Skip to content

Instantly share code, notes, and snippets.

@john-adeojo
Last active November 8, 2023 00:39
Show Gist options
  • Save john-adeojo/8b514631ae8cfd069487767cdfdf63d1 to your computer and use it in GitHub Desktop.
Save john-adeojo/8b514631ae8cfd069487767cdfdf63d1 to your computer and use it in GitHub Desktop.
# Assign the tools to the user proxy agent
user_proxy.register_function(
function_map={
"search_and_index_wikipedia": search_and_index_wikipedia,
"query_wiki_index":query_wiki_index,
}
)
# Assign all the agents to the group chat
groupchat = autogen.GroupChat(
agents=[user_proxy, analyst, reporter, moderator],
messages=[],
max_round=20
)
# Define the group chat manager.
manager = autogen.GroupChatManager(
groupchat=groupchat,
llm_config=llm_config,
system_message='''You should start the workflow by consulting the analyst,
then the reporter and finally the moderator.
If the analyst does not use both the `search_and_index_wikipedia`
and the `query_wiki_index`, you must request that it does.'''
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment