@arcadeai/arcadejs 0.1.2
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 +64 -0
- package/LICENSE +201 -0
- package/README.md +305 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +242 -0
- package/core.d.ts.map +1 -0
- package/core.js +903 -0
- package/core.js.map +1 -0
- package/core.mjs +871 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +53 -0
- package/error.d.ts.map +1 -0
- package/error.js +143 -0
- package/error.js.map +1 -0
- package/error.mjs +127 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +146 -0
- package/index.d.ts +146 -0
- package/index.d.ts.map +1 -0
- package/index.js +118 -0
- package/index.js.map +1 -0
- package/index.mjs +90 -0
- package/index.mjs.map +1 -0
- package/package.json +103 -0
- package/pagination.d.ts +26 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +46 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +42 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/auth.d.ts +68 -0
- package/resources/auth.d.ts.map +1 -0
- package/resources/auth.js +25 -0
- package/resources/auth.js.map +1 -0
- package/resources/auth.mjs +21 -0
- package/resources/auth.mjs.map +1 -0
- package/resources/chat/chat.d.ts +136 -0
- package/resources/chat/chat.d.ts.map +1 -0
- package/resources/chat/chat.js +40 -0
- package/resources/chat/chat.js.map +1 -0
- package/resources/chat/chat.mjs +13 -0
- package/resources/chat/chat.mjs.map +1 -0
- package/resources/chat/completions.d.ts +76 -0
- package/resources/chat/completions.d.ts.map +1 -0
- package/resources/chat/completions.js +17 -0
- package/resources/chat/completions.js.map +1 -0
- package/resources/chat/completions.mjs +13 -0
- package/resources/chat/completions.mjs.map +1 -0
- package/resources/chat/index.d.ts +3 -0
- package/resources/chat/index.d.ts.map +1 -0
- package/resources/chat/index.js +9 -0
- package/resources/chat/index.js.map +1 -0
- package/resources/chat/index.mjs +4 -0
- package/resources/chat/index.mjs.map +1 -0
- package/resources/health.d.ts +16 -0
- package/resources/health.d.ts.map +1 -0
- package/resources/health.js +17 -0
- package/resources/health.js.map +1 -0
- package/resources/health.mjs +13 -0
- package/resources/health.mjs.map +1 -0
- package/resources/index.d.ts +6 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +28 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +7 -0
- package/resources/index.mjs.map +1 -0
- package/resources/shared.d.ts +30 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/tools/definition.d.ts +24 -0
- package/resources/tools/definition.d.ts.map +1 -0
- package/resources/tools/definition.js +17 -0
- package/resources/tools/definition.js.map +1 -0
- package/resources/tools/definition.mjs +13 -0
- package/resources/tools/definition.mjs.map +1 -0
- package/resources/tools/formatted.d.ts +48 -0
- package/resources/tools/formatted.d.ts.map +1 -0
- package/resources/tools/formatted.js +56 -0
- package/resources/tools/formatted.js.map +1 -0
- package/resources/tools/formatted.mjs +28 -0
- package/resources/tools/formatted.mjs.map +1 -0
- package/resources/tools/index.d.ts +3 -0
- package/resources/tools/index.d.ts.map +1 -0
- package/resources/tools/index.js +10 -0
- package/resources/tools/index.js.map +1 -0
- package/resources/tools/index.mjs +4 -0
- package/resources/tools/index.mjs.map +1 -0
- package/resources/tools/tools.d.ts +169 -0
- package/resources/tools/tools.d.ts.map +1 -0
- package/resources/tools/tools.js +68 -0
- package/resources/tools/tools.js.map +1 -0
- package/resources/tools/tools.mjs +41 -0
- package/resources/tools/tools.mjs.map +1 -0
- package/resources/tools.d.ts +161 -0
- package/resources/tools.d.ts.map +1 -0
- package/resources/tools.js +38 -0
- package/resources/tools.js.map +1 -0
- package/resources/tools.mjs +34 -0
- package/resources/tools.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1196 -0
- package/src/error.ts +146 -0
- package/src/index.ts +227 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +79 -0
- package/src/resource.ts +11 -0
- package/src/resources/auth.ts +97 -0
- package/src/resources/chat/chat.ts +186 -0
- package/src/resources/chat/completions.ts +102 -0
- package/src/resources/chat/index.ts +4 -0
- package/src/resources/health.ts +22 -0
- package/src/resources/index.ts +23 -0
- package/src/resources/shared.ts +46 -0
- package/src/resources/tools/definition.ts +31 -0
- package/src/resources/tools/formatted.ts +78 -0
- package/src/resources/tools/index.ts +27 -0
- package/src/resources/tools/tools.ts +249 -0
- package/src/resources/tools.ts +240 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +255 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +171 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +158 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { APIResource } from "../resource.js";
|
|
2
|
+
import * as Core from "../core.js";
|
|
3
|
+
import * as AuthAPI from "./auth.js";
|
|
4
|
+
import * as Shared from "./shared.js";
|
|
5
|
+
export declare class Auth extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Starts the authorization process for given authorization requirements
|
|
8
|
+
*/
|
|
9
|
+
authorize(body: AuthAuthorizeParams, options?: Core.RequestOptions): Core.APIPromise<Shared.AuthorizationResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Checks the status of an ongoing authorization process for a specific tool. If
|
|
12
|
+
* 'wait' param is present, does not respond until either the auth status becomes
|
|
13
|
+
* completed or the timeout is reached.
|
|
14
|
+
*/
|
|
15
|
+
status(query: AuthStatusParams, options?: Core.RequestOptions): Core.APIPromise<Shared.AuthorizationResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface AuthRequest {
|
|
18
|
+
auth_requirement: AuthRequest.AuthRequirement;
|
|
19
|
+
user_id: string;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace AuthRequest {
|
|
22
|
+
interface AuthRequirement {
|
|
23
|
+
oauth2?: AuthRequirement.Oauth2;
|
|
24
|
+
provider_id?: string;
|
|
25
|
+
provider_type?: string;
|
|
26
|
+
}
|
|
27
|
+
namespace AuthRequirement {
|
|
28
|
+
interface Oauth2 {
|
|
29
|
+
scopes?: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export interface AuthAuthorizeParams {
|
|
34
|
+
auth_requirement: AuthAuthorizeParams.AuthRequirement;
|
|
35
|
+
user_id: string;
|
|
36
|
+
}
|
|
37
|
+
export declare namespace AuthAuthorizeParams {
|
|
38
|
+
interface AuthRequirement {
|
|
39
|
+
oauth2?: AuthRequirement.Oauth2;
|
|
40
|
+
provider_id?: string;
|
|
41
|
+
provider_type?: string;
|
|
42
|
+
}
|
|
43
|
+
namespace AuthRequirement {
|
|
44
|
+
interface Oauth2 {
|
|
45
|
+
scopes?: Array<string>;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export interface AuthStatusParams {
|
|
50
|
+
/**
|
|
51
|
+
* Authorization ID
|
|
52
|
+
*/
|
|
53
|
+
authorizationId: string;
|
|
54
|
+
/**
|
|
55
|
+
* Scopes
|
|
56
|
+
*/
|
|
57
|
+
scopes?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Timeout in seconds (max 59)
|
|
60
|
+
*/
|
|
61
|
+
wait?: number;
|
|
62
|
+
}
|
|
63
|
+
export declare namespace Auth {
|
|
64
|
+
export import AuthRequest = AuthAPI.AuthRequest;
|
|
65
|
+
export import AuthAuthorizeParams = AuthAPI.AuthAuthorizeParams;
|
|
66
|
+
export import AuthStatusParams = AuthAPI.AuthStatusParams;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,OAAO,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,SAAS,CACP,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAIhD;;;;OAIG;IACH,MAAM,CACJ,KAAK,EAAE,gBAAgB,EACvB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;CAGjD;AAED,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,WAAW,CAAC,eAAe,CAAC;IAE9C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,WAAW,CAAC;IAC3B,UAAiB,eAAe;QAC9B,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC;QAEhC,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;IAED,UAAiB,eAAe,CAAC;QAC/B,UAAiB,MAAM;YACrB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;SACxB;KACF;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,EAAE,mBAAmB,CAAC,eAAe,CAAC;IAEtD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,eAAe;QAC9B,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC;QAEhC,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;IAED,UAAiB,eAAe,CAAC;QAC/B,UAAiB,MAAM;YACrB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;SACxB;KACF;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,IAAI,CAAC;IACpB,MAAM,QAAQ,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAChD,MAAM,QAAQ,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAChE,MAAM,QAAQ,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAC3D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Auth = void 0;
|
|
5
|
+
const resource_1 = require("../resource.js");
|
|
6
|
+
class Auth extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Starts the authorization process for given authorization requirements
|
|
9
|
+
*/
|
|
10
|
+
authorize(body, options) {
|
|
11
|
+
return this._client.post('/v1/auth/authorize', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Checks the status of an ongoing authorization process for a specific tool. If
|
|
15
|
+
* 'wait' param is present, does not respond until either the auth status becomes
|
|
16
|
+
* completed or the timeout is reached.
|
|
17
|
+
*/
|
|
18
|
+
status(query, options) {
|
|
19
|
+
return this._client.get('/v1/auth/status', { query, ...options });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.Auth = Auth;
|
|
23
|
+
(function (Auth) {
|
|
24
|
+
})(Auth = exports.Auth || (exports.Auth = {}));
|
|
25
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAK1C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,SAAS,CACP,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAuB,EACvB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AAtBD,oBAsBC;AA+DD,WAAiB,IAAI;AAIrB,CAAC,EAJgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAIpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../resource.mjs";
|
|
3
|
+
export class Auth extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Starts the authorization process for given authorization requirements
|
|
6
|
+
*/
|
|
7
|
+
authorize(body, options) {
|
|
8
|
+
return this._client.post('/v1/auth/authorize', { body, ...options });
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Checks the status of an ongoing authorization process for a specific tool. If
|
|
12
|
+
* 'wait' param is present, does not respond until either the auth status becomes
|
|
13
|
+
* completed or the timeout is reached.
|
|
14
|
+
*/
|
|
15
|
+
status(query, options) {
|
|
16
|
+
return this._client.get('/v1/auth/status', { query, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
(function (Auth) {
|
|
20
|
+
})(Auth || (Auth = {}));
|
|
21
|
+
//# sourceMappingURL=auth.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,SAAS,CACP,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAuB,EACvB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AA+DD,WAAiB,IAAI;AAIrB,CAAC,EAJgB,IAAI,KAAJ,IAAI,QAIpB"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as ChatAPI from "./chat.js";
|
|
3
|
+
import * as Shared from "../shared.js";
|
|
4
|
+
import * as CompletionsAPI from "./completions.js";
|
|
5
|
+
export declare class Chat extends APIResource {
|
|
6
|
+
completions: CompletionsAPI.Completions;
|
|
7
|
+
}
|
|
8
|
+
export interface ChatMessage {
|
|
9
|
+
/**
|
|
10
|
+
* The content of the message.
|
|
11
|
+
*/
|
|
12
|
+
content: string;
|
|
13
|
+
/**
|
|
14
|
+
* The role of the author of this message. One of system, user, tool, or assistant.
|
|
15
|
+
*/
|
|
16
|
+
role: string;
|
|
17
|
+
/**
|
|
18
|
+
* tool Name
|
|
19
|
+
*/
|
|
20
|
+
name?: string;
|
|
21
|
+
/**
|
|
22
|
+
* tool_call_id
|
|
23
|
+
*/
|
|
24
|
+
tool_call_id?: string;
|
|
25
|
+
/**
|
|
26
|
+
* tool calls if any
|
|
27
|
+
*/
|
|
28
|
+
tool_calls?: Array<ChatMessage.ToolCall>;
|
|
29
|
+
}
|
|
30
|
+
export declare namespace ChatMessage {
|
|
31
|
+
interface ToolCall {
|
|
32
|
+
id?: string;
|
|
33
|
+
function?: ToolCall.Function;
|
|
34
|
+
type?: 'function';
|
|
35
|
+
}
|
|
36
|
+
namespace ToolCall {
|
|
37
|
+
interface Function {
|
|
38
|
+
arguments?: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export interface ChatRequest {
|
|
44
|
+
frequency_penalty?: number;
|
|
45
|
+
/**
|
|
46
|
+
* LogitBias is must be a token id string (specified by their token ID in the
|
|
47
|
+
* tokenizer), not a word string. incorrect: `"logit_bias":{"You": 6}`, correct:
|
|
48
|
+
* `"logit_bias":{"1639": 6}` refs:
|
|
49
|
+
* https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
|
|
50
|
+
*/
|
|
51
|
+
logit_bias?: Record<string, number>;
|
|
52
|
+
/**
|
|
53
|
+
* LogProbs indicates whether to return log probabilities of the output tokens or
|
|
54
|
+
* not. If true, returns the log probabilities of each output token returned in the
|
|
55
|
+
* content of message. This option is currently not available on the
|
|
56
|
+
* gpt-4-vision-preview model.
|
|
57
|
+
*/
|
|
58
|
+
logprobs?: boolean;
|
|
59
|
+
max_tokens?: number;
|
|
60
|
+
messages?: Array<ChatMessage>;
|
|
61
|
+
model?: string;
|
|
62
|
+
n?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Disable the default behavior of parallel tool calls by setting it: false.
|
|
65
|
+
*/
|
|
66
|
+
parallel_tool_calls?: boolean;
|
|
67
|
+
presence_penalty?: number;
|
|
68
|
+
response_format?: 'json_object' | 'text';
|
|
69
|
+
seed?: number;
|
|
70
|
+
stop?: Array<string>;
|
|
71
|
+
stream?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
74
|
+
*/
|
|
75
|
+
stream_options?: ChatRequest.StreamOptions;
|
|
76
|
+
temperature?: number;
|
|
77
|
+
/**
|
|
78
|
+
* This can be either a string or an ToolChoice object.
|
|
79
|
+
*/
|
|
80
|
+
tool_choice?: unknown;
|
|
81
|
+
tools?: unknown;
|
|
82
|
+
/**
|
|
83
|
+
* TopLogProbs is an integer between 0 and 5 specifying the number of most likely
|
|
84
|
+
* tokens to return at each token position, each with an associated log
|
|
85
|
+
* probability. logprobs must be set to true if this parameter is used.
|
|
86
|
+
*/
|
|
87
|
+
top_logprobs?: number;
|
|
88
|
+
top_p?: number;
|
|
89
|
+
user?: string;
|
|
90
|
+
}
|
|
91
|
+
export declare namespace ChatRequest {
|
|
92
|
+
/**
|
|
93
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
94
|
+
*/
|
|
95
|
+
interface StreamOptions {
|
|
96
|
+
/**
|
|
97
|
+
* If set, an additional chunk will be streamed before the data: [DONE] message.
|
|
98
|
+
* The usage field on this chunk shows the token usage statistics for the entire
|
|
99
|
+
* request, and the choices field will always be an empty array. All other chunks
|
|
100
|
+
* will also include a usage field, but with a null value.
|
|
101
|
+
*/
|
|
102
|
+
include_usage?: boolean;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export interface ChatResponse {
|
|
106
|
+
id?: string;
|
|
107
|
+
choices?: Array<Choice>;
|
|
108
|
+
created?: number;
|
|
109
|
+
model?: string;
|
|
110
|
+
object?: string;
|
|
111
|
+
system_fingerprint?: string;
|
|
112
|
+
usage?: Usage;
|
|
113
|
+
}
|
|
114
|
+
export interface Choice {
|
|
115
|
+
finish_reason?: string;
|
|
116
|
+
index?: number;
|
|
117
|
+
logprobs?: unknown;
|
|
118
|
+
message?: ChatMessage;
|
|
119
|
+
tool_authorizations?: Array<Shared.AuthorizationResponse>;
|
|
120
|
+
tool_messages?: Array<ChatMessage>;
|
|
121
|
+
}
|
|
122
|
+
export interface Usage {
|
|
123
|
+
completion_tokens?: number;
|
|
124
|
+
prompt_tokens?: number;
|
|
125
|
+
total_tokens?: number;
|
|
126
|
+
}
|
|
127
|
+
export declare namespace Chat {
|
|
128
|
+
export import ChatMessage = ChatAPI.ChatMessage;
|
|
129
|
+
export import ChatRequest = ChatAPI.ChatRequest;
|
|
130
|
+
export import ChatResponse = ChatAPI.ChatResponse;
|
|
131
|
+
export import Choice = ChatAPI.Choice;
|
|
132
|
+
export import Usage = ChatAPI.Usage;
|
|
133
|
+
export import Completions = CompletionsAPI.Completions;
|
|
134
|
+
export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.Chat = void 0;
|
|
28
|
+
const resource_1 = require("../../resource.js");
|
|
29
|
+
const CompletionsAPI = __importStar(require("./completions.js"));
|
|
30
|
+
class Chat extends resource_1.APIResource {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.completions = new CompletionsAPI.Completions(this._client);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Chat = Chat;
|
|
37
|
+
(function (Chat) {
|
|
38
|
+
Chat.Completions = CompletionsAPI.Completions;
|
|
39
|
+
})(Chat = exports.Chat || (exports.Chat = {}));
|
|
40
|
+
//# sourceMappingURL=chat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAG7C,iEAAgD;AAEhD,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAFD,oBAEC;AAwKD,WAAiB,IAAI;IAML,gBAAW,GAAG,cAAc,CAAC,WAAW,CAAC;AAEzD,CAAC,EARgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAQpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import * as CompletionsAPI from "./completions.mjs";
|
|
4
|
+
export class Chat extends APIResource {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.completions = new CompletionsAPI.Completions(this._client);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
(function (Chat) {
|
|
11
|
+
Chat.Completions = CompletionsAPI.Completions;
|
|
12
|
+
})(Chat || (Chat = {}));
|
|
13
|
+
//# sourceMappingURL=chat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,KAAK,cAAc;AAE1B,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAwKD,WAAiB,IAAI;IAML,gBAAW,GAAG,cAAc,CAAC,WAAW,CAAC;AAEzD,CAAC,EARgB,IAAI,KAAJ,IAAI,QAQpB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
import * as CompletionsAPI from "./completions.js";
|
|
4
|
+
import * as ChatAPI from "./chat.js";
|
|
5
|
+
export declare class Completions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Talk to different LLM Chat APIs via OpenAI's API
|
|
8
|
+
*/
|
|
9
|
+
create(body: CompletionCreateParams, options?: Core.RequestOptions): Core.APIPromise<ChatAPI.ChatResponse>;
|
|
10
|
+
}
|
|
11
|
+
export interface CompletionCreateParams {
|
|
12
|
+
frequency_penalty?: number;
|
|
13
|
+
/**
|
|
14
|
+
* LogitBias is must be a token id string (specified by their token ID in the
|
|
15
|
+
* tokenizer), not a word string. incorrect: `"logit_bias":{"You": 6}`, correct:
|
|
16
|
+
* `"logit_bias":{"1639": 6}` refs:
|
|
17
|
+
* https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
|
|
18
|
+
*/
|
|
19
|
+
logit_bias?: Record<string, number>;
|
|
20
|
+
/**
|
|
21
|
+
* LogProbs indicates whether to return log probabilities of the output tokens or
|
|
22
|
+
* not. If true, returns the log probabilities of each output token returned in the
|
|
23
|
+
* content of message. This option is currently not available on the
|
|
24
|
+
* gpt-4-vision-preview model.
|
|
25
|
+
*/
|
|
26
|
+
logprobs?: boolean;
|
|
27
|
+
max_tokens?: number;
|
|
28
|
+
messages?: Array<ChatAPI.ChatMessage>;
|
|
29
|
+
model?: string;
|
|
30
|
+
n?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Disable the default behavior of parallel tool calls by setting it: false.
|
|
33
|
+
*/
|
|
34
|
+
parallel_tool_calls?: boolean;
|
|
35
|
+
presence_penalty?: number;
|
|
36
|
+
response_format?: 'json_object' | 'text';
|
|
37
|
+
seed?: number;
|
|
38
|
+
stop?: Array<string>;
|
|
39
|
+
stream?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
42
|
+
*/
|
|
43
|
+
stream_options?: CompletionCreateParams.StreamOptions;
|
|
44
|
+
temperature?: number;
|
|
45
|
+
/**
|
|
46
|
+
* This can be either a string or an ToolChoice object.
|
|
47
|
+
*/
|
|
48
|
+
tool_choice?: unknown;
|
|
49
|
+
tools?: unknown;
|
|
50
|
+
/**
|
|
51
|
+
* TopLogProbs is an integer between 0 and 5 specifying the number of most likely
|
|
52
|
+
* tokens to return at each token position, each with an associated log
|
|
53
|
+
* probability. logprobs must be set to true if this parameter is used.
|
|
54
|
+
*/
|
|
55
|
+
top_logprobs?: number;
|
|
56
|
+
top_p?: number;
|
|
57
|
+
user?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare namespace CompletionCreateParams {
|
|
60
|
+
/**
|
|
61
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
62
|
+
*/
|
|
63
|
+
interface StreamOptions {
|
|
64
|
+
/**
|
|
65
|
+
* If set, an additional chunk will be streamed before the data: [DONE] message.
|
|
66
|
+
* The usage field on this chunk shows the token usage statistics for the entire
|
|
67
|
+
* request, and the choices field will always be an empty array. All other chunks
|
|
68
|
+
* will also include a usage field, but with a null value.
|
|
69
|
+
*/
|
|
70
|
+
include_usage?: boolean;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export declare namespace Completions {
|
|
74
|
+
export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,QAAQ,CAAC;AAElC,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC;CAG3G;AAED,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAEtC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,eAAe,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IAEzC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAErB,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,cAAc,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC;IAEtD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,sBAAsB,CAAC;IACtC;;OAEG;IACH,UAAiB,aAAa;QAC5B;;;;;WAKG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB;CACF;AAED,yBAAiB,WAAW,CAAC;IAC3B,MAAM,QAAQ,sBAAsB,GAAG,cAAc,CAAC,sBAAsB,CAAC;CAC9E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Completions = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
class Completions extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Talk to different LLM Chat APIs via OpenAI's API
|
|
9
|
+
*/
|
|
10
|
+
create(body, options) {
|
|
11
|
+
return this._client.post('/v1/chat/completions', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Completions = Completions;
|
|
15
|
+
(function (Completions) {
|
|
16
|
+
})(Completions = exports.Completions || (exports.Completions = {}));
|
|
17
|
+
//# sourceMappingURL=completions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAK7C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,MAAM,CAAC,IAA4B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AAPD,kCAOC;AAqFD,WAAiB,WAAW;AAE5B,CAAC,EAFgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAE3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
export class Completions extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Talk to different LLM Chat APIs via OpenAI's API
|
|
6
|
+
*/
|
|
7
|
+
create(body, options) {
|
|
8
|
+
return this._client.post('/v1/chat/completions', { body, ...options });
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
(function (Completions) {
|
|
12
|
+
})(Completions || (Completions = {}));
|
|
13
|
+
//# sourceMappingURL=completions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CAAC,IAA4B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AAqFD,WAAiB,WAAW;AAE5B,CAAC,EAFgB,WAAW,KAAX,WAAW,QAE3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Completions = exports.Chat = void 0;
|
|
5
|
+
var chat_1 = require("./chat.js");
|
|
6
|
+
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return chat_1.Chat; } });
|
|
7
|
+
var completions_1 = require("./completions.js");
|
|
8
|
+
Object.defineProperty(exports, "Completions", { enumerable: true, get: function () { return completions_1.Completions; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAAqF;AAArB,4FAAA,IAAI,OAAA;AACpE,gDAAoE;AAAnC,0GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAyD,IAAI,EAAE;OAC/D,EAA0B,WAAW,EAAE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { APIResource } from "../resource.js";
|
|
2
|
+
import * as Core from "../core.js";
|
|
3
|
+
import * as HealthAPI from "./health.js";
|
|
4
|
+
export declare class Health extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Engine Health
|
|
7
|
+
*/
|
|
8
|
+
check(options?: Core.RequestOptions): Core.APIPromise<HealthSchema>;
|
|
9
|
+
}
|
|
10
|
+
export interface HealthSchema {
|
|
11
|
+
healthy?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace Health {
|
|
14
|
+
export import HealthSchema = HealthAPI.HealthSchema;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AAEtC,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;CAGpE;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,yBAAiB,MAAM,CAAC;IACtB,MAAM,QAAQ,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;CACrD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Health = void 0;
|
|
5
|
+
const resource_1 = require("../resource.js");
|
|
6
|
+
class Health extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Engine Health
|
|
9
|
+
*/
|
|
10
|
+
check(options) {
|
|
11
|
+
return this._client.get('/v1/health', options);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Health = Health;
|
|
15
|
+
(function (Health) {
|
|
16
|
+
})(Health = exports.Health || (exports.Health = {}));
|
|
17
|
+
//# sourceMappingURL=health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,KAAK,CAAC,OAA6B;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AAPD,wBAOC;AAMD,WAAiB,MAAM;AAEvB,CAAC,EAFgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAEtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../resource.mjs";
|
|
3
|
+
export class Health extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Engine Health
|
|
6
|
+
*/
|
|
7
|
+
check(options) {
|
|
8
|
+
return this._client.get('/v1/health', options);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
(function (Health) {
|
|
12
|
+
})(Health || (Health = {}));
|
|
13
|
+
//# sourceMappingURL=health.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.mjs","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,KAAK,CAAC,OAA6B;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AAMD,WAAiB,MAAM;AAEvB,CAAC,EAFgB,MAAM,KAAN,MAAM,QAEtB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./shared.js";
|
|
2
|
+
export { AuthRequest, AuthAuthorizeParams, AuthStatusParams, Auth } from "./auth.js";
|
|
3
|
+
export { AuthorizeToolRequest, ExecuteToolRequest, Inputs, Output, Parameter, Requirements, Response, ResponseOutput, ToolkitDefinition, ValueSchema, ToolListParams, ToolAuthorizeParams, ToolExecuteParams, ToolGetParams, Tools, } from "./tools/tools.js";
|
|
4
|
+
export { ChatMessage, ChatRequest, ChatResponse, Choice, Usage, Chat } from "./chat/chat.js";
|
|
5
|
+
export { HealthSchema, Health } from "./health.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAClF,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,EACN,MAAM,EACN,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Health = exports.Chat = exports.Tools = exports.Auth = void 0;
|
|
19
|
+
__exportStar(require("./shared.js"), exports);
|
|
20
|
+
var auth_1 = require("./auth.js");
|
|
21
|
+
Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return auth_1.Auth; } });
|
|
22
|
+
var tools_1 = require("./tools/tools.js");
|
|
23
|
+
Object.defineProperty(exports, "Tools", { enumerable: true, get: function () { return tools_1.Tools; } });
|
|
24
|
+
var chat_1 = require("./chat/chat.js");
|
|
25
|
+
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return chat_1.Chat; } });
|
|
26
|
+
var health_1 = require("./health.js");
|
|
27
|
+
Object.defineProperty(exports, "Health", { enumerable: true, get: function () { return health_1.Health; } });
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;AAEtF,8CAAyB;AACzB,kCAAkF;AAArB,4FAAA,IAAI,OAAA;AACjE,0CAgBuB;AADrB,8FAAA,KAAK,OAAA;AAEP,uCAA0F;AAA1B,4FAAA,IAAI,OAAA;AACpE,sCAAgD;AAAzB,gGAAA,MAAM,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export * from "./shared.mjs";
|
|
3
|
+
export { Auth } from "./auth.mjs";
|
|
4
|
+
export { Tools, } from "./tools/tools.mjs";
|
|
5
|
+
export { Chat } from "./chat/chat.mjs";
|
|
6
|
+
export { Health } from "./health.mjs";
|
|
7
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EAAsD,IAAI,EAAE;OAC5D,EAeL,KAAK,GACN;OACM,EAAyD,IAAI,EAAE;OAC/D,EAAgB,MAAM,EAAE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as ToolsAPI from "./tools/tools.js";
|
|
2
|
+
import { OffsetPage } from "../pagination.js";
|
|
3
|
+
export interface AuthorizationResponse {
|
|
4
|
+
authorization_id?: string;
|
|
5
|
+
authorization_url?: string;
|
|
6
|
+
context?: AuthorizationResponse.Context;
|
|
7
|
+
scopes?: Array<string>;
|
|
8
|
+
status?: 'pending' | 'completed' | 'failed';
|
|
9
|
+
}
|
|
10
|
+
export declare namespace AuthorizationResponse {
|
|
11
|
+
interface Context {
|
|
12
|
+
token?: string;
|
|
13
|
+
user_info?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export interface Error {
|
|
17
|
+
message?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ToolDefinition {
|
|
21
|
+
inputs: ToolsAPI.Inputs;
|
|
22
|
+
name: string;
|
|
23
|
+
toolkit: ToolsAPI.ToolkitDefinition;
|
|
24
|
+
description?: string;
|
|
25
|
+
output?: ToolsAPI.Output;
|
|
26
|
+
requirements?: ToolsAPI.Requirements;
|
|
27
|
+
}
|
|
28
|
+
export declare class ToolDefinitionsOffsetPage extends OffsetPage<ToolDefinition> {
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=shared.d.ts.map
|