Skip to content

Commit

Permalink
Merge pull request #49 from openai/model-enums
Browse files Browse the repository at this point in the history
Add model enums for autocomplete
  • Loading branch information
schnerd authored Jun 19, 2023
2 parents 23a3067 + eab237b commit a27cad2
Showing 1 changed file with 47 additions and 11 deletions.
58 changes: 47 additions & 11 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: OpenAI API
description: APIs for sampling from and fine-tuning language models
version: '1.3.0'
version: '1.3.1'
servers:
- url: https://api.openai.com/v1
tags:
Expand Down Expand Up @@ -2073,9 +2073,13 @@ components:
CreateCompletionRequest:
type: object
properties:
model: &model_configuration
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
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.
oneOf:
- 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"]
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 @@ -2411,7 +2415,11 @@ components:
properties:
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.
type: string
example: "gpt-3.5-turbo"
oneOf:
- type: string
- type: string
enum: ["gpt-4","gpt-4-0613","gpt-4-32k","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","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 @@ -2593,6 +2601,11 @@ components:
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
example: "text-davinci-edit-001"
oneOf:
- type: string
- 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 @@ -2798,10 +2811,13 @@ components:
Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.
The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.
type: string
nullable: false
default: "text-moderation-latest"
example: "text-moderation-stable"
oneOf:
- type: string
- type: string
enum: ["text-moderation-latest","text-moderation-stable"]
required:
- input

Expand Down Expand Up @@ -3145,7 +3161,9 @@ components:
type: object
additionalProperties: false
properties:
model: *model_configuration
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
query:
description: Query to be classified.
type: string
Expand Down Expand Up @@ -3279,8 +3297,12 @@ components:
To learn more about these models, see the
[Models](https://platform.openai.com/docs/models) documentation.
default: "curie"
type: string
example: "curie"
nullable: true
oneOf:
- type: string
- 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 @@ -3416,7 +3438,13 @@ components:
type: object
additionalProperties: false
properties:
model: *model_configuration
model:
description: *model_description
example: "text-embedding-ada-002"
oneOf:
- type: string
- 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 @@ -3501,7 +3529,11 @@ components:
model:
description: |
ID of the model to use. Only `whisper-1` is currently available.
type: string
example: whisper-1
oneOf:
- type: string
- 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 @@ -3546,7 +3578,11 @@ components:
model:
description: |
ID of the model to use. Only `whisper-1` is currently available.
type: string
example: whisper-1
oneOf:
- type: string
- 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

0 comments on commit a27cad2

Please sign in to comment.