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
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@ namespace tryAGI.OpenAI
typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2AudioFormatJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2AudioFormatNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedEnumJsonConverter),
Expand All @@ -395,6 +393,8 @@ namespace tryAGI.OpenAI
typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2TypeNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsTypeJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsTypeNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchContextSizeJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchContextSizeNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationTypeJsonConverter),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2438,139 +2438,139 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.Verbosity? Type603 { get; set; }
public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Type603 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Type604 { get; set; }
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Type604 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Type605 { get; set; }
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? Type605 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? Type606 { get; set; }
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2AudioFormat? Type606 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2AudioFormat? Type607 { get; set; }
public global::tryAGI.OpenAI.VoiceIdsShared? Type607 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.VoiceIdsShared? Type608 { get; set; }
public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Type608 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Type609 { get; set; }
public global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2FunctionCall?, global::tryAGI.OpenAI.ChatCompletionFunctionCallOption>? Type609 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2FunctionCall?, global::tryAGI.OpenAI.ChatCompletionFunctionCallOption>? Type610 { get; set; }
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2FunctionCall? Type610 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2FunctionCall? Type611 { get; set; }
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ChatCompletionFunctions>? Type611 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ChatCompletionFunctions>? Type612 { get; set; }
public global::System.Collections.Generic.Dictionary<string, int>? Type612 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.Dictionary<string, int>? Type613 { get; set; }
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ChatCompletionRequestMessage>? Type613 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ChatCompletionRequestMessage>? Type614 { get; set; }
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ResponseModalitie>? Type614 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ResponseModalitie>? Type615 { get; set; }
public global::tryAGI.OpenAI.ResponseModalitie? Type615 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.ResponseModalitie? Type616 { get; set; }
public global::tryAGI.OpenAI.ModelIdsShared? Type616 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.ModelIdsShared? Type617 { get; set; }
public global::tryAGI.OpenAI.PredictionContent? Type617 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.PredictionContent? Type618 { get; set; }
public global::tryAGI.OpenAI.PredictionContentType? Type618 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.PredictionContentType? Type619 { get; set; }
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator? Type619 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator? Type620 { get; set; }
public global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.ResponseFormatText, global::tryAGI.OpenAI.ResponseFormatJsonSchema, global::tryAGI.OpenAI.ResponseFormatJsonObject>? Type620 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.ResponseFormatText, global::tryAGI.OpenAI.ResponseFormatJsonSchema, global::tryAGI.OpenAI.ResponseFormatJsonObject>? Type621 { get; set; }
public global::tryAGI.OpenAI.StopConfiguration? Type621 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.StopConfiguration? Type622 { get; set; }
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ToolsItem>? Type622 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ToolsItem>? Type623 { get; set; }
public global::tryAGI.OpenAI.ToolsItem? Type623 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.ToolsItem? Type624 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletions? Type624 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletions? Type625 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustom? Type625 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustom? Type626 { get; set; }
public global::tryAGI.OpenAI.Format2? Type626 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.Format2? Type627 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? Type627 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? Type628 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type? Type628 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type? Type629 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? Type629 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? Type630 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar? Type630 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar? Type631 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax? Type631 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax? Type632 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type? Type632 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type? Type633 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator? Type633 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator? Type634 { get; set; }
public global::tryAGI.OpenAI.CustomToolChatCompletionsType? Type634 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CustomToolChatCompletionsType? Type635 { get; set; }
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator? Type635 { get; set; }
/// <summary>
///
/// </summary>
public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator? Type636 { get; set; }
public global::tryAGI.OpenAI.Verbosity? Type636 { get; set; }
/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ public sealed partial class CreateChatCompletionRequestVariant2
[global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")]
public int? TopLogprobs { get; set; }

/// <summary>
/// Constrains the verbosity of the model's response. Lower values will result in<br/>
/// more concise responses, while higher values will result in more verbose responses.<br/>
/// Currently supported values are `low`, `medium`, and `high`.<br/>
/// Default Value: medium
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("verbosity")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter))]
public global::tryAGI.OpenAI.Verbosity? Verbosity { get; set; }

