Skip to content
Open
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
6 changes: 5 additions & 1 deletion sdk/ai/azure-ai-projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ with (
credential=credential
) as project_client,
):
# Use project_client here; the context manager closes it on exit.
...
```

To construct an asynchronous client, install the additional package [aiohttp](https://pypi.org/project/aiohttp/):
Expand All @@ -127,6 +129,8 @@ async with (
credential=credential
) as project_client,
):
# Use project_client here; the context manager closes it on exit.
...
Comment thread
kkchandi marked this conversation as resolved.
```
### Performing Responses operations using OpenAI client

Expand Down Expand Up @@ -242,7 +246,7 @@ import sys
import logging

# Acquire the logger for this client library. Use 'azure' to affect both
# `azure.core` and `azure.ai.projects' libraries.
# `azure.core` and `azure.ai.projects` libraries.
logger = logging.getLogger("azure")

# Set the desired logging level. logging.INFO or logging.DEBUG are good options.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
pip install "azure-ai-projects>=2.0.0" azure-identity python-dotenv

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found in the overview page of your
1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found in the overview page of your
Microsoft Foundry project. It has the form: https://<account_name>.services.ai.azure.com/api/projects/<project_name>.
2) AZURE_AI_MODEL_DEPLOYMENT_NAME - Required. The name of the model deployment to use for evaluation.
3) AZURE_AI_MODEL_DEPLOYMENT_NAME_FOR_AUDIO - Required. The name of the model deployment for audio to use for evaluation, recommend to use "gpt-4o-audio-preview"
2) FOUNDRY_MODEL_NAME - Required. The name of the model deployment to use for evaluation.
3) FOUNDRY_MODEL_NAME_FOR_AUDIO - Required. The name of the model deployment for audio to use for evaluation, recommend to use "gpt-4o-audio-preview"
"""

import base64
Expand All @@ -48,9 +48,9 @@
file_path = os.path.abspath(__file__)
folder_path = os.path.dirname(file_path)

endpoint = os.environ["AZURE_AI_PROJECT_ENDPOINT"]
model_deployment_name = os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"]
model_deployment_name_for_audio = os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME_FOR_AUDIO"]
endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
model_deployment_name = os.environ["FOUNDRY_MODEL_NAME"]
model_deployment_name_for_audio = os.environ["FOUNDRY_MODEL_NAME_FOR_AUDIO"]


def audio_to_base64(audio_path: str) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
pip install "azure-ai-projects>=2.0.0" azure-identity python-dotenv

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found in the overview page of your
1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found in the overview page of your
Microsoft Foundry project. It has the form: https://<account_name>.services.ai.azure.com/api/projects/<project_name>.
2) AZURE_AI_MODEL_DEPLOYMENT_NAME - Required. The name of the model deployment to use for evaluation.
3) AZURE_AI_MODEL_DEPLOYMENT_NAME_FOR_AUDIO - Required. The name of the model deployment for audio to use for evaluation, recommend to use "gpt-4o-audio-preview"
2) FOUNDRY_MODEL_NAME - Required. The name of the model deployment to use for evaluation.
3) FOUNDRY_MODEL_NAME_FOR_AUDIO - Required. The name of the model deployment for audio to use for evaluation, recommend to use "gpt-4o-audio-preview"
"""

import base64
Expand All @@ -47,9 +47,9 @@
file_path = os.path.abspath(__file__)
folder_path = os.path.dirname(file_path)

endpoint = os.environ["AZURE_AI_PROJECT_ENDPOINT"]
model_deployment_name = os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"]
model_deployment_name_for_audio = os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME_FOR_AUDIO"]
endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
model_deployment_name = os.environ["FOUNDRY_MODEL_NAME"]
model_deployment_name_for_audio = os.environ["FOUNDRY_MODEL_NAME_FOR_AUDIO"]


def audio_to_base64(audio_path: str) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
pip install "azure-ai-projects>=2.0.0" azure-identity python-dotenv Pillow

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found in the overview page of your
1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found in the overview page of your
Microsoft Foundry project. It has the form: https://<account_name>.services.ai.azure.com/api/projects/<project_name>.
2) AZURE_AI_MODEL_DEPLOYMENT_NAME - Required. The name of the model deployment to use for evaluation.
2) FOUNDRY_MODEL_NAME - Required. The name of the model deployment to use for evaluation.
"""

import base64
Expand All @@ -47,8 +47,8 @@
file_path = os.path.abspath(__file__)
folder_path = os.path.dirname(file_path)

endpoint = os.environ["AZURE_AI_PROJECT_ENDPOINT"]
model_deployment_name = os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"]
endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
model_deployment_name = os.environ["FOUNDRY_MODEL_NAME"]


def image_to_data_uri(image_file_path: str) -> str:
Expand Down
Loading