Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md - add more information about using Azure OpenAI services #4253

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions python/packages/autogen-magentic-one/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,24 @@ You can install the Magentic-One package and then run the example code to see ho
uv sync --all-extras
source .venv/bin/activate
```
Install magentic-one from source:
For Windows, run `.venv\Scripts\activate` to activate the environment.

2. Install magentic-one from source:
```bash
cd packages/autogen-magentic-one
pip install -e .
```

The following instructions are for running the example code:

The following instructions are for running the example code:

2. Configure the environment variables for the chat completion client. See instructions below [Environment Configuration for Chat Completion Client](#environment-configuration-for-chat-completion-client).
3. Magentic-One code uses code execution, you need to have [Docker installed](https://docs.docker.com/engine/install/) to run any examples.
4. Magentic-One uses playwright to interact with web pages. You need to install the playwright dependencies. Run the following command to install the playwright dependencies:
3. Configure the environment variables for the chat completion client. See instructions below [Environment Configuration for Chat Completion Client](#environment-configuration-for-chat-completion-client).
4. Magentic-One code uses code execution, you need to have [Docker installed](https://docs.docker.com/engine/install/) to run any examples.
5. Magentic-One uses playwright to interact with web pages. You need to install the playwright dependencies. Run the following command to install the playwright dependencies:

```bash
playwright install --with-deps chromium
```
5. Now you can run the example code to see how the agents work together to accomplish a task.
6. Now you can run the example code to see how the agents work together to accomplish a task.

> [!CAUTION]
> The example code may download files from the internet, execute code, and interact with web pages. Ensure you are in a safe environment before running the example code.
Expand All @@ -108,7 +110,7 @@ playwright install --with-deps chromium
- hil_mode: (Optional) Enable human-in-the-loop mode (default: disabled)
- save_screenshots: (Optional) Save screenshots of browser (default: disabled)

6. [Preview] We have a preview API for Magentic-One.
7. [Preview] We have a preview API for Magentic-One.
You can use the `MagenticOneHelper` class to interact with the system and stream logs. See the [interface README](interface/README.md) for more details.


Expand Down Expand Up @@ -139,6 +141,12 @@ To configure for Azure OpenAI service, set the following environment variables:
}
```

This project uses Azure OpenAI service with [Entra ID authentcation by default](https://learn.microsoft.com/azure/ai-services/openai/how-to/managed-identity). If you run the examples on a local device, you can use the Azure CLI cached credentials for testing:

Log in to Azure using `az login`, and then run the examples. The account used must have [RBAC permissions](https://learn.microsoft.com/azure/ai-services/openai/how-to/role-based-access-control) like `Azure Cognitive Services OpenAI User` for the OpenAI service; otherwise, you will receive the error: Principal does not have access to API/Operation.

Note that even if you are the owner of the subscription, you still need to grant the necessary Azure Cognitive Services OpenAI permissions to call the API.

### With OpenAI

To configure for OpenAI, set the following environment variables:
Expand Down
Loading