Assistants API + AutoGen + Multi Agents

parmarjatin4911@gmail.com - Jan 28 - - Dev Community

Assistants API + AutoGen + Multi Agents

import autogen
from autogen.agentchat.contrib.gpt_assistant_agent import GPTAssistantAgent
import openai

client = openai.OpenAI()

llm_config = {}

coder = GPTAssistantAgent(
name="Coder_Assistant",
instructions="""
You are an expert at writing python code to solve problems.
Reply TERMINATE when the task is solved and there is no problem
""",
llm_config=llm_config
)

analyst = GPTAssistantAgent(
name="Data_Analyst",
instructions="You are a data analyst that offers insight into data.",
llm_config=llm_config
)

user_proxy = autogen.UserProxyAgent(
name="MervinPraison",
code_execution_config={
"work_dir" : "coding",
},
system_message="Admin"
)

groupchat = autogen.GroupChat(agents=[user_proxy, coder, analyst], messages=[], max_round=10)
manager = autogen.GroupChatManager(groupchat=groupchat)

user_proxy.initiate_chat(
manager,
message="""
Get the number of issues and pull requests for the repository
'microsoft/autogen' in the past 4 weeks and
offer analyzes to the data.
You should print the data in csv format grouped by weeks.
"""
)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player