Skip to content

Commit ed8fdb5

Browse files
Merge pull request openai#82 from openai/dev/logan/API-updates
Sync API spec updates
2 parents 03e6271 + 7d8e8bf commit ed8fdb5

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

openapi.yaml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
openapi: 3.0.0
22
info:
33
title: OpenAI API
4-
description: APIs for sampling from and fine-tuning language models
4+
description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
55
version: "2.0.0"
6+
termsOfService: https://openai.com/policies/terms-of-use
7+
contact:
8+
name: OpenAI Support
9+
url: https://help.openai.com/
10+
license:
11+
name: MIT
12+
url: https://github.com/openai/openai-openapi/blob/master/LICENSE
613
servers:
714
- url: https://api.openai.com/v1
815
tags:
@@ -78,7 +85,7 @@ paths:
7885
7986
async function main() {
8087
const completion = await openai.chat.completions.create({
81-
messages: [{ role: "system", content: "string" }],
88+
messages: [{ role: "system", content: "You are a helpful assistant." }],
8289
model: "VAR_model_id",
8390
});
8491
@@ -923,7 +930,7 @@ paths:
923930
required: true
924931
schema:
925932
type: string
926-
description: The ID of the file to use for this request
933+
description: The ID of the file to use for this request.
927934
responses:
928935
"200":
929936
description: OK
@@ -974,7 +981,7 @@ paths:
974981
required: true
975982
schema:
976983
type: string
977-
description: The ID of the file to use for this request
984+
description: The ID of the file to use for this request.
978985
responses:
979986
"200":
980987
description: OK
@@ -1022,14 +1029,14 @@ paths:
10221029
operationId: downloadFile
10231030
tags:
10241031
- OpenAI
1025-
summary: Returns the contents of the specified file
1032+
summary: Returns the contents of the specified file.
10261033
parameters:
10271034
- in: path
10281035
name: file_id
10291036
required: true
10301037
schema:
10311038
type: string
1032-
description: The ID of the file to use for this request
1039+
description: The ID of the file to use for this request.
10331040
responses:
10341041
"200":
10351042
description: OK
@@ -1220,7 +1227,7 @@ paths:
12201227
type: string
12211228
example: ft-AF1WoRqd3aJAHsqc9NY7iL8F
12221229
description: |
1223-
The ID of the fine-tuning job
1230+
The ID of the fine-tuning job.
12241231
responses:
12251232
"200":
12261233
description: OK
@@ -1248,7 +1255,7 @@ paths:
12481255
12491256
async function main() {
12501257
const fineTune = await openai.fineTuning.jobs.retrieve("ft-AF1WoRqd3aJAHsqc9NY7iL8F");
1251-
1258+
12521259
console.log(fineTune);
12531260
}
12541261
@@ -1378,7 +1385,7 @@ paths:
13781385
type: string
13791386
example: ft-AF1WoRqd3aJAHsqc9NY7iL8F
13801387
description: |
1381-
The ID of the fine-tuning job to cancel
1388+
The ID of the fine-tuning job to cancel.
13821389
responses:
13831390
"200":
13841391
description: OK
@@ -2138,6 +2145,12 @@ paths:
21382145
}
21392146

21402147
components:
2148+
2149+
securitySchemes:
2150+
ApiKeyAuth:
2151+
type: http
2152+
scheme: 'bearer'
2153+
21412154
schemas:
21422155
Error:
21432156
type: object
@@ -3823,19 +3836,19 @@ components:
38233836
"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.
38243837
training_file:
38253838
type: string
3826-
description: The file ID used for training.
3839+
description: The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).
38273840
validation_file:
38283841
type: string
38293842
nullable: true
3830-
description: The file ID used for validation.
3843+
description: The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).
38313844
result_files:
38323845
type: array
3833-
description: The compiled results files for the fine-tuning job.
3846+
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).
38343847
items:
38353848
$ref: "#/components/schemas/OpenAIFile"
38363849
trained_tokens:
38373850
type: integer
3838-
description: The total number of billable tokens processed by this fine tuning job.
3851+
description: The total number of billable tokens processed by this fine-tuning job.
38393852
required:
38403853
- id
38413854
- object
@@ -4020,11 +4033,11 @@ components:
40204033
- level
40214034
- message
40224035
x-oiMeta:
4023-
name: The fine-tuning event object
4036+
name: The fine-tuning job event object
40244037
example: |
40254038
{
4026-
"object": "fine_tuning.job.event",
4027-
"id": "ft-event-xiA7iJjj8V2zOkCGvWF2hAkDWBQZe",
4039+
"object": "event",
4040+
"id": "ftevent-abc123"
40284041
"created_at": 1677610602,
40294042
"level": "info",
40304043
"message": "Created fine-tuning job"
@@ -4073,6 +4086,9 @@ components:
40734086
- completion_tokens
40744087
- total_tokens
40754088

4089+
security:
4090+
- ApiKeyAuth: []
4091+
40764092
x-oaiMeta:
40774093
groups:
40784094
# > General Notes

0 commit comments

Comments
 (0)