NEW PROJ: autogen agent with magneticOne

This commit is contained in:
Madhu 2025-02-19 21:28:02 +05:30
parent fc02a7f3dd
commit 431bb6fc48
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import asyncio
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.teams.magentic_one import MagenticOne
from autogen_agentchat.ui import Console
async def example_usage():
client = OpenAIChatCompletionClient(model="gpt-4o", api_key="")
m1 = MagenticOne(client=client)
task = "Write a Python script to fetch data from an API."
result = await Console(m1.run_stream(task=task))
print(result)
if __name__ == "__main__":
asyncio.run(example_usage())

View file

@ -0,0 +1,3 @@
autogen-agentchat
autogen-ext
playwright install --with-deps chromium