Skip to content
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

Fix anyOf enum incompatibility with csharp client generators. #57

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
Fix anyOf enum incompatibility with csharp client generators.
fixes #56
  • Loading branch information
bobend committed Jul 6, 2023
commit 2be6822f0bf1a5a14886b717a20ee5aabaa149c1
51 changes: 17 additions & 34 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1634,10 +1634,8 @@ components:
model:
description: &model_description |
ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
anyOf:
- type: string
- type: string
enum: ["text-davinci-003","text-davinci-002","text-davinci-001","code-davinci-002","text-curie-001","text-babbage-001","text-ada-001"]
type: string
enum: ["text-davinci-003","text-davinci-002","text-davinci-001","code-davinci-002","text-curie-001","text-babbage-001","text-ada-001"]
prompt:
description: &completions_prompt_description |
The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
Expand Down Expand Up @@ -1983,10 +1981,8 @@ components:
model:
description: ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.
example: "gpt-3.5-turbo"
anyOf:
- type: string
- type: string
enum: ["gpt-4","gpt-4-0314","gpt-4-0613","gpt-4-32k","gpt-4-32k-0314","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-0301","gpt-3.5-turbo-0613","gpt-3.5-turbo-16k-0613"]
type: string
enum: ["gpt-4","gpt-4-0314","gpt-4-0613","gpt-4-32k","gpt-4-32k-0314","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-0301","gpt-3.5-turbo-0613","gpt-3.5-turbo-16k-0613"]
messages:
description: A list of messages comprising the conversation so far. [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).
type: array
Expand Down Expand Up @@ -2168,13 +2164,10 @@ components:
type: object
properties:
model:
description: ID of the model to use. You can use the `text-davinci-edit-001` or `code-davinci-edit-001` model with this endpoint.
type: string
description: ID of the model to use. You can use the `text-davinci-edit-001` or `code-davinci-edit-001` model with this endpoint.
example: "text-davinci-edit-001"
anyOf:
- type: string
- type: string
enum: ["text-davinci-edit-001","code-davinci-edit-001"]
type: string
enum: ["text-davinci-edit-001","code-davinci-edit-001"]
input:
description:
The input text to use as a starting point for the edit.
Expand Down Expand Up @@ -2385,10 +2378,8 @@ components:
nullable: false
default: "text-moderation-latest"
example: "text-moderation-stable"
anyOf:
- type: string
- type: string
enum: ["text-moderation-latest","text-moderation-stable"]
type: string
enum: ["text-moderation-latest","text-moderation-stable"]
required:
- input

Expand Down Expand Up @@ -2556,10 +2547,8 @@ components:
default: "curie"
example: "curie"
nullable: true
anyOf:
- type: string
- type: string
enum: ["ada","babbage","curie","davinci"]
type: string
enum: ["ada","babbage","curie","davinci"]
n_epochs:
description: |
The number of epochs to train the model for. An epoch refers to one
Expand Down Expand Up @@ -2698,10 +2687,8 @@ components:
model:
description: *model_description
example: "text-embedding-ada-002"
anyOf:
- type: string
- type: string
enum: ["text-embedding-ada-002"]
type: string
enum: ["text-embedding-ada-002"]
input:
description: |
Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed the max input tokens for the model (8191 tokens for `text-embedding-ada-002`). [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb) for counting tokens.
Expand Down Expand Up @@ -2787,10 +2774,8 @@ components:
description: |
ID of the model to use. Only `whisper-1` is currently available.
example: whisper-1
anyOf:
- type: string
- type: string
enum: ["whisper-1"]
type: string
enum: ["whisper-1"]
prompt:
description: |
An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.
Expand Down Expand Up @@ -2836,10 +2821,8 @@ components:
description: |
ID of the model to use. Only `whisper-1` is currently available.
example: whisper-1
anyOf:
- type: string
- type: string
enum: ["whisper-1"]
type: string
enum: ["whisper-1"]
prompt:
description: |
An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.
Expand Down