namespace OpenAI.Chat;
using Microsoft.TypeSpec.Generator.Customizations;
using System;
/// A streaming update representing part of a tool call made by the model.
[CodeGenType("ChatCompletionMessageToolCallChunk")]
[CodeGenSuppress("StreamingChatToolCallUpdate", typeof(int))]
public partial class StreamingChatToolCallUpdate
{
// CUSTOM: Made internal.
[CodeGenMember("Function")]
internal InternalChatCompletionMessageToolCallChunkFunction Function { get; }
// CUSTOM:
// - Changed type to match public type.
/// The kind of tool.Currently, only is supported.
[CodeGenMember("Type")]
public ChatToolCallKind Kind { get; } = ChatToolCallKind.Function;
// CUSTOM: Renamed.
///
/// The unique identifier of the tool call being streamed, as used with e.g.
/// or
/// .
///
[CodeGenMember("Id")]
public string ToolCallId { get; }
///
/// The name of the tool that the streaming tool call requests invocation of.
///
public string FunctionName => Function?.Name;
// CUSTOM: Spread.
///
/// The update to the arguments that the model is calling the function with, which are generated by the model
/// in JSON format. As part of a streaming response, the arguments are chunked and streamed across streaming
/// updates, and must therefore be accumulated in order to reconstruct them. Note that the model does not
/// always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate
/// the arguments in your code before calling your function.
///
public BinaryData FunctionArgumentsUpdate => Function?.Arguments;
}