Skip to content

Commit f454d84

Browse files
authored
Beta 5 release of azure-ai-projects SDK (Azure#38968)
1 parent 52ad05e commit f454d84

File tree

76 files changed

+2606
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2606
-451
lines changed

sdk/ai/azure-ai-projects/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Release History
22

3+
## 1.0.0b5 (2025-01-17)
4+
5+
### Features added
6+
7+
* Add method `.inference.get_image_embeddings_client` on `AIProjectClient` to get an authenticated
8+
`ImageEmbeddingsClient` (from the package azure-ai-inference). You need to have azure-ai-inference package
9+
version 1.0.0b7 or above installed for this method to work.
10+
11+
### Bugs Fixed
12+
13+
* Fix for events dropped in streamed Agent response (see [GitHub issue 39028](https://github.com/Azure/azure-sdk-for-python/issues/39028)).
14+
* In Agents, incomplete status thread run event is now deserialized into a ThreadRun object, during stream iteration, and invokes the correct function `on_thread_run` (instead of the wrong function `on_unhandled_event`).
15+
* Fix an error when calling the `to_evaluator_model_config` method of class `ConnectionProperties`. See new input
16+
argument `include_credentials`.
17+
18+
### Breaking Changes
19+
20+
* `submit_tool_outputs_to_run` returns `None` instead of `ThreadRun` (see [GitHub issue 39028](https://github.com/Azure/azure-sdk-for-python/issues/39028)).
21+
322
## 1.0.0b4 (2024-12-20)
423

524
### Bugs Fixed

sdk/ai/azure-ai-projects/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ print(connection)
187187

188188
### Get an authenticated ChatCompletionsClient
189189

190-
Your Azure AI Foundry project may have one or more AI models deployed that support chat completions. These could be OpenAI models, Microsoft models, or models from other providers. Use the code below to get an already authenticated [ChatCompletionsClient](https://learn.microsoft.com/python/api/azure-ai-inference/azure.ai.inference.chatcompletionsclient?view=azure-python-preview) from the [azure-ai-inference](https://pypi.org/project/azure-ai-inference/) package, and execute a chat completions call.
190+
Your Azure AI Foundry project may have one or more AI models deployed that support chat completions. These could be OpenAI models, Microsoft models, or models from other providers. Use the code below to get an already authenticated [ChatCompletionsClient](https://learn.microsoft.com/python/api/azure-ai-inference/azure.ai.inference.chatcompletionsclient) from the [azure-ai-inference](https://pypi.org/project/azure-ai-inference/) package, and execute a chat completions call.
191191

192192
First, install the package:
193193

@@ -208,7 +208,7 @@ response = inference_client.complete(
208208
print(response.choices[0].message.content)
209209
```
210210

211-
See the "inference" folder in the [package samples][samples] for additional samples, including getting an authenticated [EmbeddingsClient](https://learn.microsoft.com/python/api/azure-ai-inference/azure.ai.inference.embeddingsclient?view=azure-python-preview).
211+
See the "inference" folder in the [package samples][samples] for additional samples, including getting an authenticated [EmbeddingsClient](https://learn.microsoft.com/python/api/azure-ai-inference/azure.ai.inference.embeddingsclient) and [ImageEmbeddingsClient](https://learn.microsoft.com/python/api/azure-ai-inference/azure.ai.inference.imageembeddingsclient).
212212

213213
### Get an authenticated AzureOpenAI client
214214

@@ -844,6 +844,15 @@ with project_client.agents.create_stream(
844844

845845
As you can see, this SDK parses the events and produces various event types similar to OpenAI assistants. In your use case, you might not be interested in handling all these types and may decide to parse the events on your own. To achieve this, please refer to [override base event handler](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/samples/agents/sample_agents_stream_with_base_override_eventhandler.py).
846846

847+
```
848+
Note: Multiple streaming processes may be chained behind the scenes.
849+
850+
When the SDK receives a `ThreadRun` event with the status `requires_action`, the next event will be `Done`, followed by termination. The SDK will submit the tool calls using the same event handler. The event handler will then chain the main stream with the tool stream.
851+
852+
Consequently, when you iterate over the streaming using a for loop similar to the example above, the for loop will receive events from the main stream followed by events from the tool stream.
853+
```
854+
855+
847856
#### Retrieve Message
848857

849858
To retrieve messages from agents, use the following example:
@@ -1070,7 +1079,7 @@ Make sure to install OpenTelemetry and the Azure SDK tracing plugin via
10701079

10711080
```bash
10721081
pip install opentelemetry
1073-
pip install azure-core-tracing-opentelemetry
1082+
pip install azure-ai-projects azure-identity opentelemetry-sdk azure-core-tracing-opentelemetry
10741083
```
10751084

10761085
You will also need an exporter to send telemetry to your observability backend. You can print traces to the console or use a local viewer such as [Aspire Dashboard](https://learn.microsoft.com/dotnet/aspire/fundamentals/dashboard/standalone?tabs=bash).
@@ -1218,5 +1227,5 @@ additional questions or comments.
12181227
[pip]: https://pypi.org/project/pip/
12191228
[azure_sub]: https://azure.microsoft.com/free/
12201229
[evaluators]: https://learn.microsoft.com/azure/ai-studio/how-to/develop/evaluate-sdk
1221-
[azure_ai_evaluation]: https://learn.microsoft.com/python/api/overview/azure/ai-evaluation-readme?view=azure-python-preview
1230+
[azure_ai_evaluation]: https://learn.microsoft.com/python/api/overview/azure/ai-evaluation-readme
12221231
[evaluator_library]: https://learn.microsoft.com/azure/ai-studio/how-to/evaluate-generative-ai-app#view-and-manage-the-evaluators-in-the-evaluator-library

sdk/ai/azure-ai-projects/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/ai/azure-ai-projects",
5-
"Tag": "python/ai/azure-ai-projects_e85eaccb70"
5+
"Tag": "python/ai/azure-ai-projects_40731b58e1"
66
}

sdk/ai/azure-ai-projects/azure/ai/projects/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b4"
9+
VERSION = "1.0.0b5"

0 commit comments

Comments
 (0)