Generative AI

The broad Gailor of the Improving Coduction Codes of Round-Robin Agent Multi with Microsoft Autogen

In this study, we showed how Microsoft is a Microsoft framework is framework for internship developers By softening Aurogen's RoundroupChat and TeamTool Abstriced, like investigators, films, FieldCheckers, Electronic Programs, and output, which allows you to focus on Agele technology and software Together or quick chains.

!pip install -q autogen-agentchat[gemini] autogen-ext[openai] nest_asyncio

We include Autogen Agentchat Package, Opema Support, Opelai Facilities According to API, and Nest_asyncio Library drafting the booklet,

import os, nest_asyncio
from getpass import getpass


nest_asyncio.apply()
os.environ["GEMINI_API_KEY"] = getpass("Enter your Gemini API key: ")

We invite and use the nest_asyncio to enable the loops of the tables placed in the numbers, and allow your Gemini API key using Grass and save it to the Model Client Client Client Client CLIENT ACCESS.

from autogen_ext.models.openai import OpenAIChatCompletionClient


model_client = OpenAIChatCompletionClient(
    model="gemini-1.5-flash-8b",    
    api_key=os.environ["GEMINI_API_KEY"],
    api_type="google",
)

We start the corresponding component chat points to Gemino's Gemini by specifying the Gemini-1.5-flash-8B model, and to place the API_Type, to give you a Dowstream Autogen Agents.

from autogen_agentchat.agents import AssistantAgent


researcher   = AssistantAgent(name="Researcher", system_message="Gather and summarize factual info.", model_client=model_client)
factchecker  = AssistantAgent(name="FactChecker", system_message="Verify facts and cite sources.",       model_client=model_client)
critic       = AssistantAgent(name="Critic",    system_message="Critique clarity and logic.",         model_client=model_client)
summarizer   = AssistantAgent(name="Summarizer",system_message="Condense into a brief executive summary.", model_client=model_client)
editor       = AssistantAgent(name="Editor",    system_message="Polish language and signal APPROVED when done.", model_client=model_client)

It describes five special agencies, researcher, criticism, Slemini-Power System Client, synchronization, and Polish language within the Autogen work.

from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.conditions import MaxMessageTermination, TextMentionTermination


max_msgs = MaxMessageTermination(max_messages=20)
text_term = TextMentionTermination(text="APPROVED", sources=["Editor"])
termination = max_msgs | text_term                                    
team = RoundRobinGroupChat(
    participants=[researcher, factchecker, critic, summarizer, editor],
    termination_condition=termination
)

We import a RoundrobgroupChat section and two conditions to eliminate, and write fireworks after 20 messages or when the planning editor holds “approval.” Finally, it turns off the round of robin five special agents and that integrated termination, to enable them to travel through research, truth, summaries, summarizing until one of the stop situations.

from autogen_agentchat.tools import TeamTool


deepdive_tool = TeamTool(team=team, name="DeepDive", description="Collaborative multi-agent deep dive")

We threaten our RoundroBingroupChat team called the “Deepdeve” called a man's reader, successfully packing all workout activities that have unemployment tools that do not have unnecessary tools.

host = AssistantAgent(
    name="Host",
    model_client=model_client,
    tools=[deepdive_tool],
    system_message="You have access to a DeepDive tool for in-depth research."
)

We create an agent for “caught” prepared for Gemini-powered Model_Client, provided a deep-based research team tool.

import asyncio


async def run_deepdive(topic: str):
    result = await host.run(task=f"Deep dive on: {topic}")
    print("🔍 DeepDive result:n", result)
    await model_client.close()


topic = "Impacts of Model Context Protocl on Agentic AI"
loop = asyncio.get_event_loop()
loop.run_until_complete(run_deepdive(topic))

Finally, we explain the Asynchronous work Run_Deepdive Agency to issue a deep group's agent in the article given, print the full result, and then close the Model Client; Then it catches an existing asyncio asyncio and conducting Coroutine to get the seamstress, sync.

At the conclusion, including Google Gemini with autogen's Open Customer Client and threatening our multi-alent team as the potent teamtool is a powerful temple. Autogen Abstracts After Loop Management (with Nest_asyncio), broadcasting answers, and the dissolution of mind, to enable us to immediately cross the agents and the full orchestaration. This developed method has directed the development of AI cooperation programs and lays the basis for extending return pipelines, dynamic sterns, or conditional development strategies.


See a letter of writing here. All credit for this study goes to research for this project. Also, feel free to follow it Sane and don't forget to join ours 95k + ml subreddit Then sign up for Our newspaper.


Asphazzaq is a Markteach Media Inc. According to a View Business and Developer, Asifi is committed to integrating a good social intelligence. His latest attempt is launched by the launch of the chemistrylife plan for an intelligence, MarktechPost, a devastating intimate practice of a machine learning and deep learning issues that are clearly and easily understood. The platform is adhering to more than two million moon visits, indicating its popularity between the audience.

Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button