github Azure/azure-sdk-for-python azure-ai-inference_1.0.0b4

1.0.0b4 (2024-08-30)

Features Added

  • Support chat completion streaming response with function arguments (tool calls). Add new classes
    StreamingChatResponseMessageUpdate and StreamingChatResponseToolCallUpdate.
  • Support text embeddings result in base64 encoded string format.
  • Nicely formated print of chat completions and embeddings result objects.

Breaking Changes

  • Classes ChatCompletionsToolSelectionPreset, ChatCompletionsNamedToolSelection and ChatCompletionsFunctionToolSelection renamed to ChatCompletionsToolChoicePreset ChatCompletionsNamedToolChoice and ChatCompletionsNamedToolChoiceFunction respectively.
  • Update the object type of embeddings property on EmbeddingsResult, from embedding: List[float] to embedding: Union[str, List[float]].
  • Instead of base class 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.

Bugs Fixed

  • Fix setting of chat completions response format, to allow response in JSON format. See classes ChatCompletionsResponseFormat (base class) and
    derived classes ChatCompletionsResponseFormatJSON and ChatCompletionsResponseFormatText.

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.