From b850dcd39988db662b513de58fb5d2e0d49b6188 Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Wed, 8 Jan 2025 06:28:25 -0800 Subject: [PATCH] Fix link to samples (#4933) * Fix link to samples * fix readme --------- Co-authored-by: Jack Gerrits --- .../framework/distributed-agent-runtime.ipynb | 8 ++--- .../core_async_human_in_the_loop/README.md | 35 ++++--------------- 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/python/packages/autogen-core/docs/src/user-guide/core-user-guide/framework/distributed-agent-runtime.ipynb b/python/packages/autogen-core/docs/src/user-guide/core-user-guide/framework/distributed-agent-runtime.ipynb index bdf53792d57e..96a80a2f08cb 100644 --- a/python/packages/autogen-core/docs/src/user-guide/core-user-guide/framework/distributed-agent-runtime.ipynb +++ b/python/packages/autogen-core/docs/src/user-guide/core-user-guide/framework/distributed-agent-runtime.ipynb @@ -195,9 +195,9 @@ "# Next Steps\n", "To see complete examples of using distributed runtime, please take a look at the following samples:\n", "\n", - "- [Distributed Workers](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-core/samples/worker) \n", - "- [Distributed Semantic Router](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-core/samples/semantic_router) \n", - "- [Distributed Group Chat](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-core/samples/distributed-group-chat) \n" + "- [Distributed Workers](https://github.com/microsoft/autogen/tree/main/python/samples/core_grpc_worker_runtime) \n", + "- [Distributed Semantic Router](https://github.com/microsoft/autogen/tree/main/python/samples/core_semantic_router) \n", + "- [Distributed Group Chat](https://github.com/microsoft/autogen/tree/main/python/samples/core_distributed-group-chat) \n" ] } ], @@ -222,4 +222,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/python/samples/core_async_human_in_the_loop/README.md b/python/samples/core_async_human_in_the_loop/README.md index f1fca50c9cf0..af8d9e4a1d79 100644 --- a/python/samples/core_async_human_in_the_loop/README.md +++ b/python/samples/core_async_human_in_the_loop/README.md @@ -12,36 +12,13 @@ First, you need a shell with AutoGen core and required dependencies installed. pip install "autogen-core==0.4.0.dev13" "autogen-ext[openai,azure]==0.4.0.dev13" ``` -### Using Azure OpenAI API +### Model Configuration -For Azure OpenAI API, you need to set the following environment variables: +The model configuration should defined in a `model_config.json` file. +Use `model_config_template.json` as a template. -```bash -export OPENAI_API_TYPE=azure -export AZURE_OPENAI_API_ENDPOINT=your_azure_openai_endpoint -export AZURE_OPENAI_API_VERSION=your_azure_openai_api_version -``` - -By default, we use Azure Active Directory (AAD) for authentication. -You need to run `az login` first to authenticate with Azure. -You can also -use API key authentication by setting the following environment variables: - -```bash -export AZURE_OPENAI_API_KEY=your_azure_openai_api_key -``` - -This requires azure-identity installation: +### Running the example ```bash -pip install azure-identity -``` - -### Using OpenAI API - -For OpenAI API, you need to set the following environment variables. - -```bash -export OPENAI_API_TYPE=openai -export OPENAI_API_KEY=your_openai_api_key -``` +python main.py +``` \ No newline at end of file