@mistralai/mistralai 1.11.0 → 1.12.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/_speakeasy/.github/action-inputs-config.json +53 -0
- package/_speakeasy/.github/action-security-config.json +88 -0
- package/funcs/batchJobsGet.d.ts +3 -0
- package/funcs/batchJobsGet.d.ts.map +1 -1
- package/funcs/batchJobsGet.js +7 -0
- package/funcs/batchJobsGet.js.map +1 -1
- package/funcs/betaAgentsList.d.ts.map +1 -1
- package/funcs/betaAgentsList.js +4 -3
- package/funcs/betaAgentsList.js.map +1 -1
- package/funcs/betaConversationsList.d.ts.map +1 -1
- package/funcs/betaConversationsList.js +4 -3
- package/funcs/betaConversationsList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/audioencoding.d.ts +26 -0
- package/models/components/audioencoding.d.ts.map +1 -0
- package/models/components/audioencoding.js +72 -0
- package/models/components/audioencoding.js.map +1 -0
- package/models/components/audioformat.d.ts +32 -0
- package/models/components/audioformat.d.ts.map +1 -0
- package/models/components/audioformat.js +81 -0
- package/models/components/audioformat.js.map +1 -0
- package/models/components/batchjobin.d.ts +5 -2
- package/models/components/batchjobin.d.ts.map +1 -1
- package/models/components/batchjobin.js +5 -2
- package/models/components/batchjobin.js.map +1 -1
- package/models/components/batchjobout.d.ts +6 -0
- package/models/components/batchjobout.d.ts.map +1 -1
- package/models/components/batchjobout.js +2 -0
- package/models/components/batchjobout.js.map +1 -1
- package/models/components/batchrequest.d.ts +35 -0
- package/models/components/batchrequest.d.ts.map +1 -0
- package/models/components/batchrequest.js +80 -0
- package/models/components/batchrequest.js.map +1 -0
- package/models/components/classificationrequest.d.ts +6 -0
- package/models/components/classificationrequest.d.ts.map +1 -1
- package/models/components/classificationrequest.js +2 -0
- package/models/components/classificationrequest.js.map +1 -1
- package/models/components/embeddingrequest.d.ts +6 -0
- package/models/components/embeddingrequest.d.ts.map +1 -1
- package/models/components/embeddingrequest.js +2 -0
- package/models/components/embeddingrequest.js.map +1 -1
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/toolfilechunk.d.ts +23 -2
- package/models/components/toolfilechunk.d.ts.map +1 -1
- package/models/components/toolfilechunk.js +26 -3
- package/models/components/toolfilechunk.js.map +1 -1
- package/models/components/toolreferencechunk.d.ts +23 -2
- package/models/components/toolreferencechunk.d.ts.map +1 -1
- package/models/components/toolreferencechunk.js +26 -3
- package/models/components/toolreferencechunk.js.map +1 -1
- package/models/operations/jobsapiroutesbatchgetbatchjob.d.ts +2 -0
- package/models/operations/jobsapiroutesbatchgetbatchjob.d.ts.map +1 -1
- package/models/operations/jobsapiroutesbatchgetbatchjob.js +2 -0
- package/models/operations/jobsapiroutesbatchgetbatchjob.js.map +1 -1
- package/package.json +1 -1
- package/sdk/mistraljobs.d.ts +3 -0
- package/sdk/mistraljobs.d.ts.map +1 -1
- package/sdk/mistraljobs.js +3 -0
- package/sdk/mistraljobs.js.map +1 -1
- package/src/funcs/batchJobsGet.ts +9 -1
- package/src/funcs/betaAgentsList.ts +18 -10
- package/src/funcs/betaConversationsList.ts +14 -6
- package/src/lib/config.ts +2 -2
- package/src/models/components/audioencoding.ts +52 -0
- package/src/models/components/audioformat.ts +80 -0
- package/src/models/components/batchjobin.ts +14 -4
- package/src/models/components/batchjobout.ts +4 -0
- package/src/models/components/batchrequest.ts +75 -0
- package/src/models/components/classificationrequest.ts +4 -0
- package/src/models/components/embeddingrequest.ts +4 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/toolfilechunk.ts +54 -4
- package/src/models/components/toolreferencechunk.ts +54 -4
- package/src/models/operations/jobsapiroutesbatchgetbatchjob.ts +4 -0
- package/src/sdk/mistraljobs.ts +3 -0
|
@@ -36,7 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ToolReferenceChunk$ = exports.ToolReferenceChunk$outboundSchema = exports.ToolReferenceChunk$inboundSchema = exports.ToolReferenceChunkType$ = exports.ToolReferenceChunkType$outboundSchema = exports.ToolReferenceChunkType$inboundSchema = exports.ToolReferenceChunkType = void 0;
|
|
39
|
+
exports.ToolReferenceChunk$ = exports.ToolReferenceChunk$outboundSchema = exports.ToolReferenceChunk$inboundSchema = exports.ToolReferenceChunkTool$ = exports.ToolReferenceChunkTool$outboundSchema = exports.ToolReferenceChunkTool$inboundSchema = exports.ToolReferenceChunkType$ = exports.ToolReferenceChunkType$outboundSchema = exports.ToolReferenceChunkType$inboundSchema = exports.ToolReferenceChunkType = void 0;
|
|
40
|
+
exports.toolReferenceChunkToolToJSON = toolReferenceChunkToolToJSON;
|
|
41
|
+
exports.toolReferenceChunkToolFromJSON = toolReferenceChunkToolFromJSON;
|
|
40
42
|
exports.toolReferenceChunkToJSON = toolReferenceChunkToJSON;
|
|
41
43
|
exports.toolReferenceChunkFromJSON = toolReferenceChunkFromJSON;
|
|
42
44
|
const z = __importStar(require("zod"));
|
|
@@ -61,9 +63,30 @@ var ToolReferenceChunkType$;
|
|
|
61
63
|
ToolReferenceChunkType$.outboundSchema = exports.ToolReferenceChunkType$outboundSchema;
|
|
62
64
|
})(ToolReferenceChunkType$ || (exports.ToolReferenceChunkType$ = ToolReferenceChunkType$ = {}));
|
|
63
65
|
/** @internal */
|
|
66
|
+
exports.ToolReferenceChunkTool$inboundSchema = z.union([builtinconnectors_js_1.BuiltInConnectors$inboundSchema, z.string()]);
|
|
67
|
+
/** @internal */
|
|
68
|
+
exports.ToolReferenceChunkTool$outboundSchema = z.union([builtinconnectors_js_1.BuiltInConnectors$outboundSchema, z.string()]);
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
|
+
*/
|
|
73
|
+
var ToolReferenceChunkTool$;
|
|
74
|
+
(function (ToolReferenceChunkTool$) {
|
|
75
|
+
/** @deprecated use `ToolReferenceChunkTool$inboundSchema` instead. */
|
|
76
|
+
ToolReferenceChunkTool$.inboundSchema = exports.ToolReferenceChunkTool$inboundSchema;
|
|
77
|
+
/** @deprecated use `ToolReferenceChunkTool$outboundSchema` instead. */
|
|
78
|
+
ToolReferenceChunkTool$.outboundSchema = exports.ToolReferenceChunkTool$outboundSchema;
|
|
79
|
+
})(ToolReferenceChunkTool$ || (exports.ToolReferenceChunkTool$ = ToolReferenceChunkTool$ = {}));
|
|
80
|
+
function toolReferenceChunkToolToJSON(toolReferenceChunkTool) {
|
|
81
|
+
return JSON.stringify(exports.ToolReferenceChunkTool$outboundSchema.parse(toolReferenceChunkTool));
|
|
82
|
+
}
|
|
83
|
+
function toolReferenceChunkToolFromJSON(jsonString) {
|
|
84
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ToolReferenceChunkTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolReferenceChunkTool' from JSON`);
|
|
85
|
+
}
|
|
86
|
+
/** @internal */
|
|
64
87
|
exports.ToolReferenceChunk$inboundSchema = z.object({
|
|
65
88
|
type: exports.ToolReferenceChunkType$inboundSchema.default("tool_reference"),
|
|
66
|
-
tool: builtinconnectors_js_1.BuiltInConnectors$inboundSchema,
|
|
89
|
+
tool: z.union([builtinconnectors_js_1.BuiltInConnectors$inboundSchema, z.string()]),
|
|
67
90
|
title: z.string(),
|
|
68
91
|
url: z.nullable(z.string()).optional(),
|
|
69
92
|
favicon: z.nullable(z.string()).optional(),
|
|
@@ -72,7 +95,7 @@ exports.ToolReferenceChunk$inboundSchema = z.object({
|
|
|
72
95
|
/** @internal */
|
|
73
96
|
exports.ToolReferenceChunk$outboundSchema = z.object({
|
|
74
97
|
type: exports.ToolReferenceChunkType$outboundSchema.default("tool_reference"),
|
|
75
|
-
tool: builtinconnectors_js_1.BuiltInConnectors$outboundSchema,
|
|
98
|
+
tool: z.union([builtinconnectors_js_1.BuiltInConnectors$outboundSchema, z.string()]),
|
|
76
99
|
title: z.string(),
|
|
77
100
|
url: z.nullable(z.string()).optional(),
|
|
78
101
|
favicon: z.nullable(z.string()).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolreferencechunk.js","sourceRoot":"","sources":["../../src/models/components/toolreferencechunk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"toolreferencechunk.js","sourceRoot":"","sources":["../../src/models/components/toolreferencechunk.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,12 +3,14 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
4
|
export type JobsApiRoutesBatchGetBatchJobRequest = {
|
|
5
5
|
jobId: string;
|
|
6
|
+
inline?: boolean | null | undefined;
|
|
6
7
|
};
|
|
7
8
|
/** @internal */
|
|
8
9
|
export declare const JobsApiRoutesBatchGetBatchJobRequest$inboundSchema: z.ZodType<JobsApiRoutesBatchGetBatchJobRequest, z.ZodTypeDef, unknown>;
|
|
9
10
|
/** @internal */
|
|
10
11
|
export type JobsApiRoutesBatchGetBatchJobRequest$Outbound = {
|
|
11
12
|
job_id: string;
|
|
13
|
+
inline?: boolean | null | undefined;
|
|
12
14
|
};
|
|
13
15
|
/** @internal */
|
|
14
16
|
export declare const JobsApiRoutesBatchGetBatchJobRequest$outboundSchema: z.ZodType<JobsApiRoutesBatchGetBatchJobRequest$Outbound, z.ZodTypeDef, JobsApiRoutesBatchGetBatchJobRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobsapiroutesbatchgetbatchjob.d.ts","sourceRoot":"","sources":["../../src/models/operations/jobsapiroutesbatchgetbatchjob.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,oCAAoC,GAAG;IACjD,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"jobsapiroutesbatchgetbatchjob.d.ts","sourceRoot":"","sources":["../../src/models/operations/jobsapiroutesbatchgetbatchjob.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,oCAAoC,GAAG;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kDAAkD,EAAE,CAAC,CAAC,OAAO,CACxE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,OAAO,CAQP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,6CAA6C,GAAG;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mDAAmD,EAAE,CAAC,CAAC,OAAO,CACzE,6CAA6C,EAC7C,CAAC,CAAC,UAAU,EACZ,oCAAoC,CAQpC,CAAC;AAEH;;;GAGG;AACH,yBAAiB,qCAAqC,CAAC;IACrD,oFAAoF;IAC7E,MAAM,aAAa,wEAC0B,CAAC;IACrD,qFAAqF;IAC9E,MAAM,cAAc,8GAC0B,CAAC;IACtD,+EAA+E;IAC/E,KAAY,QAAQ,GAAG,6CAA6C,CAAC;CACtE;AAED,wBAAgB,0CAA0C,CACxD,oCAAoC,EAAE,oCAAoC,GACzE,MAAM,CAMR;AAED,wBAAgB,4CAA4C,CAC1D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,oCAAoC,EAAE,kBAAkB,CAAC,CAO3E"}
|
|
@@ -45,6 +45,7 @@ const schemas_js_1 = require("../../lib/schemas.js");
|
|
|
45
45
|
/** @internal */
|
|
46
46
|
exports.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = z.object({
|
|
47
47
|
job_id: z.string(),
|
|
48
|
+
inline: z.nullable(z.boolean()).optional(),
|
|
48
49
|
}).transform((v) => {
|
|
49
50
|
return (0, primitives_js_1.remap)(v, {
|
|
50
51
|
"job_id": "jobId",
|
|
@@ -53,6 +54,7 @@ exports.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = z.object({
|
|
|
53
54
|
/** @internal */
|
|
54
55
|
exports.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema = z.object({
|
|
55
56
|
jobId: z.string(),
|
|
57
|
+
inline: z.nullable(z.boolean()).optional(),
|
|
56
58
|
}).transform((v) => {
|
|
57
59
|
return (0, primitives_js_1.remap)(v, {
|
|
58
60
|
jobId: "job_id",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobsapiroutesbatchgetbatchjob.js","sourceRoot":"","sources":["../../src/models/operations/jobsapiroutesbatchgetbatchjob.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"jobsapiroutesbatchgetbatchjob.js","sourceRoot":"","sources":["../../src/models/operations/jobsapiroutesbatchgetbatchjob.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DH,gGAQC;AAED,oGASC;AA/ED,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AASjD,gBAAgB;AACH,QAAA,kDAAkD,GAI3D,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,mDAAmD,GAI5D,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,KAAK,EAAE,QAAQ;KAChB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,qCAAqC,CASrD;AATD,WAAiB,qCAAqC;IACpD,oFAAoF;IACvE,mDAAa,GACxB,0DAAkD,CAAC;IACrD,qFAAqF;IACxE,oDAAc,GACzB,2DAAmD,CAAC;AAGxD,CAAC,EATgB,qCAAqC,qDAArC,qCAAqC,QASrD;AAED,SAAgB,0CAA0C,CACxD,oCAA0E;IAE1E,OAAO,IAAI,CAAC,SAAS,CACnB,2DAAmD,CAAC,KAAK,CACvD,oCAAoC,CACrC,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,4CAA4C,CAC1D,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,0DAAkD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzE,kEAAkE,CACnE,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/sdk/mistraljobs.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ export declare class MistralJobs extends ClientSDK {
|
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
23
|
* Get a batch job details by its UUID.
|
|
24
|
+
*
|
|
25
|
+
* Args:
|
|
26
|
+
* inline: If True, return results inline in the response.
|
|
24
27
|
*/
|
|
25
28
|
get(request: operations.JobsApiRoutesBatchGetBatchJobRequest, options?: RequestOptions): Promise<components.BatchJobOut>;
|
|
26
29
|
/**
|
package/sdk/mistraljobs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mistraljobs.d.ts","sourceRoot":"","sources":["../src/sdk/mistraljobs.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,WAAY,SAAQ,SAAS;IACxC;;;;;OAKG;IACG,IAAI,CACR,OAAO,CAAC,EAAE,UAAU,CAAC,qCAAqC,GAAG,SAAS,EACtE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;IAQnC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,UAAU,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;IAQlC
|
|
1
|
+
{"version":3,"file":"mistraljobs.d.ts","sourceRoot":"","sources":["../src/sdk/mistraljobs.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,WAAY,SAAQ,SAAS;IACxC;;;;;OAKG;IACG,IAAI,CACR,OAAO,CAAC,EAAE,UAAU,CAAC,qCAAqC,GAAG,SAAS,EACtE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;IAQnC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,UAAU,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;IAQlC;;;;;;;;OAQG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;IAQlC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,uCAAuC,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;CAOnC"}
|
package/sdk/mistraljobs.js
CHANGED
|
@@ -34,6 +34,9 @@ class MistralJobs extends sdks_js_1.ClientSDK {
|
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
36
|
* Get a batch job details by its UUID.
|
|
37
|
+
*
|
|
38
|
+
* Args:
|
|
39
|
+
* inline: If True, return results inline in the response.
|
|
37
40
|
*/
|
|
38
41
|
async get(request, options) {
|
|
39
42
|
return (0, fp_js_1.unwrapAsync)((0, batchJobsGet_js_1.batchJobsGet)(this, request, options));
|
package/sdk/mistraljobs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mistraljobs.js","sourceRoot":"","sources":["../src/sdk/mistraljobs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oEAA8D;AAC9D,oEAA8D;AAC9D,8DAAwD;AACxD,gEAA0D;AAC1D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,WAAY,SAAQ,mBAAS;IACxC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAAsE,EACtE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"mistraljobs.js","sourceRoot":"","sources":["../src/sdk/mistraljobs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oEAA8D;AAC9D,oEAA8D;AAC9D,8DAAwD;AACxD,gEAA0D;AAC1D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,WAAY,SAAQ,mBAAS;IACxC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAAsE,EACtE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CACP,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAA2D,EAC3D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAvED,kCAuEC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { MistralCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -30,6 +30,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get a batch job details by its UUID.
|
|
33
|
+
*
|
|
34
|
+
* Args:
|
|
35
|
+
* inline: If True, return results inline in the response.
|
|
33
36
|
*/
|
|
34
37
|
export function batchJobsGet(
|
|
35
38
|
client: MistralCore,
|
|
@@ -98,6 +101,10 @@ async function $do(
|
|
|
98
101
|
|
|
99
102
|
const path = pathToFunc("/v1/batch/jobs/{job_id}")(pathParams);
|
|
100
103
|
|
|
104
|
+
const query = encodeFormQuery({
|
|
105
|
+
"inline": payload.inline,
|
|
106
|
+
});
|
|
107
|
+
|
|
101
108
|
const headers = new Headers(compactMap({
|
|
102
109
|
Accept: "application/json",
|
|
103
110
|
}));
|
|
@@ -127,6 +134,7 @@ async function $do(
|
|
|
127
134
|
baseURL: options?.serverURL,
|
|
128
135
|
path: path,
|
|
129
136
|
headers: headers,
|
|
137
|
+
query: query,
|
|
130
138
|
body: body,
|
|
131
139
|
userAgent: client._options.userAgent,
|
|
132
140
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { MistralCore } from "../core.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
encodeFormQuery,
|
|
9
|
+
encodeJSONQuery,
|
|
10
|
+
queryJoin,
|
|
11
|
+
} from "../lib/encodings.js";
|
|
8
12
|
import * as M from "../lib/matchers.js";
|
|
9
13
|
import { compactMap } from "../lib/primitives.js";
|
|
10
14
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -95,15 +99,19 @@ async function $do(
|
|
|
95
99
|
|
|
96
100
|
const path = pathToFunc("/v1/agents")();
|
|
97
101
|
|
|
98
|
-
const query =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
const query = queryJoin(
|
|
103
|
+
encodeFormQuery({
|
|
104
|
+
"deployment_chat": payload?.deployment_chat,
|
|
105
|
+
"id": payload?.id,
|
|
106
|
+
"name": payload?.name,
|
|
107
|
+
"page": payload?.page,
|
|
108
|
+
"page_size": payload?.page_size,
|
|
109
|
+
"sources": payload?.sources,
|
|
110
|
+
}),
|
|
111
|
+
encodeJSONQuery({
|
|
112
|
+
"metadata": payload?.metadata,
|
|
113
|
+
}, { explode: false }),
|
|
114
|
+
);
|
|
107
115
|
|
|
108
116
|
const headers = new Headers(compactMap({
|
|
109
117
|
Accept: "application/json",
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { MistralCore } from "../core.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
encodeFormQuery,
|
|
9
|
+
encodeJSONQuery,
|
|
10
|
+
queryJoin,
|
|
11
|
+
} from "../lib/encodings.js";
|
|
8
12
|
import * as M from "../lib/matchers.js";
|
|
9
13
|
import { compactMap } from "../lib/primitives.js";
|
|
10
14
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -93,11 +97,15 @@ async function $do(
|
|
|
93
97
|
|
|
94
98
|
const path = pathToFunc("/v1/conversations")();
|
|
95
99
|
|
|
96
|
-
const query =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
const query = queryJoin(
|
|
101
|
+
encodeFormQuery({
|
|
102
|
+
"page": payload?.page,
|
|
103
|
+
"page_size": payload?.page_size,
|
|
104
|
+
}),
|
|
105
|
+
encodeJSONQuery({
|
|
106
|
+
"metadata": payload?.metadata,
|
|
107
|
+
}, { explode: false }),
|
|
108
|
+
);
|
|
101
109
|
|
|
102
110
|
const headers = new Headers(compactMap({
|
|
103
111
|
Accept: "application/json",
|
package/src/lib/config.ts
CHANGED
|
@@ -59,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
59
59
|
export const SDK_METADATA = {
|
|
60
60
|
language: "typescript",
|
|
61
61
|
openapiDocVersion: "1.0.0",
|
|
62
|
-
sdkVersion: "1.
|
|
62
|
+
sdkVersion: "1.12.0",
|
|
63
63
|
genVersion: "2.687.13",
|
|
64
64
|
userAgent:
|
|
65
|
-
"speakeasy-sdk/typescript 1.
|
|
65
|
+
"speakeasy-sdk/typescript 1.12.0 2.687.13 1.0.0 @mistralai/mistralai",
|
|
66
66
|
} as const;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../../types/enums.js";
|
|
11
|
+
|
|
12
|
+
export const AudioEncoding = {
|
|
13
|
+
PcmS16le: "pcm_s16le",
|
|
14
|
+
PcmS32le: "pcm_s32le",
|
|
15
|
+
PcmF16le: "pcm_f16le",
|
|
16
|
+
PcmF32le: "pcm_f32le",
|
|
17
|
+
PcmMulaw: "pcm_mulaw",
|
|
18
|
+
PcmAlaw: "pcm_alaw",
|
|
19
|
+
} as const;
|
|
20
|
+
export type AudioEncoding = OpenEnum<typeof AudioEncoding>;
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AudioEncoding$inboundSchema: z.ZodType<
|
|
24
|
+
AudioEncoding,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z
|
|
28
|
+
.union([
|
|
29
|
+
z.nativeEnum(AudioEncoding),
|
|
30
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const AudioEncoding$outboundSchema: z.ZodType<
|
|
35
|
+
AudioEncoding,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
AudioEncoding
|
|
38
|
+
> = z.union([
|
|
39
|
+
z.nativeEnum(AudioEncoding),
|
|
40
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export namespace AudioEncoding$ {
|
|
48
|
+
/** @deprecated use `AudioEncoding$inboundSchema` instead. */
|
|
49
|
+
export const inboundSchema = AudioEncoding$inboundSchema;
|
|
50
|
+
/** @deprecated use `AudioEncoding$outboundSchema` instead. */
|
|
51
|
+
export const outboundSchema = AudioEncoding$outboundSchema;
|
|
52
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
AudioEncoding,
|
|
12
|
+
AudioEncoding$inboundSchema,
|
|
13
|
+
AudioEncoding$outboundSchema,
|
|
14
|
+
} from "./audioencoding.js";
|
|
15
|
+
|
|
16
|
+
export type AudioFormat = {
|
|
17
|
+
encoding: AudioEncoding;
|
|
18
|
+
sampleRate: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const AudioFormat$inboundSchema: z.ZodType<
|
|
23
|
+
AudioFormat,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
encoding: AudioEncoding$inboundSchema,
|
|
28
|
+
sample_rate: z.number().int(),
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"sample_rate": "sampleRate",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type AudioFormat$Outbound = {
|
|
37
|
+
encoding: string;
|
|
38
|
+
sample_rate: number;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const AudioFormat$outboundSchema: z.ZodType<
|
|
43
|
+
AudioFormat$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
AudioFormat
|
|
46
|
+
> = z.object({
|
|
47
|
+
encoding: AudioEncoding$outboundSchema,
|
|
48
|
+
sampleRate: z.number().int(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
sampleRate: "sample_rate",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace AudioFormat$ {
|
|
60
|
+
/** @deprecated use `AudioFormat$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = AudioFormat$inboundSchema;
|
|
62
|
+
/** @deprecated use `AudioFormat$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = AudioFormat$outboundSchema;
|
|
64
|
+
/** @deprecated use `AudioFormat$Outbound` instead. */
|
|
65
|
+
export type Outbound = AudioFormat$Outbound;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function audioFormatToJSON(audioFormat: AudioFormat): string {
|
|
69
|
+
return JSON.stringify(AudioFormat$outboundSchema.parse(audioFormat));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function audioFormatFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<AudioFormat, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => AudioFormat$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'AudioFormat' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -12,12 +12,19 @@ import {
|
|
|
12
12
|
ApiEndpoint$inboundSchema,
|
|
13
13
|
ApiEndpoint$outboundSchema,
|
|
14
14
|
} from "./apiendpoint.js";
|
|
15
|
+
import {
|
|
16
|
+
BatchRequest,
|
|
17
|
+
BatchRequest$inboundSchema,
|
|
18
|
+
BatchRequest$Outbound,
|
|
19
|
+
BatchRequest$outboundSchema,
|
|
20
|
+
} from "./batchrequest.js";
|
|
15
21
|
|
|
16
22
|
export type BatchJobIn = {
|
|
17
23
|
/**
|
|
18
24
|
* The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a "body" field. An example of such file is the following: ```json {"custom_id": "0", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French cheese?"}]}} {"custom_id": "1", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French wine?"}]}} ```
|
|
19
25
|
*/
|
|
20
|
-
inputFiles
|
|
26
|
+
inputFiles?: Array<string> | null | undefined;
|
|
27
|
+
requests?: Array<BatchRequest> | null | undefined;
|
|
21
28
|
endpoint: ApiEndpoint;
|
|
22
29
|
/**
|
|
23
30
|
* The model to be used for batch inference.
|
|
@@ -43,7 +50,8 @@ export const BatchJobIn$inboundSchema: z.ZodType<
|
|
|
43
50
|
z.ZodTypeDef,
|
|
44
51
|
unknown
|
|
45
52
|
> = z.object({
|
|
46
|
-
input_files: z.array(z.string()),
|
|
53
|
+
input_files: z.nullable(z.array(z.string())).optional(),
|
|
54
|
+
requests: z.nullable(z.array(BatchRequest$inboundSchema)).optional(),
|
|
47
55
|
endpoint: ApiEndpoint$inboundSchema,
|
|
48
56
|
model: z.nullable(z.string()).optional(),
|
|
49
57
|
agent_id: z.nullable(z.string()).optional(),
|
|
@@ -59,7 +67,8 @@ export const BatchJobIn$inboundSchema: z.ZodType<
|
|
|
59
67
|
|
|
60
68
|
/** @internal */
|
|
61
69
|
export type BatchJobIn$Outbound = {
|
|
62
|
-
input_files
|
|
70
|
+
input_files?: Array<string> | null | undefined;
|
|
71
|
+
requests?: Array<BatchRequest$Outbound> | null | undefined;
|
|
63
72
|
endpoint: string;
|
|
64
73
|
model?: string | null | undefined;
|
|
65
74
|
agent_id?: string | null | undefined;
|
|
@@ -73,7 +82,8 @@ export const BatchJobIn$outboundSchema: z.ZodType<
|
|
|
73
82
|
z.ZodTypeDef,
|
|
74
83
|
BatchJobIn
|
|
75
84
|
> = z.object({
|
|
76
|
-
inputFiles: z.array(z.string()),
|
|
85
|
+
inputFiles: z.nullable(z.array(z.string())).optional(),
|
|
86
|
+
requests: z.nullable(z.array(BatchRequest$outboundSchema)).optional(),
|
|
77
87
|
endpoint: ApiEndpoint$outboundSchema,
|
|
78
88
|
model: z.nullable(z.string()).optional(),
|
|
79
89
|
agentId: z.nullable(z.string()).optional(),
|
|
@@ -36,6 +36,7 @@ export type BatchJobOut = {
|
|
|
36
36
|
outputFile?: string | null | undefined;
|
|
37
37
|
errorFile?: string | null | undefined;
|
|
38
38
|
errors: Array<BatchError>;
|
|
39
|
+
outputs?: Array<{ [k: string]: any }> | null | undefined;
|
|
39
40
|
status: BatchJobStatus;
|
|
40
41
|
createdAt: number;
|
|
41
42
|
totalRequests: number;
|
|
@@ -83,6 +84,7 @@ export const BatchJobOut$inboundSchema: z.ZodType<
|
|
|
83
84
|
output_file: z.nullable(z.string()).optional(),
|
|
84
85
|
error_file: z.nullable(z.string()).optional(),
|
|
85
86
|
errors: z.array(BatchError$inboundSchema),
|
|
87
|
+
outputs: z.nullable(z.array(z.record(z.any()))).optional(),
|
|
86
88
|
status: BatchJobStatus$inboundSchema,
|
|
87
89
|
created_at: z.number().int(),
|
|
88
90
|
total_requests: z.number().int(),
|
|
@@ -119,6 +121,7 @@ export type BatchJobOut$Outbound = {
|
|
|
119
121
|
output_file?: string | null | undefined;
|
|
120
122
|
error_file?: string | null | undefined;
|
|
121
123
|
errors: Array<BatchError$Outbound>;
|
|
124
|
+
outputs?: Array<{ [k: string]: any }> | null | undefined;
|
|
122
125
|
status: string;
|
|
123
126
|
created_at: number;
|
|
124
127
|
total_requests: number;
|
|
@@ -145,6 +148,7 @@ export const BatchJobOut$outboundSchema: z.ZodType<
|
|
|
145
148
|
outputFile: z.nullable(z.string()).optional(),
|
|
146
149
|
errorFile: z.nullable(z.string()).optional(),
|
|
147
150
|
errors: z.array(BatchError$outboundSchema),
|
|
151
|
+
outputs: z.nullable(z.array(z.record(z.any()))).optional(),
|
|
148
152
|
status: BatchJobStatus$outboundSchema,
|
|
149
153
|
createdAt: z.number().int(),
|
|
150
154
|
totalRequests: z.number().int(),
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type BatchRequest = {
|
|
12
|
+
customId?: string | null | undefined;
|
|
13
|
+
body: { [k: string]: any };
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const BatchRequest$inboundSchema: z.ZodType<
|
|
18
|
+
BatchRequest,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
custom_id: z.nullable(z.string()).optional(),
|
|
23
|
+
body: z.record(z.any()),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
"custom_id": "customId",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type BatchRequest$Outbound = {
|
|
32
|
+
custom_id?: string | null | undefined;
|
|
33
|
+
body: { [k: string]: any };
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const BatchRequest$outboundSchema: z.ZodType<
|
|
38
|
+
BatchRequest$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
BatchRequest
|
|
41
|
+
> = z.object({
|
|
42
|
+
customId: z.nullable(z.string()).optional(),
|
|
43
|
+
body: z.record(z.any()),
|
|
44
|
+
}).transform((v) => {
|
|
45
|
+
return remap$(v, {
|
|
46
|
+
customId: "custom_id",
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace BatchRequest$ {
|
|
55
|
+
/** @deprecated use `BatchRequest$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = BatchRequest$inboundSchema;
|
|
57
|
+
/** @deprecated use `BatchRequest$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = BatchRequest$outboundSchema;
|
|
59
|
+
/** @deprecated use `BatchRequest$Outbound` instead. */
|
|
60
|
+
export type Outbound = BatchRequest$Outbound;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function batchRequestToJSON(batchRequest: BatchRequest): string {
|
|
64
|
+
return JSON.stringify(BatchRequest$outboundSchema.parse(batchRequest));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function batchRequestFromJSON(
|
|
68
|
+
jsonString: string,
|
|
69
|
+
): SafeParseResult<BatchRequest, SDKValidationError> {
|
|
70
|
+
return safeParse(
|
|
71
|
+
jsonString,
|
|
72
|
+
(x) => BatchRequest$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'BatchRequest' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -18,6 +18,7 @@ export type ClassificationRequest = {
|
|
|
18
18
|
* ID of the model to use.
|
|
19
19
|
*/
|
|
20
20
|
model: string;
|
|
21
|
+
metadata?: { [k: string]: any } | null | undefined;
|
|
21
22
|
/**
|
|
22
23
|
* Text to classify.
|
|
23
24
|
*/
|
|
@@ -81,6 +82,7 @@ export const ClassificationRequest$inboundSchema: z.ZodType<
|
|
|
81
82
|
unknown
|
|
82
83
|
> = z.object({
|
|
83
84
|
model: z.string(),
|
|
85
|
+
metadata: z.nullable(z.record(z.any())).optional(),
|
|
84
86
|
input: z.union([z.string(), z.array(z.string())]),
|
|
85
87
|
}).transform((v) => {
|
|
86
88
|
return remap$(v, {
|
|
@@ -91,6 +93,7 @@ export const ClassificationRequest$inboundSchema: z.ZodType<
|
|
|
91
93
|
/** @internal */
|
|
92
94
|
export type ClassificationRequest$Outbound = {
|
|
93
95
|
model: string;
|
|
96
|
+
metadata?: { [k: string]: any } | null | undefined;
|
|
94
97
|
input: string | Array<string>;
|
|
95
98
|
};
|
|
96
99
|
|
|
@@ -101,6 +104,7 @@ export const ClassificationRequest$outboundSchema: z.ZodType<
|
|
|
101
104
|
ClassificationRequest
|
|
102
105
|
> = z.object({
|
|
103
106
|
model: z.string(),
|
|
107
|
+
metadata: z.nullable(z.record(z.any())).optional(),
|
|
104
108
|
inputs: z.union([z.string(), z.array(z.string())]),
|
|
105
109
|
}).transform((v) => {
|
|
106
110
|
return remap$(v, {
|
|
@@ -28,6 +28,7 @@ export type EmbeddingRequest = {
|
|
|
28
28
|
* The ID of the model to be used for embedding.
|
|
29
29
|
*/
|
|
30
30
|
model: string;
|
|
31
|
+
metadata?: { [k: string]: any } | null | undefined;
|
|
31
32
|
/**
|
|
32
33
|
* The text content to be embedded, can be a string or an array of strings for fast processing in bulk.
|
|
33
34
|
*/
|
|
@@ -95,6 +96,7 @@ export const EmbeddingRequest$inboundSchema: z.ZodType<
|
|
|
95
96
|
unknown
|
|
96
97
|
> = z.object({
|
|
97
98
|
model: z.string(),
|
|
99
|
+
metadata: z.nullable(z.record(z.any())).optional(),
|
|
98
100
|
input: z.union([z.string(), z.array(z.string())]),
|
|
99
101
|
output_dimension: z.nullable(z.number().int()).optional(),
|
|
100
102
|
output_dtype: EmbeddingDtype$inboundSchema.optional(),
|
|
@@ -111,6 +113,7 @@ export const EmbeddingRequest$inboundSchema: z.ZodType<
|
|
|
111
113
|
/** @internal */
|
|
112
114
|
export type EmbeddingRequest$Outbound = {
|
|
113
115
|
model: string;
|
|
116
|
+
metadata?: { [k: string]: any } | null | undefined;
|
|
114
117
|
input: string | Array<string>;
|
|
115
118
|
output_dimension?: number | null | undefined;
|
|
116
119
|
output_dtype?: string | undefined;
|
|
@@ -124,6 +127,7 @@ export const EmbeddingRequest$outboundSchema: z.ZodType<
|
|
|
124
127
|
EmbeddingRequest
|
|
125
128
|
> = z.object({
|
|
126
129
|
model: z.string(),
|
|
130
|
+
metadata: z.nullable(z.record(z.any())).optional(),
|
|
127
131
|
inputs: z.union([z.string(), z.array(z.string())]),
|
|
128
132
|
outputDimension: z.nullable(z.number().int()).optional(),
|
|
129
133
|
outputDtype: EmbeddingDtype$outboundSchema.optional(),
|