openai 4.16.2 → 4.17.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 +13 -0
- package/README.md +1 -1
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/assistants/assistants.d.ts +4 -96
- package/resources/beta/assistants/assistants.d.ts.map +1 -1
- package/resources/beta/assistants/assistants.js.map +1 -1
- package/resources/beta/assistants/assistants.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +5 -66
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js.map +1 -1
- 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/threads.d.ts +2 -32
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions.d.ts +27 -42
- 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/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -0
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.ts +35 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/src/index.ts +3 -0
- package/src/resources/beta/assistants/assistants.ts +4 -105
- package/src/resources/beta/threads/runs/runs.ts +5 -72
- package/src/resources/beta/threads/runs/steps.ts +4 -4
- package/src/resources/beta/threads/threads.ts +2 -35
- package/src/resources/chat/completions.ts +27 -45
- package/src/resources/index.ts +1 -0
- package/src/resources/shared.ts +39 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.mjs","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,gBAAgB,EAAE,MAAM,aAAa;
|
|
1
|
+
{"version":3,"file":"threads.mjs","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,gBAAgB,EAAE,MAAM,aAAa;OAGvC,KAAK,WAAW,MAAM,iDAAiD;OACvE,KAAK,OAAO,MAAM,yCAAyC;AAElE,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnD,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IA8DzE,CAAC;IAvDC,MAAM,CACJ,OAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC3B,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,OAA6B;QACtD,OAAO,IAAI,CAAC,GAAG,C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
import * as ChatCompletionsAPI from 'openai/resources/chat/completions';
|
|
5
5
|
import * as CompletionsAPI from 'openai/resources/completions';
|
|
6
|
+
import * as Shared from 'openai/resources/shared';
|
|
6
7
|
import { Stream } from 'openai/streaming';
|
|
7
8
|
export declare class Completions extends APIResource {
|
|
8
9
|
/**
|
|
@@ -138,7 +139,6 @@ export interface ChatCompletionChunk {
|
|
|
138
139
|
object: 'chat.completion.chunk';
|
|
139
140
|
/**
|
|
140
141
|
* This fingerprint represents the backend configuration that the model runs with.
|
|
141
|
-
*
|
|
142
142
|
* Can be used in conjunction with the `seed` request parameter to understand when
|
|
143
143
|
* backend changes have been made that might impact determinism.
|
|
144
144
|
*/
|
|
@@ -394,37 +394,12 @@ export interface ChatCompletionSystemMessageParam {
|
|
|
394
394
|
role: 'system';
|
|
395
395
|
}
|
|
396
396
|
export interface ChatCompletionTool {
|
|
397
|
-
function:
|
|
397
|
+
function: Shared.FunctionDefinition;
|
|
398
398
|
/**
|
|
399
399
|
* The type of the tool. Currently, only `function` is supported.
|
|
400
400
|
*/
|
|
401
401
|
type: 'function';
|
|
402
402
|
}
|
|
403
|
-
export declare namespace ChatCompletionTool {
|
|
404
|
-
interface Function {
|
|
405
|
-
/**
|
|
406
|
-
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
407
|
-
* underscores and dashes, with a maximum length of 64.
|
|
408
|
-
*/
|
|
409
|
-
name: string;
|
|
410
|
-
/**
|
|
411
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
412
|
-
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
413
|
-
* examples, and the
|
|
414
|
-
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
415
|
-
* documentation about the format.
|
|
416
|
-
*
|
|
417
|
-
* To describe a function that accepts no parameters, provide the value
|
|
418
|
-
* `{"type": "object", "properties": {}}`.
|
|
419
|
-
*/
|
|
420
|
-
parameters: Record<string, unknown>;
|
|
421
|
-
/**
|
|
422
|
-
* A description of what the function does, used by the model to choose when and
|
|
423
|
-
* how to call the function.
|
|
424
|
-
*/
|
|
425
|
-
description?: string;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
403
|
/**
|
|
429
404
|
* Controls which (if any) function is called by the model. `none` means the model
|
|
430
405
|
* will not call a function and instead generates a message. `auto` means the model
|
|
@@ -538,8 +513,18 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
538
513
|
*/
|
|
539
514
|
presence_penalty?: number | null;
|
|
540
515
|
/**
|
|
541
|
-
* An object specifying the format that the model must output.
|
|
542
|
-
*
|
|
516
|
+
* An object specifying the format that the model must output.
|
|
517
|
+
*
|
|
518
|
+
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
519
|
+
* message the model generates is valid JSON.
|
|
520
|
+
*
|
|
521
|
+
* **Important:** when using JSON mode, you **must** also instruct the model to
|
|
522
|
+
* produce JSON yourself via a system or user message. Without this, the model may
|
|
523
|
+
* generate an unending stream of whitespace until the generation reaches the token
|
|
524
|
+
* limit, resulting in increased latency and appearance of a "stuck" request. Also
|
|
525
|
+
* note that the message content may be partially cut off if
|
|
526
|
+
* `finish_reason="length"`, which indicates the generation exceeded `max_tokens`
|
|
527
|
+
* or the conversation exceeded the max context length.
|
|
543
528
|
*/
|
|
544
529
|
response_format?: ChatCompletionCreateParams.ResponseFormat;
|
|
545
530
|
/**
|
|
@@ -621,7 +606,7 @@ export declare namespace ChatCompletionCreateParams {
|
|
|
621
606
|
* To describe a function that accepts no parameters, provide the value
|
|
622
607
|
* `{"type": "object", "properties": {}}`.
|
|
623
608
|
*/
|
|
624
|
-
parameters:
|
|
609
|
+
parameters: Shared.FunctionParameters;
|
|
625
610
|
/**
|
|
626
611
|
* A description of what the function does, used by the model to choose when and
|
|
627
612
|
* how to call the function.
|
|
@@ -629,21 +614,21 @@ export declare namespace ChatCompletionCreateParams {
|
|
|
629
614
|
description?: string;
|
|
630
615
|
}
|
|
631
616
|
/**
|
|
632
|
-
* An object specifying the format that the model must output.
|
|
633
|
-
*
|
|
617
|
+
* An object specifying the format that the model must output.
|
|
618
|
+
*
|
|
619
|
+
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
|
|
620
|
+
* message the model generates is valid JSON.
|
|
621
|
+
*
|
|
622
|
+
* **Important:** when using JSON mode, you **must** also instruct the model to
|
|
623
|
+
* produce JSON yourself via a system or user message. Without this, the model may
|
|
624
|
+
* generate an unending stream of whitespace until the generation reaches the token
|
|
625
|
+
* limit, resulting in increased latency and appearance of a "stuck" request. Also
|
|
626
|
+
* note that the message content may be partially cut off if
|
|
627
|
+
* `finish_reason="length"`, which indicates the generation exceeded `max_tokens`
|
|
628
|
+
* or the conversation exceeded the max context length.
|
|
634
629
|
*/
|
|
635
630
|
interface ResponseFormat {
|
|
636
631
|
/**
|
|
637
|
-
* Setting to `json_object` enables JSON mode. This guarantees that the message the
|
|
638
|
-
* model generates is valid JSON.
|
|
639
|
-
*
|
|
640
|
-
* Note that your system prompt must still instruct the model to produce JSON, and
|
|
641
|
-
* to help ensure you don't forget, the API will throw an error if the string
|
|
642
|
-
* `JSON` does not appear in your system message. Also note that the message
|
|
643
|
-
* content may be partial (i.e. cut off) if `finish_reason="length"`, which
|
|
644
|
-
* indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
645
|
-
* max context length.
|
|
646
|
-
*
|
|
647
632
|
* Must be one of `text` or `json_object`.
|
|
648
633
|
*/
|
|
649
634
|
type?: 'text' | 'json_object';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,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0B,CAAC;IACzF,MAAM,QAAQ,6BAA6B,GAAG,kBAAkB,CAAC,6BAA6B,CAAC;IAC/F,MAAM,QAAQ,6BAA6B,GAAG,kBAAkB,CAAC,6BAA6B,CAAC;IAC/F,MAAM,QAAQ,kBAAkB,GAAG,kBAAkB,CAAC,kBAAkB,CAAC;IACzE,MAAM,QAAQ,gCAAgC,GAAG,kBAAkB,CAAC,gCAAgC,CAAC;IACrG,MAAM,QAAQ,kBAAkB,GAAG,kBAAkB,CAAC,kBAAkB,CAAC;IACzE,MAAM,QAAQ,8BAA8B,GAAG,kBAAkB,CAAC,8BAA8B,CAAC;IACjG,MAAM,QAAQ,8BAA8B,GAAG,kBAAkB,CAAC,8BAA8B,CAAC;IACjG,MAAM,QAAQ,8BAA8B,GAAG,kBAAkB,CAAC,8BAA8B,CAAC;IACjG;;OAEG;IACH,MAAM,QAAQ,kCAAkC,GAAG,kBAAkB,CAAC,kCAAkC,CAAC;IACzG,MAAM,QAAQ,0BAA0B,GAAG,kBAAkB,CAAC,0BAA0B,CAAC;IACzF,MAAM,QAAQ,sBAAsB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC;IACjF,MAAM,QAAQ,sCAAsC,GAAG,kBAAkB,CAAC,sCAAsC,CAAC;IACjH,MAAM,QAAQ,kCAAkC,GAAG,kBAAkB,CAAC,kCAAkC,CAAC;IACzG,MAAM,QAAQ,mCAAmC,GAAG,kBAAkB,CAAC,mCAAmC,CAAC;IAC3G,MAAM,QAAQ,+BAA+B,GAAG,kBAAkB,CAAC,+BAA+B,CAAC;CACpG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAIrD,8CAA8C;
|
|
1
|
+
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAIrD,8CAA8C;AAM9C,MAAa,WAAY,SAAQ,sBAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAxBD,kCAwBC;AAixBD,WAAiB,WAAW;AA6B5B,CAAC,EA7BgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA6B3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;
|
|
1
|
+
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;AAM7C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAixBD,WAAiB,WAAW;AA6B5B,CAAC,EA7BgB,WAAW,KAAX,WAAW,QA6B3B"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./chat/index.js";
|
|
2
|
+
export * from "./shared.js";
|
|
2
3
|
export { Audio } from "./audio/audio.js";
|
|
3
4
|
export { Beta } from "./beta/beta.js";
|
|
4
5
|
export { Completion, CompletionChoice, CompletionUsage, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, Completions, } from "./completions.js";
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,kCAAkC,EAClC,+BAA+B,EAC/B,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,KAAK,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,QAAQ,EACR,aAAa,EACb,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,oCAAoC,EACpC,iCAAiC,EACjC,aAAa,EACb,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,KAAK,EACL,cAAc,EACd,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,MAAM,GACP,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,kCAAkC,EAClC,+BAA+B,EAC/B,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,KAAK,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,QAAQ,EACR,aAAa,EACb,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,oCAAoC,EACpC,iCAAiC,EACjC,aAAa,EACb,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,KAAK,EACL,cAAc,EACd,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,MAAM,GACP,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/resources/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.Moderations = exports.Models = exports.ModelsPage = exports.Images = exports.FineTuning = exports.FineTunes = exports.FineTunesPage = exports.Files = exports.FileObjectsPage = exports.Edits = exports.Embeddings = exports.Completions = exports.Beta = exports.Audio = void 0;
|
|
19
19
|
__exportStar(require("./chat/index.js"), exports);
|
|
20
|
+
__exportStar(require("./shared.js"), exports);
|
|
20
21
|
var audio_1 = require("./audio/audio.js");
|
|
21
22
|
Object.defineProperty(exports, "Audio", { enumerable: true, get: function () { return audio_1.Audio; } });
|
|
22
23
|
var beta_1 = require("./beta/beta.js");
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;AAErD,kDAA6B;AAC7B,0CAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,gDAQuB;AADrB,0GAAA,WAAW,OAAA;AAEb,8CAAqG;AAAjC,wGAAA,UAAU,OAAA;AAC9E,oCAAwD;AAAvB,8FAAA,KAAK,OAAA;AACtC,oCAQiB;AAFf,wGAAA,eAAe,OAAA;AACf,8FAAA,KAAK,OAAA;AAEP,8CAUsB;AAFpB,2GAAA,aAAa,OAAA;AACb,uGAAA,SAAS,OAAA;AAEX,4DAAuD;AAA9C,yGAAA,UAAU,OAAA;AACnB,sCAOkB;AADhB,gGAAA,MAAM,OAAA;AAER,sCAAmE;AAArC,oGAAA,UAAU,OAAA;AAAE,gGAAA,MAAM,OAAA;AAChD,gDAA0G;AAAnC,0GAAA,WAAW,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;AAErD,kDAA6B;AAC7B,8CAAyB;AACzB,0CAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,gDAQuB;AADrB,0GAAA,WAAW,OAAA;AAEb,8CAAqG;AAAjC,wGAAA,UAAU,OAAA;AAC9E,oCAAwD;AAAvB,8FAAA,KAAK,OAAA;AACtC,oCAQiB;AAFf,wGAAA,eAAe,OAAA;AACf,8FAAA,KAAK,OAAA;AAEP,8CAUsB;AAFpB,2GAAA,aAAa,OAAA;AACb,uGAAA,SAAS,OAAA;AAEX,4DAAuD;AAA9C,yGAAA,UAAU,OAAA;AACnB,sCAOkB;AADhB,gGAAA,MAAM,OAAA;AAER,sCAAmE;AAArC,oGAAA,UAAU,OAAA;AAAE,gGAAA,MAAM,OAAA;AAChD,gDAA0G;AAAnC,0GAAA,WAAW,OAAA"}
|
package/resources/index.mjs
CHANGED
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,qDAAqD
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;;;OAI9C,EAAE,KAAK,EAAE;OACT,EAAE,IAAI,EAAE;OACR,EAOL,WAAW,GACZ;OACM,EAA6D,UAAU,EAAE;OACzE,EAA0B,KAAK,EAAE;OACjC,EAML,eAAe,EACf,KAAK,GACN;OACM,EAQL,aAAa,EACb,SAAS,GACV;OACM,EAAE,UAAU,EAAE;OACd,EAML,MAAM,GACP;OACM,EAAuB,UAAU,EAAE,MAAM,EAAE;OAC3C,EAAgE,WAAW,EAAE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface FunctionDefinition {
|
|
2
|
+
/**
|
|
3
|
+
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
4
|
+
* underscores and dashes, with a maximum length of 64.
|
|
5
|
+
*/
|
|
6
|
+
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
9
|
+
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
10
|
+
* examples, and the
|
|
11
|
+
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
12
|
+
* documentation about the format.
|
|
13
|
+
*
|
|
14
|
+
* To describe a function that accepts no parameters, provide the value
|
|
15
|
+
* `{"type": "object", "properties": {}}`.
|
|
16
|
+
*/
|
|
17
|
+
parameters: FunctionParameters;
|
|
18
|
+
/**
|
|
19
|
+
* A description of what the function does, used by the model to choose when and
|
|
20
|
+
* how to call the function.
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
26
|
+
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
27
|
+
* examples, and the
|
|
28
|
+
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
29
|
+
* documentation about the format.
|
|
30
|
+
*
|
|
31
|
+
* To describe a function that accepts no parameters, provide the value
|
|
32
|
+
* `{"type": "object", "properties": {}}`.
|
|
33
|
+
*/
|
|
34
|
+
export type FunctionParameters = Record<string, unknown>;
|
|
35
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;;OASG;IACH,UAAU,EAAE,kBAAkB,CAAC;IAE/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,qDAAqD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,qDAAqD"}
|
package/src/index.ts
CHANGED
|
@@ -296,6 +296,9 @@ export namespace OpenAI {
|
|
|
296
296
|
export import FineTuneListEventsParamsStreaming = API.FineTuneListEventsParamsStreaming;
|
|
297
297
|
|
|
298
298
|
export import Beta = API.Beta;
|
|
299
|
+
|
|
300
|
+
export import FunctionDefinition = API.FunctionDefinition;
|
|
301
|
+
export import FunctionParameters = API.FunctionParameters;
|
|
299
302
|
}
|
|
300
303
|
|
|
301
304
|
export default OpenAI;
|
|
@@ -4,6 +4,7 @@ import * as Core from "../../../core";
|
|
|
4
4
|
import { APIResource } from "../../../resource";
|
|
5
5
|
import { isRequestOptions } from "../../../core";
|
|
6
6
|
import * as AssistantsAPI from "./assistants";
|
|
7
|
+
import * as Shared from "../../shared";
|
|
7
8
|
import * as FilesAPI from "./files";
|
|
8
9
|
import { CursorPage, type CursorPageParams } from "../../../pagination";
|
|
9
10
|
|
|
@@ -163,47 +164,13 @@ export namespace Assistant {
|
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
export interface Function {
|
|
166
|
-
|
|
167
|
-
* The function definition.
|
|
168
|
-
*/
|
|
169
|
-
function: Function.Function;
|
|
167
|
+
function: Shared.FunctionDefinition;
|
|
170
168
|
|
|
171
169
|
/**
|
|
172
170
|
* The type of tool being defined: `function`
|
|
173
171
|
*/
|
|
174
172
|
type: 'function';
|
|
175
173
|
}
|
|
176
|
-
|
|
177
|
-
export namespace Function {
|
|
178
|
-
/**
|
|
179
|
-
* The function definition.
|
|
180
|
-
*/
|
|
181
|
-
export interface Function {
|
|
182
|
-
/**
|
|
183
|
-
* A description of what the function does, used by the model to choose when and
|
|
184
|
-
* how to call the function.
|
|
185
|
-
*/
|
|
186
|
-
description: string;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
190
|
-
* underscores and dashes, with a maximum length of 64.
|
|
191
|
-
*/
|
|
192
|
-
name: string;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
196
|
-
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
197
|
-
* examples, and the
|
|
198
|
-
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
199
|
-
* documentation about the format.
|
|
200
|
-
*
|
|
201
|
-
* To describe a function that accepts no parameters, provide the value
|
|
202
|
-
* `{"type": "object", "properties": {}}`.
|
|
203
|
-
*/
|
|
204
|
-
parameters: Record<string, unknown>;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
174
|
}
|
|
208
175
|
|
|
209
176
|
export interface AssistantDeleted {
|
|
@@ -282,47 +249,13 @@ export namespace AssistantCreateParams {
|
|
|
282
249
|
}
|
|
283
250
|
|
|
284
251
|
export interface AssistantToolsFunction {
|
|
285
|
-
|
|
286
|
-
* The function definition.
|
|
287
|
-
*/
|
|
288
|
-
function: AssistantToolsFunction.Function;
|
|
252
|
+
function: Shared.FunctionDefinition;
|
|
289
253
|
|
|
290
254
|
/**
|
|
291
255
|
* The type of tool being defined: `function`
|
|
292
256
|
*/
|
|
293
257
|
type: 'function';
|
|
294
258
|
}
|
|
295
|
-
|
|
296
|
-
export namespace AssistantToolsFunction {
|
|
297
|
-
/**
|
|
298
|
-
* The function definition.
|
|
299
|
-
*/
|
|
300
|
-
export interface Function {
|
|
301
|
-
/**
|
|
302
|
-
* A description of what the function does, used by the model to choose when and
|
|
303
|
-
* how to call the function.
|
|
304
|
-
*/
|
|
305
|
-
description: string;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
309
|
-
* underscores and dashes, with a maximum length of 64.
|
|
310
|
-
*/
|
|
311
|
-
name: string;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
315
|
-
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
316
|
-
* examples, and the
|
|
317
|
-
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
318
|
-
* documentation about the format.
|
|
319
|
-
*
|
|
320
|
-
* To describe a function that accepts no parameters, provide the value
|
|
321
|
-
* `{"type": "object", "properties": {}}`.
|
|
322
|
-
*/
|
|
323
|
-
parameters: Record<string, unknown>;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
259
|
}
|
|
327
260
|
|
|
328
261
|
export interface AssistantUpdateParams {
|
|
@@ -395,47 +328,13 @@ export namespace AssistantUpdateParams {
|
|
|
395
328
|
}
|
|
396
329
|
|
|
397
330
|
export interface AssistantToolsFunction {
|
|
398
|
-
|
|
399
|
-
* The function definition.
|
|
400
|
-
*/
|
|
401
|
-
function: AssistantToolsFunction.Function;
|
|
331
|
+
function: Shared.FunctionDefinition;
|
|
402
332
|
|
|
403
333
|
/**
|
|
404
334
|
* The type of tool being defined: `function`
|
|
405
335
|
*/
|
|
406
336
|
type: 'function';
|
|
407
337
|
}
|
|
408
|
-
|
|
409
|
-
export namespace AssistantToolsFunction {
|
|
410
|
-
/**
|
|
411
|
-
* The function definition.
|
|
412
|
-
*/
|
|
413
|
-
export interface Function {
|
|
414
|
-
/**
|
|
415
|
-
* A description of what the function does, used by the model to choose when and
|
|
416
|
-
* how to call the function.
|
|
417
|
-
*/
|
|
418
|
-
description: string;
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
422
|
-
* underscores and dashes, with a maximum length of 64.
|
|
423
|
-
*/
|
|
424
|
-
name: string;
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
428
|
-
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
429
|
-
* examples, and the
|
|
430
|
-
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
431
|
-
* documentation about the format.
|
|
432
|
-
*
|
|
433
|
-
* To describe a function that accepts no parameters, provide the value
|
|
434
|
-
* `{"type": "object", "properties": {}}`.
|
|
435
|
-
*/
|
|
436
|
-
parameters: Record<string, unknown>;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
338
|
}
|
|
440
339
|
|
|
441
340
|
export interface AssistantListParams extends CursorPageParams {
|
|
@@ -4,6 +4,7 @@ import * as Core from "../../../../core";
|
|
|
4
4
|
import { APIResource } from "../../../../resource";
|
|
5
5
|
import { isRequestOptions } from "../../../../core";
|
|
6
6
|
import * as RunsAPI from "./runs";
|
|
7
|
+
import * as Shared from "../../../shared";
|
|
7
8
|
import * as StepsAPI from "./steps";
|
|
8
9
|
import { CursorPage, type CursorPageParams } from "../../../../pagination";
|
|
9
10
|
|
|
@@ -221,9 +222,9 @@ export interface Run {
|
|
|
221
222
|
model: string;
|
|
222
223
|
|
|
223
224
|
/**
|
|
224
|
-
* The object type, which is always `
|
|
225
|
+
* The object type, which is always `thread.run`.
|
|
225
226
|
*/
|
|
226
|
-
object: '
|
|
227
|
+
object: 'thread.run';
|
|
227
228
|
|
|
228
229
|
/**
|
|
229
230
|
* Details on the action required to continue the run. Will be `null` if no action
|
|
@@ -324,47 +325,13 @@ export namespace Run {
|
|
|
324
325
|
}
|
|
325
326
|
|
|
326
327
|
export interface AssistantToolsFunction {
|
|
327
|
-
|
|
328
|
-
* The function definition.
|
|
329
|
-
*/
|
|
330
|
-
function: AssistantToolsFunction.Function;
|
|
328
|
+
function: Shared.FunctionDefinition;
|
|
331
329
|
|
|
332
330
|
/**
|
|
333
331
|
* The type of tool being defined: `function`
|
|
334
332
|
*/
|
|
335
333
|
type: 'function';
|
|
336
334
|
}
|
|
337
|
-
|
|
338
|
-
export namespace AssistantToolsFunction {
|
|
339
|
-
/**
|
|
340
|
-
* The function definition.
|
|
341
|
-
*/
|
|
342
|
-
export interface Function {
|
|
343
|
-
/**
|
|
344
|
-
* A description of what the function does, used by the model to choose when and
|
|
345
|
-
* how to call the function.
|
|
346
|
-
*/
|
|
347
|
-
description: string;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
351
|
-
* underscores and dashes, with a maximum length of 64.
|
|
352
|
-
*/
|
|
353
|
-
name: string;
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
357
|
-
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
358
|
-
* examples, and the
|
|
359
|
-
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
360
|
-
* documentation about the format.
|
|
361
|
-
*
|
|
362
|
-
* To describe a function that accepts no parameters, provide the value
|
|
363
|
-
* `{"type": "object", "properties": {}}`.
|
|
364
|
-
*/
|
|
365
|
-
parameters: Record<string, unknown>;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
335
|
}
|
|
369
336
|
|
|
370
337
|
export interface RunCreateParams {
|
|
@@ -424,47 +391,13 @@ export namespace RunCreateParams {
|
|
|
424
391
|
}
|
|
425
392
|
|
|
426
393
|
export interface AssistantToolsFunction {
|
|
427
|
-
|
|
428
|
-
* The function definition.
|
|
429
|
-
*/
|
|
430
|
-
function: AssistantToolsFunction.Function;
|
|
394
|
+
function: Shared.FunctionDefinition;
|
|
431
395
|
|
|
432
396
|
/**
|
|
433
397
|
* The type of tool being defined: `function`
|
|
434
398
|
*/
|
|
435
399
|
type: 'function';
|
|
436
400
|
}
|
|
437
|
-
|
|
438
|
-
export namespace AssistantToolsFunction {
|
|
439
|
-
/**
|
|
440
|
-
* The function definition.
|
|
441
|
-
*/
|
|
442
|
-
export interface Function {
|
|
443
|
-
/**
|
|
444
|
-
* A description of what the function does, used by the model to choose when and
|
|
445
|
-
* how to call the function.
|
|
446
|
-
*/
|
|
447
|
-
description: string;
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
451
|
-
* underscores and dashes, with a maximum length of 64.
|
|
452
|
-
*/
|
|
453
|
-
name: string;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
457
|
-
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
458
|
-
* examples, and the
|
|
459
|
-
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
460
|
-
* documentation about the format.
|
|
461
|
-
*
|
|
462
|
-
* To describe a function that accepts no parameters, provide the value
|
|
463
|
-
* `{"type": "object", "properties": {}}`.
|
|
464
|
-
*/
|
|
465
|
-
parameters: Record<string, unknown>;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
401
|
}
|
|
469
402
|
|
|
470
403
|
export interface RunUpdateParams {
|
|
@@ -269,9 +269,9 @@ export interface RunStep {
|
|
|
269
269
|
metadata: unknown | null;
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
|
-
* The object type, which is always `
|
|
272
|
+
* The object type, which is always `thread.run.step``.
|
|
273
273
|
*/
|
|
274
|
-
object: '
|
|
274
|
+
object: 'thread.run.step';
|
|
275
275
|
|
|
276
276
|
/**
|
|
277
277
|
* The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that
|
|
@@ -280,8 +280,8 @@ export interface RunStep {
|
|
|
280
280
|
run_id: string;
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
|
-
* The status of the run, which can be either `in_progress`, `cancelled`,
|
|
284
|
-
* `completed`, or `expired`.
|
|
283
|
+
* The status of the run step, which can be either `in_progress`, `cancelled`,
|
|
284
|
+
* `failed`, `completed`, or `expired`.
|
|
285
285
|
*/
|
|
286
286
|
status: 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired';
|
|
287
287
|
|
|
@@ -4,6 +4,7 @@ import * as Core from "../../../core";
|
|
|
4
4
|
import { APIResource } from "../../../resource";
|
|
5
5
|
import { isRequestOptions } from "../../../core";
|
|
6
6
|
import * as ThreadsAPI from "./threads";
|
|
7
|
+
import * as Shared from "../../shared";
|
|
7
8
|
import * as MessagesAPI from "./messages/messages";
|
|
8
9
|
import * as RunsAPI from "./runs/runs";
|
|
9
10
|
|
|
@@ -279,47 +280,13 @@ export namespace ThreadCreateAndRunParams {
|
|
|
279
280
|
}
|
|
280
281
|
|
|
281
282
|
export interface AssistantToolsFunction {
|
|
282
|
-
|
|
283
|
-
* The function definition.
|
|
284
|
-
*/
|
|
285
|
-
function: AssistantToolsFunction.Function;
|
|
283
|
+
function: Shared.FunctionDefinition;
|
|
286
284
|
|
|
287
285
|
/**
|
|
288
286
|
* The type of tool being defined: `function`
|
|
289
287
|
*/
|
|
290
288
|
type: 'function';
|
|
291
289
|
}
|
|
292
|
-
|
|
293
|
-
export namespace AssistantToolsFunction {
|
|
294
|
-
/**
|
|
295
|
-
* The function definition.
|
|
296
|
-
*/
|
|
297
|
-
export interface Function {
|
|
298
|
-
/**
|
|
299
|
-
* A description of what the function does, used by the model to choose when and
|
|
300
|
-
* how to call the function.
|
|
301
|
-
*/
|
|
302
|
-
description: string;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
|
306
|
-
* underscores and dashes, with a maximum length of 64.
|
|
307
|
-
*/
|
|
308
|
-
name: string;
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
312
|
-
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
|
|
313
|
-
* examples, and the
|
|
314
|
-
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
315
|
-
* documentation about the format.
|
|
316
|
-
*
|
|
317
|
-
* To describe a function that accepts no parameters, provide the value
|
|
318
|
-
* `{"type": "object", "properties": {}}`.
|
|
319
|
-
*/
|
|
320
|
-
parameters: Record<string, unknown>;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
290
|
}
|
|
324
291
|
|
|
325
292
|
export namespace Threads {
|