Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions website/snippets/python-examples/sequentialchat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,25 @@ chat_results = teacher.initiate_chats(
[
{
"recipient": lesson_curriculum,
"message": "Let's create a science lesson, what's a good topic?",
"message": [
{"content": "Let's create a science lesson, what's a good topic?", "role": "user"}
],
"max_turns": 1,
"summary_method": "last_msg",
},
{
"recipient": lesson_planner,
"message": "Create a lesson plan.",
"message": [
{"content": "Create a lesson plan.", "role": "user"}
],
"max_turns": 2, # One revision
"summary_method": "last_msg",
},
{
"recipient": lesson_formatter,
"message": "Format the lesson plan.",
"message": [
{"content": "Format the lesson plan.", "role": "user"}
],
"max_turns": 1,
"summary_method": "last_msg",
},
Expand All @@ -88,3 +94,4 @@ print("\n\nCurriculum summary:\n", chat_results[0].summary)
print("\n\nLesson Planner summary:\n", chat_results[1].summary)
print("\n\nFormatter summary:\n", chat_results[2].summary)
```

3 changes: 2 additions & 1 deletion website/snippets/python-examples/swarmgroupchat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ teacher = ConversableAgent(
result, _, _ = initiate_swarm_chat(
initial_agent=teacher,
agents=[lesson_planner, lesson_reviewer, teacher],
messages="Today, let's introduce our kids to the solar system.",
messages=[{"content": "Today, let's introduce our kids to the solar system.", "role": "user"}],
max_rounds=10,
swarm_manager_args={"llm_config": llm_config},
after_work=AfterWorkOption.SWARM_MANAGER
)
```