langchain/docs/use_cases/agent_simulations
mbchang 628e93a9a0
docs: simplification of two agent d&d simulation (#3550)
Simplifies the [Two Agent
D&D](https://python.langchain.com/en/latest/use_cases/agent_simulations/two_player_dnd.html)
example with a cleaner, simpler interface that is extensible for
multiple agents.

`DialogueAgent`:
- `send()`: applies the chatmodel to the message history and returns the
message string
- `receive(name, message)`: adds the `message` spoken by `name` to
message history

The `DialogueSimulator` class takes a list of agents. At each step, it
performs the following:
1. Select the next speaker
2. Calls the next speaker to send a message 
3. Broadcasts the message to all other agents
4. Update the step counter.
The selection of the next speaker can be implemented as any function,
but in this case we simply loop through the agents.
2023-04-25 16:10:32 -07:00
..
camel_role_playing.ipynb Agents 4 18 (#3122) 2023-04-18 21:41:03 -07:00
characters.ipynb Move Generative Agent definition to Experimental (#3245) 2023-04-23 18:32:37 -07:00
two_player_dnd.ipynb docs: simplification of two agent d&d simulation (#3550) 2023-04-25 16:10:32 -07:00