Class StreamingToolCallUpdate
Represents an incremental update to a streaming tool call that is part of a streaming chat completions choice.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.AI.Inference.dll
Syntax
public abstract class StreamingToolCallUpdate
Remarks
This type encapsulates the payload located in e.g. $.choices[0].delta.tool_calls[] in the REST API schema.
To differentiate between parallel streaming tool calls within a single streaming choice, use the value of the ToolCallIndex property.
Please note StreamingToolCallUpdate is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include: StreamingFunctionToolCallUpdate.
Properties
Id
Gets the ID associated with with the streaming tool call.
Declaration
public string Id { get; }
Property Value
|
System.String
|
Remarks
Corresponds to e.g. $.choices[0].delta.tool_calls[0].id in the REST API schema.
This value appears once for each streaming tool call, typically on the first update message for each ToolCallIndex. Callers should retain the value when it arrives to accumulate the complete tool call information.
Tool call IDs must be provided in ChatRequestToolMessage instances that respond to tool calls.
ToolCallIndex
Gets the tool call index associated with this StreamingToolCallUpdate.
Declaration
public int ToolCallIndex { get; }
Property Value
|
System.Int32
|
Remarks
Corresponds to e.g. $.choices[0].delta.tool_calls[0].index in the REST API schema.
This value appears on every streaming tool call update. When multiple tool calls occur within the same streaming chat choice, this index specifies which tool call that this update contains new information for.