-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1_stock_joke.py
More file actions
30 lines (24 loc) · 794 Bytes
/
Copy path1_stock_joke.py
File metadata and controls
30 lines (24 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# https://microsoft.github.io/autogen/docs/Getting-Started
import os
from dotenv import load_dotenv
# For 'import autogen' to work, had to 'pip install packaging'
from autogen import AssistantAgent, UserProxyAgent
load_dotenv()
# For some reason I need proxyman running and OPENAI_BASE_URL set to http://localhost:10800/v1 for this to work 🤷♂️
llm_config = {
'model': 'gpt-4o',
'api_key': os.getenv('OPENAI_API_KEY'),
'base_url': os.getenv('OPENAI_BASE_URL') if os.getenv('OPENAI_BASE_URL') else None,
}
assistant = AssistantAgent(
'assistant',
llm_config=llm_config
)
user_proxy = UserProxyAgent(
'user_proxy',
code_execution_config=False
)
user_proxy.initiate_chat(
assistant,
message='Tell me a joke about NVDA and TESLA stock prices.',
)