Skip to content

Commit b658488

Browse files
authored
Merge pull request #1 from openai/ds-enduser
[1.0.3] document end user param, fix some required params
2 parents 323f9d0 + 18b17d4 commit b658488

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

openapi.yaml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.0
22
info:
33
title: OpenAI API
44
description: APIs for sampling from and fine-tuning language models
5-
version: '1.0.2'
5+
version: '1.0.3'
66
servers:
77
- url: https://api.openai.com/v1
88
tags:
@@ -1340,12 +1340,10 @@ components:
13401340
type: string
13411341
default: ''
13421342
example: "This is a test."
1343-
nullable: false
13441343
- type: array
13451344
minItems: 1
13461345
items:
13471346
type: integer
1348-
nullable: false
13491347
example: "[1212, 318, 257, 1332, 13]"
13501348
- type: array
13511349
minItems: 1
@@ -1354,7 +1352,6 @@ components:
13541352
minItems: 1
13551353
items:
13561354
type: integer
1357-
nullable: false
13581355
example: "[[1212, 318, 257, 1332, 13]]"
13591356
max_tokens:
13601357
type: integer
@@ -1438,7 +1435,6 @@ components:
14381435
items:
14391436
type: string
14401437
example: '["\n"]'
1441-
nullable: false
14421438
presence_penalty:
14431439
type: number
14441440
default: 0
@@ -1482,6 +1478,11 @@ components:
14821478
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.
14831479

14841480
As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
1481+
user: &end_user_param_configuration
1482+
type: string
1483+
example: user-1234
1484+
description: |
1485+
A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
14851486
14861487
CreateCompletionResponse:
14871488
type: object
@@ -1538,6 +1539,11 @@ components:
15381539
CreateSearchRequest:
15391540
type: object
15401541
properties:
1542+
query:
1543+
description: Query to search against the documents.
1544+
type: string
1545+
example: "the president"
1546+
minLength: 1
15411547
documents:
15421548
description: |
15431549
Up to 200 documents to search over, provided as a list of strings.
@@ -1559,12 +1565,6 @@ components:
15591565
You should specify either `documents` or a `file`, but not both.
15601566
type: string
15611567
nullable: true
1562-
query:
1563-
description: Query to search against the documents.
1564-
type: string
1565-
nullable: false
1566-
example: "the president"
1567-
minLength: 1
15681568
max_rerank:
15691569
description: |
15701570
The maximum number of documents to be re-ranked and returned by search.
@@ -1582,6 +1582,9 @@ components:
15821582
type: boolean
15831583
default: false
15841584
nullable: true
1585+
user: *end_user_param_configuration
1586+
required:
1587+
- query
15851588

15861589
CreateSearchResponse:
15871590
type: object
@@ -1734,14 +1737,12 @@ components:
17341737
- type: string
17351738
default: <|endoftext|>
17361739
example: "\n"
1737-
nullable: true
17381740
- type: array
17391741
minItems: 1
17401742
maxItems: 4
17411743
items:
17421744
type: string
17431745
example: '["\n"]'
1744-
nullable: false
17451746
nullable: true
17461747
n:
17471748
description: How many answers to generate for each question.
@@ -1763,6 +1764,12 @@ components:
17631764
items: {}
17641765
nullable: true
17651766
default: []
1767+
user: *end_user_param_configuration
1768+
required:
1769+
- model
1770+
- question
1771+
- examples
1772+
- examples_context
17661773

17671774
CreateAnswerResponse:
17681775
type: object
@@ -1857,6 +1864,10 @@ components:
18571864
return_prompt: *return_prompt_configuration
18581865
return_metadata: *return_metadata_configuration
18591866
expand: *expand_configuration
1867+
user: *end_user_param_configuration
1868+
required:
1869+
- model
1870+
- query
18601871

18611872
CreateClassificationResponse:
18621873
type: object
@@ -1898,7 +1909,6 @@ components:
18981909
18991910
See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details.
19001911
type: string
1901-
nullable: false
19021912
example: "file-ajSREls59WBbvgSzJSVWxMCB"
19031913
validation_file:
19041914
description: |
@@ -2017,6 +2027,8 @@ components:
20172027
example: [0.6, 1, 1.5, 2]
20182028
default: null
20192029
nullable: true
2030+
required:
2031+
- training_file
20202032

20212033
ListFineTunesResponse:
20222034
type: object
@@ -2057,12 +2069,10 @@ components:
20572069
type: string
20582070
default: ''
20592071
example: "This is a test."
2060-
nullable: false
20612072
- type: array
20622073
minItems: 1
20632074
items:
20642075
type: integer
2065-
nullable: false
20662076
example: "[1212, 318, 257, 1332, 13]"
20672077
- type: array
20682078
minItems: 1
@@ -2071,8 +2081,10 @@ components:
20712081
minItems: 1
20722082
items:
20732083
type: integer
2074-
nullable: false
20752084
example: "[[1212, 318, 257, 1332, 13]]"
2085+
user: *end_user_param_configuration
2086+
required:
2087+
- input
20762088

20772089
CreateEmbeddingResponse:
20782090
type: object

0 commit comments

Comments
 (0)