Skip to content

Commit

Permalink
Update README.md - add more information about using Azure OpenAI serv…
Browse files Browse the repository at this point in the history
…ices (#4253)

* Update README.md

Add more information about using Azure OpenAI services

* Update README.md

Adjust the formatting to improve readability of the steps, making them easier to follow.

---------

Co-authored-by: Hussein Mozannar <[email protected]>
  • Loading branch information
genlin and husseinmozannar authored Nov 23, 2024
1 parent caeab68 commit c9835f3
Showing 1 changed file with 16 additions and 8 deletions.
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

0 comments on commit c9835f3

Please sign in to comment.