Skip to content

Commit 0cf702f

Browse files
uyffgCyrus YerobotMonkeyButler
authored
feat: replace gin with CLI (#14)
* fix: replace gin with CLI * update --------- Co-authored-by: Cyrus Ye <cyrus@CyrusdeMacBook-Pro.local> Co-authored-by: Yining Zhao <zhaoyining5445@gmail.com>
1 parent fadd43e commit 0cf702f

File tree

5 files changed

+1296
-56
lines changed

5 files changed

+1296
-56
lines changed

examples/run_chat.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@
1919

2020
async def main():
2121
"""Run a simple multi-agent conversation"""
22-
22+
2323
# Get API key from environment variable
2424
api_key = os.getenv("OPENAI_API_KEY")
2525
if not api_key:
2626
print("Warning: OPENAI_API_KEY not set. Some features may not work.")
27-
27+
2828
# Create chat server
2929
server = ChatServer(api_key=api_key)
30-
30+
3131
# Define agent configurations
3232
agent_configs = [
3333
{
3434
"name": "Alice",
3535
"type": "llm",
3636
"model": "gpt-4o-mini",
37-
"goal": "Be friendly and helpful in the conversation"
37+
"goal": "Be friendly and helpful in the conversation",
3838
},
3939
{
40-
"name": "Bob",
40+
"name": "Bob",
4141
"type": "llm",
4242
"model": "gpt-4o-mini",
43-
"goal": "Ask thoughtful questions and share interesting ideas"
44-
}
43+
"goal": "Ask thoughtful questions and share interesting ideas",
44+
},
4545
]
46-
46+
4747
# Create a simple background
4848
background = ChatBackground(
4949
scenario="Two friends meeting at a coffee shop",
@@ -52,20 +52,20 @@ async def main():
5252
p1_goal="Have a pleasant conversation about weekend plans",
5353
p2_goal="Discuss recent books and outdoor activities",
5454
p1_name="Alice",
55-
p2_name="Bob"
55+
p2_name="Bob",
5656
)
57-
57+
5858
print("Starting multi-agent conversation...")
5959
print("=" * 50)
60-
60+
6161
# Run the conversation
6262
await server.run_conversation(
6363
agent_configs=agent_configs,
6464
background=background,
6565
max_turns=10,
66-
enable_evaluation=True
66+
enable_evaluation=True,
6767
)
6868

6969

7070
if __name__ == "__main__":
71-
asyncio.run(main())
71+
asyncio.run(main())

0 commit comments

Comments
 (0)