Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 11, 2024
1 parent be59b8d commit e7a2cb5
Show file tree
Hide file tree
Showing 55 changed files with 738 additions and 830 deletions.
1,460 changes: 684 additions & 776 deletions src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ partial void ProcessCreateAssistantResponseContent(
string? instructions = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateAssistantRequestToolResources? toolResources = default,
global::OpenAI.CreateAssistantRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
global::OpenAI.AssistantsApiResponseFormatOption? responseFormat = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ partial void ProcessCreateMessageResponseContent(
global::OpenAI.CreateMessageRequestRole role,
global::OpenAI.OneOf<string, global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.MessageContentImageFileObject, global::OpenAI.MessageContentImageUrlObject, global::OpenAI.MessageRequestContentTextObject>>> content,
global::System.Collections.Generic.IList<global::OpenAI.CreateMessageRequestAttachment>? attachments = default,
global::OpenAI.CreateMessageRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::OpenAI.CreateMessageRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ partial void ProcessCreateRunResponseContent(
string? additionalInstructions = default,
global::System.Collections.Generic.IList<global::OpenAI.CreateMessageRequest>? additionalMessages = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateRunRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
bool? stream = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ partial void ProcessCreateThreadResponseContent(
public async global::System.Threading.Tasks.Task<global::OpenAI.ThreadObject> CreateThreadAsync(
global::System.Collections.Generic.IList<global::OpenAI.CreateMessageRequest>? messages = default,
global::OpenAI.CreateThreadRequestToolResources? toolResources = default,
global::OpenAI.CreateThreadRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::OpenAI.CreateThreadRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
string? instructions = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default,
global::OpenAI.CreateThreadAndRunRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
bool? stream = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ partial void ProcessModifyAssistantResponseContent(
string? instructions = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.ModifyAssistantRequestToolResources? toolResources = default,
global::OpenAI.ModifyAssistantRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
global::OpenAI.AssistantsApiResponseFormatOption? responseFormat = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessModifyMessageResponseContent(
public async global::System.Threading.Tasks.Task<global::OpenAI.MessageObject> ModifyMessageAsync(
string threadId,
string messageId,
global::OpenAI.ModifyMessageRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::OpenAI.ModifyMessageRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessModifyRunResponseContent(
public async global::System.Threading.Tasks.Task<global::OpenAI.RunObject> ModifyRunAsync(
string threadId,
string runId,
global::OpenAI.ModifyRunRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::OpenAI.ModifyRunRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ partial void ProcessModifyThreadResponseContent(
public async global::System.Threading.Tasks.Task<global::OpenAI.ThreadObject> ModifyThreadAsync(
string threadId,
global::OpenAI.ModifyThreadRequestToolResources? toolResources = default,
global::OpenAI.ModifyThreadRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::OpenAI.ModifyThreadRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ partial void ProcessCreateBatchResponseContent(
string inputFileId,
global::OpenAI.CreateBatchRequestEndpoint endpoint,
global::OpenAI.CreateBatchRequestCompletionWindow completionWindow = default,
global::OpenAI.CreateBatchRequestMetadata? metadata = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::OpenAI.CreateBatchRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ partial void ProcessCreateChatCompletionResponseContent(
global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestMessage> messages,
global::OpenAI.AnyOf<string, global::OpenAI.CreateChatCompletionRequestModel?> model,
double? frequencyPenalty = 0,
global::OpenAI.CreateChatCompletionRequestLogitBias? logitBias = default,
global::System.Collections.Generic.Dictionary<string, int>? logitBias = default,
bool? logprobs = false,
int? topLogprobs = default,
int? maxCompletionTokens = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ partial void ProcessCreateCompletionResponseContent(
int? bestOf = 1,
bool? echo = false,
double? frequencyPenalty = 0,
global::OpenAI.CreateCompletionRequestLogitBias? logitBias = default,
global::System.Collections.Generic.Dictionary<string, int>? logitBias = default,
int? logprobs = default,
int? maxTokens = 16,
int? n = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public partial interface IAssistantsClient
string? instructions = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateAssistantRequestToolResources? toolResources = default,
global::OpenAI.CreateAssistantRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
global::OpenAI.AssistantsApiResponseFormatOption? responseFormat = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public partial interface IAssistantsClient
global::OpenAI.CreateMessageRequestRole role,
global::OpenAI.OneOf<string, global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.MessageContentImageFileObject, global::OpenAI.MessageContentImageUrlObject, global::OpenAI.MessageRequestContentTextObject>>> content,
global::System.Collections.Generic.IList<global::OpenAI.CreateMessageRequestAttachment>? attachments = default,
global::OpenAI.CreateMessageRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public partial interface IAssistantsClient
string? additionalInstructions = default,
global::System.Collections.Generic.IList<global::OpenAI.CreateMessageRequest>? additionalMessages = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateRunRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
bool? stream = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial interface IAssistantsClient
global::System.Threading.Tasks.Task<global::OpenAI.ThreadObject> CreateThreadAsync(
global::System.Collections.Generic.IList<global::OpenAI.CreateMessageRequest>? messages = default,
global::OpenAI.CreateThreadRequestToolResources? toolResources = default,
global::OpenAI.CreateThreadRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public partial interface IAssistantsClient
string? instructions = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default,
global::OpenAI.CreateThreadAndRunRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
bool? stream = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public partial interface IAssistantsClient
string? instructions = default,
global::System.Collections.Generic.IList<global::OpenAI.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.ModifyAssistantRequestToolResources? toolResources = default,
global::OpenAI.ModifyAssistantRequestMetadata? metadata = default,
object? metadata = default,
double? temperature = 1,
double? topP = 1,
global::OpenAI.AssistantsApiResponseFormatOption? responseFormat = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial interface IAssistantsClient
global::System.Threading.Tasks.Task<global::OpenAI.MessageObject> ModifyMessageAsync(
string threadId,
string messageId,
global::OpenAI.ModifyMessageRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial interface IAssistantsClient
global::System.Threading.Tasks.Task<global::OpenAI.RunObject> ModifyRunAsync(
string threadId,
string runId,
global::OpenAI.ModifyRunRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial interface IAssistantsClient
global::System.Threading.Tasks.Task<global::OpenAI.ThreadObject> ModifyThreadAsync(
string threadId,
global::OpenAI.ModifyThreadRequestToolResources? toolResources = default,
global::OpenAI.ModifyThreadRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public partial interface IBatchClient
string inputFileId,
global::OpenAI.CreateBatchRequestEndpoint endpoint,
global::OpenAI.CreateBatchRequestCompletionWindow completionWindow = default,
global::OpenAI.CreateBatchRequestMetadata? metadata = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public partial interface IChatClient
global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestMessage> messages,
global::OpenAI.AnyOf<string, global::OpenAI.CreateChatCompletionRequestModel?> model,
double? frequencyPenalty = 0,
global::OpenAI.CreateChatCompletionRequestLogitBias? logitBias = default,
global::System.Collections.Generic.Dictionary<string, int>? logitBias = default,
bool? logprobs = false,
int? topLogprobs = default,
int? maxCompletionTokens = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public partial interface ICompletionsClient
int? bestOf = 1,
bool? echo = false,
double? frequencyPenalty = 0,
global::OpenAI.CreateCompletionRequestLogitBias? logitBias = default,
global::System.Collections.Generic.Dictionary<string, int>? logitBias = default,
int? logprobs = default,
int? maxTokens = 16,
int? n = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public partial interface IVectorStoresClient
string? name = default,
global::OpenAI.VectorStoreExpirationAfter? expiresAfter = default,
global::OpenAI.OneOf<global::OpenAI.AutoChunkingStrategyRequestParam, global::OpenAI.StaticChunkingStrategyRequestParam>? chunkingStrategy = default,
global::OpenAI.CreateVectorStoreRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public partial interface IVectorStoresClient
string vectorStoreId,
string? name = default,
global::OpenAI.VectorStoreExpirationAfter? expiresAfter = default,
global::OpenAI.UpdateVectorStoreRequestMetadata? metadata = default,
object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public sealed partial class AssistantObject
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AssistantObjectMetadata? Metadata { get; set; }
public required object? Metadata { get; set; }

/// <summary>
/// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.<br/>
Expand Down
2 changes: 1 addition & 1 deletion src/libs/OpenAI/Generated/OpenAI.Models.Batch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public sealed partial class Batch
/// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
public global::OpenAI.BatchMetadata? Metadata { get; set; }
public object? Metadata { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public sealed partial class BatchRequestOutputResponse
/// The JSON body of the response
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("body")]
public global::OpenAI.BatchRequestOutputResponseBody? Body { get; set; }
public object? Body { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public sealed partial class CreateAssistantRequest
/// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
public global::OpenAI.CreateAssistantRequestMetadata? Metadata { get; set; }
public object? Metadata { get; set; }

/// <summary>
/// empty<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorS
/// Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreMetadata? Metadata { get; set; }
public object? Metadata { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public sealed partial class CreateBatchRequest
/// Optional custom metadata for the batch.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
public global::OpenAI.CreateBatchRequestMetadata? Metadata { get; set; }
public global::System.Collections.Generic.Dictionary<string, string>? Metadata { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public sealed partial class CreateChatCompletionRequest
/// Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("logit_bias")]
public global::OpenAI.CreateChatCompletionRequestLogitBias? LogitBias { get; set; }
public global::System.Collections.Generic.Dictionary<string, int>? LogitBias { get; set; }

/// <summary>
/// Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.<br/>
Expand Down
Loading

0 comments on commit e7a2cb5

Please sign in to comment.