-
Notifications
You must be signed in to change notification settings - Fork 0
/
code_agent.py
33 lines (26 loc) · 1.13 KB
/
code_agent.py
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
31
32
from autogen import config_list_from_json
import autogen
config_list = config_list_from_json(env_or_file='OAI_CONFIG.json')
llm_config = {
"config_list": config_list,
"seed": 42,
"request_timeout": 100,
}
user_proxy = autogen.UserProxyAgent(name='UserProxy',
system_message="A human admin who will give the idea and run the code provided by Coder.",
code_execution_config={"last_n_messages": 2, "work_dir": "group_chat"},
human_input_mode="ALWAYS",)
coder = autogen.AssistantAgent(
name='Coder',
llm_config=llm_config
)
project_manager = autogen.AssistantAgent(
name='ProjectManager',
system_message="You will help me break down the project into smaller tasks and assign them to the team members.",
llm_config=llm_config
)
groupchat = autogen.GroupChat(
agents=[user_proxy, coder, project_manager], messages=[]
)
manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)
user_proxy.initiate_chat(manager, message="Build a classic & basic ASP.NET MVC application. query the data")