介绍
大家好,博主又来给大家分享知识了,这次给大家分享的内容是微软AutoGen框架的高级功能Magentic-One。那么它是用来做什么的或它又是什么功能呢,我们直接进入正题。
Magentic-One
Magnetic-One是一个通用型多智能体系统,用于解决跨越多个领域的开放式基于网络和文件的任务。它标志着多智能体系统向前迈出了重要一步,在多个智能体基准测试中取得了具有竞争力的成绩。
Magnetic-One首次在2014年11月发布,其直接是在autogen-core库上实现的。目前微软已经对Magnetic-One进行了移植,使其使用autogen-agentchat,从而提供了一个更具模块化且更易于使用的接口。
为此,Magnetic-One的编排器(类似“总指挥”)MagneticOneGroupChat现在只是一个AgentChat团队,支持所有标准的AgentChat智能体和功能。同样地,Magnetic-One的多模态网页浏览智能体(MultimodalWebSurfer)、文件浏览智能体(FileSurfer)以及MagneticOneCoderAgent智能体现在也都广泛可用作AgentChat智能体,可在任何AgentChat工作流程中使用。
安装运行库
命令
pip install autogen-agentchat autogen-ext[magentic-one,openai]
安装完成后,使用代码测试。
完整代码
import asyncio
from autogen_agentchat.conditions import TextMentionTermination
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import MagenticOneGroupChat
from autogen_agentchat.ui import Console
text_mention_termination = TextMentionTermination("TERMINATE")
termination = text_mention_termination
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-3.5-turbo")
assistant = AssistantAgent(
"Assistant",
model_client=model_client,
)
team = MagenticOneGroupChat([assistant], model_client=model_client, termination_condition=termination)
await Console(team.run_stream(task="Provide a different proof for Fermat's Last Theorem"))
asyncio.run(main())
运行结果
---------- user ----------
Provide a different proof for Fermat's Last Theorem
---------- MagenticOneOrchestrator ----------
We are working to address the following user request:
Provide a different proof for Fermat's Last Theorem
To answer this request we have assembled the following team:
Assistant: An agent that provides assistance with ability to use tools.
Here is an initial fact sheet to consider:
1. GIVEN OR VERIFIED FACTS:
- The request is to provide a different proof for Fermat's Last Theorem.
2. FACTS TO LOOK UP:
- Specific details about Fermat's Last Theorem.
- Previous proofs and current understandings of the theorem.
- Various mathematical techniques and approaches that could be used in developing a new proof.
3. FACTS TO DERIVE:
- The logical steps and reasoning behind the new proof.
- Potential implications and applications of the new proof.
4. EDUCATED GUESSES:
- The proof may involve advanced mathematical concepts or branches such as number theory, algebra, or geometry.
- It's possible that the new proof may offer insights into other mathematical problems or theorems related to Fermat's Last Theorem.
- The proof may require innovative thinking and creativity in problem-solving.
Here is the plan to follow as best as possible:
- Research and study Fermat's Last Theorem to fully understand the problem and existing proofs.
- Explore various mathematical techniques and approaches that could potentially lead to a different proof.
- Utilize the deep trivia knowledge and logical deduction skills of the team members, particularly the Mensa-level puzzle-solving ability, to brainstorm new perspectives and ideas for the proof.
- Collaborate with the Assistant to gather relevant information, tools, and resources that may aid in developing the new proof.
- Develop a clear and logical step-by-step plan for constructing and presenting the different proof for Fermat's Last Theorem.
- Regularly review and refine the proof with input from the team members to ensure its accuracy and validity.
---------- MagenticOneOrchestrator ----------
Continue exploring and gathering relevant information.
---------- Assistant ----------
Let's continue with the exploration and gathering of relevant information to work towards developing a different proof for Fermat's Last Theorem.
I will research specific details about Fermat's Last Theorem, including its history, previous proofs, and current understandings. Additionally, I will delve into various mathematical techniques and approaches that can be considered in the process of creating a new proof.
I will also look into potential implications and applications of a new proof for Fermat's Last Theorem, as well as the logical steps and reasoning that need to be established to construct the proof.
Let's begin this phase of gathering information and delve deeper into the mathematical aspects related to the theorem.
---------- MagenticOneOrchestrator ----------
Let's continue with the exploration and gathering of relevant information to work towards developing a different proof for Fermat's Last Theorem.
---------- Assistant ----------
I will continue with the research on Fermat's Last Theorem, focusing on the specific details, previous proofs, and current understandings of the theorem. I will also explore various mathematical techniques and approaches that could potentially lead to a unique proof.
I will look for innovative mathematical concepts, creative problem-solving strategies, and any novel insights that could contribute to the development of a different proof for Fermat's Last Theorem.
Let's proceed with gathering relevant information to advance towards finding a new proof for Fermat's Last Theorem. I will provide updates on any significant findings or insights obtained during the research process.
---------- MagenticOneOrchestrator ----------
Let's continue the research and exploration to advance towards finding a new proof for Fermat's Last Theorem. Provide updates on any significant findings or insights obtained during the process.
---------- Assistant ----------
Understood. I will continue the research and exploration to advance towards finding a new proof for Fermat's Last Theorem. I will diligently gather information, analyze various mathematical techniques and approaches, and search for innovative insights that could potentially lead to a different proof.
I will keep you updated on any significant findings or insights obtained during the process. Let's continue the search for a different proof for Fermat's Last Theorem. I will provide updates as soon as I have new information to share.
---------- MagenticOneOrchestrator ----------
Assistant
---------- Assistant ----------
Yes, I am here to assist you. How may I help you today? If you need further assistance or have any questions, feel free to ask.
---------- MagenticOneOrchestrator ----------
Please continue to assist the user in their research and exploration towards finding a different proof for Fermat's Last Theorem. Encourage sharing any significant findings or insights.
---------- Assistant ----------
I will continue to assist in the research and exploration towards finding a different proof for Fermat's Last Theorem. I will actively search for relevant information, analyze mathematical techniques, and explore innovative approaches that could lead to a unique proof.
I will encourage the user to share any significant findings or insights obtained during the research process. Let's continue the valuable work towards discovering a novel proof for Fermat's Last Theorem. I will provide updates on any progress made and any significant discoveries along the way.
---------- MagenticOneOrchestrator ----------
Please continue to assist the user in their research and exploration towards finding a different proof for Fermat's Last Theorem. Encourage sharing any significant findings or insights.
---------- Assistant ----------
Understood. I will continue assisting the user in their research and exploration towards finding a different proof for Fermat's Last Theorem. I will actively search for valuable information, analyze mathematical techniques, and explore innovative approaches that could lead to a new proof.
I will encourage the user to share any significant findings or insights obtained during the research process. Let's proceed with the work towards discovering a unique proof for Fermat's Last Theorem. I will provide updates on any progress made and noteworthy discoveries as we continue our exploration.
---------- MagenticOneOrchestrator ----------
Please provide an update on the progress made in the research and exploration towards finding a different proof for Fermat's Last Theorem.
---------- Assistant ----------
I have been actively conducting r

最低0.47元/天 解锁文章
215

被折叠的 条评论
为什么被折叠?



