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

Move model parameter above input/messages/file to make downstream clients more efficient for OpenAI API implementors #284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
62 changes: 31 additions & 31 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7811,12 +7811,6 @@ components:
CreateChatCompletionRequest:
type: object
properties:
messages:
description: A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).
type: array
minItems: 1
items:
$ref: "#/components/schemas/ChatCompletionRequestMessage"
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-4-turbo"
Expand Down Expand Up @@ -7848,6 +7842,12 @@ components:
"gpt-3.5-turbo-16k-0613",
]
x-oaiTypeLabel: string
messages:
description: A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).
type: array
minItems: 1
items:
$ref: "#/components/schemas/ChatCompletionRequestMessage"
frequency_penalty:
type: number
default: 0
Expand Down Expand Up @@ -8871,6 +8871,19 @@ components:
type: object
additionalProperties: false
properties:
model:
description: *model_description
example: "text-embedding-3-small"
anyOf:
- type: string
- type: string
enum:
[
"text-embedding-ada-002",
"text-embedding-3-small",
"text-embedding-3-large",
]
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`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
Expand Down Expand Up @@ -8910,19 +8923,6 @@ components:
type: integer
example: "[[1212, 318, 257, 1332, 13]]"
x-oaiExpandable: true
model:
description: *model_description
example: "text-embedding-3-small"
anyOf:
- type: string
- type: string
enum:
[
"text-embedding-ada-002",
"text-embedding-3-small",
"text-embedding-3-large",
]
x-oaiTypeLabel: string
encoding_format:
description: "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/)."
example: "float"
Expand Down Expand Up @@ -8977,12 +8977,6 @@ components:
type: object
additionalProperties: false
properties:
file:
description: |
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
type: string
x-oaiTypeLabel: file
format: binary
model:
description: |
ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.
Expand All @@ -8992,6 +8986,12 @@ components:
- type: string
enum: ["whisper-1"]
x-oaiTypeLabel: string
file:
description: |
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
type: string
x-oaiTypeLabel: file
format: binary
language:
description: |
The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.
Expand Down Expand Up @@ -9147,12 +9147,6 @@ components:
type: object
additionalProperties: false
properties:
file:
description: |
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
type: string
x-oaiTypeLabel: file
format: binary
model:
description: |
ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.
Expand All @@ -9162,6 +9156,12 @@ components:
- type: string
enum: ["whisper-1"]
x-oaiTypeLabel: string
file:
description: |
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
type: string
x-oaiTypeLabel: file
format: binary
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