openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
mailinhphan/clientOptions

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

OpenAI/src/Custom/Chat/Streaming/StreamingChatFunctionCallUpdate.cs

35lines · modecode

1using Microsoft.TypeSpec.Generator.Customizations;
2using System;
3
4namespace OpenAI.Chat;
5
6[Obsolete($"This class is obsolete. Please use {nameof(StreamingChatToolCallUpdate)} instead.")]
7[CodeGenType("ChatCompletionStreamResponseDeltaFunctionCall")]
8[CodeGenSerialization(nameof(FunctionArgumentsUpdate), SerializationValueHook = nameof(SerializeFunctionArgumentsUpdateValue), DeserializationValueHook = nameof(DeserializeFunctionArgumentsUpdateValue))]
9public partial class StreamingChatFunctionCallUpdate
10{
11 // CUSTOM: Renamed.
12 /// <summary> The name of the function to call. </summary>
13 [CodeGenMember("Name")]
14 public string FunctionName { get; }
15
16 // CUSTOM:
17 // - Renamed.
18 // - Changed type from string to BinaryData.
19 /// <summary>
20 /// Gets a function arguments fragment associated with this update.
21 /// </summary>
22 /// <remarks>
23 /// <para>
24 /// Each update contains only a small number of tokens. When presenting or reconstituting a full, streamed
25 /// arguments body, all <see cref="FunctionArgumentsUpdate"/> values should be combined.
26 /// </para>
27 /// <para>
28 /// As is the case for non-streaming <see cref="ChatFunctionCall.FunctionArguments"/>, the content provided
29 /// for function arguments is not guaranteed to be well-formed JSON or to contain expected data. Callers
30 /// should validate function arguments before using them.
31 /// </para>
32 /// </remarks>
33 [CodeGenMember("Arguments")]
34 public BinaryData FunctionArgumentsUpdate { get; }
35}
36