NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1992 most downloaded on PyPI
Microsoft Azure AI Inference Client Library for Python
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 4 weeks
Unknown
no stable releases
Nothing withdrawn
no release was ever pulled
2 years old
9 releases · first in 2024
Added support for chat completion messages with developer role.
developer role.dict objects.load_client function or
get_model_info method fails to run on an endpoint that does not support the /info route.One column per month.
Added support for Chat Completions with audio input. See new sample sample_chat_completions_with_audio_data.py.
sample_chat_completions_with_audio_data.py.Added a client for Image Embeddings, named ImageEmbeddingsClient. See package README.md and new samples.
ImageEmbeddingsClient. See package README.md and new samples.sample_chat_completions_with_structured_output.py and
sample_chat_completions_with_structured_output_pydantic.py.content a positional argument (in addition to keyword argument), in the constructors of
UserMessage, SystemMessage, AssistantMessage and ToolMessage. For example, you no longer need to write
UserMessage(content="my message"). Simply write UserMessage("my message"). All samples were updated accordingly.ChatCompletionClient.complete() call to output JSON format without a scheme, you have this in your code: response_format=ChatCompletionsResponseFormatJSON(). To maintain the same functionality, replace this with response_format="json_object". We however recommend that you now switch to output JSON format with a provided schema if your AI model supports it: response_format=JsonSchemaFormat(...).Method AIInferenceInstrumentor().instrument() updated with an input argument enable_content_recording.
AIInferenceInstrumentor().instrument() updated with an input argument enable_content_recording.AIInferenceInstrumentor().instrument() twice no longer results in an exception.AIInferenceInstrumentor().is_content_recording_enabled()Support for OpenTelemetry tracing. Please find more information in the package README.md.
credential of type AzureKeyCredential, two HTTP request headers are sent simultaneously for authentication: Authentication: Beater <key> and api-key: <key> (previously only the first one was sent). This is to support different inference services, removing the need for the application to explicitly specify an additional HTTP request header.Support chat completion streaming response with function arguments (tool calls). Add new classes StreamingChatResponseMessageUpdate and StreamingChatR
StreamingChatResponseMessageUpdate and StreamingChatResponseToolCallUpdate.ChatCompletionsToolSelectionPreset, ChatCompletionsNamedToolSelection and ChatCompletionsFunctionToolSelection renamed to ChatCompletionsToolChoicePreset ChatCompletionsNamedToolChoice and ChatCompletionsNamedToolChoiceFunction respectively.embeddings property on EmbeddingsResult, from embedding: List[float] to embedding: Union[str, List[float]].ChatCompletionsToolCall and derived class ChatCompletionsFunctionToolCall, we now have a flat representation of only one class ChatCompletionsToolCall that that represents a function tool. This is because the only support tool is a function call.ChatCompletionsResponseFormat (base class) and
derived classes ChatCompletionsResponseFormatJSON and ChatCompletionsResponseFormatText.Allow setting default chat completions configuration in the ChatCompletionsClient constructor.
ChatCompletionsClient constructor.EmbeddingsClient constructor.model as an optional input argument to the embed method of EmbeddingsClient.Add model as an optional input argument to the complete method of ChatCompletionsClient.
Add model as an optional input argument to the complete method of ChatCompletionsClient.
The field input_tokens was removed from class EmbeddingsUsage, as this was never defined in the
REST API and the service never returned this value.
* Initial beta version
Your coding agent can read these notes before it upgrades. Set up the MCP server →