-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat:Add verbosity property to relevant OpenAPI schemas and update references #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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' | ||
| web_search_options: | ||
| title: Web search | ||
| type: object | ||
|
|
@@ -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 | ||
|
|
@@ -22709,6 +22709,8 @@ components: | |
| properties: | ||
| format: | ||
| $ref: '#/components/schemas/TextResponseFormatConfiguration' | ||
| verbosity: | ||
| $ref: '#/components/schemas/Verbosity' | ||
|
Comment on lines
+22712
to
+22713
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAlign
If nulls should be accepted here too (OAS 3.0): verbosity:
$ref: '#/components/schemas/Verbosity'
+ nullable: trueTo spot potential breakage and ensure consistent usage across the repo: 🏁 Script executed: #!/bin/bash
set -euo pipefail
# List all occurrences of 'Verbosity' schema and 'verbosity' property
rg -n -A2 -B2 '^\s*Verbosity:|^\s*verbosity:' -- src
# Check if any client/SDK code references response config fields near this addition
rg -n -A4 -B4 'TextResponseFormatConfiguration|verbosity' -- .
# If you rely on codegen, ensure manifests/configs mention this OpenAPI file
fd 'openapi' -e yaml -e yml -e jsonLength of output: 72719 Add The • File: src/libs/tryAGI.OpenAI/openapi.yaml Suggested diff: verbosity:
$ref: '#/components/schemas/Verbosity'
+ nullable: trueAfter applying this change, regenerate the client SDK/types and verify any impacted tests or type declarations.
🤖 Prompt for AI Agents |
||
| 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: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Confirm schema existence and decide on nullability/optionality for
verbosity.#/components/schemas/Verbosityexists and is the intended target.verbosityshould be nullable (accepts null) and/or optional (omitted when unspecified). Current addition has nonullable: trueunlike neighboring fields such aslogprobs.If you intend to allow nulls at the property level, this minimal change is typical for OAS 3.0:
verbosity: $ref: '#/components/schemas/Verbosity' + nullable: trueAlternatively, make
Verbosityitself nullable (applies to all references), or keep it non-nullable and simply omit it from therequiredlist to make it optional.Run this script to verify the
Verbosityschema exists, find allverbosityproperties, and check their$refandnullableusage, plus whether any schema marks it as required:🏁 Script executed:
Length of output: 695
Confirm
Verbosityschema and nullability forverbosityproperties#/components/schemas/Verbosityschema exists.verbosity(both have$ref: '#/components/schemas/Verbosity'and nonullable):components/schemas/CreateChatCompletionRequest/allOf/1/properties/verbositycomponents/schemas/ResponseProperties/properties/text/properties/verbosityrequired, so both fields are already optional.If you need to allow
nullvalues, addnullable: trueto each property. For example:components/schemas/CreateChatCompletionRequest: allOf: - $ref: '#/components/schemas/BaseRequest' - properties: verbosity: $ref: '#/components/schemas/Verbosity' + nullable: true components/schemas/ResponseProperties: properties: text: properties: verbosity: $ref: '#/components/schemas/Verbosity' + nullable: trueIf you prefer to keep
verbositynon-nullable, no changes are needed beyond omitting it from anyrequiredlists.🤖 Prompt for AI Agents