Skip to content
Draft
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions python/samples/02-agents/declarative/mcp_tool_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async def run_azure_ai_example():
Prerequisites:
1. Create a Foundry connection named 'github-mcp-oauth-connection' in your
Azure AI project with OAuth credentials for GitHub
2. Set PROJECT_ENDPOINT environment variable to your Azure AI project endpoint
2. Set the FOUNDRY_PROJECT_ENDPOINT environment variable to your Foundry project endpoint
"""
print("=" * 60)
print("Example 2: Azure AI with Foundry Connection Reference")
Expand All @@ -154,7 +154,7 @@ async def main():
await run_openai_example()

# Run the Azure AI example (uncomment to run)
# Requires: Foundry connection set up and PROJECT_ENDPOINT env var
# Requires: Foundry connection set up and FOUNDRY_PROJECT_ENDPOINT env var
# await run_azure_ai_example()


Expand Down
13 changes: 4 additions & 9 deletions python/samples/02-agents/multimodal_input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,10 @@ Set the following environment variables before running the examples:
**For OpenAI:**
- `OPENAI_API_KEY`: Your OpenAI API key

**For Azure OpenAI:**
**For the Azure examples (`FoundryChatClient`):**

- `AZURE_OPENAI_ENDPOINT`: Your Azure OpenAI endpoint
- `AZURE_OPENAI_MODEL`: The name of your Azure OpenAI chat model deployment
- `AZURE_OPENAI_MODEL`: The name of your Azure OpenAI responses model deployment

Optionally for Azure OpenAI:
- `AZURE_OPENAI_API_VERSION`: The API version to use (default is `2024-10-21`)
- `AZURE_OPENAI_API_KEY`: Your Azure OpenAI API key (if not using `AzureCliCredential`)
- `FOUNDRY_PROJECT_ENDPOINT`: Your Microsoft Foundry project endpoint, for example `https://your-account.services.ai.azure.com/api/projects/your-project`
- `FOUNDRY_MODEL`: The name of your model deployment

**Note:** You can also provide configuration directly in code instead of using environment variables:
```python
Expand All @@ -51,7 +46,7 @@ client = FoundryChatClient(

## Authentication

The Azure example uses `AzureCliCredential` for authentication. Run `az login` in your terminal before running the example, or replace `AzureCliCredential` with your preferred authentication method (e.g., provide `api_key` parameter).
The Azure examples use `AzureCliCredential` for authentication. Run `az login` in your terminal before running them, or replace `AzureCliCredential` with another Azure Identity credential.

## Running the Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create_sample_image() -> str:
async def test_image() -> None:
"""Test image analysis with Azure OpenAI."""
# For authentication, run `az login` command in terminal or replace AzureCliCredential with preferred
# authentication option. Requires AZURE_OPENAI_ENDPOINT and FOUNDRY_MODEL
# authentication option. Requires FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL
# environment variables to be set.
# Alternatively, you can pass model explicitly:
# client = FoundryChatClient(credential=AzureCliCredential(), model="your-deployment-name")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def create_sample_image() -> str:
async def test_image() -> None:
"""Test image analysis with Azure OpenAI Responses API."""
# For authentication, run `az login` command in terminal or replace AzureCliCredential with preferred
# authentication option. Requires AZURE_OPENAI_ENDPOINT and FOUNDRY_MODEL
# authentication option. Requires FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL
# environment variables to be set.
# Alternatively, you can pass model explicitly:
# client = FoundryChatClient(credential=AzureCliCredential(), model="your-deployment-name")
Expand Down
Loading