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
Prev Previous commit
Next Next commit
Merge branch 'master' into any-enum-fix
  • Loading branch information
bobend committed Nov 7, 2023
commit 0b5dccfff9562161189821ece41f3aac450bd7ce
119 changes: 44 additions & 75 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5233,7 +5233,19 @@ components:
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.
type: string
enum: ["text-davinci-003","text-davinci-002","text-davinci-001","code-davinci-002","text-curie-001","text-babbage-001","text-ada-001"]
enum:
[
"babbage-002",
"davinci-002",
"gpt-3.5-turbo-instruct",
"text-davinci-003",
"text-davinci-002",
"text-davinci-001",
"code-davinci-002",
"text-curie-001",
"text-babbage-001",
"text-ada-001",
]
x-oaiTypeLabel: string
prompt:
description: &completions_prompt_description |
Expand Down Expand Up @@ -5921,7 +5933,20 @@ components:
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"
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"]
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",
]
x-oaiTypeLabel: string
frequency_penalty:
type: number
Expand Down Expand Up @@ -6284,7 +6309,7 @@ components:
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"
type: string
enum: ["text-davinci-edit-001","code-davinci-edit-001"]
enum: ["text-davinci-edit-001", "code-davinci-edit-001"]
x-oaiTypeLabel: string
input:
description: The input text to use as a starting point for the edit.
Expand Down Expand Up @@ -6371,10 +6396,8 @@ components:
type: string
example: "A cute baby sea otter"
model:
anyOf:
- type: string
- type: string
enum: ["dall-e-2", "dall-e-3"]
type: string
enum: ["dall-e-2", "dall-e-3"]
x-oaiTypeLabel: string
default: "dall-e-2"
example: "dall-e-3"
Expand Down Expand Up @@ -6468,10 +6491,8 @@ components:
type: string
format: binary
model:
anyOf:
- type: string
- type: string
enum: ["dall-e-2"]
type: string
enum: ["dall-e-2"]
x-oaiTypeLabel: string
default: "dall-e-2"
example: "dall-e-2"
Expand Down Expand Up @@ -6506,10 +6527,8 @@ components:
type: string
format: binary
model:
anyOf:
- type: string
- type: string
enum: ["dall-e-2"]
type: string
enum: ["dall-e-2"]
x-oaiTypeLabel: string
default: "dall-e-2"
example: "dall-e-2"
Expand Down Expand Up @@ -6545,7 +6564,7 @@ components:
default: "text-moderation-latest"
example: "text-moderation-stable"
type: string
enum: ["text-moderation-latest","text-moderation-stable"]
enum: ["text-moderation-latest", "text-moderation-stable"]
x-oaiTypeLabel: string
required:
- input
Expand Down Expand Up @@ -6736,10 +6755,8 @@ components:
The name of the model to fine-tune. You can select one of the
[supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned).
example: "gpt-3.5-turbo"
anyOf:
- type: string
- type: string
enum: ["babbage-002", "davinci-002", "gpt-3.5-turbo"]
type: string
enum: ["babbage-002", "davinci-002", "gpt-3.5-turbo"]
x-oaiTypeLabel: string
training_file:
description: |
Expand Down Expand Up @@ -6847,43 +6864,7 @@ components:

See the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more details.
type: string
example: "file-ajSREls59WBbvgSzJSVWxMCB"
validation_file:
description: |
The ID of an uploaded file that contains validation data.

If you provide this file, the data is used to generate validation
metrics periodically during fine-tuning. These metrics can be viewed in
the [fine-tuning results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model).
Your train and validation data should be mutually exclusive.

Your dataset must be formatted as a JSONL file, where each validation
example is a JSON object with the keys "prompt" and "completion".
Additionally, you must upload your file with the purpose `fine-tune`.

See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details.
type: string
nullable: true
example: "file-XjSREls59WBbvgSzJSVWxMCa"
model:
description: |
The name of the base model to fine-tune. You can select one of "ada",
"babbage", "curie", "davinci", or a fine-tuned model created after 2022-04-21.
To learn more about these models, see the
[Models](https://platform.openai.com/docs/models) documentation.
default: "curie"
example: "curie"
nullable: true
type: string
enum: ["ada","babbage","curie","davinci"]
x-oaiTypeLabel: string
n_epochs:
description: |
The number of epochs to train the model for. An epoch refers to one
full cycle through the training dataset.
default: 4
type: integer
nullable: true
example: "file-abc123"
batch_size:
description: |
The batch size to use for training. The batch size is the number of
Expand Down Expand Up @@ -6980,10 +6961,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"]
x-oaiTypeLabel: string
prompt_loss_weight:
description: |
Expand Down Expand Up @@ -7060,12 +7039,6 @@ components:
type: object
additionalProperties: false
properties:
model:
description: *model_description
example: "text-embedding-ada-002"
type: string
enum: ["text-embedding-ada-002"]
x-oaiTypeLabel: string
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. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`) and cannot be an empty string. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
Expand Down Expand Up @@ -7096,10 +7069,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"]
x-oaiTypeLabel: string
encoding_format:
description: "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/)."
Expand Down Expand Up @@ -7251,10 +7222,8 @@ components:
model:
description: |
One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`
anyOf:
- type: string
- type: string
enum: ["tts-1", "tts-1-hd"]
type: string
enum: ["tts-1", "tts-1-hd"]
x-oaiTypeLabel: string
input:
type: string
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.