openai 4.36.0 → 4.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +16 -2
- package/lib/AssistantStream.d.ts +2 -2
- package/lib/AssistantStream.d.ts.map +1 -1
- package/lib/Util.d.ts +5 -0
- package/lib/Util.d.ts.map +1 -0
- package/lib/Util.js +26 -0
- package/lib/Util.js.map +1 -0
- package/lib/Util.mjs +22 -0
- package/lib/Util.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/beta/{assistants/assistants.d.ts → assistants.d.ts} +217 -41
- package/resources/beta/assistants.d.ts.map +1 -0
- package/resources/beta/{assistants/assistants.js → assistants.js} +6 -13
- package/resources/beta/assistants.js.map +1 -0
- package/resources/beta/{assistants/assistants.mjs → assistants.mjs} +6 -13
- package/resources/beta/assistants.mjs.map +1 -0
- package/resources/beta/beta.d.ts +11 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +5 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +5 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.ts +2 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +11 -8
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +2 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/threads/index.d.ts +1 -1
- package/resources/beta/threads/index.d.ts.map +1 -1
- package/resources/beta/threads/index.js +6 -6
- package/resources/beta/threads/index.js.map +1 -1
- package/resources/beta/threads/index.mjs +1 -1
- package/resources/beta/threads/{messages/messages.d.ts → messages.d.ts} +27 -28
- package/resources/beta/threads/messages.d.ts.map +1 -0
- package/resources/beta/threads/{messages/messages.js → messages.js} +5 -12
- package/resources/beta/threads/messages.js.map +1 -0
- package/resources/beta/threads/{messages/messages.mjs → messages.mjs} +5 -12
- package/resources/beta/threads/messages.mjs.map +1 -0
- package/resources/beta/threads/runs/index.d.ts +1 -1
- package/resources/beta/threads/runs/index.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +75 -29
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js +6 -6
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs +6 -6
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +40 -40
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/runs/steps.js +2 -2
- package/resources/beta/threads/runs/steps.mjs +2 -2
- package/resources/beta/threads/threads.d.ts +498 -32
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +6 -6
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +6 -6
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/beta/vector-stores/file-batches.d.ts +142 -0
- package/resources/beta/vector-stores/file-batches.d.ts.map +1 -0
- package/resources/beta/vector-stores/file-batches.js +128 -0
- package/resources/beta/vector-stores/file-batches.js.map +1 -0
- package/resources/beta/vector-stores/file-batches.mjs +124 -0
- package/resources/beta/vector-stores/file-batches.mjs.map +1 -0
- package/resources/beta/vector-stores/files.d.ts +148 -0
- package/resources/beta/vector-stores/files.d.ts.map +1 -0
- package/resources/beta/vector-stores/files.js +148 -0
- package/resources/beta/vector-stores/files.js.map +1 -0
- package/resources/beta/vector-stores/files.mjs +120 -0
- package/resources/beta/vector-stores/files.mjs.map +1 -0
- package/resources/beta/vector-stores/index.d.ts +4 -0
- package/resources/beta/vector-stores/index.d.ts.map +1 -0
- package/resources/beta/vector-stores/index.js +13 -0
- package/resources/beta/vector-stores/index.js.map +1 -0
- package/resources/beta/vector-stores/index.mjs +5 -0
- package/resources/beta/vector-stores/index.mjs.map +1 -0
- package/resources/beta/vector-stores/vector-stores.d.ts +233 -0
- package/resources/beta/vector-stores/vector-stores.d.ts.map +1 -0
- package/resources/beta/vector-stores/vector-stores.js +99 -0
- package/resources/beta/vector-stores/vector-stores.js.map +1 -0
- package/resources/beta/vector-stores/vector-stores.mjs +71 -0
- package/resources/beta/vector-stores/vector-stores.mjs.map +1 -0
- package/resources/fine-tuning/jobs/jobs.d.ts +1 -1
- package/src/lib/AssistantStream.ts +2 -2
- package/src/lib/Util.ts +23 -0
- package/src/resources/beta/{assistants/assistants.ts → assistants.ts} +254 -58
- package/src/resources/beta/beta.ts +11 -2
- package/src/resources/beta/index.ts +11 -2
- package/src/resources/beta/threads/index.ts +1 -1
- package/src/resources/beta/threads/{messages/messages.ts → messages.ts} +39 -38
- package/src/resources/beta/threads/runs/index.ts +2 -2
- package/src/resources/beta/threads/runs/runs.ts +94 -36
- package/src/resources/beta/threads/runs/steps.ts +49 -49
- package/src/resources/beta/threads/threads.ts +571 -37
- package/src/resources/beta/vector-stores/file-batches.ts +292 -0
- package/src/resources/beta/vector-stores/files.ts +277 -0
- package/src/resources/beta/vector-stores/index.ts +25 -0
- package/src/resources/beta/vector-stores/vector-stores.ts +318 -0
- package/src/resources/fine-tuning/jobs/jobs.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/beta/assistants/assistants.d.ts.map +0 -1
- package/resources/beta/assistants/assistants.js.map +0 -1
- package/resources/beta/assistants/assistants.mjs.map +0 -1
- package/resources/beta/assistants/files.d.ts +0 -88
- package/resources/beta/assistants/files.d.ts.map +0 -1
- package/resources/beta/assistants/files.js +0 -81
- package/resources/beta/assistants/files.js.map +0 -1
- package/resources/beta/assistants/files.mjs +0 -53
- package/resources/beta/assistants/files.mjs.map +0 -1
- package/resources/beta/assistants/index.d.ts +0 -3
- package/resources/beta/assistants/index.d.ts.map +0 -1
- package/resources/beta/assistants/index.js +0 -11
- package/resources/beta/assistants/index.js.map +0 -1
- package/resources/beta/assistants/index.mjs +0 -4
- package/resources/beta/assistants/index.mjs.map +0 -1
- package/resources/beta/threads/messages/files.d.ts +0 -60
- package/resources/beta/threads/messages/files.d.ts.map +0 -1
- package/resources/beta/threads/messages/files.js +0 -60
- package/resources/beta/threads/messages/files.js.map +0 -1
- package/resources/beta/threads/messages/files.mjs +0 -32
- package/resources/beta/threads/messages/files.mjs.map +0 -1
- package/resources/beta/threads/messages/index.d.ts +0 -3
- package/resources/beta/threads/messages/index.d.ts.map +0 -1
- package/resources/beta/threads/messages/index.js +0 -11
- package/resources/beta/threads/messages/index.js.map +0 -1
- package/resources/beta/threads/messages/index.mjs +0 -4
- package/resources/beta/threads/messages/index.mjs.map +0 -1
- package/resources/beta/threads/messages/messages.d.ts.map +0 -1
- package/resources/beta/threads/messages/messages.js.map +0 -1
- package/resources/beta/threads/messages/messages.mjs.map +0 -1
- package/src/resources/beta/assistants/files.ts +0 -154
- package/src/resources/beta/assistants/index.ts +0 -28
- package/src/resources/beta/threads/messages/files.ts +0 -105
- package/src/resources/beta/threads/messages/index.ts +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.37.0 (2024-04-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.36.0...v4.37.0](https://github.com/openai/openai-node/compare/v4.36.0...v4.37.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add vector stores ([#776](https://github.com/openai/openai-node/issues/776)) ([8bb929b](https://github.com/openai/openai-node/commit/8bb929b2ee91c1bec0a00347bf4f7628652d1be3))
|
|
10
|
+
|
|
3
11
|
## 4.36.0 (2024-04-16)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v4.35.0...v4.36.0](https://github.com/openai/openai-node/compare/v4.35.0...v4.36.0)
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ You can import in Deno via:
|
|
|
19
19
|
<!-- x-release-please-start-version -->
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
|
-
import OpenAI from 'https://deno.land/x/openai@v4.
|
|
22
|
+
import OpenAI from 'https://deno.land/x/openai@v4.37.0/mod.ts';
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
<!-- x-release-please-end -->
|
|
@@ -102,7 +102,7 @@ Documentation for each method, request param, and response field are available i
|
|
|
102
102
|
|
|
103
103
|
### Polling Helpers
|
|
104
104
|
|
|
105
|
-
When interacting with the API some actions such as starting a Run
|
|
105
|
+
When interacting with the API some actions such as starting a Run and adding files to vector stores are asynchronous and take time to complete. The SDK includes
|
|
106
106
|
helper functions which will poll the status until it reaches a terminal state and then return the resulting object.
|
|
107
107
|
If an API method results in an action which could benefit from polling there will be a corresponding version of the
|
|
108
108
|
method ending in 'AndPoll'.
|
|
@@ -117,6 +117,20 @@ const run = await openai.beta.threads.runs.createAndPoll(thread.id, {
|
|
|
117
117
|
|
|
118
118
|
More information on the lifecycle of a Run can be found in the [Run Lifecycle Documentation](https://platform.openai.com/docs/assistants/how-it-works/run-lifecycle)
|
|
119
119
|
|
|
120
|
+
### Bulk Upload Helpers
|
|
121
|
+
|
|
122
|
+
When creating an interacting with vector stores, you can use the polling helpers to monitor the status of operations.
|
|
123
|
+
For convenience, we also provide a bulk upload helper to allow you to simultaneously upload several files at once.
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
const fileList = [
|
|
127
|
+
createReadStream('/home/data/example.pdf'),
|
|
128
|
+
...
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
const batch = await openai.vectorStores.fileBatches.uploadAndPoll(vectorStore.id, fileList);
|
|
132
|
+
```
|
|
133
|
+
|
|
120
134
|
### Streaming Helpers
|
|
121
135
|
|
|
122
136
|
The SDK also includes helpers to process streams and handle the incoming events.
|
package/lib/AssistantStream.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Message, Text, ImageFile, TextDelta, Messages } from 'openai/resources/beta/threads/messages
|
|
1
|
+
import { Message, Text, ImageFile, TextDelta, Messages } from 'openai/resources/beta/threads/messages';
|
|
2
2
|
import * as Core from 'openai/core';
|
|
3
3
|
import { RequestOptions } from 'openai/core';
|
|
4
4
|
import { Run, RunCreateParamsBase, Runs, RunSubmitToolOutputsParamsBase } from 'openai/resources/beta/threads/runs/runs';
|
|
5
5
|
import { AbstractAssistantRunnerEvents, AbstractAssistantStreamRunner } from "./AbstractAssistantStreamRunner.js";
|
|
6
6
|
import { type ReadableStream } from 'openai/_shims/index';
|
|
7
|
-
import { AssistantStreamEvent } from 'openai/resources/beta/assistants
|
|
7
|
+
import { AssistantStreamEvent } from 'openai/resources/beta/assistants';
|
|
8
8
|
import { RunStep, RunStepDelta, ToolCall, ToolCallDelta } from 'openai/resources/beta/threads/runs/steps';
|
|
9
9
|
import { ThreadCreateAndRunParamsBase, Threads } from 'openai/resources/beta/threads/threads';
|
|
10
10
|
import MessageDelta = Messages.MessageDelta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantStream.d.ts","sourceRoot":"","sources":["../src/lib/AssistantStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,OAAO,EAEP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,QAAQ,EACT,MAAM,
|
|
1
|
+
{"version":3,"file":"AssistantStream.d.ts","sourceRoot":"","sources":["../src/lib/AssistantStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,OAAO,EAEP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,QAAQ,EACT,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,GAAG,EACH,mBAAmB,EAEnB,IAAI,EACJ,8BAA8B,EAE/B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM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":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,6CAmB/B,CAAC"}
|
package/lib/Util.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allSettledWithThrow = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Like `Promise.allSettled()` but throws an error if any promises are rejected.
|
|
6
|
+
*/
|
|
7
|
+
const allSettledWithThrow = async (promises) => {
|
|
8
|
+
const results = await Promise.allSettled(promises);
|
|
9
|
+
const rejected = results.filter((result) => result.status === 'rejected');
|
|
10
|
+
if (rejected.length) {
|
|
11
|
+
for (const result of rejected) {
|
|
12
|
+
console.error(result.reason);
|
|
13
|
+
}
|
|
14
|
+
throw new Error(`${rejected.length} promise(s) failed - see the above errors`);
|
|
15
|
+
}
|
|
16
|
+
// Note: TS was complaining about using `.filter().map()` here for some reason
|
|
17
|
+
const values = [];
|
|
18
|
+
for (const result of results) {
|
|
19
|
+
if (result.status === 'fulfilled') {
|
|
20
|
+
values.push(result.value);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return values;
|
|
24
|
+
};
|
|
25
|
+
exports.allSettledWithThrow = allSettledWithThrow;
|
|
26
|
+
//# sourceMappingURL=Util.js.map
|
package/lib/Util.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../src/lib/Util.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,mBAAmB,GAAG,KAAK,EAAK,QAAsB,EAAgB,EAAE;IACnF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAmC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;IAC3G,IAAI,QAAQ,CAAC,MAAM,EAAE;QACnB,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE;YAC7B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAC9B;QAED,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,2CAA2C,CAAC,CAAC;KAChF;IAED,8EAA8E;IAC9E,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC3B;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B"}
|
package/lib/Util.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Like `Promise.allSettled()` but throws an error if any promises are rejected.
|
|
3
|
+
*/
|
|
4
|
+
export const allSettledWithThrow = async (promises) => {
|
|
5
|
+
const results = await Promise.allSettled(promises);
|
|
6
|
+
const rejected = results.filter((result) => result.status === 'rejected');
|
|
7
|
+
if (rejected.length) {
|
|
8
|
+
for (const result of rejected) {
|
|
9
|
+
console.error(result.reason);
|
|
10
|
+
}
|
|
11
|
+
throw new Error(`${rejected.length} promise(s) failed - see the above errors`);
|
|
12
|
+
}
|
|
13
|
+
// Note: TS was complaining about using `.filter().map()` here for some reason
|
|
14
|
+
const values = [];
|
|
15
|
+
for (const result of results) {
|
|
16
|
+
if (result.status === 'fulfilled') {
|
|
17
|
+
values.push(result.value);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return values;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Util.mjs.map
|
package/lib/Util.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Util.mjs","sourceRoot":"","sources":["../src/lib/Util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EAAK,QAAsB,EAAgB,EAAE;IACnF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAmC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;IAC3G,IAAI,QAAQ,CAAC,MAAM,EAAE;QACnB,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE;YAC7B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAC9B;QAED,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,2CAA2C,CAAC,CAAC;KAChF;IAED,8EAA8E;IAC9E,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC3B;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import * as Core from 'openai/core';
|
|
2
2
|
import { APIResource } from 'openai/resource';
|
|
3
|
-
import * as AssistantsAPI from 'openai/resources/beta/assistants
|
|
3
|
+
import * as AssistantsAPI from 'openai/resources/beta/assistants';
|
|
4
4
|
import * as Shared from 'openai/resources/shared';
|
|
5
|
-
import * as
|
|
5
|
+
import * as MessagesAPI from 'openai/resources/beta/threads/messages';
|
|
6
6
|
import * as ThreadsAPI from 'openai/resources/beta/threads/threads';
|
|
7
|
-
import * as MessagesAPI from 'openai/resources/beta/threads/messages/messages';
|
|
8
7
|
import * as RunsAPI from 'openai/resources/beta/threads/runs/runs';
|
|
9
8
|
import * as StepsAPI from 'openai/resources/beta/threads/runs/steps';
|
|
10
9
|
import { CursorPage, type CursorPageParams } from 'openai/pagination';
|
|
11
10
|
export declare class Assistants extends APIResource {
|
|
12
|
-
files: FilesAPI.Files;
|
|
13
11
|
/**
|
|
14
12
|
* Create an assistant with a model and instructions.
|
|
15
13
|
*/
|
|
@@ -50,12 +48,6 @@ export interface Assistant {
|
|
|
50
48
|
* The description of the assistant. The maximum length is 512 characters.
|
|
51
49
|
*/
|
|
52
50
|
description: string | null;
|
|
53
|
-
/**
|
|
54
|
-
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs
|
|
55
|
-
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
56
|
-
* assistant. Files are ordered by their creation date in ascending order.
|
|
57
|
-
*/
|
|
58
|
-
file_ids: Array<string>;
|
|
59
51
|
/**
|
|
60
52
|
* The system instructions that the assistant uses. The maximum length is 256,000
|
|
61
53
|
* characters.
|
|
@@ -86,9 +78,48 @@ export interface Assistant {
|
|
|
86
78
|
object: 'assistant';
|
|
87
79
|
/**
|
|
88
80
|
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
89
|
-
* assistant. Tools can be of types `code_interpreter`, `
|
|
81
|
+
* assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
82
|
+
* `function`.
|
|
90
83
|
*/
|
|
91
84
|
tools: Array<AssistantTool>;
|
|
85
|
+
/**
|
|
86
|
+
* A set of resources that are used by the assistant's tools. The resources are
|
|
87
|
+
* specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
88
|
+
* a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
89
|
+
* IDs.
|
|
90
|
+
*/
|
|
91
|
+
tool_resources?: Assistant.ToolResources | null;
|
|
92
|
+
}
|
|
93
|
+
export declare namespace Assistant {
|
|
94
|
+
/**
|
|
95
|
+
* A set of resources that are used by the assistant's tools. The resources are
|
|
96
|
+
* specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
97
|
+
* a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
98
|
+
* IDs.
|
|
99
|
+
*/
|
|
100
|
+
interface ToolResources {
|
|
101
|
+
code_interpreter?: ToolResources.CodeInterpreter;
|
|
102
|
+
file_search?: ToolResources.FileSearch;
|
|
103
|
+
}
|
|
104
|
+
namespace ToolResources {
|
|
105
|
+
interface CodeInterpreter {
|
|
106
|
+
/**
|
|
107
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
|
|
108
|
+
* available to the `code_interpreter`` tool. There can be a maximum of 20 files
|
|
109
|
+
* associated with the tool.
|
|
110
|
+
*/
|
|
111
|
+
file_ids?: Array<string>;
|
|
112
|
+
}
|
|
113
|
+
interface FileSearch {
|
|
114
|
+
/**
|
|
115
|
+
* The ID of the
|
|
116
|
+
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
|
|
117
|
+
* attached to this assistant. There can be a maximum of 1 vector store attached to
|
|
118
|
+
* the assistant.
|
|
119
|
+
*/
|
|
120
|
+
vector_store_ids?: Array<string>;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
92
123
|
}
|
|
93
124
|
export interface AssistantDeleted {
|
|
94
125
|
id: string;
|
|
@@ -400,13 +431,19 @@ export declare namespace AssistantStreamEvent {
|
|
|
400
431
|
event: 'error';
|
|
401
432
|
}
|
|
402
433
|
}
|
|
403
|
-
export type AssistantTool = CodeInterpreterTool |
|
|
434
|
+
export type AssistantTool = CodeInterpreterTool | FileSearchTool | FunctionTool;
|
|
404
435
|
export interface CodeInterpreterTool {
|
|
405
436
|
/**
|
|
406
437
|
* The type of tool being defined: `code_interpreter`
|
|
407
438
|
*/
|
|
408
439
|
type: 'code_interpreter';
|
|
409
440
|
}
|
|
441
|
+
export interface FileSearchTool {
|
|
442
|
+
/**
|
|
443
|
+
* The type of tool being defined: `file_search`
|
|
444
|
+
*/
|
|
445
|
+
type: 'file_search';
|
|
446
|
+
}
|
|
410
447
|
export interface FunctionTool {
|
|
411
448
|
function: Shared.FunctionDefinition;
|
|
412
449
|
/**
|
|
@@ -487,12 +524,6 @@ export declare namespace MessageStreamEvent {
|
|
|
487
524
|
event: 'thread.message.incomplete';
|
|
488
525
|
}
|
|
489
526
|
}
|
|
490
|
-
export interface RetrievalTool {
|
|
491
|
-
/**
|
|
492
|
-
* The type of tool being defined: `retrieval`
|
|
493
|
-
*/
|
|
494
|
-
type: 'retrieval';
|
|
495
|
-
}
|
|
496
527
|
/**
|
|
497
528
|
* Occurs when a
|
|
498
529
|
* [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
|
|
@@ -727,12 +758,6 @@ export interface AssistantCreateParams {
|
|
|
727
758
|
* The description of the assistant. The maximum length is 512 characters.
|
|
728
759
|
*/
|
|
729
760
|
description?: string | null;
|
|
730
|
-
/**
|
|
731
|
-
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs
|
|
732
|
-
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
733
|
-
* assistant. Files are ordered by their creation date in ascending order.
|
|
734
|
-
*/
|
|
735
|
-
file_ids?: Array<string>;
|
|
736
761
|
/**
|
|
737
762
|
* The system instructions that the assistant uses. The maximum length is 256,000
|
|
738
763
|
* characters.
|
|
@@ -749,25 +774,111 @@ export interface AssistantCreateParams {
|
|
|
749
774
|
* The name of the assistant. The maximum length is 256 characters.
|
|
750
775
|
*/
|
|
751
776
|
name?: string | null;
|
|
777
|
+
/**
|
|
778
|
+
* Specifies the format that the model must output. Compatible with
|
|
779
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
|
|
780
|
+
* all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
|
|
781
|
+
*
|
|
782
|
+
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
783
|
+
* message the model generates is valid JSON.
|
|
784
|
+
*
|
|
785
|
+
* **Important:** when using JSON mode, you **must** also instruct the model to
|
|
786
|
+
* produce JSON yourself via a system or user message. Without this, the model may
|
|
787
|
+
* generate an unending stream of whitespace until the generation reaches the token
|
|
788
|
+
* limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
789
|
+
* the message content may be partially cut off if `finish_reason="length"`, which
|
|
790
|
+
* indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
791
|
+
* max context length.
|
|
792
|
+
*/
|
|
793
|
+
response_format?: ThreadsAPI.AssistantResponseFormatOption | null;
|
|
794
|
+
/**
|
|
795
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
796
|
+
* make the output more random, while lower values like 0.2 will make it more
|
|
797
|
+
* focused and deterministic.
|
|
798
|
+
*/
|
|
799
|
+
temperature?: number | null;
|
|
800
|
+
/**
|
|
801
|
+
* A set of resources that are used by the assistant's tools. The resources are
|
|
802
|
+
* specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
803
|
+
* a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
804
|
+
* IDs.
|
|
805
|
+
*/
|
|
806
|
+
tool_resources?: AssistantCreateParams.ToolResources | null;
|
|
752
807
|
/**
|
|
753
808
|
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
754
|
-
* assistant. Tools can be of types `code_interpreter`, `
|
|
809
|
+
* assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
810
|
+
* `function`.
|
|
755
811
|
*/
|
|
756
812
|
tools?: Array<AssistantTool>;
|
|
813
|
+
/**
|
|
814
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
815
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
816
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
817
|
+
*
|
|
818
|
+
* We generally recommend altering this or temperature but not both.
|
|
819
|
+
*/
|
|
820
|
+
top_p?: number | null;
|
|
821
|
+
}
|
|
822
|
+
export declare namespace AssistantCreateParams {
|
|
823
|
+
/**
|
|
824
|
+
* A set of resources that are used by the assistant's tools. The resources are
|
|
825
|
+
* specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
826
|
+
* a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
827
|
+
* IDs.
|
|
828
|
+
*/
|
|
829
|
+
interface ToolResources {
|
|
830
|
+
code_interpreter?: ToolResources.CodeInterpreter;
|
|
831
|
+
file_search?: ToolResources.FileSearch;
|
|
832
|
+
}
|
|
833
|
+
namespace ToolResources {
|
|
834
|
+
interface CodeInterpreter {
|
|
835
|
+
/**
|
|
836
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
|
|
837
|
+
* available to the `code_interpreter` tool. There can be a maximum of 20 files
|
|
838
|
+
* associated with the tool.
|
|
839
|
+
*/
|
|
840
|
+
file_ids?: Array<string>;
|
|
841
|
+
}
|
|
842
|
+
interface FileSearch {
|
|
843
|
+
/**
|
|
844
|
+
* The
|
|
845
|
+
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
|
|
846
|
+
* attached to this assistant. There can be a maximum of 1 vector store attached to
|
|
847
|
+
* the assistant.
|
|
848
|
+
*/
|
|
849
|
+
vector_store_ids?: Array<string>;
|
|
850
|
+
/**
|
|
851
|
+
* A helper to create a
|
|
852
|
+
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
|
|
853
|
+
* with file_ids and attach it to this assistant. There can be a maximum of 1
|
|
854
|
+
* vector store attached to the assistant.
|
|
855
|
+
*/
|
|
856
|
+
vector_stores?: Array<FileSearch.VectorStore>;
|
|
857
|
+
}
|
|
858
|
+
namespace FileSearch {
|
|
859
|
+
interface VectorStore {
|
|
860
|
+
/**
|
|
861
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
|
|
862
|
+
* add to the vector store. There can be a maximum of 10000 files in a vector
|
|
863
|
+
* store.
|
|
864
|
+
*/
|
|
865
|
+
file_ids?: Array<string>;
|
|
866
|
+
/**
|
|
867
|
+
* Set of 16 key-value pairs that can be attached to a vector store. This can be
|
|
868
|
+
* useful for storing additional information about the vector store in a structured
|
|
869
|
+
* format. Keys can be a maximum of 64 characters long and values can be a maxium
|
|
870
|
+
* of 512 characters long.
|
|
871
|
+
*/
|
|
872
|
+
metadata?: unknown;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
757
876
|
}
|
|
758
877
|
export interface AssistantUpdateParams {
|
|
759
878
|
/**
|
|
760
879
|
* The description of the assistant. The maximum length is 512 characters.
|
|
761
880
|
*/
|
|
762
881
|
description?: string | null;
|
|
763
|
-
/**
|
|
764
|
-
* A list of [File](https://platform.openai.com/docs/api-reference/files) IDs
|
|
765
|
-
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
766
|
-
* assistant. Files are ordered by their creation date in ascending order. If a
|
|
767
|
-
* file was previously attached to the list but does not show up in the list, it
|
|
768
|
-
* will be deleted from the assistant.
|
|
769
|
-
*/
|
|
770
|
-
file_ids?: Array<string>;
|
|
771
882
|
/**
|
|
772
883
|
* The system instructions that the assistant uses. The maximum length is 256,000
|
|
773
884
|
* characters.
|
|
@@ -792,11 +903,82 @@ export interface AssistantUpdateParams {
|
|
|
792
903
|
* The name of the assistant. The maximum length is 256 characters.
|
|
793
904
|
*/
|
|
794
905
|
name?: string | null;
|
|
906
|
+
/**
|
|
907
|
+
* Specifies the format that the model must output. Compatible with
|
|
908
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
|
|
909
|
+
* all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
|
|
910
|
+
*
|
|
911
|
+
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
912
|
+
* message the model generates is valid JSON.
|
|
913
|
+
*
|
|
914
|
+
* **Important:** when using JSON mode, you **must** also instruct the model to
|
|
915
|
+
* produce JSON yourself via a system or user message. Without this, the model may
|
|
916
|
+
* generate an unending stream of whitespace until the generation reaches the token
|
|
917
|
+
* limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
918
|
+
* the message content may be partially cut off if `finish_reason="length"`, which
|
|
919
|
+
* indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
920
|
+
* max context length.
|
|
921
|
+
*/
|
|
922
|
+
response_format?: ThreadsAPI.AssistantResponseFormatOption | null;
|
|
923
|
+
/**
|
|
924
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
925
|
+
* make the output more random, while lower values like 0.2 will make it more
|
|
926
|
+
* focused and deterministic.
|
|
927
|
+
*/
|
|
928
|
+
temperature?: number | null;
|
|
929
|
+
/**
|
|
930
|
+
* A set of resources that are used by the assistant's tools. The resources are
|
|
931
|
+
* specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
932
|
+
* a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
933
|
+
* IDs.
|
|
934
|
+
*/
|
|
935
|
+
tool_resources?: AssistantUpdateParams.ToolResources | null;
|
|
795
936
|
/**
|
|
796
937
|
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
797
|
-
* assistant. Tools can be of types `code_interpreter`, `
|
|
938
|
+
* assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
939
|
+
* `function`.
|
|
798
940
|
*/
|
|
799
941
|
tools?: Array<AssistantTool>;
|
|
942
|
+
/**
|
|
943
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
944
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
945
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
946
|
+
*
|
|
947
|
+
* We generally recommend altering this or temperature but not both.
|
|
948
|
+
*/
|
|
949
|
+
top_p?: number | null;
|
|
950
|
+
}
|
|
951
|
+
export declare namespace AssistantUpdateParams {
|
|
952
|
+
/**
|
|
953
|
+
* A set of resources that are used by the assistant's tools. The resources are
|
|
954
|
+
* specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
955
|
+
* a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
956
|
+
* IDs.
|
|
957
|
+
*/
|
|
958
|
+
interface ToolResources {
|
|
959
|
+
code_interpreter?: ToolResources.CodeInterpreter;
|
|
960
|
+
file_search?: ToolResources.FileSearch;
|
|
961
|
+
}
|
|
962
|
+
namespace ToolResources {
|
|
963
|
+
interface CodeInterpreter {
|
|
964
|
+
/**
|
|
965
|
+
* Overrides the list of
|
|
966
|
+
* [file](https://platform.openai.com/docs/api-reference/files) IDs made available
|
|
967
|
+
* to the `code_interpreter` tool. There can be a maximum of 20 files associated
|
|
968
|
+
* with the tool.
|
|
969
|
+
*/
|
|
970
|
+
file_ids?: Array<string>;
|
|
971
|
+
}
|
|
972
|
+
interface FileSearch {
|
|
973
|
+
/**
|
|
974
|
+
* Overrides the
|
|
975
|
+
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
|
|
976
|
+
* attached to this assistant. There can be a maximum of 1 vector store attached to
|
|
977
|
+
* the assistant.
|
|
978
|
+
*/
|
|
979
|
+
vector_store_ids?: Array<string>;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
800
982
|
}
|
|
801
983
|
export interface AssistantListParams extends CursorPageParams {
|
|
802
984
|
/**
|
|
@@ -818,9 +1000,9 @@ export declare namespace Assistants {
|
|
|
818
1000
|
export import AssistantStreamEvent = AssistantsAPI.AssistantStreamEvent;
|
|
819
1001
|
export import AssistantTool = AssistantsAPI.AssistantTool;
|
|
820
1002
|
export import CodeInterpreterTool = AssistantsAPI.CodeInterpreterTool;
|
|
1003
|
+
export import FileSearchTool = AssistantsAPI.FileSearchTool;
|
|
821
1004
|
export import FunctionTool = AssistantsAPI.FunctionTool;
|
|
822
1005
|
export import MessageStreamEvent = AssistantsAPI.MessageStreamEvent;
|
|
823
|
-
export import RetrievalTool = AssistantsAPI.RetrievalTool;
|
|
824
1006
|
export import RunStepStreamEvent = AssistantsAPI.RunStepStreamEvent;
|
|
825
1007
|
export import RunStreamEvent = AssistantsAPI.RunStreamEvent;
|
|
826
1008
|
export import ThreadStreamEvent = AssistantsAPI.ThreadStreamEvent;
|
|
@@ -828,11 +1010,5 @@ export declare namespace Assistants {
|
|
|
828
1010
|
export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams;
|
|
829
1011
|
export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams;
|
|
830
1012
|
export import AssistantListParams = AssistantsAPI.AssistantListParams;
|
|
831
|
-
export import Files = FilesAPI.Files;
|
|
832
|
-
export import AssistantFile = FilesAPI.AssistantFile;
|
|
833
|
-
export import FileDeleteResponse = FilesAPI.FileDeleteResponse;
|
|
834
|
-
export import AssistantFilesPage = FilesAPI.AssistantFilesPage;
|
|
835
|
-
export import FileCreateParams = FilesAPI.FileCreateParams;
|
|
836
|
-
export import FileListParams = FilesAPI.FileListParams;
|
|
837
1013
|
}
|
|
838
1014
|
//# sourceMappingURL=assistants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistants.d.ts","sourceRoot":"","sources":["../../src/resources/beta/assistants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,aAAa,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,wCAAwC,CAAC;AACtE,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,QAAQ,MAAM,0CAA0C,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;IAQ9F;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,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;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAED,yBAAiB,UAAU,CAAC;IAC1B,MAAM,QAAQ,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC;IAClD,MAAM,QAAQ,gBAAgB,GAAG,aAAa,CAAC,gBAAgB,CAAC;IAChE,MAAM,QAAQ,oBAAoB,GAAG,aAAa,CAAC,oBAAoB,CAAC;IACxE,MAAM,QAAQ,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC;IAC1D,MAAM,QAAQ,mBAAmB,GAAG,aAAa,CAAC,mBAAmB,CAAC;IACtE,MAAM,QAAQ,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC;IAC5D,MAAM,QAAQ,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC;IACxD,MAAM,QAAQ,kBAAkB,GAAG,aAAa,CAAC,kBAAkB,CAAC;IACpE,MAAM,QAAQ,kBAAkB,GAAG,aAAa,CAAC,kBAAkB,CAAC;IACpE,MAAM,QAAQ,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC;IAC5D,MAAM,QAAQ,iBAAiB,GAAG,aAAa,CAAC,iBAAiB,CAAC;IAClE,MAAM,QAAQ,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC;IAC5D,MAAM,QAAQ,qBAAqB,GAAG,aAAa,CAAC,qBAAqB,CAAC;IAC1E,MAAM,QAAQ,qBAAqB,GAAG,aAAa,CAAC,qBAAqB,CAAC;IAC1E,MAAM,QAAQ,mBAAmB,GAAG,aAAa,CAAC,mBAAmB,CAAC;CACvE"}
|
|
@@ -27,14 +27,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
27
27
|
exports.AssistantsPage = exports.Assistants = void 0;
|
|
28
28
|
const resource_1 = require("openai/resource");
|
|
29
29
|
const core_1 = require("openai/core");
|
|
30
|
-
const AssistantsAPI = __importStar(require("openai/resources/beta/assistants
|
|
31
|
-
const FilesAPI = __importStar(require("openai/resources/beta/assistants/files"));
|
|
30
|
+
const AssistantsAPI = __importStar(require("openai/resources/beta/assistants"));
|
|
32
31
|
const pagination_1 = require("openai/pagination");
|
|
33
32
|
class Assistants extends resource_1.APIResource {
|
|
34
|
-
constructor() {
|
|
35
|
-
super(...arguments);
|
|
36
|
-
this.files = new FilesAPI.Files(this._client);
|
|
37
|
-
}
|
|
38
33
|
/**
|
|
39
34
|
* Create an assistant with a model and instructions.
|
|
40
35
|
*/
|
|
@@ -42,7 +37,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
42
37
|
return this._client.post('/assistants', {
|
|
43
38
|
body,
|
|
44
39
|
...options,
|
|
45
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
40
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
46
41
|
});
|
|
47
42
|
}
|
|
48
43
|
/**
|
|
@@ -51,7 +46,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
51
46
|
retrieve(assistantId, options) {
|
|
52
47
|
return this._client.get(`/assistants/${assistantId}`, {
|
|
53
48
|
...options,
|
|
54
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
49
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
55
50
|
});
|
|
56
51
|
}
|
|
57
52
|
/**
|
|
@@ -61,7 +56,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
61
56
|
return this._client.post(`/assistants/${assistantId}`, {
|
|
62
57
|
body,
|
|
63
58
|
...options,
|
|
64
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
59
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
65
60
|
});
|
|
66
61
|
}
|
|
67
62
|
list(query = {}, options) {
|
|
@@ -71,7 +66,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
71
66
|
return this._client.getAPIList('/assistants', AssistantsPage, {
|
|
72
67
|
query,
|
|
73
68
|
...options,
|
|
74
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
69
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
75
70
|
});
|
|
76
71
|
}
|
|
77
72
|
/**
|
|
@@ -80,7 +75,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
80
75
|
del(assistantId, options) {
|
|
81
76
|
return this._client.delete(`/assistants/${assistantId}`, {
|
|
82
77
|
...options,
|
|
83
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
78
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
84
79
|
});
|
|
85
80
|
}
|
|
86
81
|
}
|
|
@@ -90,7 +85,5 @@ class AssistantsPage extends pagination_1.CursorPage {
|
|
|
90
85
|
exports.AssistantsPage = AssistantsPage;
|
|
91
86
|
(function (Assistants) {
|
|
92
87
|
Assistants.AssistantsPage = AssistantsAPI.AssistantsPage;
|
|
93
|
-
Assistants.Files = FilesAPI.Files;
|
|
94
|
-
Assistants.AssistantFilesPage = FilesAPI.AssistantFilesPage;
|
|
95
88
|
})(Assistants = exports.Assistants || (exports.Assistants = {}));
|
|
96
89
|
//# sourceMappingURL=assistants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistants.js","sourceRoot":"","sources":["../../src/resources/beta/assistants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,8CAA8C;AAC9C,sCAA+C;AAC/C,gFAAkE;AAMlE,kDAAsE;AAEtE,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,MAAM,CAAC,IAA2B,EAAE,OAA6B;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE;YACtC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;I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