Created
July 21, 2024 11:53
-
-
Save bizrockman/b15e58d071b167010bb6aeb8a54ed6b6 to your computer and use it in GitHub Desktop.
AutoGen - Einfaches Beispiel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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