Skip to content
Merged
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
46 changes: 29 additions & 17 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.0.2'
version: '1.0.3'
servers:
- url: https://api.openai.com/v1
tags:
Expand Down Expand Up @@ -1340,12 +1340,10 @@ components:
type: string
default: ''
example: "This is a test."
nullable: false
- type: array
minItems: 1
items:
type: integer
nullable: false
example: "[1212, 318, 257, 1332, 13]"
- type: array
minItems: 1
Expand All @@ -1354,7 +1352,6 @@ components:
minItems: 1
items:
type: integer
nullable: false
example: "[[1212, 318, 257, 1332, 13]]"
max_tokens:
type: integer
Expand Down Expand Up @@ -1438,7 +1435,6 @@ components:
items:
type: string
example: '["\n"]'
nullable: false
presence_penalty:
type: number
default: 0
Expand Down Expand Up @@ -1482,6 +1478,11 @@ components:
Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.

As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
user: &end_user_param_configuration
type: string
example: user-1234
description: |
A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.

CreateCompletionResponse:
type: object
Expand Down Expand Up @@ -1538,6 +1539,11 @@ components:
CreateSearchRequest:
type: object
properties:
query:
description: Query to search against the documents.
type: string
example: "the president"
minLength: 1
documents:
description: |
Up to 200 documents to search over, provided as a list of strings.
Expand All @@ -1559,12 +1565,6 @@ components:
You should specify either `documents` or a `file`, but not both.
type: string
nullable: true
query:
description: Query to search against the documents.
type: string
nullable: false
example: "the president"
minLength: 1
max_rerank:
description: |
The maximum number of documents to be re-ranked and returned by search.
Expand All @@ -1582,6 +1582,9 @@ components:
type: boolean
default: false
nullable: true
user: *end_user_param_configuration
required:
- query

CreateSearchResponse:
type: object
Expand Down Expand Up @@ -1734,14 +1737,12 @@ components:
- type: string
default: <|endoftext|>
example: "\n"
nullable: true
- type: array
minItems: 1
maxItems: 4
items:
type: string
example: '["\n"]'
nullable: false
nullable: true
n:
description: How many answers to generate for each question.
Expand All @@ -1763,6 +1764,12 @@ components:
items: {}
nullable: true
default: []
user: *end_user_param_configuration
required:
- model
- question
- examples
- examples_context

CreateAnswerResponse:
type: object
Expand Down Expand Up @@ -1857,6 +1864,10 @@ components:
return_prompt: *return_prompt_configuration
return_metadata: *return_metadata_configuration
expand: *expand_configuration
user: *end_user_param_configuration
required:
- model
- query

CreateClassificationResponse:
type: object
Expand Down Expand Up @@ -1898,7 +1909,6 @@ components:

See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details.
type: string
nullable: false
example: "file-ajSREls59WBbvgSzJSVWxMCB"
validation_file:
description: |
Expand Down Expand Up @@ -2017,6 +2027,8 @@ components:
example: [0.6, 1, 1.5, 2]
default: null
nullable: true
required:
- training_file

ListFineTunesResponse:
type: object
Expand Down Expand Up @@ -2057,12 +2069,10 @@ components:
type: string
default: ''
example: "This is a test."
nullable: false
- type: array
minItems: 1
items:
type: integer
nullable: false
example: "[1212, 318, 257, 1332, 13]"
- type: array
minItems: 1
Expand All @@ -2071,8 +2081,10 @@ components:
minItems: 1
items:
type: integer
nullable: false
example: "[[1212, 318, 257, 1332, 13]]"
user: *end_user_param_configuration
required:
- input

CreateEmbeddingResponse:
type: object
Expand Down