From 18b17d4b4f125923d1c99fc2bdb0fb121eaaafcb Mon Sep 17 00:00:00 2001 From: David Schnurr Date: Wed, 16 Feb 2022 10:51:08 -0800 Subject: [PATCH] [1.0.3] document end user param, fix some required params --- openapi.yaml | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 850ef369..f0e038be 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -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: @@ -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 @@ -1354,7 +1352,6 @@ components: minItems: 1 items: type: integer - nullable: false example: "[[1212, 318, 257, 1332, 13]]" max_tokens: type: integer @@ -1438,7 +1435,6 @@ components: items: type: string example: '["\n"]' - nullable: false presence_penalty: type: number default: 0 @@ -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 @@ -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. @@ -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. @@ -1582,6 +1582,9 @@ components: type: boolean default: false nullable: true + user: *end_user_param_configuration + required: + - query CreateSearchResponse: type: object @@ -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. @@ -1763,6 +1764,12 @@ components: items: {} nullable: true default: [] + user: *end_user_param_configuration + required: + - model + - question + - examples + - examples_context CreateAnswerResponse: type: object @@ -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 @@ -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: | @@ -2017,6 +2027,8 @@ components: example: [0.6, 1, 1.5, 2] default: null nullable: true + required: + - training_file ListFineTunesResponse: type: object @@ -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 @@ -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