Skip to content

Sync API spec updates #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2023
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
48 changes: 32 additions & 16 deletions openapi.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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",
});

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1248,7 +1255,7 @@ paths:

async function main() {
const fineTune = await openai.fineTuning.jobs.retrieve("ft-AF1WoRqd3aJAHsqc9NY7iL8F");

console.log(fineTune);
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2138,6 +2145,12 @@ paths:
}

components:

securitySchemes:
ApiKeyAuth:
type: http
scheme: 'bearer'

schemas:
Error:
type: object
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -4073,6 +4086,9 @@ components:
- completion_tokens
- total_tokens

security:
- ApiKeyAuth: []

x-oaiMeta:
groups:
# > General Notes
Expand Down