/// <summary>
/// This tool searches the web for relevant results to use in a response.<br/>
/// Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
Expand Down Expand Up @@ -396,6 +406,12 @@ public sealed partial class CreateChatCompletionRequestVariant2
/// return at each token position, each with an associated log probability.<br/>
/// `logprobs` must be set to `true` if this parameter is used.
/// </param>
/// <param name="verbosity">
/// Constrains the verbosity of the model's response. Lower values will result in<br/>
/// more concise responses, while higher values will result in more verbose responses.<br/>
/// Currently supported values are `low`, `medium`, and `high`.<br/>
/// Default Value: medium
/// </param>
/// <param name="webSearchOptions">
/// This tool searches the web for relevant results to use in a response.<br/>
/// Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
Expand Down Expand Up @@ -426,6 +442,7 @@ public CreateChatCompletionRequestVariant2(
global::tryAGI.OpenAI.ChatCompletionToolChoiceOption? toolChoice,
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ToolsItem>? tools,
int? topLogprobs,
global::tryAGI.OpenAI.Verbosity? verbosity,
global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? webSearchOptions)
{
this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages));
Expand All @@ -450,6 +467,7 @@ public CreateChatCompletionRequestVariant2(
this.ToolChoice = toolChoice;
this.Tools = tools;
this.TopLogprobs = topLogprobs;
this.Verbosity = verbosity;
this.WebSearchOptions = webSearchOptions;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ public sealed partial class ModelResponseProperties
[global::System.Obsolete("This property marked as deprecated.")]
public string? User { get; set; }

/// <summary>
/// Constrains the verbosity of the model's response. Lower values will result in<br/>
/// more concise responses, while higher values will result in more verbose responses.<br/>
/// Currently supported values are `low`, `medium`, and `high`.<br/>
/// Default Value: medium
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("verbosity")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter))]
public global::tryAGI.OpenAI.Verbosity? Verbosity { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -152,12 +142,6 @@ public sealed partial class ModelResponseProperties
/// Default Value: 1<br/>
/// Example: 1
/// </param>
/// <param name="verbosity">
/// Constrains the verbosity of the model's response. Lower values will result in<br/>
/// more concise responses, while higher values will result in more verbose responses.<br/>
/// Currently supported values are `low`, `medium`, and `high`.<br/>
/// Default Value: medium
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -168,8 +152,7 @@ public ModelResponseProperties(
global::tryAGI.OpenAI.ServiceTier? serviceTier,
double? temperature,
int? topLogprobs,
double? topP,
global::tryAGI.OpenAI.Verbosity? verbosity)
double? topP)
{
this.Metadata = metadata;
this.PromptCacheKey = promptCacheKey;
Expand All @@ -178,7 +161,6 @@ public ModelResponseProperties(
this.Temperature = temperature;
this.TopLogprobs = topLogprobs;
this.TopP = topP;
this.Verbosity = verbosity;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ public sealed partial class ResponsePropertiesText
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatConfigurationJsonConverter))]
public global::tryAGI.OpenAI.TextResponseFormatConfiguration? Format { get; set; }

/// <summary>
/// Constrains the verbosity of the model's response. Lower values will result in<br/>
/// more concise responses, while higher values will result in more verbose responses.<br/>
/// Currently supported values are `low`, `medium`, and `high`.<br/>
/// Default Value: medium
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("verbosity")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter))]
public global::tryAGI.OpenAI.Verbosity? Verbosity { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -46,13 +56,21 @@ public sealed partial class ResponsePropertiesText
/// ensures the message the model generates is valid JSON. Using `json_schema`<br/>
/// is preferred for models that support it.
/// </param>
/// <param name="verbosity">
/// Constrains the verbosity of the model's response. Lower values will result in<br/>
/// more concise responses, while higher values will result in more verbose responses.<br/>
/// Currently supported values are `low`, `medium`, and `high`.<br/>
/// Default Value: medium
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public ResponsePropertiesText(
global::tryAGI.OpenAI.TextResponseFormatConfiguration? format)
global::tryAGI.OpenAI.TextResponseFormatConfiguration? format,
global::tryAGI.OpenAI.Verbosity? verbosity)
{
this.Format = format;
this.Verbosity = verbosity;
}

