diff --git a/README.md b/README.md index 8760e8caf96e..c0994b24d68f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ from autogen_ext.models.openai import OpenAIChatCompletionClient async def main() -> None: agent = AssistantAgent("assistant", OpenAIChatCompletionClient(model="gpt-4o")) - print(agent.run(task="Say 'Hello World!'")) + print(await agent.run(task="Say 'Hello World!'")) asyncio.run(main()) ``` diff --git a/python/packages/autogen-core/docs/src/index.md b/python/packages/autogen-core/docs/src/index.md index e62b398dce58..85f06bcdd3d4 100644 --- a/python/packages/autogen-core/docs/src/index.md +++ b/python/packages/autogen-core/docs/src/index.md @@ -119,7 +119,7 @@ from autogen_ext.models.openai import OpenAIChatCompletionClient async def main() -> None: agent = AssistantAgent("assistant", OpenAIChatCompletionClient(model="gpt-4o")) - print(agent.run(task="Say 'Hello World!'")) + print(await agent.run(task="Say 'Hello World!'")) asyncio.run(main()) ```