1.0.0-beta.12 (2023-12-15)
Like beta.11, beta.12 is another release that brings further refinements and fixes. It remains based on the 2023-12-01-preview
service API version for Azure OpenAI and does not add any new service capabilities.
Features Added
Updates for using streaming tool calls:
- A new .NET-specific
StreamingToolCallUpdate
type has been added to better represent streaming tool call updates
when using chat tools.- This new type includes an explicit
ToolCallIndex
property, reflectingindex
in the REST schema, to allow
resilient deserialization of parallel function tool calling.
- This new type includes an explicit
- A convenience constructor has been added for
ChatRequestAssistantMessage
that can automatically populate from a prior
ChatResponseMessage
when using non-streaming chat completions. - A public constructor has been added for
ChatCompletionsFunctionToolCall
to allow more intuitive reconstruction of
ChatCompletionsToolCall
instances for use inChatRequestAssistantMessage
instances made from streaming responses.
Other additions:
- To facilitate reuse of user message contents,
ChatRequestUserMessage
now provides a publicContent
property (string
) as well as a publicMultimodalContentItems
property (IList<ChatMessageContentItem
).Content
is the conventional plain-text content and will be populated as non-null when the aChatRequestUserMessage()
constructor accepting a string is used to instantiate the message.MultimodalContentItems
is the new compound content type, currently only usable withgpt-4-vision-preview
, that allows hybrid use of text and image references. It will be populated when an appropriateChatRequestUserMessage()
constructor accepting a collection ofChatMessageContentItem
instances is used.Role
is also restored to common visibility toChatRequestUserMessage
.
Breaking Changes
- The type of
ToolCallUpdate
onStreamingChatCompletionsUpdate
has been changed from the non-streaming
ChatCompletionsToolCall
to the newStreamingToolCallUpdate
type. The conversion is straightforward:ToolCallUpdate.Id
remains unchanged.- Instead of casting
ToolCallUpdate
toChatCompletionsFunctionToolCall
, cast it toStreamingToolCallUpdate
. - Update cast instance use of
functionToolCallUpdate.Arguments
to accumulatefunctionToolCallUpdate.ArgumentsUpdate
.
- Removed the parameterized constructor of the
ChatCompletionsOptions
class that only received the messages as a parameter in favor of the parameterized constructor that receives the deployment name as well. This makes it consistent with the implementation of other Options classes. - Removed the setter of the
Input
property of theEmbeddingsOptions
class as per the guidelines for collection properties.