Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bizrockman/b15e58d071b167010bb6aeb8a54ed6b6 to your computer and use it in GitHub Desktop.
Save bizrockman/b15e58d071b167010bb6aeb8a54ed6b6 to your computer and use it in GitHub Desktop.
AutoGen - Einfaches Beispiel
from autogen import AssistantAgent, UserProxyAgent
config_list = [
{
"model": "gpt-4o",
"api_key": "sk-...",
}
]
assistant = AssistantAgent(
name="assistant",
llm_config={"config_list": config_list}
)
user_proxy = UserProxyAgent(
name="user_proxy",
human_input_mode="ALWAYS",
code_execution_config={
"last_n_messages": 2,
"work_dir": "tasks",
"use_docker": False,
}
)
user_proxy.initiate_chat(assistant, message="Plot a chart of META and TESLA stock price change YTD.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment