Skip to content

Commit

Permalink
Merge pull request #59 from tryAGI/bot/update-openapi_202408121515
Browse files Browse the repository at this point in the history
feat:Updated OpenAPI spec
  • Loading branch information
github-actions[bot] authored Aug 12, 2024
2 parents af8df7a + b305ec1 commit bf17c63
Show file tree
Hide file tree
Showing 48 changed files with 103 additions and 103 deletions.
94 changes: 47 additions & 47 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 @@ -141,7 +141,7 @@ partial void ProcessCreateAssistantResponseContent(
string? name = default,
string? description = default,
string? instructions = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode?, global::OpenAI.AssistantToolsFileSearch?, global::OpenAI.AssistantToolsFunction?>>? tools = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateAssistantRequestToolResources? toolResources = default,
global::OpenAI.CreateAssistantRequestMetadata? metadata = default,
double? temperature = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ partial void ProcessCreateMessageResponseContent(
public async global::System.Threading.Tasks.Task<global::OpenAI.MessageObject> CreateMessageAsync(
string threadId,
global::OpenAI.CreateMessageRequestRole role,
global::System.OneOf<string?, global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.MessageContentImageFileObject?, global::OpenAI.MessageContentImageUrlObject?, global::OpenAI.MessageRequestContentTextObject?>>?> content,
global::System.OneOf<string?, global::System.Collections.Generic.IList<global::System.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,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ partial void ProcessCreateRunResponseContent(
string? instructions = default,
string? additionalInstructions = default,
global::System.Collections.Generic.IList<global::OpenAI.CreateMessageRequest>? additionalMessages = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode?, global::OpenAI.AssistantToolsFileSearch?, global::OpenAI.AssistantToolsFunction?>>? tools = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateRunRequestMetadata? metadata = default,
double? temperature = 1,
double? topP = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
global::OpenAI.CreateThreadRequest? thread = default,
global::System.AnyOf<string?, global::OpenAI.CreateThreadAndRunRequestModel?>? model = default,
string? instructions = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode?, global::OpenAI.AssistantToolsFileSearch?, global::OpenAI.AssistantToolsFunction?>>? tools = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default,
global::OpenAI.CreateThreadAndRunRequestMetadata? metadata = default,
double? temperature = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ partial void ProcessModifyAssistantResponseContent(
string? name = default,
string? description = default,
string? instructions = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode?, global::OpenAI.AssistantToolsFileSearch?, global::OpenAI.AssistantToolsFunction?>>? tools = default,
global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? tools = default,
global::OpenAI.ModifyAssistantRequestToolResources? toolResources = default,
global::OpenAI.ModifyAssistantRequestMetadata? metadata = default,
double? temperature = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ partial void ProcessCreateTranscriptionResponseContent(
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranscriptionResponseJson?, global::OpenAI.CreateTranscriptionResponseVerboseJson?>> CreateTranscriptionAsync(
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranscriptionResponseJson, global::OpenAI.CreateTranscriptionResponseVerboseJson>> CreateTranscriptionAsync(
global::OpenAI.CreateTranscriptionRequest request,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand Down Expand Up @@ -167,7 +167,7 @@ partial void ProcessCreateTranscriptionResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranscriptionResponseJson?, global::OpenAI.CreateTranscriptionResponseVerboseJson?>> CreateTranscriptionAsync(
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranscriptionResponseJson, global::OpenAI.CreateTranscriptionResponseVerboseJson>> CreateTranscriptionAsync(
byte[] file,
string filename,
global::System.AnyOf<string?, global::OpenAI.CreateTranscriptionRequestModel?> model,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ partial void ProcessCreateTranslationResponseContent(
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranslationResponseJson?, global::OpenAI.CreateTranslationResponseVerboseJson?>> CreateTranslationAsync(
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranslationResponseJson, global::OpenAI.CreateTranslationResponseVerboseJson>> CreateTranslationAsync(
global::OpenAI.CreateTranslationRequest request,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand Down Expand Up @@ -147,7 +147,7 @@ partial void ProcessCreateTranslationResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranslationResponseJson?, global::OpenAI.CreateTranslationResponseVerboseJson?>> CreateTranslationAsync(
public async global::System.Threading.Tasks.Task<global::System.OneOf<global::OpenAI.CreateTranslationResponseJson, global::OpenAI.CreateTranslationResponseVerboseJson>> CreateTranslationAsync(
byte[] file,
string filename,
global::System.AnyOf<string?, global::OpenAI.CreateTranslationRequestModel?> model,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ partial void ProcessCreateChatCompletionResponseContent(
int? maxTokens = default,
int? n = 1,
double? presencePenalty = 0,
global::System.OneOf<global::OpenAI.ResponseFormatText?, global::OpenAI.ResponseFormatJsonObject?, global::OpenAI.ResponseFormatJsonSchema?>? responseFormat = default,
global::System.OneOf<global::OpenAI.ResponseFormatText, global::OpenAI.ResponseFormatJsonObject, global::OpenAI.ResponseFormatJsonSchema>? responseFormat = default,
int? seed = default,
global::OpenAI.CreateChatCompletionRequestServiceTier? serviceTier = default,
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>?>? stop = default,
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>>? stop = default,
bool? stream = false,
global::OpenAI.ChatCompletionStreamOptions? streamOptions = default,
double? temperature = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ partial void ProcessCreateCompletionResponseContent(
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::OpenAI.CreateCompletionResponse> CreateCompletionAsync(
global::System.AnyOf<string?, global::OpenAI.CreateCompletionRequestModel?> model,
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>?, global::System.Collections.Generic.IList<int>?, global::System.Collections.Generic.IList<global::System.Collections.Generic.IList<int>>?>? prompt,
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>, global::System.Collections.Generic.IList<int>, global::System.Collections.Generic.IList<global::System.Collections.Generic.IList<int>>>? prompt,
int? bestOf = 1,
bool? echo = false,
double? frequencyPenalty = 0,
Expand All @@ -194,7 +194,7 @@ partial void ProcessCreateCompletionResponseContent(
int? n = 1,
double? presencePenalty = 0,
int? seed = default,
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>?>? stop = default,
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>>? stop = default,
bool? stream = false,
global::OpenAI.ChatCompletionStreamOptions? streamOptions = default,
string? suffix = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ partial void ProcessCreateEmbeddingResponseContent(
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::OpenAI.CreateEmbeddingResponse> CreateEmbeddingAsync(
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>?, global::System.Collections.Generic.IList<int>?, global::System.Collections.Generic.IList<global::System.Collections.Generic.IList<int>>?> input,
global::System.OneOf<string?, global::System.Collections.Generic.IList<string>, global::System.Collections.Generic.IList<int>, global::System.Collections.Generic.IList<global::System.Collections.Generic.IList<int>>> input,
global::System.AnyOf<string?, global::OpenAI.CreateEmbeddingRequestModel?> model,
global::OpenAI.CreateEmbeddingRequestEncodingFormat? encodingFormat = global::OpenAI.CreateEmbeddingRequestEncodingFormat.Float,
int? dimensions = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public sealed partial class AssistantObject
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("tools")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode?, global::OpenAI.AssistantToolsFileSearch?, global::OpenAI.AssistantToolsFunction?>> Tools { get; set; }
public required global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>> Tools { get; set; }

/// <summary>
/// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed partial class ChatCompletionRequestAssistantMessage
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
public global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestAssistantMessageContentPart>?>? Content { get; set; }
public global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestAssistantMessageContentPart>>? Content { get; set; }

/// <summary>
/// The refusal message by the assistant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class ChatCompletionRequestSystemMessage
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestSystemMessageContentPart>?> Content { get; set; }
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestSystemMessageContentPart>> Content { get; set; }

/// <summary>
/// The role of the messages author, in this case `system`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public sealed partial class ChatCompletionRequestToolMessage
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestToolMessageContentPart>?> Content { get; set; }
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestToolMessageContentPart>> Content { get; set; }

/// <summary>
/// Tool call that this message is responding to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class ChatCompletionRequestUserMessage
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestUserMessageContentPart>?> Content { get; set; }
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::OpenAI.ChatCompletionRequestUserMessageContentPart>> Content { get; set; }

/// <summary>
/// The role of the messages author, in this case `user`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed partial class CreateAssistantRequest
/// A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("tools")]
public global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode?, global::OpenAI.AssistantToolsFileSearch?, global::OpenAI.AssistantToolsFunction?>>? Tools { get; set; }
public global::System.Collections.Generic.IList<global::System.OneOf<global::OpenAI.AssistantToolsCode, global::OpenAI.AssistantToolsFileSearch, global::OpenAI.AssistantToolsFunction>>? Tools { get; set; }

/// <summary>
/// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorS
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
public global::System.OneOf<global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?, global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?>? ChunkingStrategy { get; set; }
public global::System.OneOf<global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1, global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2>? ChunkingStrategy { get; set; }

/// <summary>
/// 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 maxium of 512 characters long.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public sealed partial class CreateChatCompletionRequest
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("response_format")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory3))]
public global::System.OneOf<global::OpenAI.ResponseFormatText?, global::OpenAI.ResponseFormatJsonObject?, global::OpenAI.ResponseFormatJsonSchema?>? ResponseFormat { get; set; }
public global::System.OneOf<global::OpenAI.ResponseFormatText, global::OpenAI.ResponseFormatJsonObject, global::OpenAI.ResponseFormatJsonSchema>? ResponseFormat { get; set; }

/// <summary>
/// This feature is in Beta.<br/>
Expand All @@ -111,7 +111,7 @@ public sealed partial class CreateChatCompletionRequest
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("stop")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
public global::System.OneOf<string?, global::System.Collections.Generic.IList<string>?>? Stop { get; set; }
public global::System.OneOf<string?, global::System.Collections.Generic.IList<string>>? Stop { get; set; }

/// <summary>
/// If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).<br/>
Expand Down Expand Up @@ -185,7 +185,7 @@ public sealed partial class CreateChatCompletionRequest
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("function_call")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
public global::System.OneOf<global::OpenAI.CreateChatCompletionRequestFunctionCall?, global::OpenAI.ChatCompletionFunctionCallOption?>? FunctionCall { get; set; }
public global::System.OneOf<global::OpenAI.CreateChatCompletionRequestFunctionCall?, global::OpenAI.ChatCompletionFunctionCallOption>? FunctionCall { get; set; }

/// <summary>
/// Deprecated in favor of `tools`.<br/>
Expand Down
Loading

0 comments on commit bf17c63

Please sign in to comment.