| 
1 | 1 | openapi: 3.0.0  | 
2 | 2 | info:  | 
3 | 3 |  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.  | 
5 | 5 |  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  | 
6 | 13 | servers:  | 
7 | 14 |  - url: https://api.openai.com/v1  | 
8 | 15 | tags:  | 
 | 
78 | 85 | 
  | 
79 | 86 |  async function main() {  | 
80 | 87 |  const completion = await openai.chat.completions.create({  | 
81 |  | - messages: [{ role: "system", content: "string" }],  | 
 | 88 | + messages: [{ role: "system", content: "You are a helpful assistant." }],  | 
82 | 89 |  model: "VAR_model_id",  | 
83 | 90 |  });  | 
84 | 91 | 
  | 
@@ -923,7 +930,7 @@ paths:  | 
923 | 930 |  required: true  | 
924 | 931 |  schema:  | 
925 | 932 |  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.  | 
927 | 934 |  responses:  | 
928 | 935 |  "200":  | 
929 | 936 |  description: OK  | 
@@ -974,7 +981,7 @@ paths:  | 
974 | 981 |  required: true  | 
975 | 982 |  schema:  | 
976 | 983 |  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.  | 
978 | 985 |  responses:  | 
979 | 986 |  "200":  | 
980 | 987 |  description: OK  | 
@@ -1022,14 +1029,14 @@ paths:  | 
1022 | 1029 |  operationId: downloadFile  | 
1023 | 1030 |  tags:  | 
1024 | 1031 |  - OpenAI  | 
1025 |  | - summary: Returns the contents of the specified file  | 
 | 1032 | + summary: Returns the contents of the specified file.  | 
1026 | 1033 |  parameters:  | 
1027 | 1034 |  - in: path  | 
1028 | 1035 |  name: file_id  | 
1029 | 1036 |  required: true  | 
1030 | 1037 |  schema:  | 
1031 | 1038 |  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.  | 
1033 | 1040 |  responses:  | 
1034 | 1041 |  "200":  | 
1035 | 1042 |  description: OK  | 
@@ -1220,7 +1227,7 @@ paths:  | 
1220 | 1227 |  type: string  | 
1221 | 1228 |  example: ft-AF1WoRqd3aJAHsqc9NY7iL8F  | 
1222 | 1229 |  description: |  | 
1223 |  | - The ID of the fine-tuning job  | 
 | 1230 | + The ID of the fine-tuning job.  | 
1224 | 1231 |  responses:  | 
1225 | 1232 |  "200":  | 
1226 | 1233 |  description: OK  | 
@@ -1248,7 +1255,7 @@ paths:  | 
1248 | 1255 | 
  | 
1249 | 1256 |  async function main() {  | 
1250 | 1257 |  const fineTune = await openai.fineTuning.jobs.retrieve("ft-AF1WoRqd3aJAHsqc9NY7iL8F");  | 
1251 |  | -
  | 
 | 1258 | +   | 
1252 | 1259 |  console.log(fineTune);  | 
1253 | 1260 |  }  | 
1254 | 1261 | 
  | 
@@ -1378,7 +1385,7 @@ paths:  | 
1378 | 1385 |  type: string  | 
1379 | 1386 |  example: ft-AF1WoRqd3aJAHsqc9NY7iL8F  | 
1380 | 1387 |  description: |  | 
1381 |  | - The ID of the fine-tuning job to cancel  | 
 | 1388 | + The ID of the fine-tuning job to cancel.  | 
1382 | 1389 |  responses:  | 
1383 | 1390 |  "200":  | 
1384 | 1391 |  description: OK  | 
@@ -2138,6 +2145,12 @@ paths:  | 
2138 | 2145 |  }  | 
2139 | 2146 | 
 
  | 
2140 | 2147 | components:  | 
 | 2148 | + | 
 | 2149 | + securitySchemes:  | 
 | 2150 | + ApiKeyAuth:  | 
 | 2151 | + type: http  | 
 | 2152 | + scheme: 'bearer'  | 
 | 2153 | + | 
2141 | 2154 |  schemas:  | 
2142 | 2155 |  Error:  | 
2143 | 2156 |  type: object  | 
@@ -3823,19 +3836,19 @@ components:  | 
3823 | 3836 |  "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.  | 
3824 | 3837 |  training_file:  | 
3825 | 3838 |  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).  | 
3827 | 3840 |  validation_file:  | 
3828 | 3841 |  type: string  | 
3829 | 3842 |  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).  | 
3831 | 3844 |  result_files:  | 
3832 | 3845 |  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).   | 
3834 | 3847 |  items:  | 
3835 | 3848 |  $ref: "#/components/schemas/OpenAIFile"  | 
3836 | 3849 |  trained_tokens:  | 
3837 | 3850 |  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.  | 
3839 | 3852 |  required:  | 
3840 | 3853 |  - id  | 
3841 | 3854 |  - object  | 
@@ -4020,11 +4033,11 @@ components:  | 
4020 | 4033 |  - level  | 
4021 | 4034 |  - message  | 
4022 | 4035 |  x-oiMeta:  | 
4023 |  | - name: The fine-tuning event object  | 
 | 4036 | + name: The fine-tuning job event object  | 
4024 | 4037 |  example: |  | 
4025 | 4038 |  {  | 
4026 |  | - "object": "fine_tuning.job.event",  | 
4027 |  | - "id": "ft-event-xiA7iJjj8V2zOkCGvWF2hAkDWBQZe",  | 
 | 4039 | + "object": "event",  | 
 | 4040 | + "id": "ftevent-abc123"  | 
4028 | 4041 |  "created_at": 1677610602,  | 
4029 | 4042 |  "level": "info",  | 
4030 | 4043 |  "message": "Created fine-tuning job"  | 
@@ -4073,6 +4086,9 @@ components:  | 
4073 | 4086 |  - completion_tokens  | 
4074 | 4087 |  - total_tokens  | 
4075 | 4088 | 
 
  | 
 | 4089 | +security:  | 
 | 4090 | + - ApiKeyAuth: []  | 
 | 4091 | + | 
4076 | 4092 | x-oaiMeta:  | 
4077 | 4093 |  groups:  | 
4078 | 4094 |  # > General Notes  | 
 | 
0 commit comments