diff --git a/openapi.yaml b/openapi.yaml index 89faed57..a42ee385 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,8 +1,15 @@ openapi: 3.0.0 info: title: OpenAI API - description: APIs for sampling from and fine-tuning language models + description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details. version: "2.0.0" + termsOfService: https://openai.com/policies/terms-of-use + contact: + name: OpenAI Support + url: https://help.openai.com/ + license: + name: MIT + url: https://github.com/openai/openai-openapi/blob/master/LICENSE servers: - url: https://api.openai.com/v1 tags: @@ -78,7 +85,7 @@ paths: async function main() { const completion = await openai.chat.completions.create({ - messages: [{ role: "system", content: "string" }], + messages: [{ role: "system", content: "You are a helpful assistant." }], model: "VAR_model_id", }); @@ -923,7 +930,7 @@ paths: required: true schema: type: string - description: The ID of the file to use for this request + description: The ID of the file to use for this request. responses: "200": description: OK @@ -974,7 +981,7 @@ paths: required: true schema: type: string - description: The ID of the file to use for this request + description: The ID of the file to use for this request. responses: "200": description: OK @@ -1022,14 +1029,14 @@ paths: operationId: downloadFile tags: - OpenAI - summary: Returns the contents of the specified file + summary: Returns the contents of the specified file. parameters: - in: path name: file_id required: true schema: type: string - description: The ID of the file to use for this request + description: The ID of the file to use for this request. responses: "200": description: OK @@ -1220,7 +1227,7 @@ paths: type: string example: ft-AF1WoRqd3aJAHsqc9NY7iL8F description: | - The ID of the fine-tuning job + The ID of the fine-tuning job. responses: "200": description: OK @@ -1248,7 +1255,7 @@ paths: async function main() { const fineTune = await openai.fineTuning.jobs.retrieve("ft-AF1WoRqd3aJAHsqc9NY7iL8F"); - + console.log(fineTune); } @@ -1378,7 +1385,7 @@ paths: type: string example: ft-AF1WoRqd3aJAHsqc9NY7iL8F description: | - The ID of the fine-tuning job to cancel + The ID of the fine-tuning job to cancel. responses: "200": description: OK @@ -2138,6 +2145,12 @@ paths: } components: + + securitySchemes: + ApiKeyAuth: + type: http + scheme: 'bearer' + schemas: Error: type: object @@ -3823,19 +3836,19 @@ components: "Auto" decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs. training_file: type: string - description: The file ID used for training. + description: The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents). validation_file: type: string nullable: true - description: The file ID used for validation. + description: The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents). result_files: type: array - description: The compiled results files for the fine-tuning job. + description: The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents). items: $ref: "#/components/schemas/OpenAIFile" trained_tokens: type: integer - description: The total number of billable tokens processed by this fine tuning job. + description: The total number of billable tokens processed by this fine-tuning job. required: - id - object @@ -4020,11 +4033,11 @@ components: - level - message x-oiMeta: - name: The fine-tuning event object + name: The fine-tuning job event object example: | { - "object": "fine_tuning.job.event", - "id": "ft-event-xiA7iJjj8V2zOkCGvWF2hAkDWBQZe", + "object": "event", + "id": "ftevent-abc123" "created_at": 1677610602, "level": "info", "message": "Created fine-tuning job" @@ -4073,6 +4086,9 @@ components: - completion_tokens - total_tokens +security: + - ApiKeyAuth: [] + x-oaiMeta: groups: # > General Notes