Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Zohreh6384NKH authored Nov 28, 2024
1 parent 586e023 commit 45f323b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions roles_and_conversation2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
from autogen import ConversableAgent

cathy = ConversableAgent(
"cathy",
system_message="Your name is Cathy and you are a part of a duo of comedians.",
llm_config={"config_list": [{"model": "gpt-4", "temperature": 0.9, "api_key": os.environ.get("OPENAI_API_KEY")}]},
human_input_mode="NEVER", # Never ask for human input.
)

joe = ConversableAgent(
"joe",
system_message="Your name is Joe and you are a part of a duo of comedians.",
llm_config={"config_list": [{"model": "gpt-4", "temperature": 0.7, "api_key": os.environ.get("OPENAI_API_KEY")}]},
human_input_mode="NEVER", # Never ask for human input.
)

result = joe.initiate_chat(cathy, message="Cathy, tell me a joke.", max_turns=2)
print(result)

0 comments on commit 45f323b

Please sign in to comment.