/// <summary>
Expand Down
6 changes: 4 additions & 2 deletions src/libs/tryAGI.OpenAI/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10366,6 +10366,8 @@ components:
type: integer
description: "An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n`logprobs` must be set to `true` if this parameter is used.\n"
nullable: true
verbosity:
$ref: '#/components/schemas/Verbosity'
Comment on lines +10369 to +10370
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Add a description and decide on explicit-null handling for the new property.

Consider documenting this new field and clarifying nullability for client generators and validators.

Suggested change (OAS 3.0.x style):

-            verbosity:
-              $ref: '#/components/schemas/Verbosity'
+            verbosity:
+              $ref: '#/components/schemas/Verbosity'
+              description: "Controls the verbosity level of the model response."
+              nullable: true

If you’re on OAS 3.1, prefer:

verbosity:
  oneOf:
    - $ref: '#/components/schemas/Verbosity'
    - type: 'null'
  description: "Controls the verbosity level of the model response."

Verification script to check spec version and schema presence:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the OpenAPI spec file
SPEC="$(fd -a openapi.yaml | head -n1)"
echo "Spec file: $SPEC"

# Show OpenAPI version
echo "OpenAPI version:"
rg -n "^openapi:\s*" "$SPEC" -n -n -H || true

# Ensure Verbosity schema exists
echo
echo "Checking for Verbosity schema definition:"
rg -n "^\s*Verbosity:\s*$" "$SPEC" -n -A 15 || { echo "Missing components.schemas.Verbosity"; exit 1; }

# Show all places where 'verbosity' property is used
echo
echo "All 'verbosity' property occurrences:"
rg -n "^\s*verbosity:\s*$" "$SPEC" -n -A 2

# Sanity check: ensure 'verbosity' is not inadvertently required anywhere
echo
echo "Any 'required' lists that mention verbosity:"
rg -n "required:\s*(\[[^\]]*verbosity[^\]]*\])|(^\s*-\s*verbosity\s*$)" "$SPEC" -n -A 2 || true

Length of output: 2231


Add description to verbosity using allOf (OAS 3.0.x)

In OpenAPI 3.0.x, sibling keywords alongside a $ref are ignored. To attach a description (and preserve the schema’s existing nullable: true), wrap the reference in allOf:

• File: src/libs/tryAGI.OpenAI/openapi.yaml
• At lines 10369–10370 and 22712–22713:

-            verbosity:
-              $ref: '#/components/schemas/Verbosity'
+            verbosity:
+              allOf:
+                - $ref: '#/components/schemas/Verbosity'
+              description: "Controls the verbosity level of the model response."

Since components.schemas.Verbosity already includes nullable: true, you don’t need to re-specify it here.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml at lines 10369-10370 and 22712-22713, the
verbosity schema reference lacks a description because OpenAPI 3.0.x ignores
sibling keywords alongside $ref. To fix this, wrap the $ref inside an allOf
array and add the description as a sibling within allOf, preserving the existing
nullable property without re-specifying it.

web_search_options:
title: Web search
type: object
Expand Down Expand Up @@ -17890,8 +17892,6 @@ components:
description: "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users. \nUsed to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n"
example: user-1234
deprecated: true
verbosity:
$ref: '#/components/schemas/Verbosity'
ModerationImageURLInput:
required:
- type
Expand Down Expand Up @@ -22709,6 +22709,8 @@ components:
properties:
format:
$ref: '#/components/schemas/TextResponseFormatConfiguration'
verbosity:
$ref: '#/components/schemas/Verbosity'
description: "Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n- [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)\n"
tool_choice:
anyOf:
Expand Down
Loading