openai 4.46.0 → 4.47.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 +16 -0
- package/README.md +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/index.mjs +2 -2
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audio/audio.d.ts +4 -4
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js +4 -4
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs +4 -4
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/speech.d.ts +4 -4
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/speech.js +1 -1
- package/resources/audio/speech.js.map +1 -1
- package/resources/audio/speech.mjs +1 -1
- package/resources/audio/speech.mjs.map +1 -1
- package/resources/audio/transcriptions.d.ts +4 -4
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js +2 -2
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs +2 -2
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.ts +4 -4
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js +2 -2
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs +2 -2
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/batches.d.ts +10 -7
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +4 -4
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +4 -4
- package/resources/batches.mjs.map +1 -1
- package/resources/beta/assistants.d.ts +18 -15
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/assistants.js +4 -4
- package/resources/beta/assistants.js.map +1 -1
- package/resources/beta/assistants.mjs +4 -4
- package/resources/beta/assistants.mjs.map +1 -1
- package/resources/beta/beta.d.ts +5 -5
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +5 -5
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +5 -5
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/chat/chat.d.ts +2 -2
- package/resources/beta/chat/chat.d.ts.map +1 -1
- package/resources/beta/chat/chat.js +2 -2
- package/resources/beta/chat/chat.js.map +1 -1
- package/resources/beta/chat/chat.mjs +2 -2
- package/resources/beta/chat/chat.mjs.map +1 -1
- package/resources/beta/chat/completions.d.ts +14 -14
- package/resources/beta/chat/completions.d.ts.map +1 -1
- package/resources/beta/chat/completions.js +8 -8
- package/resources/beta/chat/completions.js.map +1 -1
- package/resources/beta/chat/completions.mjs +8 -8
- package/resources/beta/chat/completions.mjs.map +1 -1
- package/resources/beta/threads/messages.d.ts +5 -5
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js +4 -4
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs +4 -4
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +32 -27
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js +8 -7
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs +8 -7
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +4 -4
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/runs/steps.js +4 -4
- package/resources/beta/threads/runs/steps.js.map +1 -1
- package/resources/beta/threads/runs/steps.mjs +4 -4
- package/resources/beta/threads/runs/steps.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +21 -17
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +5 -5
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +5 -5
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/beta/vector-stores/file-batches.d.ts +7 -7
- package/resources/beta/vector-stores/file-batches.d.ts.map +1 -1
- package/resources/beta/vector-stores/file-batches.js +6 -5
- package/resources/beta/vector-stores/file-batches.js.map +1 -1
- package/resources/beta/vector-stores/file-batches.mjs +6 -5
- package/resources/beta/vector-stores/file-batches.mjs.map +1 -1
- package/resources/beta/vector-stores/files.d.ts +5 -5
- package/resources/beta/vector-stores/files.d.ts.map +1 -1
- package/resources/beta/vector-stores/files.js +5 -5
- package/resources/beta/vector-stores/files.js.map +1 -1
- package/resources/beta/vector-stores/files.mjs +5 -5
- package/resources/beta/vector-stores/files.mjs.map +1 -1
- package/resources/beta/vector-stores/vector-stores.d.ts +6 -6
- package/resources/beta/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/beta/vector-stores/vector-stores.js +6 -6
- package/resources/beta/vector-stores/vector-stores.js.map +1 -1
- package/resources/beta/vector-stores/vector-stores.mjs +6 -6
- package/resources/beta/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/chat/chat.d.ts +3 -3
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js +2 -2
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs +2 -2
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +8 -8
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +1 -1
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +1 -1
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/completions.d.ts +6 -6
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +1 -1
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +1 -1
- package/resources/completions.mjs.map +1 -1
- package/resources/embeddings.d.ts +3 -3
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +1 -1
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +1 -1
- package/resources/embeddings.mjs.map +1 -1
- package/resources/files.d.ts +17 -13
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +18 -14
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +18 -14
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tuning/fine-tuning.d.ts +2 -2
- package/resources/fine-tuning/fine-tuning.d.ts.map +1 -1
- package/resources/fine-tuning/fine-tuning.js +2 -2
- package/resources/fine-tuning/fine-tuning.js.map +1 -1
- package/resources/fine-tuning/fine-tuning.mjs +2 -2
- package/resources/fine-tuning/fine-tuning.mjs.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.ts +4 -4
- package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.js +4 -4
- package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.mjs +4 -4
- package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +5 -5
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +5 -5
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +5 -5
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/images.d.ts +4 -4
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +2 -2
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +2 -2
- package/resources/images.mjs.map +1 -1
- package/resources/models.d.ts +4 -4
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +3 -3
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +3 -3
- package/resources/models.mjs.map +1 -1
- package/resources/moderations.d.ts +3 -3
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +1 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +1 -1
- package/resources/moderations.mjs.map +1 -1
- package/src/index.ts +2 -2
- package/src/resources/audio/audio.ts +4 -4
- package/src/resources/audio/speech.ts +4 -4
- package/src/resources/audio/transcriptions.ts +4 -4
- package/src/resources/audio/translations.ts +4 -4
- package/src/resources/batches.ts +11 -8
- package/src/resources/beta/assistants.ts +19 -16
- package/src/resources/beta/beta.ts +5 -5
- package/src/resources/beta/chat/chat.ts +2 -2
- package/src/resources/beta/chat/completions.ts +14 -14
- package/src/resources/beta/threads/messages.ts +6 -6
- package/src/resources/beta/threads/runs/runs.ts +35 -28
- package/src/resources/beta/threads/runs/steps.ts +5 -5
- package/src/resources/beta/threads/threads.ts +22 -18
- package/src/resources/beta/vector-stores/file-batches.ts +11 -10
- package/src/resources/beta/vector-stores/files.ts +6 -6
- package/src/resources/beta/vector-stores/vector-stores.ts +7 -7
- package/src/resources/chat/chat.ts +3 -3
- package/src/resources/chat/completions.ts +8 -8
- package/src/resources/completions.ts +6 -6
- package/src/resources/embeddings.ts +3 -3
- package/src/resources/files.ts +20 -16
- package/src/resources/fine-tuning/fine-tuning.ts +2 -2
- package/src/resources/fine-tuning/jobs/checkpoints.ts +5 -5
- package/src/resources/fine-tuning/jobs/jobs.ts +6 -6
- package/src/resources/images.ts +4 -4
- package/src/resources/models.ts +4 -4
- package/src/resources/moderations.ts +3 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/models.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from
|
|
3
|
-
import * as ModelsAPI from
|
|
4
|
-
import { Page } from
|
|
2
|
+
import { APIResource } from "../resource.mjs";
|
|
3
|
+
import * as ModelsAPI from "./models.mjs";
|
|
4
|
+
import { Page } from "../pagination.mjs";
|
|
5
5
|
export class Models extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Retrieves a model instance, providing basic information about the model such as
|
package/resources/models.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,KAAa,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAW;CAAG;AAmC9C,WAAiB,MAAM;IAGP,iBAAU,GAAG,SAAS,CAAC,UAAU,CAAC;AAClD,CAAC,EAJgB,MAAM,KAAN,MAAM,QAItB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as Core from
|
|
2
|
-
import { APIResource } from
|
|
3
|
-
import * as ModerationsAPI from
|
|
1
|
+
import * as Core from "../core.js";
|
|
2
|
+
import { APIResource } from "../resource.js";
|
|
3
|
+
import * as ModerationsAPI from "./moderations.js";
|
|
4
4
|
export declare class Moderations extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Classifies if text is potentially harmful.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderations.d.ts","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"moderations.d.ts","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAEhD,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAG7C;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;IAElC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC,cAAc,CAAC;IAE3C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,UAAU,CAAC;IAC1B;;OAEG;IACH,UAAiB,UAAU;QACzB;;;WAGG;QACH,UAAU,EAAE,OAAO,CAAC;QAEpB;;;WAGG;QACH,wBAAwB,EAAE,OAAO,CAAC;QAElC;;;;;WAKG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;;;WAIG;QACH,kBAAkB,EAAE,OAAO,CAAC;QAE5B;;;WAGG;QACH,WAAW,EAAE,OAAO,CAAC;QAErB;;;;WAIG;QACH,wBAAwB,EAAE,OAAO,CAAC;QAElC;;;WAGG;QACH,kBAAkB,EAAE,OAAO,CAAC;QAE5B;;;;WAIG;QACH,MAAM,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,eAAe,EAAE,OAAO,CAAC;QAEzB;;WAEG;QACH,QAAQ,EAAE,OAAO,CAAC;QAElB;;WAEG;QACH,kBAAkB,EAAE,OAAO,CAAC;KAC7B;IAED;;OAEG;IACH,UAAiB,cAAc;QAC7B;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,wBAAwB,EAAE,MAAM,CAAC;QAEjC;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAE3B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,wBAAwB,EAAE,MAAM,CAAC;QAEjC;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAE3B;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,eAAe,EAAE,MAAM,CAAC;QAExB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;CAC7E;AAED,yBAAiB,WAAW,CAAC;IAC3B,MAAM,QAAQ,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IACrD,MAAM,QAAQ,wBAAwB,GAAG,cAAc,CAAC,wBAAwB,CAAC;IACjF,MAAM,QAAQ,sBAAsB,GAAG,cAAc,CAAC,sBAAsB,CAAC;CAC9E"}
|
package/resources/moderations.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.Moderations = void 0;
|
|
5
|
-
const resource_1 = require("
|
|
5
|
+
const resource_1 = require("../resource.js");
|
|
6
6
|
class Moderations extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Classifies if text is potentially harmful.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderations.js","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAGtF,
|
|
1
|
+
{"version":3,"file":"moderations.js","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAGtF,6CAA0C;AAG1C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAVD,kCAUC;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAI3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from
|
|
2
|
+
import { APIResource } from "../resource.mjs";
|
|
3
3
|
export class Moderations extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Classifies if text is potentially harmful.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderations.mjs","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"moderations.mjs","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B"}
|
package/src/index.ts
CHANGED
|
@@ -4,8 +4,8 @@ import * as Core from './core';
|
|
|
4
4
|
import * as Errors from './error';
|
|
5
5
|
import { type Agent, type RequestInit } from './_shims/index';
|
|
6
6
|
import * as Uploads from './uploads';
|
|
7
|
-
import * as Pagination from
|
|
8
|
-
import * as API from
|
|
7
|
+
import * as Pagination from './pagination';
|
|
8
|
+
import * as API from './resources/index';
|
|
9
9
|
|
|
10
10
|
export interface ClientOptions {
|
|
11
11
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as SpeechAPI from
|
|
5
|
-
import * as TranscriptionsAPI from
|
|
6
|
-
import * as TranslationsAPI from
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as SpeechAPI from './speech';
|
|
5
|
+
import * as TranscriptionsAPI from './transcriptions';
|
|
6
|
+
import * as TranslationsAPI from './translations';
|
|
7
7
|
|
|
8
8
|
export class Audio extends APIResource {
|
|
9
9
|
transcriptions: TranscriptionsAPI.Transcriptions = new TranscriptionsAPI.Transcriptions(this._client);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import { type Response } from
|
|
6
|
-
import * as SpeechAPI from
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { type Response } from '../../_shims/index';
|
|
6
|
+
import * as SpeechAPI from './speech';
|
|
7
7
|
|
|
8
8
|
export class Speech extends APIResource {
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import * as TranscriptionsAPI from
|
|
6
|
-
import { type Uploadable, multipartFormRequestOptions } from
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import * as TranscriptionsAPI from './transcriptions';
|
|
6
|
+
import { type Uploadable, multipartFormRequestOptions } from '../../core';
|
|
7
7
|
|
|
8
8
|
export class Transcriptions extends APIResource {
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import * as TranslationsAPI from
|
|
6
|
-
import { type Uploadable, multipartFormRequestOptions } from
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import * as TranslationsAPI from './translations';
|
|
6
|
+
import { type Uploadable, multipartFormRequestOptions } from '../../core';
|
|
7
7
|
|
|
8
8
|
export class Translations extends APIResource {
|
|
9
9
|
/**
|
package/src/resources/batches.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import { isRequestOptions } from
|
|
6
|
-
import * as BatchesAPI from
|
|
7
|
-
import { CursorPage, type CursorPageParams } from
|
|
3
|
+
import * as Core from '../core';
|
|
4
|
+
import { APIResource } from '../resource';
|
|
5
|
+
import { isRequestOptions } from '../core';
|
|
6
|
+
import * as BatchesAPI from './batches';
|
|
7
|
+
import { CursorPage, type CursorPageParams } from '../pagination';
|
|
8
8
|
|
|
9
9
|
export class Batches extends APIResource {
|
|
10
10
|
/**
|
|
@@ -215,9 +215,11 @@ export interface BatchCreateParams {
|
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* The endpoint to be used for all requests in the batch. Currently
|
|
218
|
-
* `/v1/chat/completions
|
|
218
|
+
* `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.
|
|
219
|
+
* Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
|
|
220
|
+
* embedding inputs across all requests in the batch.
|
|
219
221
|
*/
|
|
220
|
-
endpoint: '/v1/chat/completions' | '/v1/embeddings';
|
|
222
|
+
endpoint: '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';
|
|
221
223
|
|
|
222
224
|
/**
|
|
223
225
|
* The ID of an uploaded file that contains requests for the new batch.
|
|
@@ -227,7 +229,8 @@ export interface BatchCreateParams {
|
|
|
227
229
|
*
|
|
228
230
|
* Your input file must be formatted as a
|
|
229
231
|
* [JSONL file](https://platform.openai.com/docs/api-reference/batch/requestInput),
|
|
230
|
-
* and must be uploaded with the purpose `batch`.
|
|
232
|
+
* and must be uploaded with the purpose `batch`. The file can contain up to 50,000
|
|
233
|
+
* requests, and can be up to 100 MB in size.
|
|
231
234
|
*/
|
|
232
235
|
input_file_id: string;
|
|
233
236
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import { isRequestOptions } from
|
|
6
|
-
import * as AssistantsAPI from
|
|
7
|
-
import * as Shared from
|
|
8
|
-
import * as MessagesAPI from
|
|
9
|
-
import * as ThreadsAPI from
|
|
10
|
-
import * as RunsAPI from
|
|
11
|
-
import * as StepsAPI from
|
|
12
|
-
import { CursorPage, type CursorPageParams } from
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as AssistantsAPI from './assistants';
|
|
7
|
+
import * as Shared from '../shared';
|
|
8
|
+
import * as MessagesAPI from './threads/messages';
|
|
9
|
+
import * as ThreadsAPI from './threads/threads';
|
|
10
|
+
import * as RunsAPI from './threads/runs/runs';
|
|
11
|
+
import * as StepsAPI from './threads/runs/steps';
|
|
12
|
+
import { CursorPage, type CursorPageParams } from '../../pagination';
|
|
13
13
|
|
|
14
14
|
export class Assistants extends APIResource {
|
|
15
15
|
/**
|
|
@@ -144,8 +144,9 @@ export interface Assistant {
|
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Specifies the format that the model must output. Compatible with
|
|
147
|
-
* [GPT-
|
|
148
|
-
*
|
|
147
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
148
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
149
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
149
150
|
*
|
|
150
151
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
151
152
|
* message the model generates is valid JSON.
|
|
@@ -1047,8 +1048,9 @@ export interface AssistantCreateParams {
|
|
|
1047
1048
|
|
|
1048
1049
|
/**
|
|
1049
1050
|
* Specifies the format that the model must output. Compatible with
|
|
1050
|
-
* [GPT-
|
|
1051
|
-
*
|
|
1051
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
1052
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
1053
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
1052
1054
|
*
|
|
1053
1055
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
1054
1056
|
* message the model generates is valid JSON.
|
|
@@ -1193,8 +1195,9 @@ export interface AssistantUpdateParams {
|
|
|
1193
1195
|
|
|
1194
1196
|
/**
|
|
1195
1197
|
* Specifies the format that the model must output. Compatible with
|
|
1196
|
-
* [GPT-
|
|
1197
|
-
*
|
|
1198
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
1199
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
1200
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
1198
1201
|
*
|
|
1199
1202
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
1200
1203
|
* message the model generates is valid JSON.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as AssistantsAPI from
|
|
5
|
-
import * as ChatAPI from
|
|
6
|
-
import * as ThreadsAPI from
|
|
7
|
-
import * as VectorStoresAPI from
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as AssistantsAPI from './assistants';
|
|
5
|
+
import * as ChatAPI from './chat/chat';
|
|
6
|
+
import * as ThreadsAPI from './threads/threads';
|
|
7
|
+
import * as VectorStoresAPI from './vector-stores/vector-stores';
|
|
8
8
|
|
|
9
9
|
export class Beta extends APIResource {
|
|
10
10
|
vectorStores: VectorStoresAPI.VectorStores = new VectorStoresAPI.VectorStores(this._client);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as CompletionsAPI from
|
|
3
|
+
import { APIResource } from '../../../resource';
|
|
4
|
+
import * as CompletionsAPI from './completions';
|
|
5
5
|
|
|
6
6
|
export class Chat extends APIResource {
|
|
7
7
|
completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from
|
|
6
|
-
export { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIResource } from '../../../resource';
|
|
5
|
+
import { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from '../../../lib/ChatCompletionRunner';
|
|
6
|
+
export { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from '../../../lib/ChatCompletionRunner';
|
|
7
7
|
import {
|
|
8
8
|
ChatCompletionStreamingRunner,
|
|
9
9
|
ChatCompletionStreamingFunctionRunnerParams,
|
|
10
|
-
} from
|
|
10
|
+
} from '../../../lib/ChatCompletionStreamingRunner';
|
|
11
11
|
export {
|
|
12
12
|
ChatCompletionStreamingRunner,
|
|
13
13
|
ChatCompletionStreamingFunctionRunnerParams,
|
|
14
|
-
} from
|
|
15
|
-
import { BaseFunctionsArgs } from
|
|
14
|
+
} from '../../../lib/ChatCompletionStreamingRunner';
|
|
15
|
+
import { BaseFunctionsArgs } from '../../../lib/RunnableFunction';
|
|
16
16
|
export {
|
|
17
17
|
RunnableFunction,
|
|
18
18
|
RunnableFunctions,
|
|
@@ -20,13 +20,13 @@ export {
|
|
|
20
20
|
RunnableFunctionWithoutParse,
|
|
21
21
|
ParsingFunction,
|
|
22
22
|
ParsingToolFunction,
|
|
23
|
-
} from
|
|
24
|
-
import { ChatCompletionToolRunnerParams } from
|
|
25
|
-
export { ChatCompletionToolRunnerParams } from
|
|
26
|
-
import { ChatCompletionStreamingToolRunnerParams } from
|
|
27
|
-
export { ChatCompletionStreamingToolRunnerParams } from
|
|
28
|
-
import { ChatCompletionStream, type ChatCompletionStreamParams } from
|
|
29
|
-
export { ChatCompletionStream, type ChatCompletionStreamParams } from
|
|
23
|
+
} from '../../../lib/RunnableFunction';
|
|
24
|
+
import { ChatCompletionToolRunnerParams } from '../../../lib/ChatCompletionRunner';
|
|
25
|
+
export { ChatCompletionToolRunnerParams } from '../../../lib/ChatCompletionRunner';
|
|
26
|
+
import { ChatCompletionStreamingToolRunnerParams } from '../../../lib/ChatCompletionStreamingRunner';
|
|
27
|
+
export { ChatCompletionStreamingToolRunnerParams } from '../../../lib/ChatCompletionStreamingRunner';
|
|
28
|
+
import { ChatCompletionStream, type ChatCompletionStreamParams } from '../../../lib/ChatCompletionStream';
|
|
29
|
+
export { ChatCompletionStream, type ChatCompletionStreamParams } from '../../../lib/ChatCompletionStream';
|
|
30
30
|
|
|
31
31
|
export class Completions extends APIResource {
|
|
32
32
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import { isRequestOptions } from
|
|
6
|
-
import * as MessagesAPI from
|
|
7
|
-
import * as AssistantsAPI from
|
|
8
|
-
import { CursorPage, type CursorPageParams } from
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIResource } from '../../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../../core';
|
|
6
|
+
import * as MessagesAPI from './messages';
|
|
7
|
+
import * as AssistantsAPI from '../assistants';
|
|
8
|
+
import { CursorPage, type CursorPageParams } from '../../../pagination';
|
|
9
9
|
|
|
10
10
|
export class Messages extends APIResource {
|
|
11
11
|
/**
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIPromise } from
|
|
5
|
-
import { APIResource } from
|
|
6
|
-
import { isRequestOptions } from
|
|
7
|
-
import { AssistantStream, RunCreateParamsBaseStream } from
|
|
8
|
-
import { sleep } from
|
|
9
|
-
import { RunSubmitToolOutputsParamsStream } from
|
|
10
|
-
import * as RunsAPI from
|
|
11
|
-
import * as AssistantsAPI from
|
|
12
|
-
import * as MessagesAPI from
|
|
13
|
-
import * as ThreadsAPI from
|
|
14
|
-
import * as StepsAPI from
|
|
15
|
-
import { CursorPage, type CursorPageParams } from
|
|
16
|
-
import { Stream } from
|
|
3
|
+
import * as Core from '../../../../core';
|
|
4
|
+
import { APIPromise } from '../../../../core';
|
|
5
|
+
import { APIResource } from '../../../../resource';
|
|
6
|
+
import { isRequestOptions } from '../../../../core';
|
|
7
|
+
import { AssistantStream, RunCreateParamsBaseStream } from '../../../../lib/AssistantStream';
|
|
8
|
+
import { sleep } from '../../../../core';
|
|
9
|
+
import { RunSubmitToolOutputsParamsStream } from '../../../../lib/AssistantStream';
|
|
10
|
+
import * as RunsAPI from './runs';
|
|
11
|
+
import * as AssistantsAPI from '../../assistants';
|
|
12
|
+
import * as MessagesAPI from '../messages';
|
|
13
|
+
import * as ThreadsAPI from '../threads';
|
|
14
|
+
import * as StepsAPI from './steps';
|
|
15
|
+
import { CursorPage, type CursorPageParams } from '../../../../pagination';
|
|
16
|
+
import { Stream } from '../../../../streaming';
|
|
17
17
|
|
|
18
18
|
export class Runs extends APIResource {
|
|
19
19
|
steps: StepsAPI.Steps = new StepsAPI.Steps(this._client);
|
|
@@ -176,6 +176,7 @@ export class Runs extends APIResource {
|
|
|
176
176
|
break;
|
|
177
177
|
//We return the run in any terminal state.
|
|
178
178
|
case 'requires_action':
|
|
179
|
+
case 'incomplete':
|
|
179
180
|
case 'cancelled':
|
|
180
181
|
case 'completed':
|
|
181
182
|
case 'failed':
|
|
@@ -409,8 +410,9 @@ export interface Run {
|
|
|
409
410
|
|
|
410
411
|
/**
|
|
411
412
|
* Specifies the format that the model must output. Compatible with
|
|
412
|
-
* [GPT-
|
|
413
|
-
*
|
|
413
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
414
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
415
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
414
416
|
*
|
|
415
417
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
416
418
|
* message the model generates is valid JSON.
|
|
@@ -432,8 +434,8 @@ export interface Run {
|
|
|
432
434
|
|
|
433
435
|
/**
|
|
434
436
|
* The status of the run, which can be either `queued`, `in_progress`,
|
|
435
|
-
* `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
|
|
436
|
-
* `expired`.
|
|
437
|
+
* `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
|
|
438
|
+
* `incomplete`, or `expired`.
|
|
437
439
|
*/
|
|
438
440
|
status: RunStatus;
|
|
439
441
|
|
|
@@ -584,8 +586,8 @@ export namespace Run {
|
|
|
584
586
|
|
|
585
587
|
/**
|
|
586
588
|
* The status of the run, which can be either `queued`, `in_progress`,
|
|
587
|
-
* `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
|
|
588
|
-
* `expired`.
|
|
589
|
+
* `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
|
|
590
|
+
* `incomplete`, or `expired`.
|
|
589
591
|
*/
|
|
590
592
|
export type RunStatus =
|
|
591
593
|
| 'queued'
|
|
@@ -595,6 +597,7 @@ export type RunStatus =
|
|
|
595
597
|
| 'cancelled'
|
|
596
598
|
| 'failed'
|
|
597
599
|
| 'completed'
|
|
600
|
+
| 'incomplete'
|
|
598
601
|
| 'expired';
|
|
599
602
|
|
|
600
603
|
export type RunCreateParams = RunCreateParamsNonStreaming | RunCreateParamsStreaming;
|
|
@@ -684,8 +687,9 @@ export interface RunCreateParamsBase {
|
|
|
684
687
|
|
|
685
688
|
/**
|
|
686
689
|
* Specifies the format that the model must output. Compatible with
|
|
687
|
-
* [GPT-
|
|
688
|
-
*
|
|
690
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
691
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
692
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
689
693
|
*
|
|
690
694
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
691
695
|
* message the model generates is valid JSON.
|
|
@@ -945,8 +949,9 @@ export interface RunCreateAndPollParams {
|
|
|
945
949
|
|
|
946
950
|
/**
|
|
947
951
|
* Specifies the format that the model must output. Compatible with
|
|
948
|
-
* [GPT-
|
|
949
|
-
*
|
|
952
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
953
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
954
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
950
955
|
*
|
|
951
956
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
952
957
|
* message the model generates is valid JSON.
|
|
@@ -1152,8 +1157,9 @@ export interface RunCreateAndStreamParams {
|
|
|
1152
1157
|
|
|
1153
1158
|
/**
|
|
1154
1159
|
* Specifies the format that the model must output. Compatible with
|
|
1155
|
-
* [GPT-
|
|
1156
|
-
*
|
|
1160
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
1161
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
1162
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
1157
1163
|
*
|
|
1158
1164
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
1159
1165
|
* message the model generates is valid JSON.
|
|
@@ -1359,8 +1365,9 @@ export interface RunStreamParams {
|
|
|
1359
1365
|
|
|
1360
1366
|
/**
|
|
1361
1367
|
* Specifies the format that the model must output. Compatible with
|
|
1362
|
-
* [GPT-
|
|
1363
|
-
*
|
|
1368
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
1369
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
1370
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
1364
1371
|
*
|
|
1365
1372
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
1366
1373
|
* message the model generates is valid JSON.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import { isRequestOptions } from
|
|
6
|
-
import * as StepsAPI from
|
|
7
|
-
import { CursorPage, type CursorPageParams } from
|
|
3
|
+
import * as Core from '../../../../core';
|
|
4
|
+
import { APIResource } from '../../../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../../../core';
|
|
6
|
+
import * as StepsAPI from './steps';
|
|
7
|
+
import { CursorPage, type CursorPageParams } from '../../../../pagination';
|
|
8
8
|
|
|
9
9
|
export class Steps extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIPromise } from
|
|
5
|
-
import { APIResource } from
|
|
6
|
-
import { isRequestOptions } from
|
|
7
|
-
import { AssistantStream, ThreadCreateAndRunParamsBaseStream } from
|
|
8
|
-
import * as ThreadsAPI from
|
|
9
|
-
import * as AssistantsAPI from
|
|
10
|
-
import * as MessagesAPI from
|
|
11
|
-
import * as RunsAPI from
|
|
12
|
-
import { Stream } from
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIPromise } from '../../../core';
|
|
5
|
+
import { APIResource } from '../../../resource';
|
|
6
|
+
import { isRequestOptions } from '../../../core';
|
|
7
|
+
import { AssistantStream, ThreadCreateAndRunParamsBaseStream } from '../../../lib/AssistantStream';
|
|
8
|
+
import * as ThreadsAPI from './threads';
|
|
9
|
+
import * as AssistantsAPI from '../assistants';
|
|
10
|
+
import * as MessagesAPI from './messages';
|
|
11
|
+
import * as RunsAPI from './runs/runs';
|
|
12
|
+
import { Stream } from '../../../streaming';
|
|
13
13
|
|
|
14
14
|
export class Threads extends APIResource {
|
|
15
15
|
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
@@ -130,8 +130,9 @@ export interface AssistantResponseFormat {
|
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* Specifies the format that the model must output. Compatible with
|
|
133
|
-
* [GPT-
|
|
134
|
-
*
|
|
133
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
134
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
135
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
135
136
|
*
|
|
136
137
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
137
138
|
* message the model generates is valid JSON.
|
|
@@ -516,8 +517,9 @@ export interface ThreadCreateAndRunParamsBase {
|
|
|
516
517
|
|
|
517
518
|
/**
|
|
518
519
|
* Specifies the format that the model must output. Compatible with
|
|
519
|
-
* [GPT-
|
|
520
|
-
*
|
|
520
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
521
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
522
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
521
523
|
*
|
|
522
524
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
523
525
|
* message the model generates is valid JSON.
|
|
@@ -875,8 +877,9 @@ export interface ThreadCreateAndRunPollParams {
|
|
|
875
877
|
|
|
876
878
|
/**
|
|
877
879
|
* Specifies the format that the model must output. Compatible with
|
|
878
|
-
* [GPT-
|
|
879
|
-
*
|
|
880
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
881
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
882
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
880
883
|
*
|
|
881
884
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
882
885
|
* message the model generates is valid JSON.
|
|
@@ -1206,8 +1209,9 @@ export interface ThreadCreateAndRunStreamParams {
|
|
|
1206
1209
|
|
|
1207
1210
|
/**
|
|
1208
1211
|
* Specifies the format that the model must output. Compatible with
|
|
1209
|
-
* [GPT-
|
|
1210
|
-
*
|
|
1212
|
+
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
|
|
1213
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
|
|
1214
|
+
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
1211
1215
|
*
|
|
1212
1216
|
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
1213
1217
|
* message the model generates is valid JSON.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from
|
|
4
|
-
import { APIResource } from
|
|
5
|
-
import { isRequestOptions } from
|
|
6
|
-
import { sleep } from
|
|
7
|
-
import { Uploadable } from
|
|
8
|
-
import { allSettledWithThrow } from
|
|
9
|
-
import * as FileBatchesAPI from
|
|
10
|
-
import * as FilesAPI from
|
|
11
|
-
import { VectorStoreFilesPage } from
|
|
12
|
-
import { type CursorPageParams } from
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIResource } from '../../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../../core';
|
|
6
|
+
import { sleep } from '../../../core';
|
|
7
|
+
import { Uploadable } from '../../../core';
|
|
8
|
+
import { allSettledWithThrow } from '../../../lib/Util';
|
|
9
|
+
import * as FileBatchesAPI from './file-batches';
|
|
10
|
+
import * as FilesAPI from './files';
|
|
11
|
+
import { VectorStoreFilesPage } from './files';
|
|
12
|
+
import { type CursorPageParams } from '../../../pagination';
|
|
13
13
|
|
|
14
14
|
export class FileBatches extends APIResource {
|
|
15
15
|
/**
|
|
@@ -138,6 +138,7 @@ export class FileBatches extends APIResource {
|
|
|
138
138
|
await sleep(sleepInterval);
|
|
139
139
|
break;
|
|
140
140
|
case 'failed':
|
|
141
|
+
case 'cancelled':
|
|
141
142
|
case 'completed':
|
|
142
143
|
return batch;
|
|
143
144
|
}
|