-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the docs and sync with dev (#166)
* git ignore * add nextra site * change path to docs * Add installation instruction (#76) * fix an accordion bug * Add tabs for choosing platform in Redis Instructions * bump the version, test release to PyPi * Update README.md * Update README.md * Update README.md * add platform tab * updated open in colab instruction * bumpy version to 0.0.9 * Update Sotopia presentation information in README.md * bump version to 0.0.10 * bump version * update agents * add merge release back to main action * change checkout v4->v3 * fix merge-back-to-main and pin mypy to <1.11.0 * better visual and new installation guide * update first sentence * improve first sentence * examples in menu * add docs * chore: Update documentation and remove unused files * update generation doc * update database documentation * update database * update readme --------- Co-authored-by: Hao <prokilchu@gmail.com>
- Loading branch information
Showing
23 changed files
with
453 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,23 @@ | ||
{ | ||
"index": { | ||
"type": "page", | ||
"title": "Home" | ||
}, | ||
"contribution_menu": { | ||
"title": "Documentation", | ||
"type": "menu", | ||
"items": { | ||
"agents": { | ||
"title": "Agents", | ||
"href": "/agents" | ||
}, | ||
"environments": { | ||
"title": "Environments", | ||
"href": "/environments" | ||
}, | ||
"examples": { | ||
"title": "Examples", | ||
"href": "/examples" | ||
}, | ||
"hyperparameters": { | ||
"title": "Hyperparameters", | ||
"href": "/hyperparameters" | ||
}, | ||
"scripts": { | ||
"title": "Scripts", | ||
"href": "/scripts" | ||
}, | ||
"xml": { | ||
"title": "XML Formatter", | ||
"href": "/xml" | ||
|
||
} | ||
"title": "Introduction", | ||
"theme": { | ||
"breadcrumb": true | ||
} | ||
}, | ||
"---": { | ||
"type": "separator" | ||
}, | ||
"concepts": { | ||
"title": "Concepts", | ||
"type": "page" | ||
}, | ||
"examples": { | ||
"title": "Examples", | ||
"type": "page" | ||
}, | ||
"contribution": { | ||
"title": "Contribution", | ||
"type": "page" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
## Agents | ||
Sotopia supports a variety of agents that can support social simulations for a variety of purposes. | ||
|
||
### LLMAgent | ||
|
||
LLMAgent is the core agent that is powered by a large language model | ||
```python | ||
class LLMAgent(BaseAgent[Observation, AgentAction]): | ||
def __init__( | ||
self, | ||
agent_name: str | None = None, | ||
uuid_str: str | None = None, | ||
agent_profile: AgentProfile | None = None, | ||
model_name: str = "gpt-3.5-turbo", | ||
script_like: bool = False, | ||
) -> None: | ||
``` | ||
|
||
### ScriptWritingAgent | ||
Script Writing Agent is an agent that is specialized in writing scripts of social interactions. It is a subclass of LLMAgent and supports the investigation of [*Is this the real life? Is this just fantasy? The Misleading Success of Simulating Social Interactions With LLMs*](https://arxiv.org/abs/2403.05020) | ||
|
||
```python | ||
class ScriptWritingAgent(LLMAgent): | ||
def __init__( | ||
self, | ||
agent_name: str | None = None, | ||
uuid_str: str | None = None, | ||
agent_profile: AgentProfile | None = None, | ||
model_name: str = "gpt-3.5-turbo", | ||
agent_names: list[str] = [], | ||
background: ScriptBackground | None = None, | ||
) -> None: | ||
``` | ||
|
||
### HumanAgent | ||
This agent allows for human input to be used in the simulation through the command line. | ||
```python | ||
class HumanAgent(BaseAgent[Observation, AgentAction]): | ||
""" | ||
A human agent that takes input from the command line. | ||
""" | ||
|
||
def __init__( | ||
self, | ||
agent_name: str | None = None, | ||
uuid_str: str | None = None, | ||
agent_profile: AgentProfile | None = None, | ||
) -> None: | ||
super().__init__( | ||
agent_name=agent_name, | ||
uuid_str=uuid_str, | ||
agent_profile=agent_profile, | ||
) | ||
self.model_name: LLM_Name = "human" | ||
``` | ||
|
||
### RedisAgent | ||
|
||
RedisAgent is an agent that can be used to interact with the Redis database. | ||
```python | ||
class RedisAgent(BaseAgent[Observation, AgentAction]): | ||
"""An agent use redis as a message broker.""" | ||
|
||
def __init__( | ||
self, | ||
agent_name: str | None = None, | ||
uuid_str: str | None = None, | ||
session_id: str | None = None, | ||
agent_profile: AgentProfile | None = None, | ||
) -> None: | ||
``` |
Oops, something went wrong.