Skip to content

Commit 4746a7f

Browse files
committed
merge
2 parents 4efe03e + 652ff02 commit 4746a7f

31 files changed

+12626
-12331
lines changed

api/OpenAI.net8.0.cs

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,8 @@ public class ChatCompletion : IJsonModel<ChatCompletion>, IPersistableModel<Chat
15171517
public string Refusal { get; }
15181518
public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; }
15191519
public ChatMessageRole Role { get; }
1520+
[Experimental("OPENAI001")]
1521+
public ChatServiceTier? ServiceTier { get; }
15201522
public string SystemFingerprint { get; }
15211523
public IReadOnlyList<ChatToolCall> ToolCalls { get; }
15221524
public ChatTokenUsage Usage { get; }
@@ -1632,6 +1634,8 @@ public class ChatCompletionOptions : IJsonModel<ChatCompletionOptions>, IPersist
16321634
public ChatResponseModalities ResponseModalities { get; set; }
16331635
[Experimental("OPENAI001")]
16341636
public long? Seed { get; set; }
1637+
[Experimental("OPENAI001")]
1638+
public ChatServiceTier? ServiceTier { get; set; }
16351639
public IList<string> StopSequences { get; }
16361640
public bool? StoredOutputEnabled { get; set; }
16371641
public float? Temperature { get; set; }
@@ -1980,6 +1984,24 @@ public enum ChatResponseModalities {
19801984
Text = 1,
19811985
Audio = 2
19821986
}
1987+
[Experimental("OPENAI001")]
1988+
public readonly partial struct ChatServiceTier : IEquatable<ChatServiceTier> {
1989+
public ChatServiceTier(string value);
1990+
public static ChatServiceTier Auto { get; }
1991+
public static ChatServiceTier Default { get; }
1992+
public static ChatServiceTier Flex { get; }
1993+
public static ChatServiceTier Scale { get; }
1994+
public readonly bool Equals(ChatServiceTier other);
1995+
[EditorBrowsable(EditorBrowsableState.Never)]
1996+
public override readonly bool Equals(object obj);
1997+
[EditorBrowsable(EditorBrowsableState.Never)]
1998+
public override readonly int GetHashCode();
1999+
public static bool operator ==(ChatServiceTier left, ChatServiceTier right);
2000+
public static implicit operator ChatServiceTier(string value);
2001+
public static implicit operator ChatServiceTier?(string value);
2002+
public static bool operator !=(ChatServiceTier left, ChatServiceTier right);
2003+
public override readonly string ToString();
2004+
}
19832005
public class ChatTokenLogProbabilityDetails : IJsonModel<ChatTokenLogProbabilityDetails>, IPersistableModel<ChatTokenLogProbabilityDetails> {
19842006
public float LogProbability { get; }
19852007
public string Token { get; }
@@ -2106,7 +2128,7 @@ public class FunctionChatMessage : ChatMessage, IJsonModel<FunctionChatMessage>,
21062128
}
21072129
public static class OpenAIChatModelFactory {
21082130
[Experimental("OPENAI001")]
2109-
public static ChatCompletion ChatCompletion(string id = null, ChatFinishReason finishReason = ChatFinishReason.Stop, ChatMessageContent content = null, string refusal = null, IEnumerable<ChatToolCall> toolCalls = null, ChatMessageRole role = ChatMessageRole.System, ChatFunctionCall functionCall = null, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities = null, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities = null, DateTimeOffset createdAt = default, string model = null, string systemFingerprint = null, ChatTokenUsage usage = null, ChatOutputAudio outputAudio = null, IEnumerable<ChatMessageAnnotation> messageAnnotations = null);
2131+
public static ChatCompletion ChatCompletion(string id = null, ChatFinishReason finishReason = ChatFinishReason.Stop, ChatMessageContent content = null, string refusal = null, IEnumerable<ChatToolCall> toolCalls = null, ChatMessageRole role = ChatMessageRole.System, ChatFunctionCall functionCall = null, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities = null, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities = null, DateTimeOffset createdAt = default, string model = null, ChatServiceTier? serviceTier = null, string systemFingerprint = null, ChatTokenUsage usage = null, ChatOutputAudio outputAudio = null, IEnumerable<ChatMessageAnnotation> messageAnnotations = null);
21102132
[EditorBrowsable(EditorBrowsableState.Never)]
21112133
public static ChatCompletion ChatCompletion(string id, ChatFinishReason finishReason, ChatMessageContent content, string refusal, IEnumerable<ChatToolCall> toolCalls, ChatMessageRole role, ChatFunctionCall functionCall, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities, DateTimeOffset createdAt, string model, string systemFingerprint, ChatTokenUsage usage);
21122134
public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int audioTokenCount = 0, int cachedTokenCount = 0);
@@ -2126,7 +2148,7 @@ public static class OpenAIChatModelFactory {
21262148
[EditorBrowsable(EditorBrowsableState.Never)]
21272149
public static ChatTokenUsage ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails);
21282150
[Experimental("OPENAI001")]
2129-
public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string completionId = null, ChatMessageContent contentUpdate = null, StreamingChatFunctionCallUpdate functionCallUpdate = null, IEnumerable<StreamingChatToolCallUpdate> toolCallUpdates = null, ChatMessageRole? role = null, string refusalUpdate = null, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities = null, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities = null, ChatFinishReason? finishReason = null, DateTimeOffset createdAt = default, string model = null, string systemFingerprint = null, ChatTokenUsage usage = null, StreamingChatOutputAudioUpdate outputAudioUpdate = null);
2151+
public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string completionId = null, ChatMessageContent contentUpdate = null, StreamingChatFunctionCallUpdate functionCallUpdate = null, IEnumerable<StreamingChatToolCallUpdate> toolCallUpdates = null, ChatMessageRole? role = null, string refusalUpdate = null, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities = null, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities = null, ChatFinishReason? finishReason = null, DateTimeOffset createdAt = default, string model = null, ChatServiceTier? serviceTier = null, string systemFingerprint = null, ChatTokenUsage usage = null, StreamingChatOutputAudioUpdate outputAudioUpdate = null);
21302152
[EditorBrowsable(EditorBrowsableState.Never)]
21312153
public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string completionId, ChatMessageContent contentUpdate, StreamingChatFunctionCallUpdate functionCallUpdate, IEnumerable<StreamingChatToolCallUpdate> toolCallUpdates, ChatMessageRole? role, string refusalUpdate, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities, ChatFinishReason? finishReason, DateTimeOffset createdAt, string model, string systemFingerprint, ChatTokenUsage usage);
21322154
[Obsolete("This class is obsolete. Please use StreamingChatToolCallUpdate instead.")]
@@ -2149,6 +2171,8 @@ public class StreamingChatCompletionUpdate : IJsonModel<StreamingChatCompletionU
21492171
public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; }
21502172
public string RefusalUpdate { get; }
21512173
public ChatMessageRole? Role { get; }
2174+
[Experimental("OPENAI001")]
2175+
public ChatServiceTier? ServiceTier { get; }
21522176
public string SystemFingerprint { get; }
21532177
public IReadOnlyList<StreamingChatToolCallUpdate> ToolCallUpdates { get; }
21542178
public ChatTokenUsage Usage { get; }
@@ -4778,6 +4802,7 @@ public class OpenAIResponse : IJsonModel<OpenAIResponse>, IPersistableModel<Open
47784802
public bool ParallelToolCallsEnabled { get; }
47794803
public string PreviousResponseId { get; }
47804804
public ResponseReasoningOptions ReasoningOptions { get; }
4805+
public ResponseServiceTier? ServiceTier { get; }
47814806
public ResponseStatus? Status { get; }
47824807
public float? Temperature { get; }
47834808
public ResponseTextOptions TextOptions { get; }
@@ -4839,7 +4864,7 @@ public class OpenAIResponseClient {
48394864
[Experimental("OPENAI001")]
48404865
public static class OpenAIResponsesModelFactory {
48414866
public static MessageResponseItem MessageResponseItem(string id = null, MessageRole role = MessageRole.Assistant, MessageStatus? status = null);
4842-
public static OpenAIResponse OpenAIResponse(string id = null, DateTimeOffset createdAt = default, ResponseStatus? status = null, ResponseError error = null, ResponseTokenUsage usage = null, string endUserId = null, ResponseReasoningOptions reasoningOptions = null, int? maxOutputTokenCount = null, ResponseTextOptions textOptions = null, ResponseTruncationMode? truncationMode = null, ResponseIncompleteStatusDetails incompleteStatusDetails = null, IEnumerable<ResponseItem> outputItems = null, bool parallelToolCallsEnabled = false, ResponseToolChoice toolChoice = null, string model = null, IDictionary<string, string> metadata = null, float? temperature = null, float? topP = null, string previousResponseId = null, bool? background = null, string instructions = null, IEnumerable<ResponseTool> tools = null);
4867+
public static OpenAIResponse OpenAIResponse(string id = null, DateTimeOffset createdAt = default, ResponseStatus? status = null, ResponseError error = null, ResponseTokenUsage usage = null, string endUserId = null, ResponseReasoningOptions reasoningOptions = null, int? maxOutputTokenCount = null, ResponseTextOptions textOptions = null, ResponseTruncationMode? truncationMode = null, ResponseIncompleteStatusDetails incompleteStatusDetails = null, IEnumerable<ResponseItem> outputItems = null, bool parallelToolCallsEnabled = false, ResponseToolChoice toolChoice = null, string model = null, IDictionary<string, string> metadata = null, float? temperature = null, float? topP = null, ResponseServiceTier? serviceTier = null, string previousResponseId = null, bool? background = null, string instructions = null, IEnumerable<ResponseTool> tools = null);
48434868
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, IEnumerable<ReasoningSummaryPart> summaryParts = null);
48444869
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, string summaryText = null);
48454870
public static ReferenceResponseItem ReferenceResponseItem(string id = null);
@@ -4932,6 +4957,7 @@ public class ResponseCreationOptions : IJsonModel<ResponseCreationOptions>, IPer
49324957
public bool? ParallelToolCallsEnabled { get; set; }
49334958
public string PreviousResponseId { get; set; }
49344959
public ResponseReasoningOptions ReasoningOptions { get; set; }
4960+
public ResponseServiceTier? ServiceTier { get; set; }
49354961
public bool? StoredOutputEnabled { get; set; }
49364962
public float? Temperature { get; set; }
49374963
public ResponseTextOptions TextOptions { get; set; }
@@ -5177,6 +5203,24 @@ public class ResponseReasoningOptions : IJsonModel<ResponseReasoningOptions>, IP
51775203
public override readonly string ToString();
51785204
}
51795205
[Experimental("OPENAI001")]
5206+
public readonly partial struct ResponseServiceTier : IEquatable<ResponseServiceTier> {
5207+
public ResponseServiceTier(string value);
5208+
public static ResponseServiceTier Auto { get; }
5209+
public static ResponseServiceTier Default { get; }
5210+
public static ResponseServiceTier Flex { get; }
5211+
public static ResponseServiceTier Scale { get; }
5212+
public readonly bool Equals(ResponseServiceTier other);
5213+
[EditorBrowsable(EditorBrowsableState.Never)]
5214+
public override readonly bool Equals(object obj);
5215+
[EditorBrowsable(EditorBrowsableState.Never)]
5216+
public override readonly int GetHashCode();
5217+
public static bool operator ==(ResponseServiceTier left, ResponseServiceTier right);
5218+
public static implicit operator ResponseServiceTier(string value);
5219+
public static implicit operator ResponseServiceTier?(string value);
5220+
public static bool operator !=(ResponseServiceTier left, ResponseServiceTier right);
5221+
public override readonly string ToString();
5222+
}
5223+
[Experimental("OPENAI001")]
51805224
public enum ResponseStatus {
51815225
InProgress = 0,
51825226
Completed = 1,

0 commit comments

Comments
 (0)