openai 4.35.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 +22 -0
- package/README.md +16 -2
- package/index.d.mts +8 -1
- package/index.d.ts +8 -1
- package/index.d.ts.map +1 -1
- package/index.js +5 -1
- package/index.js.map +1 -1
- package/index.mjs +5 -1
- package/index.mjs.map +1 -1
- 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/chat/chat.d.ts +3 -0
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +2 -1
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.ts +1 -1
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js +3 -3
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +1 -1
- package/src/index.ts +12 -0
- 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/chat/chat.ts +23 -0
- package/src/resources/chat/completions.ts +2 -21
- package/src/resources/chat/index.ts +1 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,mBAAmB,EACnB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,oCAAoC,EACpC,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,OAAO,GACR,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,GACb,MAAM,uBAAuB,CAAC"}
|
package/resources/beta/index.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Chat = exports.Beta = exports.Threads = exports.Assistants = exports.AssistantsPage = void 0;
|
|
5
|
-
var
|
|
6
|
-
Object.defineProperty(exports, "AssistantsPage", { enumerable: true, get: function () { return
|
|
7
|
-
Object.defineProperty(exports, "Assistants", { enumerable: true, get: function () { return
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "Threads", { enumerable: true, get: function () { return
|
|
4
|
+
exports.VectorStores = exports.VectorStoresPage = exports.Chat = exports.Beta = exports.Threads = exports.Assistants = exports.AssistantsPage = void 0;
|
|
5
|
+
var assistants_1 = require("./assistants.js");
|
|
6
|
+
Object.defineProperty(exports, "AssistantsPage", { enumerable: true, get: function () { return assistants_1.AssistantsPage; } });
|
|
7
|
+
Object.defineProperty(exports, "Assistants", { enumerable: true, get: function () { return assistants_1.Assistants; } });
|
|
8
|
+
var index_1 = require("./threads/index.js");
|
|
9
|
+
Object.defineProperty(exports, "Threads", { enumerable: true, get: function () { return index_1.Threads; } });
|
|
10
10
|
var beta_1 = require("./beta.js");
|
|
11
11
|
Object.defineProperty(exports, "Beta", { enumerable: true, get: function () { return beta_1.Beta; } });
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return
|
|
12
|
+
var index_2 = require("./chat/index.js");
|
|
13
|
+
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return index_2.Chat; } });
|
|
14
|
+
var index_3 = require("./vector-stores/index.js");
|
|
15
|
+
Object.defineProperty(exports, "VectorStoresPage", { enumerable: true, get: function () { return index_3.VectorStoresPage; } });
|
|
16
|
+
Object.defineProperty(exports, "VectorStores", { enumerable: true, get: function () { return index_3.VectorStores; } });
|
|
14
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAiBsB;AAFpB,4GAAA,cAAc,OAAA;AACd,wGAAA,UAAU,OAAA;AAEZ,4CAgByB;AADvB,gGAAA,OAAO,OAAA;AAET,kCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,yCAAoC;AAA3B,6FAAA,IAAI,OAAA;AACb,kDAQ+B;AAF7B,yGAAA,gBAAgB,OAAA;AAChB,qGAAA,YAAY,OAAA"}
|
package/resources/beta/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export { AssistantsPage, Assistants, } from "./assistants
|
|
2
|
+
export { AssistantsPage, Assistants, } from "./assistants.mjs";
|
|
3
3
|
export { Threads, } from "./threads/index.mjs";
|
|
4
4
|
export { Beta } from "./beta.mjs";
|
|
5
5
|
export { Chat } from "./chat/index.mjs";
|
|
6
|
+
export { VectorStoresPage, VectorStores, } from "./vector-stores/index.mjs";
|
|
6
7
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAeL,cAAc,EACd,UAAU,GACX;OACM,EAeL,OAAO,GACR;OACM,EAAE,IAAI,EAAE;OACR,EAAE,IAAI,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAeL,cAAc,EACd,UAAU,GACX;OACM,EAeL,OAAO,GACR;OACM,EAAE,IAAI,EAAE;OACR,EAAE,IAAI,EAAE;OACR,EAML,gBAAgB,EAChB,YAAY,GACb"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Annotation, AnnotationDelta, FileCitationAnnotation, FileCitationDeltaAnnotation, FilePathAnnotation, FilePathDeltaAnnotation, ImageFile, ImageFileContentBlock, ImageFileDelta, ImageFileDeltaBlock, Message, MessageContent, MessageContentDelta, MessageDeleted, MessageDelta, MessageDeltaEvent, Text, TextContentBlock, TextDelta, TextDeltaBlock, MessageCreateParams, MessageUpdateParams, MessageListParams, MessagesPage, Messages, } from "./messages
|
|
1
|
+
export { Annotation, AnnotationDelta, FileCitationAnnotation, FileCitationDeltaAnnotation, FilePathAnnotation, FilePathDeltaAnnotation, ImageFile, ImageFileContentBlock, ImageFileDelta, ImageFileDeltaBlock, Message, MessageContent, MessageContentDelta, MessageDeleted, MessageDelta, MessageDeltaEvent, Text, TextContentBlock, TextDelta, TextDeltaBlock, MessageCreateParams, MessageUpdateParams, MessageListParams, MessagesPage, Messages, } from "./messages.js";
|
|
2
2
|
export { AssistantResponseFormat, AssistantResponseFormatOption, AssistantToolChoice, AssistantToolChoiceFunction, AssistantToolChoiceOption, Thread, ThreadDeleted, ThreadCreateParams, ThreadUpdateParams, ThreadCreateAndRunParams, ThreadCreateAndRunParamsNonStreaming, ThreadCreateAndRunParamsStreaming, ThreadCreateAndRunPollParams, ThreadCreateAndRunStreamParams, Threads, } from "./threads.js";
|
|
3
3
|
export { RequiredActionFunctionToolCall, Run, RunStatus, RunCreateParams, RunCreateParamsNonStreaming, RunCreateParamsStreaming, RunUpdateParams, RunListParams, RunCreateAndPollParams, RunCreateAndStreamParams, RunStreamParams, RunSubmitToolOutputsParams, RunSubmitToolOutputsParamsNonStreaming, RunSubmitToolOutputsParamsStreaming, RunSubmitToolOutputsAndPollParams, RunSubmitToolOutputsStreamParams, RunsPage, Runs, } from "./runs/index.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,GACT,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,mBAAmB,EACnB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,oCAAoC,EACpC,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,OAAO,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,8BAA8B,EAC9B,GAAG,EACH,SAAS,EACT,eAAe,EACf,2BAA2B,EAC3B,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,0BAA0B,EAC1B,sCAAsC,EACtC,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,QAAQ,EACR,IAAI,GACL,MAAM,cAAc,CAAC"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Runs = exports.RunsPage = exports.Threads = exports.Messages = exports.MessagesPage = void 0;
|
|
5
|
-
var
|
|
6
|
-
Object.defineProperty(exports, "MessagesPage", { enumerable: true, get: function () { return
|
|
7
|
-
Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return
|
|
5
|
+
var messages_1 = require("./messages.js");
|
|
6
|
+
Object.defineProperty(exports, "MessagesPage", { enumerable: true, get: function () { return messages_1.MessagesPage; } });
|
|
7
|
+
Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } });
|
|
8
8
|
var threads_1 = require("./threads.js");
|
|
9
9
|
Object.defineProperty(exports, "Threads", { enumerable: true, get: function () { return threads_1.Threads; } });
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(exports, "RunsPage", { enumerable: true, get: function () { return
|
|
12
|
-
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return
|
|
10
|
+
var index_1 = require("./runs/index.js");
|
|
11
|
+
Object.defineProperty(exports, "RunsPage", { enumerable: true, get: function () { return index_1.RunsPage; } });
|
|
12
|
+
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return index_1.Runs; } });
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CA0BoB;AAFlB,wGAAA,YAAY,OAAA;AACZ,oGAAA,QAAQ,OAAA;AAEV,wCAgBmB;AADjB,kGAAA,OAAO,OAAA;AAET,yCAmBsB;AAFpB,iGAAA,QAAQ,OAAA;AACR,6FAAA,IAAI,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export { MessagesPage, Messages, } from "./messages
|
|
2
|
+
export { MessagesPage, Messages, } from "./messages.mjs";
|
|
3
3
|
export { Threads, } from "./threads.mjs";
|
|
4
4
|
export { RunsPage, Runs, } from "./runs/index.mjs";
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as Core from 'openai/core';
|
|
2
2
|
import { APIResource } from 'openai/resource';
|
|
3
|
-
import * as MessagesAPI from 'openai/resources/beta/threads/messages
|
|
4
|
-
import * as FilesAPI from 'openai/resources/beta/threads/messages/files';
|
|
3
|
+
import * as MessagesAPI from 'openai/resources/beta/threads/messages';
|
|
5
4
|
import { CursorPage, type CursorPageParams } from 'openai/pagination';
|
|
6
5
|
export declare class Messages extends APIResource {
|
|
7
|
-
files: FilesAPI.Files;
|
|
8
6
|
/**
|
|
9
7
|
* Create a message.
|
|
10
8
|
*/
|
|
@@ -28,19 +26,19 @@ export declare class MessagesPage extends CursorPage<Message> {
|
|
|
28
26
|
/**
|
|
29
27
|
* A citation within the message that points to a specific quote from a specific
|
|
30
28
|
* File associated with the assistant or the message. Generated when the assistant
|
|
31
|
-
* uses the "
|
|
29
|
+
* uses the "file_search" tool to search files.
|
|
32
30
|
*/
|
|
33
31
|
export type Annotation = FileCitationAnnotation | FilePathAnnotation;
|
|
34
32
|
/**
|
|
35
33
|
* A citation within the message that points to a specific quote from a specific
|
|
36
34
|
* File associated with the assistant or the message. Generated when the assistant
|
|
37
|
-
* uses the "
|
|
35
|
+
* uses the "file_search" tool to search files.
|
|
38
36
|
*/
|
|
39
37
|
export type AnnotationDelta = FileCitationDeltaAnnotation | FilePathDeltaAnnotation;
|
|
40
38
|
/**
|
|
41
39
|
* A citation within the message that points to a specific quote from a specific
|
|
42
40
|
* File associated with the assistant or the message. Generated when the assistant
|
|
43
|
-
* uses the "
|
|
41
|
+
* uses the "file_search" tool to search files.
|
|
44
42
|
*/
|
|
45
43
|
export interface FileCitationAnnotation {
|
|
46
44
|
end_index: number;
|
|
@@ -70,7 +68,7 @@ export declare namespace FileCitationAnnotation {
|
|
|
70
68
|
/**
|
|
71
69
|
* A citation within the message that points to a specific quote from a specific
|
|
72
70
|
* File associated with the assistant or the message. Generated when the assistant
|
|
73
|
-
* uses the "
|
|
71
|
+
* uses the "file_search" tool to search files.
|
|
74
72
|
*/
|
|
75
73
|
export interface FileCitationDeltaAnnotation {
|
|
76
74
|
/**
|
|
@@ -210,6 +208,10 @@ export interface Message {
|
|
|
210
208
|
* authored this message.
|
|
211
209
|
*/
|
|
212
210
|
assistant_id: string | null;
|
|
211
|
+
/**
|
|
212
|
+
* A list of files attached to the message, and the tools they were added to.
|
|
213
|
+
*/
|
|
214
|
+
attachments: Array<Message.Attachment> | null;
|
|
213
215
|
/**
|
|
214
216
|
* The Unix timestamp (in seconds) for when the message was completed.
|
|
215
217
|
*/
|
|
@@ -222,12 +224,6 @@ export interface Message {
|
|
|
222
224
|
* The Unix timestamp (in seconds) for when the message was created.
|
|
223
225
|
*/
|
|
224
226
|
created_at: number;
|
|
225
|
-
/**
|
|
226
|
-
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs that
|
|
227
|
-
* the assistant should use. Useful for tools like retrieval and code_interpreter
|
|
228
|
-
* that can access files. A maximum of 10 files can be attached to a message.
|
|
229
|
-
*/
|
|
230
|
-
file_ids: Array<string>;
|
|
231
227
|
/**
|
|
232
228
|
* The Unix timestamp (in seconds) for when the message was marked as incomplete.
|
|
233
229
|
*/
|
|
@@ -269,6 +265,13 @@ export interface Message {
|
|
|
269
265
|
thread_id: string;
|
|
270
266
|
}
|
|
271
267
|
export declare namespace Message {
|
|
268
|
+
interface Attachment {
|
|
269
|
+
add_to?: Array<'file_search' | 'code_interpreter'>;
|
|
270
|
+
/**
|
|
271
|
+
* The ID of the file to attach to the message.
|
|
272
|
+
*/
|
|
273
|
+
file_id?: string;
|
|
274
|
+
}
|
|
272
275
|
/**
|
|
273
276
|
* On an incomplete message, details about why the message is incomplete.
|
|
274
277
|
*/
|
|
@@ -302,12 +305,6 @@ export interface MessageDelta {
|
|
|
302
305
|
* The content of the message in array of text and/or images.
|
|
303
306
|
*/
|
|
304
307
|
content?: Array<MessageContentDelta>;
|
|
305
|
-
/**
|
|
306
|
-
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs that
|
|
307
|
-
* the assistant should use. Useful for tools like retrieval and code_interpreter
|
|
308
|
-
* that can access files. A maximum of 10 files can be attached to a message.
|
|
309
|
-
*/
|
|
310
|
-
file_ids?: Array<string>;
|
|
311
308
|
/**
|
|
312
309
|
* The entity that produced the message. One of `user` or `assistant`.
|
|
313
310
|
*/
|
|
@@ -384,12 +381,9 @@ export interface MessageCreateParams {
|
|
|
384
381
|
*/
|
|
385
382
|
role: 'user' | 'assistant';
|
|
386
383
|
/**
|
|
387
|
-
* A list of
|
|
388
|
-
* the message should use. There can be a maximum of 10 files attached to a
|
|
389
|
-
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
390
|
-
* access and use files.
|
|
384
|
+
* A list of files attached to the message, and the tools they should be added to.
|
|
391
385
|
*/
|
|
392
|
-
|
|
386
|
+
attachments?: Array<MessageCreateParams.Attachment> | null;
|
|
393
387
|
/**
|
|
394
388
|
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
395
389
|
* for storing additional information about the object in a structured format. Keys
|
|
@@ -398,6 +392,15 @@ export interface MessageCreateParams {
|
|
|
398
392
|
*/
|
|
399
393
|
metadata?: unknown | null;
|
|
400
394
|
}
|
|
395
|
+
export declare namespace MessageCreateParams {
|
|
396
|
+
interface Attachment {
|
|
397
|
+
add_to?: Array<'file_search' | 'code_interpreter'>;
|
|
398
|
+
/**
|
|
399
|
+
* The ID of the file to attach to the message.
|
|
400
|
+
*/
|
|
401
|
+
file_id?: string;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
401
404
|
export interface MessageUpdateParams {
|
|
402
405
|
/**
|
|
403
406
|
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
@@ -450,9 +453,5 @@ export declare namespace Messages {
|
|
|
450
453
|
export import MessageCreateParams = MessagesAPI.MessageCreateParams;
|
|
451
454
|
export import MessageUpdateParams = MessagesAPI.MessageUpdateParams;
|
|
452
455
|
export import MessageListParams = MessagesAPI.MessageListParams;
|
|
453
|
-
export import Files = FilesAPI.Files;
|
|
454
|
-
export import MessageFile = FilesAPI.MessageFile;
|
|
455
|
-
export import MessageFilesPage = FilesAPI.MessageFilesPage;
|
|
456
|
-
export import FileListParams = FilesAPI.FileListParams;
|
|
457
456
|
}
|
|
458
457
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,WAAW,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;IAQ3B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;IAOtG;;OAEG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAA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,CAAC,SAAS,CAAC;IAChD,MAAM,QAAQ,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC;IACxE,MAAM,QAAQ,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IAC1D,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAC5C,MAAM,QAAQ,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IAC1D,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IAC1D,MAAM,QAAQ,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IACtD,MAAM,QAAQ,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC;IAChE,MAAM,QAAQ,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IACtC,MAAM,QAAQ,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;IAC9D,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;IAChD,MAAM,QAAQ,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IAC1D,MAAM,QAAQ,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IACtD,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC;CACjE"}
|
|
@@ -27,14 +27,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
27
27
|
exports.MessagesPage = exports.Messages = void 0;
|
|
28
28
|
const resource_1 = require("openai/resource");
|
|
29
29
|
const core_1 = require("openai/core");
|
|
30
|
-
const MessagesAPI = __importStar(require("openai/resources/beta/threads/messages
|
|
31
|
-
const FilesAPI = __importStar(require("openai/resources/beta/threads/messages/files"));
|
|
30
|
+
const MessagesAPI = __importStar(require("openai/resources/beta/threads/messages"));
|
|
32
31
|
const pagination_1 = require("openai/pagination");
|
|
33
32
|
class Messages extends resource_1.APIResource {
|
|
34
|
-
constructor() {
|
|
35
|
-
super(...arguments);
|
|
36
|
-
this.files = new FilesAPI.Files(this._client);
|
|
37
|
-
}
|
|
38
33
|
/**
|
|
39
34
|
* Create a message.
|
|
40
35
|
*/
|
|
@@ -42,7 +37,7 @@ class Messages extends resource_1.APIResource {
|
|
|
42
37
|
return this._client.post(`/threads/${threadId}/messages`, {
|
|
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 Messages extends resource_1.APIResource {
|
|
|
51
46
|
retrieve(threadId, messageId, options) {
|
|
52
47
|
return this._client.get(`/threads/${threadId}/messages/${messageId}`, {
|
|
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 Messages extends resource_1.APIResource {
|
|
|
61
56
|
return this._client.post(`/threads/${threadId}/messages/${messageId}`, {
|
|
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(threadId, query = {}, options) {
|
|
@@ -71,7 +66,7 @@ class Messages extends resource_1.APIResource {
|
|
|
71
66
|
return this._client.getAPIList(`/threads/${threadId}/messages`, MessagesPage, {
|
|
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
|
}
|
|
@@ -81,7 +76,5 @@ class MessagesPage extends pagination_1.CursorPage {
|
|
|
81
76
|
exports.MessagesPage = MessagesPage;
|
|
82
77
|
(function (Messages) {
|
|
83
78
|
Messages.MessagesPage = MessagesAPI.MessagesPage;
|
|
84
|
-
Messages.Files = FilesAPI.Files;
|
|
85
|
-
Messages.MessageFilesPage = FilesAPI.MessageFilesPage;
|
|
86
79
|
})(Messages = exports.Messages || (exports.Messages = {}));
|
|
87
80
|
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,8CAA8C;AAC9C,sCAA+C;AAC/C,oFAAsE;AACtE,kDAAsE;AAEtE,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,MAAM,CACJ,QAAgB,EAChB,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,QAAQ,WAAW,EAAE;YACxD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,SAAiB,EAAE,OAA6B;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,QAAQ,aAAa,SAAS,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,QAAgB,EAChB,SAAiB,EACjB,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,QAAQ,aAAa,SAAS,EAAE,EAAE;YACrE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAWD,IAAI,CACF,QAAgB,EAChB,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACvC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,QAAQ,WAAW,EAAE,YAAY,EAAE;YAC5E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;CACF;AAjED,4BAiEC;AAED,MAAa,YAAa,SAAQ,uBAAmB;CAAG;AAAxD,oCAAwD;AA0exD,WAAiB,QAAQ;IAqBT,qBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;AAIxD,CAAC,EAzBgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAyBxB"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from 'openai/resource';
|
|
3
3
|
import { isRequestOptions } from 'openai/core';
|
|
4
|
-
import * as MessagesAPI from 'openai/resources/beta/threads/messages
|
|
5
|
-
import * as FilesAPI from 'openai/resources/beta/threads/messages/files';
|
|
4
|
+
import * as MessagesAPI from 'openai/resources/beta/threads/messages';
|
|
6
5
|
import { CursorPage } from 'openai/pagination';
|
|
7
6
|
export class Messages extends APIResource {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.files = new FilesAPI.Files(this._client);
|
|
11
|
-
}
|
|
12
7
|
/**
|
|
13
8
|
* Create a message.
|
|
14
9
|
*/
|
|
@@ -16,7 +11,7 @@ export class Messages extends APIResource {
|
|
|
16
11
|
return this._client.post(`/threads/${threadId}/messages`, {
|
|
17
12
|
body,
|
|
18
13
|
...options,
|
|
19
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
14
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
20
15
|
});
|
|
21
16
|
}
|
|
22
17
|
/**
|
|
@@ -25,7 +20,7 @@ export class Messages extends APIResource {
|
|
|
25
20
|
retrieve(threadId, messageId, options) {
|
|
26
21
|
return this._client.get(`/threads/${threadId}/messages/${messageId}`, {
|
|
27
22
|
...options,
|
|
28
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
23
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
29
24
|
});
|
|
30
25
|
}
|
|
31
26
|
/**
|
|
@@ -35,7 +30,7 @@ export class Messages extends APIResource {
|
|
|
35
30
|
return this._client.post(`/threads/${threadId}/messages/${messageId}`, {
|
|
36
31
|
body,
|
|
37
32
|
...options,
|
|
38
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
33
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
39
34
|
});
|
|
40
35
|
}
|
|
41
36
|
list(threadId, query = {}, options) {
|
|
@@ -45,7 +40,7 @@ export class Messages extends APIResource {
|
|
|
45
40
|
return this._client.getAPIList(`/threads/${threadId}/messages`, MessagesPage, {
|
|
46
41
|
query,
|
|
47
42
|
...options,
|
|
48
|
-
headers: { 'OpenAI-Beta': 'assistants=
|
|
43
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
49
44
|
});
|
|
50
45
|
}
|
|
51
46
|
}
|
|
@@ -53,7 +48,5 @@ export class MessagesPage extends CursorPage {
|
|
|
53
48
|
}
|
|
54
49
|
(function (Messages) {
|
|
55
50
|
Messages.MessagesPage = MessagesAPI.MessagesPage;
|
|
56
|
-
Messages.Files = FilesAPI.Files;
|
|
57
|
-
Messages.MessageFilesPage = FilesAPI.MessageFilesPage;
|
|
58
51
|
})(Messages || (Messages = {}));
|
|
59
52
|
//# sourceMappingURL=messages.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,gBAAgB,EAAE,MAAM,aAAa;OACvC,KAAK,WAAW,MAAM,wCAAwC;OAC9D,EAAE,UAAU,EAAyB,MAAM,mBAAmB;AAErE,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CACJ,QAAgB,EAChB,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,QAAQ,WAAW,EAAE;YACxD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,SAAiB,EAAE,OAA6B;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,QAAQ,aAAa,SAAS,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,QAAgB,EAChB,SAAiB,EACjB,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,QAAQ,aAAa,SAAS,EAAE,EAAE;YACrE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAWD,IAAI,CACF,QAAgB,EAChB,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACvC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,QAAQ,WAAW,EAAE,YAAY,EAAE;YAC5E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,UAAmB;CAAG;AA0exD,WAAiB,QAAQ;IAqBT,qBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;AAIxD,CAAC,EAzBgB,QAAQ,KAAR,QAAQ,QAyBxB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CodeInterpreterLogs, CodeInterpreterOutputImage, CodeInterpreterToolCall, CodeInterpreterToolCallDelta,
|
|
1
|
+
export { CodeInterpreterLogs, CodeInterpreterOutputImage, CodeInterpreterToolCall, CodeInterpreterToolCallDelta, FileSearchToolCall, FileSearchToolCallDelta, FunctionToolCall, FunctionToolCallDelta, MessageCreationStepDetails, RunStep, RunStepDelta, RunStepDeltaEvent, RunStepDeltaMessageDelta, ToolCall, ToolCallDelta, ToolCallDeltaObject, ToolCallsStepDetails, StepListParams, RunStepsPage, Steps, } from "./steps.js";
|
|
2
2
|
export { RequiredActionFunctionToolCall, Run, RunStatus, RunCreateParams, RunCreateParamsNonStreaming, RunCreateParamsStreaming, RunUpdateParams, RunListParams, RunCreateAndPollParams, RunCreateAndStreamParams, RunStreamParams, RunSubmitToolOutputsParams, RunSubmitToolOutputsParamsNonStreaming, RunSubmitToolOutputsParamsStreaming, RunSubmitToolOutputsAndPollParams, RunSubmitToolOutputsStreamParams, RunsPage, Runs, } from "./runs.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,KAAK,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,8BAA8B,EAC9B,GAAG,EACH,SAAS,EACT,eAAe,EACf,2BAA2B,EAC3B,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,0BAA0B,EAC1B,sCAAsC,EACtC,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,QAAQ,EACR,IAAI,GACL,MAAM,QAAQ,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { APIResource } from 'openai/resource';
|
|
|
4
4
|
import { AssistantStream, RunCreateParamsBaseStream } from 'openai/lib/AssistantStream';
|
|
5
5
|
import { RunSubmitToolOutputsParamsStream } from 'openai/lib/AssistantStream';
|
|
6
6
|
import * as RunsAPI from 'openai/resources/beta/threads/runs/runs';
|
|
7
|
-
import * as AssistantsAPI from 'openai/resources/beta/assistants
|
|
7
|
+
import * as AssistantsAPI from 'openai/resources/beta/assistants';
|
|
8
8
|
import * as ThreadsAPI from 'openai/resources/beta/threads/threads';
|
|
9
9
|
import * as StepsAPI from 'openai/resources/beta/threads/runs/steps';
|
|
10
10
|
import { CursorPage, type CursorPageParams } from 'openai/pagination';
|
|
@@ -157,12 +157,6 @@ export interface Run {
|
|
|
157
157
|
* The Unix timestamp (in seconds) for when the run failed.
|
|
158
158
|
*/
|
|
159
159
|
failed_at: number | null;
|
|
160
|
-
/**
|
|
161
|
-
* The list of [File](https://platform.openai.com/docs/api-reference/files) IDs the
|
|
162
|
-
* [assistant](https://platform.openai.com/docs/api-reference/assistants) used for
|
|
163
|
-
* this run.
|
|
164
|
-
*/
|
|
165
|
-
file_ids: Array<string>;
|
|
166
160
|
/**
|
|
167
161
|
* Details on why the run is incomplete. Will be `null` if the run is not
|
|
168
162
|
* incomplete.
|
|
@@ -267,6 +261,10 @@ export interface Run {
|
|
|
267
261
|
* The sampling temperature used for this run. If not set, defaults to 1.
|
|
268
262
|
*/
|
|
269
263
|
temperature?: number | null;
|
|
264
|
+
/**
|
|
265
|
+
* The nucleus sampling value used for this run. If not set, defaults to 1.
|
|
266
|
+
*/
|
|
267
|
+
top_p?: number | null;
|
|
270
268
|
}
|
|
271
269
|
export declare namespace Run {
|
|
272
270
|
/**
|
|
@@ -454,6 +452,12 @@ export interface RunCreateParamsBase {
|
|
|
454
452
|
* modifying the behavior on a per-run basis.
|
|
455
453
|
*/
|
|
456
454
|
tools?: Array<AssistantsAPI.AssistantTool> | null;
|
|
455
|
+
/**
|
|
456
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
457
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
458
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
459
|
+
*/
|
|
460
|
+
top_p?: number | null;
|
|
457
461
|
truncation_strategy?: RunCreateParams.TruncationStrategy | null;
|
|
458
462
|
}
|
|
459
463
|
export declare namespace RunCreateParams {
|
|
@@ -472,12 +476,9 @@ export declare namespace RunCreateParams {
|
|
|
472
476
|
*/
|
|
473
477
|
role: 'user' | 'assistant';
|
|
474
478
|
/**
|
|
475
|
-
* A list of
|
|
476
|
-
* the message should use. There can be a maximum of 10 files attached to a
|
|
477
|
-
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
478
|
-
* access and use files.
|
|
479
|
+
* A list of files attached to the message, and the tools they should be added to.
|
|
479
480
|
*/
|
|
480
|
-
|
|
481
|
+
attachments?: Array<AdditionalMessage.Attachment> | null;
|
|
481
482
|
/**
|
|
482
483
|
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
483
484
|
* for storing additional information about the object in a structured format. Keys
|
|
@@ -486,6 +487,15 @@ export declare namespace RunCreateParams {
|
|
|
486
487
|
*/
|
|
487
488
|
metadata?: unknown | null;
|
|
488
489
|
}
|
|
490
|
+
namespace AdditionalMessage {
|
|
491
|
+
interface Attachment {
|
|
492
|
+
add_to?: Array<'file_search' | 'code_interpreter'>;
|
|
493
|
+
/**
|
|
494
|
+
* The ID of the file to attach to the message.
|
|
495
|
+
*/
|
|
496
|
+
file_id?: string;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
489
499
|
interface TruncationStrategy {
|
|
490
500
|
/**
|
|
491
501
|
* The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
@@ -632,6 +642,12 @@ export interface RunCreateAndPollParams {
|
|
|
632
642
|
* modifying the behavior on a per-run basis.
|
|
633
643
|
*/
|
|
634
644
|
tools?: Array<AssistantsAPI.AssistantTool> | null;
|
|
645
|
+
/**
|
|
646
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
647
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
648
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
649
|
+
*/
|
|
650
|
+
top_p?: number | null;
|
|
635
651
|
truncation_strategy?: RunCreateAndPollParams.TruncationStrategy | null;
|
|
636
652
|
}
|
|
637
653
|
export declare namespace RunCreateAndPollParams {
|
|
@@ -650,12 +666,9 @@ export declare namespace RunCreateAndPollParams {
|
|
|
650
666
|
*/
|
|
651
667
|
role: 'user' | 'assistant';
|
|
652
668
|
/**
|
|
653
|
-
* A list of
|
|
654
|
-
* the message should use. There can be a maximum of 10 files attached to a
|
|
655
|
-
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
656
|
-
* access and use files.
|
|
669
|
+
* A list of files attached to the message, and the tools they should be added to.
|
|
657
670
|
*/
|
|
658
|
-
|
|
671
|
+
attachments?: Array<AdditionalMessage.Attachment> | null;
|
|
659
672
|
/**
|
|
660
673
|
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
661
674
|
* for storing additional information about the object in a structured format. Keys
|
|
@@ -664,6 +677,15 @@ export declare namespace RunCreateAndPollParams {
|
|
|
664
677
|
*/
|
|
665
678
|
metadata?: unknown | null;
|
|
666
679
|
}
|
|
680
|
+
namespace AdditionalMessage {
|
|
681
|
+
interface Attachment {
|
|
682
|
+
add_to?: Array<'file_search' | 'code_interpreter'>;
|
|
683
|
+
/**
|
|
684
|
+
* The ID of the file to attach to the message.
|
|
685
|
+
*/
|
|
686
|
+
file_id?: string;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
667
689
|
interface TruncationStrategy {
|
|
668
690
|
/**
|
|
669
691
|
* The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
@@ -769,6 +791,12 @@ export interface RunCreateAndStreamParams {
|
|
|
769
791
|
* modifying the behavior on a per-run basis.
|
|
770
792
|
*/
|
|
771
793
|
tools?: Array<AssistantsAPI.AssistantTool> | null;
|
|
794
|
+
/**
|
|
795
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
796
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
797
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
798
|
+
*/
|
|
799
|
+
top_p?: number | null;
|
|
772
800
|
truncation_strategy?: RunCreateAndStreamParams.TruncationStrategy | null;
|
|
773
801
|
}
|
|
774
802
|
export declare namespace RunCreateAndStreamParams {
|
|
@@ -787,12 +815,9 @@ export declare namespace RunCreateAndStreamParams {
|
|
|
787
815
|
*/
|
|
788
816
|
role: 'user' | 'assistant';
|
|
789
817
|
/**
|
|
790
|
-
* A list of
|
|
791
|
-
* the message should use. There can be a maximum of 10 files attached to a
|
|
792
|
-
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
793
|
-
* access and use files.
|
|
818
|
+
* A list of files attached to the message, and the tools they should be added to.
|
|
794
819
|
*/
|
|
795
|
-
|
|
820
|
+
attachments?: Array<AdditionalMessage.Attachment> | null;
|
|
796
821
|
/**
|
|
797
822
|
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
798
823
|
* for storing additional information about the object in a structured format. Keys
|
|
@@ -801,6 +826,15 @@ export declare namespace RunCreateAndStreamParams {
|
|
|
801
826
|
*/
|
|
802
827
|
metadata?: unknown | null;
|
|
803
828
|
}
|
|
829
|
+
namespace AdditionalMessage {
|
|
830
|
+
interface Attachment {
|
|
831
|
+
add_to?: Array<'file_search' | 'code_interpreter'>;
|
|
832
|
+
/**
|
|
833
|
+
* The ID of the file to attach to the message.
|
|
834
|
+
*/
|
|
835
|
+
file_id?: string;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
804
838
|
interface TruncationStrategy {
|
|
805
839
|
/**
|
|
806
840
|
* The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
@@ -906,6 +940,12 @@ export interface RunStreamParams {
|
|
|
906
940
|
* modifying the behavior on a per-run basis.
|
|
907
941
|
*/
|
|
908
942
|
tools?: Array<AssistantsAPI.AssistantTool> | null;
|
|
943
|
+
/**
|
|
944
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
945
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
946
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
947
|
+
*/
|
|
948
|
+
top_p?: number | null;
|
|
909
949
|
truncation_strategy?: RunStreamParams.TruncationStrategy | null;
|
|
910
950
|
}
|
|
911
951
|
export declare namespace RunStreamParams {
|
|
@@ -924,12 +964,9 @@ export declare namespace RunStreamParams {
|
|
|
924
964
|
*/
|
|
925
965
|
role: 'user' | 'assistant';
|
|
926
966
|
/**
|
|
927
|
-
* A list of
|
|
928
|
-
* the message should use. There can be a maximum of 10 files attached to a
|
|
929
|
-
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
930
|
-
* access and use files.
|
|
967
|
+
* A list of files attached to the message, and the tools they should be added to.
|
|
931
968
|
*/
|
|
932
|
-
|
|
969
|
+
attachments?: Array<AdditionalMessage.Attachment> | null;
|
|
933
970
|
/**
|
|
934
971
|
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
935
972
|
* for storing additional information about the object in a structured format. Keys
|
|
@@ -938,6 +975,15 @@ export declare namespace RunStreamParams {
|
|
|
938
975
|
*/
|
|
939
976
|
metadata?: unknown | null;
|
|
940
977
|
}
|
|
978
|
+
namespace AdditionalMessage {
|
|
979
|
+
interface Attachment {
|
|
980
|
+
add_to?: Array<'file_search' | 'code_interpreter'>;
|
|
981
|
+
/**
|
|
982
|
+
* The ID of the file to attach to the message.
|
|
983
|
+
*/
|
|
984
|
+
file_id?: string;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
941
987
|
interface TruncationStrategy {
|
|
942
988
|
/**
|
|
943
989
|
* The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
@@ -1058,11 +1104,11 @@ export declare namespace Runs {
|
|
|
1058
1104
|
export import CodeInterpreterOutputImage = StepsAPI.CodeInterpreterOutputImage;
|
|
1059
1105
|
export import CodeInterpreterToolCall = StepsAPI.CodeInterpreterToolCall;
|
|
1060
1106
|
export import CodeInterpreterToolCallDelta = StepsAPI.CodeInterpreterToolCallDelta;
|
|
1107
|
+
export import FileSearchToolCall = StepsAPI.FileSearchToolCall;
|
|
1108
|
+
export import FileSearchToolCallDelta = StepsAPI.FileSearchToolCallDelta;
|
|
1061
1109
|
export import FunctionToolCall = StepsAPI.FunctionToolCall;
|
|
1062
1110
|
export import FunctionToolCallDelta = StepsAPI.FunctionToolCallDelta;
|
|
1063
1111
|
export import MessageCreationStepDetails = StepsAPI.MessageCreationStepDetails;
|
|
1064
|
-
export import RetrievalToolCall = StepsAPI.RetrievalToolCall;
|
|
1065
|
-
export import RetrievalToolCallDelta = StepsAPI.RetrievalToolCallDelta;
|
|
1066
1112
|
export import RunStep = StepsAPI.RunStep;
|
|
1067
1113
|
export import RunStepDelta = StepsAPI.RunStepDelta;
|
|
1068
1114
|
export import RunStepDeltaEvent = StepsAPI.RunStepDeltaEvent;
|