From cc1cdaf4efa85cfe604ac551ab028823156e692a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 6 May 2026 10:55:48 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...AGI.OpenAI.JsonConverters.ResultsItem.g.cs | 1 + ...nAI.Models.ChatCompletionTokenLogprob.g.cs | 4 +- .../tryAGI.OpenAI.Models.CostsResult.g.cs | 11 ++- ...penAI.Models.CostsResultQuantity.Json.g.cs | 92 +++++++++++++++++++ ...AGI.OpenAI.Models.CostsResultQuantity.g.cs | 18 ++++ ...s.CreateChatCompletionRequestVariant2.g.cs | 12 ++- ...CreateModelResponsePropertiesVariant2.g.cs | 12 ++- .../tryAGI.OpenAI.Models.ResponseLogProb.g.cs | 4 +- src/libs/tryAGI.OpenAI/openapi.yaml | 58 ++++++++---- 9 files changed, 182 insertions(+), 30 deletions(-) create mode 100644 src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.Json.g.cs create mode 100644 src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.g.cs diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResultsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResultsItem.g.cs index ee0496e27..7662ab18f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResultsItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResultsItem.g.cs @@ -106,6 +106,7 @@ public class ResultsItemJsonConverter : global::System.Text.Json.Serialization.J if (__jsonProps.Contains("line_item")) __score8++; if (__jsonProps.Contains("object")) __score8++; if (__jsonProps.Contains("project_id")) __score8++; + if (__jsonProps.Contains("quantity")) __score8++; var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs index 8eacb440a..dd2021a73 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs @@ -29,7 +29,7 @@ public sealed partial class ChatCompletionTokenLogprob public global::System.Collections.Generic.IList? Bytes { get; set; } /// - /// List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. + /// List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`. /// [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] [global::System.Text.Json.Serialization.JsonRequired] @@ -51,7 +51,7 @@ public sealed partial class ChatCompletionTokenLogprob /// The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. /// /// - /// List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. + /// List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`. /// /// #if NET7_0_OR_GREATER diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs index 3a206a8f2..3a815be90 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs @@ -39,6 +39,12 @@ public sealed partial class CostsResult [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] public string? ApiKeyId { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("quantity")] + public double? Quantity { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -55,6 +61,7 @@ public sealed partial class CostsResult /// /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -63,13 +70,15 @@ public CostsResult( global::tryAGI.OpenAI.CostsResultAmount? amount, string? lineItem, string? projectId, - string? apiKeyId) + string? apiKeyId, + double? quantity) { this.Object = @object; this.Amount = amount; this.LineItem = lineItem; this.ProjectId = projectId; this.ApiKeyId = apiKeyId; + this.Quantity = quantity; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.Json.g.cs new file mode 100644 index 000000000..d7edd1aba --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CostsResultQuantity + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::tryAGI.OpenAI.CostsResultQuantity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CostsResultQuantity), + jsonSerializerContext) as global::tryAGI.OpenAI.CostsResultQuantity; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::tryAGI.OpenAI.CostsResultQuantity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CostsResultQuantity), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CostsResultQuantity; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.g.cs new file mode 100644 index 000000000..d8b02e388 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultQuantity.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CostsResultQuantity + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs index 4d65d65be..5148a72a5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs @@ -83,8 +83,10 @@ public sealed partial class CreateChatCompletionRequestVariant2 public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? WebSearchOptions { get; set; } /// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability.
+ /// An integer between 0 and 20 specifying the maximum number of most likely
+ /// tokens to return at each token position, each with an associated log
+ /// probability. In some cases, the number of returned tokens may be fewer than
+ /// requested.
/// `logprobs` must be set to `true` if this parameter is used. ///
[global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] @@ -304,8 +306,10 @@ public sealed partial class CreateChatCompletionRequestVariant2 /// Learn more about the [web search tool](/docs/guides/tools-web-search?api-mode=chat). /// /// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability.
+ /// An integer between 0 and 20 specifying the maximum number of most likely
+ /// tokens to return at each token position, each with an associated log
+ /// probability. In some cases, the number of returned tokens may be fewer than
+ /// requested.
/// `logprobs` must be set to `true` if this parameter is used. /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponsePropertiesVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponsePropertiesVariant2.g.cs index 423d18a27..aa7ed04d6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponsePropertiesVariant2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponsePropertiesVariant2.g.cs @@ -9,8 +9,10 @@ namespace tryAGI.OpenAI public sealed partial class CreateModelResponsePropertiesVariant2 { /// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability. + /// An integer between 0 and 20 specifying the maximum number of most likely
+ /// tokens to return at each token position, each with an associated log
+ /// probability. In some cases, the number of returned tokens may be fewer than
+ /// requested. ///
[global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] public int? TopLogprobs { get; set; } @@ -25,8 +27,10 @@ public sealed partial class CreateModelResponsePropertiesVariant2 /// Initializes a new instance of the class. ///
/// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability. + /// An integer between 0 and 20 specifying the maximum number of most likely
+ /// tokens to return at each token position, each with an associated log
+ /// probability. In some cases, the number of returned tokens may be fewer than
+ /// requested. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs index 94a4f7fb8..d5d6c9961 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs @@ -25,7 +25,7 @@ public sealed partial class ResponseLogProb public required double Logprob { get; set; } /// - /// The log probability of the top 20 most likely tokens. + /// The log probabilities of up to 20 of the most likely tokens. /// [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] public global::System.Collections.Generic.IList? TopLogprobs { get; set; } @@ -46,7 +46,7 @@ public sealed partial class ResponseLogProb /// The log probability of this token. /// /// - /// The log probability of the top 20 most likely tokens. + /// The log probabilities of up to 20 of the most likely tokens. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/openapi.yaml b/src/libs/tryAGI.OpenAI/openapi.yaml index 6595bece6..56792972c 100644 --- a/src/libs/tryAGI.OpenAI/openapi.yaml +++ b/src/libs/tryAGI.OpenAI/openapi.yaml @@ -15691,7 +15691,8 @@ paths: }, "line_item": null, "project_id": null, - "api_key_id": null + "api_key_id": null, + "quantity": null } ] } @@ -41271,8 +41272,8 @@ components: top_logprobs: description: >- List of the most likely tokens and their log probability, at this - token position. In rare cases, there may be fewer than the number of - requested `top_logprobs` returned. + token position. The number of entries may be fewer than the + requested `top_logprobs`. type: array items: type: object @@ -42177,6 +42178,13 @@ components: When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result. - type: 'null' + quantity: + anyOf: + - type: number + description: >- + When `group_by=line_item`, this field provides the quantity of + the grouped costs result. + - type: 'null' required: - object x-oaiMeta: @@ -42189,7 +42197,8 @@ components: "currency": "usd" }, "line_item": "Image models", - "project_id": "proj_abc" + "project_id": "proj_abc", + "quantity": 10000 } CreateAssistantRequest: type: object @@ -42515,11 +42524,16 @@ components: $ref: '#/components/schemas/WebSearchContextSize' top_logprobs: description: > - An integer between 0 and 20 specifying the number of most likely - tokens to + An integer between 0 and 20 specifying the maximum number of + most likely + + tokens to return at each token position, each with an associated + log - return at each token position, each with an associated log - probability. + probability. In some cases, the number of returned tokens may be + fewer than + + requested. `logprobs` must be set to `true` if this parameter is used. type: integer @@ -45114,11 +45128,16 @@ components: properties: top_logprobs: description: > - An integer between 0 and 20 specifying the number of most likely - tokens to + An integer between 0 and 20 specifying the maximum number of + most likely + + tokens to return at each token position, each with an associated + log - return at each token position, each with an associated log - probability. + probability. In some cases, the number of returned tokens may be + fewer than + + requested. type: integer minimum: 0 maximum: 20 @@ -53800,11 +53819,16 @@ components: top_logprobs: anyOf: - description: > - An integer between 0 and 20 specifying the number of most likely - tokens to + An integer between 0 and 20 specifying the maximum number of + most likely + + tokens to return at each token position, each with an associated + log + + probability. In some cases, the number of returned tokens may be + fewer than - return at each token position, each with an associated log - probability. + requested. type: integer minimum: 0 maximum: 20 @@ -67046,7 +67070,7 @@ components: type: number top_logprobs: description: | - The log probability of the top 20 most likely tokens. + The log probabilities of up to 20 of the most likely tokens. type: array items: type: object