Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions api/OpenAI.net8.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,8 @@ public class ChatCompletion : IJsonModel<ChatCompletion>, IPersistableModel<Chat
public string Refusal { get; }
public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; }
public ChatMessageRole Role { get; }
[Experimental("OPENAI001")]
public ChatServiceTier? ServiceTier { get; }
public string SystemFingerprint { get; }
public IReadOnlyList<ChatToolCall> ToolCalls { get; }
public ChatTokenUsage Usage { get; }
Expand Down Expand Up @@ -1626,6 +1628,8 @@ public class ChatCompletionOptions : IJsonModel<ChatCompletionOptions>, IPersist
public ChatResponseModalities ResponseModalities { get; set; }
[Experimental("OPENAI001")]
public long? Seed { get; set; }
[Experimental("OPENAI001")]
public ChatServiceTier? ServiceTier { get; set; }
public IList<string> StopSequences { get; }
public bool? StoredOutputEnabled { get; set; }
public float? Temperature { get; set; }
Expand Down Expand Up @@ -1974,6 +1978,24 @@ public enum ChatResponseModalities {
Text = 1,
Audio = 2
}
[Experimental("OPENAI001")]
public readonly partial struct ChatServiceTier : IEquatable<ChatServiceTier> {
public ChatServiceTier(string value);
public static ChatServiceTier Auto { get; }
public static ChatServiceTier Default { get; }
public static ChatServiceTier Flex { get; }
public static ChatServiceTier Scale { get; }
public readonly bool Equals(ChatServiceTier other);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly bool Equals(object obj);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly int GetHashCode();
public static bool operator ==(ChatServiceTier left, ChatServiceTier right);
public static implicit operator ChatServiceTier(string value);
public static implicit operator ChatServiceTier?(string value);
public static bool operator !=(ChatServiceTier left, ChatServiceTier right);
public override readonly string ToString();
}
public class ChatTokenLogProbabilityDetails : IJsonModel<ChatTokenLogProbabilityDetails>, IPersistableModel<ChatTokenLogProbabilityDetails> {
public float LogProbability { get; }
public string Token { get; }
Expand Down Expand Up @@ -2100,7 +2122,7 @@ public class FunctionChatMessage : ChatMessage, IJsonModel<FunctionChatMessage>,
}
public static class OpenAIChatModelFactory {
[Experimental("OPENAI001")]
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);
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);
[EditorBrowsable(EditorBrowsableState.Never)]
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);
public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int audioTokenCount = 0, int cachedTokenCount = 0);
Expand All @@ -2120,7 +2142,7 @@ public static class OpenAIChatModelFactory {
[EditorBrowsable(EditorBrowsableState.Never)]
public static ChatTokenUsage ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails);
[Experimental("OPENAI001")]
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);
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);
[EditorBrowsable(EditorBrowsableState.Never)]
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);
[Obsolete("This class is obsolete. Please use StreamingChatToolCallUpdate instead.")]
Expand All @@ -2143,6 +2165,8 @@ public class StreamingChatCompletionUpdate : IJsonModel<StreamingChatCompletionU
public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; }
public string RefusalUpdate { get; }
public ChatMessageRole? Role { get; }
[Experimental("OPENAI001")]
public ChatServiceTier? ServiceTier { get; }
public string SystemFingerprint { get; }
public IReadOnlyList<StreamingChatToolCallUpdate> ToolCallUpdates { get; }
public ChatTokenUsage Usage { get; }
Expand Down Expand Up @@ -4772,6 +4796,7 @@ public class OpenAIResponse : IJsonModel<OpenAIResponse>, IPersistableModel<Open
public bool ParallelToolCallsEnabled { get; }
public string PreviousResponseId { get; }
public ResponseReasoningOptions ReasoningOptions { get; }
public ResponseServiceTier? ServiceTier { get; }
public ResponseStatus? Status { get; }
public float? Temperature { get; }
public ResponseTextOptions TextOptions { get; }
Expand Down Expand Up @@ -4833,7 +4858,7 @@ public class OpenAIResponseClient {
[Experimental("OPENAI001")]
public static class OpenAIResponsesModelFactory {
public static MessageResponseItem MessageResponseItem(string id = null, MessageRole role = MessageRole.Assistant, MessageStatus? status = null);
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);
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);
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, IEnumerable<ReasoningSummaryPart> summaryParts = null);
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, string summaryText = null);
public static ReferenceResponseItem ReferenceResponseItem(string id = null);
Expand Down Expand Up @@ -4926,6 +4951,7 @@ public class ResponseCreationOptions : IJsonModel<ResponseCreationOptions>, IPer
public bool? ParallelToolCallsEnabled { get; set; }
public string PreviousResponseId { get; set; }
public ResponseReasoningOptions ReasoningOptions { get; set; }
public ResponseServiceTier? ServiceTier { get; set; }
public bool? StoredOutputEnabled { get; set; }
public float? Temperature { get; set; }
public ResponseTextOptions TextOptions { get; set; }
Expand Down Expand Up @@ -5171,6 +5197,24 @@ public class ResponseReasoningOptions : IJsonModel<ResponseReasoningOptions>, IP
public override readonly string ToString();
}
[Experimental("OPENAI001")]
public readonly partial struct ResponseServiceTier : IEquatable<ResponseServiceTier> {
public ResponseServiceTier(string value);
public static ResponseServiceTier Auto { get; }
public static ResponseServiceTier Default { get; }
public static ResponseServiceTier Flex { get; }
public static ResponseServiceTier Scale { get; }
public readonly bool Equals(ResponseServiceTier other);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly bool Equals(object obj);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly int GetHashCode();
public static bool operator ==(ResponseServiceTier left, ResponseServiceTier right);
public static implicit operator ResponseServiceTier(string value);
public static implicit operator ResponseServiceTier?(string value);
public static bool operator !=(ResponseServiceTier left, ResponseServiceTier right);
public override readonly string ToString();
}
[Experimental("OPENAI001")]
public enum ResponseStatus {
InProgress = 0,
Completed = 1,
Expand Down
Loading