Skip to content

Commit

Permalink
Fix link to samples (#4933)
Browse files Browse the repository at this point in the history
* Fix link to samples

* fix readme

---------

Co-authored-by: Jack Gerrits <[email protected]>
  • Loading branch information
ekzhu and jackgerrits authored Jan 8, 2025
1 parent ad12364 commit b850dcd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
],
Expand All @@ -222,4 +222,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
35 changes: 6 additions & 29 deletions python/samples/core_async_human_in_the_loop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit b850dcd

Please sign in to comment.