Skip to content

Commit

Permalink
background as variable (sotopia-lab#137)
Browse files Browse the repository at this point in the history
* background as variable

* update docs
  • Loading branch information
XuhuiZhou authored Jul 16, 2024
1 parent 1939bc6 commit 1bdd155
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 352 deletions.
16 changes: 16 additions & 0 deletions docs/pages/generation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Generation functions

The core of generating agent action and environment observation lies in the `agenerate` function:

```python
@gin.configurable
@beartype
async def agenerate(
model_name: str,
template: str,
input_values: dict[str, str],
output_parser: BaseOutputParser[OutputType],
temperature: float = 0.7,
) -> OutputType:
input_variables = re.findall(r"(?<!{){([^{}]+)}(?!})", template)
```
Loading

0 comments on commit 1bdd155

Please sign in to comment.