Skip to content

Commit 01f0188

Browse files
committed
feat(api): updates (#766)
1 parent 9ed8975 commit 01f0188

File tree

20 files changed

+1177
-44
lines changed

20 files changed

+1177
-44
lines changed

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 51
1+
configured_endpoints: 52

Diff for: api.md

+25-7
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,29 @@ Methods:
149149

150150
Types:
151151

152-
- <code><a href="./src/resources/fine-tuning/jobs.ts">FineTuningJob</a></code>
153-
- <code><a href="./src/resources/fine-tuning/jobs.ts">FineTuningJobEvent</a></code>
152+
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJob</a></code>
153+
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobEvent</a></code>
154+
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobIntegration</a></code>
155+
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobWandbIntegration</a></code>
156+
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobWandbIntegrationObject</a></code>
154157

155158
Methods:
156159

157-
- <code title="post /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs.ts">create</a>({ ...params }) -> FineTuningJob</code>
158-
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs.ts">retrieve</a>(fineTuningJobId) -> FineTuningJob</code>
159-
- <code title="get /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs.ts">list</a>({ ...params }) -> FineTuningJobsPage</code>
160-
- <code title="post /fine_tuning/jobs/{fine_tuning_job_id}/cancel">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs.ts">cancel</a>(fineTuningJobId) -> FineTuningJob</code>
161-
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/events">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs.ts">listEvents</a>(fineTuningJobId, { ...params }) -> FineTuningJobEventsPage</code>
160+
- <code title="post /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs/jobs.ts">create</a>({ ...params }) -> FineTuningJob</code>
161+
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs/jobs.ts">retrieve</a>(fineTuningJobId) -> FineTuningJob</code>
162+
- <code title="get /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs/jobs.ts">list</a>({ ...params }) -> FineTuningJobsPage</code>
163+
- <code title="post /fine_tuning/jobs/{fine_tuning_job_id}/cancel">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs/jobs.ts">cancel</a>(fineTuningJobId) -> FineTuningJob</code>
164+
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/events">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs/jobs.ts">listEvents</a>(fineTuningJobId, { ...params }) -> FineTuningJobEventsPage</code>
165+
166+
### Checkpoints
167+
168+
Types:
169+
170+
- <code><a href="./src/resources/fine-tuning/jobs/checkpoints.ts">FineTuningJobCheckpoint</a></code>
171+
172+
Methods:
173+
174+
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints">client.fineTuning.jobs.checkpoints.<a href="./src/resources/fine-tuning/jobs/checkpoints.ts">list</a>(fineTuningJobId, { ...params }) -> FineTuningJobCheckpointsPage</code>
162175

163176
# Beta
164177

@@ -214,6 +227,11 @@ Methods:
214227

215228
Types:
216229

230+
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantResponseFormat</a></code>
231+
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantResponseFormatOption</a></code>
232+
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantToolChoice</a></code>
233+
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantToolChoiceFunction</a></code>
234+
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantToolChoiceOption</a></code>
217235
- <code><a href="./src/resources/beta/threads/threads.ts">Thread</a></code>
218236
- <code><a href="./src/resources/beta/threads/threads.ts">ThreadDeleted</a></code>
219237

Diff for: src/resources/beta/assistants/assistants.ts

+23-4
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export interface Assistant {
113113
file_ids: Array<string>;
114114

115115
/**
116-
* The system instructions that the assistant uses. The maximum length is 32768
116+
* The system instructions that the assistant uses. The maximum length is 256,000
117117
* characters.
118118
*/
119119
instructions: string | null;
@@ -930,7 +930,26 @@ export interface AssistantCreateParams {
930930
* [Model overview](https://platform.openai.com/docs/models/overview) for
931931
* descriptions of them.
932932
*/
933-
model: string;
933+
model:
934+
| (string & {})
935+
| 'gpt-4-turbo'
936+
| 'gpt-4-turbo-2024-04-09'
937+
| 'gpt-4-0125-preview'
938+
| 'gpt-4-turbo-preview'
939+
| 'gpt-4-1106-preview'
940+
| 'gpt-4-vision-preview'
941+
| 'gpt-4'
942+
| 'gpt-4-0314'
943+
| 'gpt-4-0613'
944+
| 'gpt-4-32k'
945+
| 'gpt-4-32k-0314'
946+
| 'gpt-4-32k-0613'
947+
| 'gpt-3.5-turbo'
948+
| 'gpt-3.5-turbo-16k'
949+
| 'gpt-3.5-turbo-0613'
950+
| 'gpt-3.5-turbo-1106'
951+
| 'gpt-3.5-turbo-0125'
952+
| 'gpt-3.5-turbo-16k-0613';
934953

935954
/**
936955
* The description of the assistant. The maximum length is 512 characters.
@@ -945,7 +964,7 @@ export interface AssistantCreateParams {
945964
file_ids?: Array<string>;
946965

947966
/**
948-
* The system instructions that the assistant uses. The maximum length is 32768
967+
* The system instructions that the assistant uses. The maximum length is 256,000
949968
* characters.
950969
*/
951970
instructions?: string | null;
@@ -986,7 +1005,7 @@ export interface AssistantUpdateParams {
9861005
file_ids?: Array<string>;
9871006

9881007
/**
989-
* The system instructions that the assistant uses. The maximum length is 32768
1008+
* The system instructions that the assistant uses. The maximum length is 256,000
9901009
* characters.
9911010
*/
9921011
instructions?: string | null;

Diff for: src/resources/beta/beta.ts

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export namespace Beta {
3030
export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams;
3131
export import AssistantListParams = AssistantsAPI.AssistantListParams;
3232
export import Threads = ThreadsAPI.Threads;
33+
export import AssistantResponseFormat = ThreadsAPI.AssistantResponseFormat;
34+
export import AssistantResponseFormatOption = ThreadsAPI.AssistantResponseFormatOption;
35+
export import AssistantToolChoice = ThreadsAPI.AssistantToolChoice;
36+
export import AssistantToolChoiceFunction = ThreadsAPI.AssistantToolChoiceFunction;
37+
export import AssistantToolChoiceOption = ThreadsAPI.AssistantToolChoiceOption;
3338
export import Thread = ThreadsAPI.Thread;
3439
export import ThreadDeleted = ThreadsAPI.ThreadDeleted;
3540
export import ThreadCreateParams = ThreadsAPI.ThreadCreateParams;

Diff for: src/resources/beta/index.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ export {
1818
AssistantsPage,
1919
Assistants,
2020
} from './assistants/index';
21-
export { Beta } from './beta';
22-
export { Chat } from './chat/index';
2321
export {
22+
AssistantResponseFormat,
23+
AssistantResponseFormatOption,
24+
AssistantToolChoice,
25+
AssistantToolChoiceFunction,
26+
AssistantToolChoiceOption,
2427
Thread,
2528
ThreadDeleted,
2629
ThreadCreateParams,
@@ -32,3 +35,5 @@ export {
3235
ThreadCreateAndRunStreamParams,
3336
Threads,
3437
} from './threads/index';
38+
export { Beta } from './beta';
39+
export { Chat } from './chat/index';

Diff for: src/resources/beta/threads/index.ts

+17-12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ export {
2727
MessagesPage,
2828
Messages,
2929
} from './messages/index';
30+
export {
31+
AssistantResponseFormat,
32+
AssistantResponseFormatOption,
33+
AssistantToolChoice,
34+
AssistantToolChoiceFunction,
35+
AssistantToolChoiceOption,
36+
Thread,
37+
ThreadDeleted,
38+
ThreadCreateParams,
39+
ThreadUpdateParams,
40+
ThreadCreateAndRunParams,
41+
ThreadCreateAndRunParamsNonStreaming,
42+
ThreadCreateAndRunParamsStreaming,
43+
ThreadCreateAndRunPollParams,
44+
ThreadCreateAndRunStreamParams,
45+
Threads,
46+
} from './threads';
3047
export {
3148
RequiredActionFunctionToolCall,
3249
Run,
@@ -47,15 +64,3 @@ export {
4764
RunsPage,
4865
Runs,
4966
} from './runs/index';
50-
export {
51-
Thread,
52-
ThreadDeleted,
53-
ThreadCreateParams,
54-
ThreadUpdateParams,
55-
ThreadCreateAndRunParams,
56-
ThreadCreateAndRunParamsNonStreaming,
57-
ThreadCreateAndRunParamsStreaming,
58-
ThreadCreateAndRunPollParams,
59-
ThreadCreateAndRunStreamParams,
60-
Threads,
61-
} from './threads';

0 commit comments

Comments
 (0)