Skip to content

Commit

Permalink
feat(api): updates (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Apr 15, 2024
1 parent 9ed8975 commit 52bcc47
Show file tree
Hide file tree
Showing 20 changed files with 1,177 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 51
configured_endpoints: 52
32 changes: 25 additions & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,29 @@ Methods:

Types:

- <code><a href="./src/resources/fine-tuning/jobs.ts">FineTuningJob</a></code>
- <code><a href="./src/resources/fine-tuning/jobs.ts">FineTuningJobEvent</a></code>
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJob</a></code>
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobEvent</a></code>
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobIntegration</a></code>
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobWandbIntegration</a></code>
- <code><a href="./src/resources/fine-tuning/jobs/jobs.ts">FineTuningJobWandbIntegrationObject</a></code>

Methods:

- <code title="post /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs.ts">create</a>({ ...params }) -> FineTuningJob</code>
- <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>
- <code title="get /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs.ts">list</a>({ ...params }) -> FineTuningJobsPage</code>
- <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>
- <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>
- <code title="post /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs/jobs.ts">create</a>({ ...params }) -> FineTuningJob</code>
- <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>
- <code title="get /fine_tuning/jobs">client.fineTuning.jobs.<a href="./src/resources/fine-tuning/jobs/jobs.ts">list</a>({ ...params }) -> FineTuningJobsPage</code>
- <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>
- <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>

### Checkpoints

Types:

- <code><a href="./src/resources/fine-tuning/jobs/checkpoints.ts">FineTuningJobCheckpoint</a></code>

Methods:

- <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>

# Beta

Expand Down Expand Up @@ -214,6 +227,11 @@ Methods:

Types:

- <code><a href="./src/resources/beta/threads/threads.ts">AssistantResponseFormat</a></code>
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantResponseFormatOption</a></code>
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantToolChoice</a></code>
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantToolChoiceFunction</a></code>
- <code><a href="./src/resources/beta/threads/threads.ts">AssistantToolChoiceOption</a></code>
- <code><a href="./src/resources/beta/threads/threads.ts">Thread</a></code>
- <code><a href="./src/resources/beta/threads/threads.ts">ThreadDeleted</a></code>

Expand Down
27 changes: 23 additions & 4 deletions src/resources/beta/assistants/assistants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export interface Assistant {
file_ids: Array<string>;

/**
* The system instructions that the assistant uses. The maximum length is 32768
* The system instructions that the assistant uses. The maximum length is 256,000
* characters.
*/
instructions: string | null;
Expand Down Expand Up @@ -930,7 +930,26 @@ export interface AssistantCreateParams {
* [Model overview](https://platform.openai.com/docs/models/overview) for
* descriptions of them.
*/
model: string;
model:
| (string & {})
| 'gpt-4-turbo'
| 'gpt-4-turbo-2024-04-09'
| 'gpt-4-0125-preview'
| 'gpt-4-turbo-preview'
| 'gpt-4-1106-preview'
| 'gpt-4-vision-preview'
| 'gpt-4'
| 'gpt-4-0314'
| 'gpt-4-0613'
| 'gpt-4-32k'
| 'gpt-4-32k-0314'
| 'gpt-4-32k-0613'
| 'gpt-3.5-turbo'
| 'gpt-3.5-turbo-16k'
| 'gpt-3.5-turbo-0613'
| 'gpt-3.5-turbo-1106'
| 'gpt-3.5-turbo-0125'
| 'gpt-3.5-turbo-16k-0613';

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

/**
* The system instructions that the assistant uses. The maximum length is 32768
* The system instructions that the assistant uses. The maximum length is 256,000
* characters.
*/
instructions?: string | null;
Expand Down Expand Up @@ -986,7 +1005,7 @@ export interface AssistantUpdateParams {
file_ids?: Array<string>;

/**
* The system instructions that the assistant uses. The maximum length is 32768
* The system instructions that the assistant uses. The maximum length is 256,000
* characters.
*/
instructions?: string | null;
Expand Down
5 changes: 5 additions & 0 deletions src/resources/beta/beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export namespace Beta {
export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams;
export import AssistantListParams = AssistantsAPI.AssistantListParams;
export import Threads = ThreadsAPI.Threads;
export import AssistantResponseFormat = ThreadsAPI.AssistantResponseFormat;
export import AssistantResponseFormatOption = ThreadsAPI.AssistantResponseFormatOption;
export import AssistantToolChoice = ThreadsAPI.AssistantToolChoice;
export import AssistantToolChoiceFunction = ThreadsAPI.AssistantToolChoiceFunction;
export import AssistantToolChoiceOption = ThreadsAPI.AssistantToolChoiceOption;
export import Thread = ThreadsAPI.Thread;
export import ThreadDeleted = ThreadsAPI.ThreadDeleted;
export import ThreadCreateParams = ThreadsAPI.ThreadCreateParams;
Expand Down
9 changes: 7 additions & 2 deletions src/resources/beta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ export {
AssistantsPage,
Assistants,
} from './assistants/index';
export { Beta } from './beta';
export { Chat } from './chat/index';
export {
AssistantResponseFormat,
AssistantResponseFormatOption,
AssistantToolChoice,
AssistantToolChoiceFunction,
AssistantToolChoiceOption,
Thread,
ThreadDeleted,
ThreadCreateParams,
Expand All @@ -32,3 +35,5 @@ export {
ThreadCreateAndRunStreamParams,
Threads,
} from './threads/index';
export { Beta } from './beta';
export { Chat } from './chat/index';
29 changes: 17 additions & 12 deletions src/resources/beta/threads/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ export {
MessagesPage,
Messages,
} from './messages/index';
export {
AssistantResponseFormat,
AssistantResponseFormatOption,
AssistantToolChoice,
AssistantToolChoiceFunction,
AssistantToolChoiceOption,
Thread,
ThreadDeleted,
ThreadCreateParams,
ThreadUpdateParams,
ThreadCreateAndRunParams,
ThreadCreateAndRunParamsNonStreaming,
ThreadCreateAndRunParamsStreaming,
ThreadCreateAndRunPollParams,
ThreadCreateAndRunStreamParams,
Threads,
} from './threads';
export {
RequiredActionFunctionToolCall,
Run,
Expand All @@ -47,15 +64,3 @@ export {
RunsPage,
Runs,
} from './runs/index';
export {
Thread,
ThreadDeleted,
ThreadCreateParams,
ThreadUpdateParams,
ThreadCreateAndRunParams,
ThreadCreateAndRunParamsNonStreaming,
ThreadCreateAndRunParamsStreaming,
ThreadCreateAndRunPollParams,
ThreadCreateAndRunStreamParams,
Threads,
} from './threads';

0 comments on commit 52bcc47

Please sign in to comment.