@orq-ai/node 3.2.6 → 3.2.8
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/bin/mcp-server.js +32 -32
- package/bin/mcp-server.js.map +17 -17
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/package.json +1 -1
- package/packages/orq-rc/README.md +39 -1
- package/packages/orq-rc/docs/sdks/deployments/README.md +81 -0
- package/packages/orq-rc/docs/sdks/prompts/README.md +110 -110
- package/packages/orq-rc/jsr.json +2 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +178 -0
- package/packages/orq-rc/src/funcs/promptsList.ts +1 -1
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/event-streams.ts +264 -0
- package/packages/orq-rc/src/lib/matchers.ts +4 -1
- package/packages/orq-rc/src/lib/security.ts +11 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +4 -2
- package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +37 -0
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createprompt.ts +599 -680
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +5960 -0
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +1 -0
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateprompt.ts +682 -599
- package/packages/orq-rc/src/sdk/deployments.ts +19 -0
- package/packages/orq-rc/src/sdk/prompts.ts +14 -14
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* The type of the model
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const ModelType = {
|
|
16
16
|
Chat: "chat",
|
|
17
17
|
Completion: "completion",
|
|
18
18
|
Embedding: "embedding",
|
|
@@ -26,7 +26,7 @@ export const CreatePromptModelType = {
|
|
|
26
26
|
/**
|
|
27
27
|
* The type of the model
|
|
28
28
|
*/
|
|
29
|
-
export type
|
|
29
|
+
export type ModelType = ClosedEnum<typeof ModelType>;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Only supported on `image` models.
|
|
@@ -45,42 +45,40 @@ export type CreatePromptFormat = ClosedEnum<typeof CreatePromptFormat>;
|
|
|
45
45
|
/**
|
|
46
46
|
* Only supported on `image` models.
|
|
47
47
|
*/
|
|
48
|
-
export const
|
|
48
|
+
export const Quality = {
|
|
49
49
|
Standard: "standard",
|
|
50
50
|
Hd: "hd",
|
|
51
51
|
} as const;
|
|
52
52
|
/**
|
|
53
53
|
* Only supported on `image` models.
|
|
54
54
|
*/
|
|
55
|
-
export type
|
|
55
|
+
export type Quality = ClosedEnum<typeof Quality>;
|
|
56
56
|
|
|
57
|
-
export const
|
|
57
|
+
export const CreatePromptResponseFormatType = {
|
|
58
58
|
JsonObject: "json_object",
|
|
59
59
|
} as const;
|
|
60
|
-
export type
|
|
61
|
-
typeof
|
|
60
|
+
export type CreatePromptResponseFormatType = ClosedEnum<
|
|
61
|
+
typeof CreatePromptResponseFormatType
|
|
62
62
|
>;
|
|
63
63
|
|
|
64
|
-
export type
|
|
65
|
-
type:
|
|
64
|
+
export type ResponseFormat2 = {
|
|
65
|
+
type: CreatePromptResponseFormatType;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
export const
|
|
68
|
+
export const ResponseFormatType = {
|
|
69
69
|
JsonSchema: "json_schema",
|
|
70
70
|
} as const;
|
|
71
|
-
export type
|
|
72
|
-
typeof CreatePromptResponseFormatType
|
|
73
|
-
>;
|
|
71
|
+
export type ResponseFormatType = ClosedEnum<typeof ResponseFormatType>;
|
|
74
72
|
|
|
75
|
-
export type
|
|
73
|
+
export type JsonSchema = {
|
|
76
74
|
name: string;
|
|
77
75
|
strict: boolean;
|
|
78
76
|
schema: { [k: string]: any };
|
|
79
77
|
};
|
|
80
78
|
|
|
81
|
-
export type
|
|
82
|
-
type:
|
|
83
|
-
jsonSchema:
|
|
79
|
+
export type ResponseFormat1 = {
|
|
80
|
+
type: ResponseFormatType;
|
|
81
|
+
jsonSchema: JsonSchema;
|
|
84
82
|
};
|
|
85
83
|
|
|
86
84
|
/**
|
|
@@ -94,42 +92,36 @@ export type CreatePromptResponseFormat1 = {
|
|
|
94
92
|
*
|
|
95
93
|
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
96
94
|
*/
|
|
97
|
-
export type
|
|
98
|
-
| CreatePromptResponseFormat2
|
|
99
|
-
| CreatePromptResponseFormat1;
|
|
95
|
+
export type ResponseFormat = ResponseFormat2 | ResponseFormat1;
|
|
100
96
|
|
|
101
97
|
/**
|
|
102
98
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
103
99
|
*/
|
|
104
|
-
export const
|
|
100
|
+
export const PhotoRealVersion = {
|
|
105
101
|
V1: "v1",
|
|
106
102
|
V2: "v2",
|
|
107
103
|
} as const;
|
|
108
104
|
/**
|
|
109
105
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
110
106
|
*/
|
|
111
|
-
export type
|
|
112
|
-
typeof CreatePromptPhotoRealVersion
|
|
113
|
-
>;
|
|
107
|
+
export type PhotoRealVersion = ClosedEnum<typeof PhotoRealVersion>;
|
|
114
108
|
|
|
115
109
|
/**
|
|
116
110
|
* The format to return the embeddings
|
|
117
111
|
*/
|
|
118
|
-
export const
|
|
112
|
+
export const EncodingFormat = {
|
|
119
113
|
Float: "float",
|
|
120
114
|
Base64: "base64",
|
|
121
115
|
} as const;
|
|
122
116
|
/**
|
|
123
117
|
* The format to return the embeddings
|
|
124
118
|
*/
|
|
125
|
-
export type
|
|
126
|
-
typeof CreatePromptEncodingFormat
|
|
127
|
-
>;
|
|
119
|
+
export type EncodingFormat = ClosedEnum<typeof EncodingFormat>;
|
|
128
120
|
|
|
129
121
|
/**
|
|
130
122
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
131
123
|
*/
|
|
132
|
-
export const
|
|
124
|
+
export const ReasoningEffort = {
|
|
133
125
|
Low: "low",
|
|
134
126
|
Medium: "medium",
|
|
135
127
|
High: "high",
|
|
@@ -137,14 +129,12 @@ export const CreatePromptReasoningEffort = {
|
|
|
137
129
|
/**
|
|
138
130
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
139
131
|
*/
|
|
140
|
-
export type
|
|
141
|
-
typeof CreatePromptReasoningEffort
|
|
142
|
-
>;
|
|
132
|
+
export type ReasoningEffort = ClosedEnum<typeof ReasoningEffort>;
|
|
143
133
|
|
|
144
134
|
/**
|
|
145
135
|
* Model Parameters: Not all parameters apply to every model
|
|
146
136
|
*/
|
|
147
|
-
export type
|
|
137
|
+
export type ModelParameters = {
|
|
148
138
|
/**
|
|
149
139
|
* Only supported on `chat` and `completion` models.
|
|
150
140
|
*/
|
|
@@ -188,7 +178,7 @@ export type CreatePromptModelParameters = {
|
|
|
188
178
|
/**
|
|
189
179
|
* Only supported on `image` models.
|
|
190
180
|
*/
|
|
191
|
-
quality?:
|
|
181
|
+
quality?: Quality | undefined;
|
|
192
182
|
/**
|
|
193
183
|
* Only supported on `image` models.
|
|
194
184
|
*/
|
|
@@ -204,30 +194,26 @@ export type CreatePromptModelParameters = {
|
|
|
204
194
|
*
|
|
205
195
|
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
206
196
|
*/
|
|
207
|
-
responseFormat?:
|
|
208
|
-
| CreatePromptResponseFormat2
|
|
209
|
-
| CreatePromptResponseFormat1
|
|
210
|
-
| null
|
|
211
|
-
| undefined;
|
|
197
|
+
responseFormat?: ResponseFormat2 | ResponseFormat1 | null | undefined;
|
|
212
198
|
/**
|
|
213
199
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
214
200
|
*/
|
|
215
|
-
photoRealVersion?:
|
|
201
|
+
photoRealVersion?: PhotoRealVersion | undefined;
|
|
216
202
|
/**
|
|
217
203
|
* The format to return the embeddings
|
|
218
204
|
*/
|
|
219
|
-
encodingFormat?:
|
|
205
|
+
encodingFormat?: EncodingFormat | undefined;
|
|
220
206
|
/**
|
|
221
207
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
222
208
|
*/
|
|
223
|
-
reasoningEffort?:
|
|
209
|
+
reasoningEffort?: ReasoningEffort | undefined;
|
|
224
210
|
/**
|
|
225
211
|
* Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
|
|
226
212
|
*/
|
|
227
213
|
budgetTokens?: number | undefined;
|
|
228
214
|
};
|
|
229
215
|
|
|
230
|
-
export const
|
|
216
|
+
export const Provider = {
|
|
231
217
|
Cohere: "cohere",
|
|
232
218
|
Openai: "openai",
|
|
233
219
|
Anthropic: "anthropic",
|
|
@@ -247,7 +233,7 @@ export const CreatePromptProvider = {
|
|
|
247
233
|
Togetherai: "togetherai",
|
|
248
234
|
Elevenlabs: "elevenlabs",
|
|
249
235
|
} as const;
|
|
250
|
-
export type
|
|
236
|
+
export type Provider = ClosedEnum<typeof Provider>;
|
|
251
237
|
|
|
252
238
|
/**
|
|
253
239
|
* The role of the prompt message
|
|
@@ -350,23 +336,23 @@ export type CreatePromptMessages = {
|
|
|
350
336
|
/**
|
|
351
337
|
* A list of messages compatible with the openAI schema
|
|
352
338
|
*/
|
|
353
|
-
export type
|
|
339
|
+
export type PromptConfig = {
|
|
354
340
|
stream?: boolean | undefined;
|
|
355
341
|
model?: string | undefined;
|
|
356
342
|
/**
|
|
357
343
|
* The type of the model
|
|
358
344
|
*/
|
|
359
|
-
modelType?:
|
|
345
|
+
modelType?: ModelType | undefined;
|
|
360
346
|
/**
|
|
361
347
|
* Model Parameters: Not all parameters apply to every model
|
|
362
348
|
*/
|
|
363
|
-
modelParameters?:
|
|
364
|
-
provider?:
|
|
349
|
+
modelParameters?: ModelParameters | undefined;
|
|
350
|
+
provider?: Provider | undefined;
|
|
365
351
|
version?: string | undefined;
|
|
366
352
|
messages: Array<CreatePromptMessages>;
|
|
367
353
|
};
|
|
368
354
|
|
|
369
|
-
export const
|
|
355
|
+
export const UseCases = {
|
|
370
356
|
Agents: "Agents",
|
|
371
357
|
AgentsSimulations: "Agents simulations",
|
|
372
358
|
APIInteraction: "API interaction",
|
|
@@ -384,12 +370,12 @@ export const CreatePromptUseCases = {
|
|
|
384
370
|
Summarization: "Summarization",
|
|
385
371
|
Tagging: "Tagging",
|
|
386
372
|
} as const;
|
|
387
|
-
export type
|
|
373
|
+
export type UseCases = ClosedEnum<typeof UseCases>;
|
|
388
374
|
|
|
389
375
|
/**
|
|
390
376
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
391
377
|
*/
|
|
392
|
-
export const
|
|
378
|
+
export const Language = {
|
|
393
379
|
Chinese: "Chinese",
|
|
394
380
|
Dutch: "Dutch",
|
|
395
381
|
English: "English",
|
|
@@ -401,17 +387,17 @@ export const CreatePromptLanguage = {
|
|
|
401
387
|
/**
|
|
402
388
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
403
389
|
*/
|
|
404
|
-
export type
|
|
390
|
+
export type Language = ClosedEnum<typeof Language>;
|
|
405
391
|
|
|
406
392
|
export type CreatePromptMetadata = {
|
|
407
393
|
/**
|
|
408
394
|
* A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
|
|
409
395
|
*/
|
|
410
|
-
useCases?: Array<
|
|
396
|
+
useCases?: Array<UseCases> | undefined;
|
|
411
397
|
/**
|
|
412
398
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
413
399
|
*/
|
|
414
|
-
language?:
|
|
400
|
+
language?: Language | undefined;
|
|
415
401
|
};
|
|
416
402
|
|
|
417
403
|
export type CreatePromptRequestBody = {
|
|
@@ -426,7 +412,7 @@ export type CreatePromptRequestBody = {
|
|
|
426
412
|
/**
|
|
427
413
|
* A list of messages compatible with the openAI schema
|
|
428
414
|
*/
|
|
429
|
-
promptConfig:
|
|
415
|
+
promptConfig: PromptConfig;
|
|
430
416
|
metadata?: CreatePromptMetadata | undefined;
|
|
431
417
|
/**
|
|
432
418
|
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
@@ -444,7 +430,7 @@ export type CreatePromptPromptsType = ClosedEnum<
|
|
|
444
430
|
/**
|
|
445
431
|
* The type of the model
|
|
446
432
|
*/
|
|
447
|
-
export const
|
|
433
|
+
export const CreatePromptModelType = {
|
|
448
434
|
Chat: "chat",
|
|
449
435
|
Completion: "completion",
|
|
450
436
|
Embedding: "embedding",
|
|
@@ -458,9 +444,7 @@ export const CreatePromptPromptsModelType = {
|
|
|
458
444
|
/**
|
|
459
445
|
* The type of the model
|
|
460
446
|
*/
|
|
461
|
-
export type
|
|
462
|
-
typeof CreatePromptPromptsModelType
|
|
463
|
-
>;
|
|
447
|
+
export type CreatePromptModelType = ClosedEnum<typeof CreatePromptModelType>;
|
|
464
448
|
|
|
465
449
|
/**
|
|
466
450
|
* Only supported on `image` models.
|
|
@@ -481,33 +465,31 @@ export type CreatePromptPromptsFormat = ClosedEnum<
|
|
|
481
465
|
/**
|
|
482
466
|
* Only supported on `image` models.
|
|
483
467
|
*/
|
|
484
|
-
export const
|
|
468
|
+
export const CreatePromptQuality = {
|
|
485
469
|
Standard: "standard",
|
|
486
470
|
Hd: "hd",
|
|
487
471
|
} as const;
|
|
488
472
|
/**
|
|
489
473
|
* Only supported on `image` models.
|
|
490
474
|
*/
|
|
491
|
-
export type
|
|
492
|
-
typeof CreatePromptPromptsQuality
|
|
493
|
-
>;
|
|
475
|
+
export type CreatePromptQuality = ClosedEnum<typeof CreatePromptQuality>;
|
|
494
476
|
|
|
495
|
-
export const
|
|
477
|
+
export const CreatePromptResponseFormatPromptsResponseType = {
|
|
496
478
|
JsonObject: "json_object",
|
|
497
479
|
} as const;
|
|
498
|
-
export type
|
|
499
|
-
typeof
|
|
480
|
+
export type CreatePromptResponseFormatPromptsResponseType = ClosedEnum<
|
|
481
|
+
typeof CreatePromptResponseFormatPromptsResponseType
|
|
500
482
|
>;
|
|
501
483
|
|
|
502
|
-
export type
|
|
503
|
-
type:
|
|
484
|
+
export type CreatePromptResponseFormat2 = {
|
|
485
|
+
type: CreatePromptResponseFormatPromptsResponseType;
|
|
504
486
|
};
|
|
505
487
|
|
|
506
|
-
export const
|
|
488
|
+
export const CreatePromptResponseFormatPromptsType = {
|
|
507
489
|
JsonSchema: "json_schema",
|
|
508
490
|
} as const;
|
|
509
|
-
export type
|
|
510
|
-
typeof
|
|
491
|
+
export type CreatePromptResponseFormatPromptsType = ClosedEnum<
|
|
492
|
+
typeof CreatePromptResponseFormatPromptsType
|
|
511
493
|
>;
|
|
512
494
|
|
|
513
495
|
export type CreatePromptResponseFormatJsonSchema = {
|
|
@@ -516,8 +498,8 @@ export type CreatePromptResponseFormatJsonSchema = {
|
|
|
516
498
|
schema: { [k: string]: any };
|
|
517
499
|
};
|
|
518
500
|
|
|
519
|
-
export type
|
|
520
|
-
type:
|
|
501
|
+
export type CreatePromptResponseFormat1 = {
|
|
502
|
+
type: CreatePromptResponseFormatPromptsType;
|
|
521
503
|
jsonSchema: CreatePromptResponseFormatJsonSchema;
|
|
522
504
|
};
|
|
523
505
|
|
|
@@ -532,42 +514,42 @@ export type CreatePromptResponseFormatPrompts1 = {
|
|
|
532
514
|
*
|
|
533
515
|
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
534
516
|
*/
|
|
535
|
-
export type
|
|
536
|
-
|
|
|
537
|
-
|
|
|
517
|
+
export type CreatePromptResponseFormat =
|
|
518
|
+
| CreatePromptResponseFormat2
|
|
519
|
+
| CreatePromptResponseFormat1;
|
|
538
520
|
|
|
539
521
|
/**
|
|
540
522
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
541
523
|
*/
|
|
542
|
-
export const
|
|
524
|
+
export const CreatePromptPhotoRealVersion = {
|
|
543
525
|
V1: "v1",
|
|
544
526
|
V2: "v2",
|
|
545
527
|
} as const;
|
|
546
528
|
/**
|
|
547
529
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
548
530
|
*/
|
|
549
|
-
export type
|
|
550
|
-
typeof
|
|
531
|
+
export type CreatePromptPhotoRealVersion = ClosedEnum<
|
|
532
|
+
typeof CreatePromptPhotoRealVersion
|
|
551
533
|
>;
|
|
552
534
|
|
|
553
535
|
/**
|
|
554
536
|
* The format to return the embeddings
|
|
555
537
|
*/
|
|
556
|
-
export const
|
|
538
|
+
export const CreatePromptEncodingFormat = {
|
|
557
539
|
Float: "float",
|
|
558
540
|
Base64: "base64",
|
|
559
541
|
} as const;
|
|
560
542
|
/**
|
|
561
543
|
* The format to return the embeddings
|
|
562
544
|
*/
|
|
563
|
-
export type
|
|
564
|
-
typeof
|
|
545
|
+
export type CreatePromptEncodingFormat = ClosedEnum<
|
|
546
|
+
typeof CreatePromptEncodingFormat
|
|
565
547
|
>;
|
|
566
548
|
|
|
567
549
|
/**
|
|
568
550
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
569
551
|
*/
|
|
570
|
-
export const
|
|
552
|
+
export const CreatePromptReasoningEffort = {
|
|
571
553
|
Low: "low",
|
|
572
554
|
Medium: "medium",
|
|
573
555
|
High: "high",
|
|
@@ -575,14 +557,14 @@ export const CreatePromptPromptsReasoningEffort = {
|
|
|
575
557
|
/**
|
|
576
558
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
577
559
|
*/
|
|
578
|
-
export type
|
|
579
|
-
typeof
|
|
560
|
+
export type CreatePromptReasoningEffort = ClosedEnum<
|
|
561
|
+
typeof CreatePromptReasoningEffort
|
|
580
562
|
>;
|
|
581
563
|
|
|
582
564
|
/**
|
|
583
565
|
* Model Parameters: Not all parameters apply to every model
|
|
584
566
|
*/
|
|
585
|
-
export type
|
|
567
|
+
export type CreatePromptModelParameters = {
|
|
586
568
|
/**
|
|
587
569
|
* Only supported on `chat` and `completion` models.
|
|
588
570
|
*/
|
|
@@ -626,7 +608,7 @@ export type CreatePromptPromptsModelParameters = {
|
|
|
626
608
|
/**
|
|
627
609
|
* Only supported on `image` models.
|
|
628
610
|
*/
|
|
629
|
-
quality?:
|
|
611
|
+
quality?: CreatePromptQuality | undefined;
|
|
630
612
|
/**
|
|
631
613
|
* Only supported on `image` models.
|
|
632
614
|
*/
|
|
@@ -643,29 +625,29 @@ export type CreatePromptPromptsModelParameters = {
|
|
|
643
625
|
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
644
626
|
*/
|
|
645
627
|
responseFormat?:
|
|
646
|
-
|
|
|
647
|
-
|
|
|
628
|
+
| CreatePromptResponseFormat2
|
|
629
|
+
| CreatePromptResponseFormat1
|
|
648
630
|
| null
|
|
649
631
|
| undefined;
|
|
650
632
|
/**
|
|
651
633
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
652
634
|
*/
|
|
653
|
-
photoRealVersion?:
|
|
635
|
+
photoRealVersion?: CreatePromptPhotoRealVersion | undefined;
|
|
654
636
|
/**
|
|
655
637
|
* The format to return the embeddings
|
|
656
638
|
*/
|
|
657
|
-
encodingFormat?:
|
|
639
|
+
encodingFormat?: CreatePromptEncodingFormat | undefined;
|
|
658
640
|
/**
|
|
659
641
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
660
642
|
*/
|
|
661
|
-
reasoningEffort?:
|
|
643
|
+
reasoningEffort?: CreatePromptReasoningEffort | undefined;
|
|
662
644
|
/**
|
|
663
645
|
* Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
|
|
664
646
|
*/
|
|
665
647
|
budgetTokens?: number | undefined;
|
|
666
648
|
};
|
|
667
649
|
|
|
668
|
-
export const
|
|
650
|
+
export const CreatePromptProvider = {
|
|
669
651
|
Cohere: "cohere",
|
|
670
652
|
Openai: "openai",
|
|
671
653
|
Anthropic: "anthropic",
|
|
@@ -685,9 +667,7 @@ export const CreatePromptPromptsProvider = {
|
|
|
685
667
|
Togetherai: "togetherai",
|
|
686
668
|
Elevenlabs: "elevenlabs",
|
|
687
669
|
} as const;
|
|
688
|
-
export type
|
|
689
|
-
typeof CreatePromptPromptsProvider
|
|
690
|
-
>;
|
|
670
|
+
export type CreatePromptProvider = ClosedEnum<typeof CreatePromptProvider>;
|
|
691
671
|
|
|
692
672
|
/**
|
|
693
673
|
* The role of the prompt message
|
|
@@ -802,7 +782,7 @@ export type CreatePromptPromptsMessages = {
|
|
|
802
782
|
/**
|
|
803
783
|
* A list of messages compatible with the openAI schema
|
|
804
784
|
*/
|
|
805
|
-
export type
|
|
785
|
+
export type CreatePromptPromptConfig = {
|
|
806
786
|
stream?: boolean | undefined;
|
|
807
787
|
model?: string | undefined;
|
|
808
788
|
/**
|
|
@@ -812,12 +792,12 @@ export type CreatePromptPromptsPromptConfig = {
|
|
|
812
792
|
/**
|
|
813
793
|
* The type of the model
|
|
814
794
|
*/
|
|
815
|
-
modelType?:
|
|
795
|
+
modelType?: CreatePromptModelType | undefined;
|
|
816
796
|
/**
|
|
817
797
|
* Model Parameters: Not all parameters apply to every model
|
|
818
798
|
*/
|
|
819
|
-
modelParameters?:
|
|
820
|
-
provider?:
|
|
799
|
+
modelParameters?: CreatePromptModelParameters | undefined;
|
|
800
|
+
provider?: CreatePromptProvider | undefined;
|
|
821
801
|
/**
|
|
822
802
|
* The id of the resource
|
|
823
803
|
*/
|
|
@@ -826,7 +806,7 @@ export type CreatePromptPromptsPromptConfig = {
|
|
|
826
806
|
messages: Array<CreatePromptPromptsMessages>;
|
|
827
807
|
};
|
|
828
808
|
|
|
829
|
-
export const
|
|
809
|
+
export const CreatePromptUseCases = {
|
|
830
810
|
Agents: "Agents",
|
|
831
811
|
AgentsSimulations: "Agents simulations",
|
|
832
812
|
APIInteraction: "API interaction",
|
|
@@ -844,14 +824,12 @@ export const CreatePromptPromptsUseCases = {
|
|
|
844
824
|
Summarization: "Summarization",
|
|
845
825
|
Tagging: "Tagging",
|
|
846
826
|
} as const;
|
|
847
|
-
export type
|
|
848
|
-
typeof CreatePromptPromptsUseCases
|
|
849
|
-
>;
|
|
827
|
+
export type CreatePromptUseCases = ClosedEnum<typeof CreatePromptUseCases>;
|
|
850
828
|
|
|
851
829
|
/**
|
|
852
830
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
853
831
|
*/
|
|
854
|
-
export const
|
|
832
|
+
export const CreatePromptLanguage = {
|
|
855
833
|
Chinese: "Chinese",
|
|
856
834
|
Dutch: "Dutch",
|
|
857
835
|
English: "English",
|
|
@@ -863,19 +841,17 @@ export const CreatePromptPromptsLanguage = {
|
|
|
863
841
|
/**
|
|
864
842
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
865
843
|
*/
|
|
866
|
-
export type
|
|
867
|
-
typeof CreatePromptPromptsLanguage
|
|
868
|
-
>;
|
|
844
|
+
export type CreatePromptLanguage = ClosedEnum<typeof CreatePromptLanguage>;
|
|
869
845
|
|
|
870
846
|
export type CreatePromptPromptsMetadata = {
|
|
871
847
|
/**
|
|
872
848
|
* A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
|
|
873
849
|
*/
|
|
874
|
-
useCases?: Array<
|
|
850
|
+
useCases?: Array<CreatePromptUseCases> | undefined;
|
|
875
851
|
/**
|
|
876
852
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
877
853
|
*/
|
|
878
|
-
language?:
|
|
854
|
+
language?: CreatePromptLanguage | undefined;
|
|
879
855
|
};
|
|
880
856
|
|
|
881
857
|
/**
|
|
@@ -901,29 +877,27 @@ export type CreatePromptResponseBody = {
|
|
|
901
877
|
/**
|
|
902
878
|
* A list of messages compatible with the openAI schema
|
|
903
879
|
*/
|
|
904
|
-
promptConfig:
|
|
880
|
+
promptConfig: CreatePromptPromptConfig;
|
|
905
881
|
metadata?: CreatePromptPromptsMetadata | undefined;
|
|
906
882
|
};
|
|
907
883
|
|
|
908
884
|
/** @internal */
|
|
909
|
-
export const
|
|
910
|
-
|
|
911
|
-
> = z.nativeEnum(CreatePromptModelType);
|
|
885
|
+
export const ModelType$inboundSchema: z.ZodNativeEnum<typeof ModelType> = z
|
|
886
|
+
.nativeEnum(ModelType);
|
|
912
887
|
|
|
913
888
|
/** @internal */
|
|
914
|
-
export const
|
|
915
|
-
|
|
916
|
-
> = CreatePromptModelType$inboundSchema;
|
|
889
|
+
export const ModelType$outboundSchema: z.ZodNativeEnum<typeof ModelType> =
|
|
890
|
+
ModelType$inboundSchema;
|
|
917
891
|
|
|
918
892
|
/**
|
|
919
893
|
* @internal
|
|
920
894
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
921
895
|
*/
|
|
922
|
-
export namespace
|
|
923
|
-
/** @deprecated use `
|
|
924
|
-
export const inboundSchema =
|
|
925
|
-
/** @deprecated use `
|
|
926
|
-
export const outboundSchema =
|
|
896
|
+
export namespace ModelType$ {
|
|
897
|
+
/** @deprecated use `ModelType$inboundSchema` instead. */
|
|
898
|
+
export const inboundSchema = ModelType$inboundSchema;
|
|
899
|
+
/** @deprecated use `ModelType$outboundSchema` instead. */
|
|
900
|
+
export const outboundSchema = ModelType$outboundSchema;
|
|
927
901
|
}
|
|
928
902
|
|
|
929
903
|
/** @internal */
|
|
@@ -948,130 +922,121 @@ export namespace CreatePromptFormat$ {
|
|
|
948
922
|
}
|
|
949
923
|
|
|
950
924
|
/** @internal */
|
|
951
|
-
export const
|
|
952
|
-
|
|
953
|
-
> = z.nativeEnum(CreatePromptQuality);
|
|
925
|
+
export const Quality$inboundSchema: z.ZodNativeEnum<typeof Quality> = z
|
|
926
|
+
.nativeEnum(Quality);
|
|
954
927
|
|
|
955
928
|
/** @internal */
|
|
956
|
-
export const
|
|
957
|
-
|
|
958
|
-
> = CreatePromptQuality$inboundSchema;
|
|
929
|
+
export const Quality$outboundSchema: z.ZodNativeEnum<typeof Quality> =
|
|
930
|
+
Quality$inboundSchema;
|
|
959
931
|
|
|
960
932
|
/**
|
|
961
933
|
* @internal
|
|
962
934
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
963
935
|
*/
|
|
964
|
-
export namespace
|
|
965
|
-
/** @deprecated use `
|
|
966
|
-
export const inboundSchema =
|
|
967
|
-
/** @deprecated use `
|
|
968
|
-
export const outboundSchema =
|
|
936
|
+
export namespace Quality$ {
|
|
937
|
+
/** @deprecated use `Quality$inboundSchema` instead. */
|
|
938
|
+
export const inboundSchema = Quality$inboundSchema;
|
|
939
|
+
/** @deprecated use `Quality$outboundSchema` instead. */
|
|
940
|
+
export const outboundSchema = Quality$outboundSchema;
|
|
969
941
|
}
|
|
970
942
|
|
|
971
943
|
/** @internal */
|
|
972
|
-
export const
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
);
|
|
944
|
+
export const CreatePromptResponseFormatType$inboundSchema: z.ZodNativeEnum<
|
|
945
|
+
typeof CreatePromptResponseFormatType
|
|
946
|
+
> = z.nativeEnum(CreatePromptResponseFormatType);
|
|
976
947
|
|
|
977
948
|
/** @internal */
|
|
978
|
-
export const
|
|
979
|
-
|
|
980
|
-
|
|
949
|
+
export const CreatePromptResponseFormatType$outboundSchema: z.ZodNativeEnum<
|
|
950
|
+
typeof CreatePromptResponseFormatType
|
|
951
|
+
> = CreatePromptResponseFormatType$inboundSchema;
|
|
981
952
|
|
|
982
953
|
/**
|
|
983
954
|
* @internal
|
|
984
955
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
985
956
|
*/
|
|
986
|
-
export namespace
|
|
987
|
-
/** @deprecated use `
|
|
988
|
-
export const inboundSchema =
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
export const outboundSchema =
|
|
992
|
-
CreatePromptResponseFormatPromptsType$outboundSchema;
|
|
957
|
+
export namespace CreatePromptResponseFormatType$ {
|
|
958
|
+
/** @deprecated use `CreatePromptResponseFormatType$inboundSchema` instead. */
|
|
959
|
+
export const inboundSchema = CreatePromptResponseFormatType$inboundSchema;
|
|
960
|
+
/** @deprecated use `CreatePromptResponseFormatType$outboundSchema` instead. */
|
|
961
|
+
export const outboundSchema = CreatePromptResponseFormatType$outboundSchema;
|
|
993
962
|
}
|
|
994
963
|
|
|
995
964
|
/** @internal */
|
|
996
|
-
export const
|
|
997
|
-
|
|
965
|
+
export const ResponseFormat2$inboundSchema: z.ZodType<
|
|
966
|
+
ResponseFormat2,
|
|
998
967
|
z.ZodTypeDef,
|
|
999
968
|
unknown
|
|
1000
969
|
> = z.object({
|
|
1001
|
-
type:
|
|
970
|
+
type: CreatePromptResponseFormatType$inboundSchema,
|
|
1002
971
|
});
|
|
1003
972
|
|
|
1004
973
|
/** @internal */
|
|
1005
|
-
export type
|
|
974
|
+
export type ResponseFormat2$Outbound = {
|
|
1006
975
|
type: string;
|
|
1007
976
|
};
|
|
1008
977
|
|
|
1009
978
|
/** @internal */
|
|
1010
|
-
export const
|
|
1011
|
-
|
|
979
|
+
export const ResponseFormat2$outboundSchema: z.ZodType<
|
|
980
|
+
ResponseFormat2$Outbound,
|
|
1012
981
|
z.ZodTypeDef,
|
|
1013
|
-
|
|
982
|
+
ResponseFormat2
|
|
1014
983
|
> = z.object({
|
|
1015
|
-
type:
|
|
984
|
+
type: CreatePromptResponseFormatType$outboundSchema,
|
|
1016
985
|
});
|
|
1017
986
|
|
|
1018
987
|
/**
|
|
1019
988
|
* @internal
|
|
1020
989
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1021
990
|
*/
|
|
1022
|
-
export namespace
|
|
1023
|
-
/** @deprecated use `
|
|
1024
|
-
export const inboundSchema =
|
|
1025
|
-
/** @deprecated use `
|
|
1026
|
-
export const outboundSchema =
|
|
1027
|
-
/** @deprecated use `
|
|
1028
|
-
export type Outbound =
|
|
991
|
+
export namespace ResponseFormat2$ {
|
|
992
|
+
/** @deprecated use `ResponseFormat2$inboundSchema` instead. */
|
|
993
|
+
export const inboundSchema = ResponseFormat2$inboundSchema;
|
|
994
|
+
/** @deprecated use `ResponseFormat2$outboundSchema` instead. */
|
|
995
|
+
export const outboundSchema = ResponseFormat2$outboundSchema;
|
|
996
|
+
/** @deprecated use `ResponseFormat2$Outbound` instead. */
|
|
997
|
+
export type Outbound = ResponseFormat2$Outbound;
|
|
1029
998
|
}
|
|
1030
999
|
|
|
1031
|
-
export function
|
|
1032
|
-
|
|
1000
|
+
export function responseFormat2ToJSON(
|
|
1001
|
+
responseFormat2: ResponseFormat2,
|
|
1033
1002
|
): string {
|
|
1034
|
-
return JSON.stringify(
|
|
1035
|
-
CreatePromptResponseFormat2$outboundSchema.parse(
|
|
1036
|
-
createPromptResponseFormat2,
|
|
1037
|
-
),
|
|
1038
|
-
);
|
|
1003
|
+
return JSON.stringify(ResponseFormat2$outboundSchema.parse(responseFormat2));
|
|
1039
1004
|
}
|
|
1040
1005
|
|
|
1041
|
-
export function
|
|
1006
|
+
export function responseFormat2FromJSON(
|
|
1042
1007
|
jsonString: string,
|
|
1043
|
-
): SafeParseResult<
|
|
1008
|
+
): SafeParseResult<ResponseFormat2, SDKValidationError> {
|
|
1044
1009
|
return safeParse(
|
|
1045
1010
|
jsonString,
|
|
1046
|
-
(x) =>
|
|
1047
|
-
`Failed to parse '
|
|
1011
|
+
(x) => ResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
1012
|
+
`Failed to parse 'ResponseFormat2' from JSON`,
|
|
1048
1013
|
);
|
|
1049
1014
|
}
|
|
1050
1015
|
|
|
1051
1016
|
/** @internal */
|
|
1052
|
-
export const
|
|
1053
|
-
typeof
|
|
1054
|
-
> = z.nativeEnum(
|
|
1017
|
+
export const ResponseFormatType$inboundSchema: z.ZodNativeEnum<
|
|
1018
|
+
typeof ResponseFormatType
|
|
1019
|
+
> = z.nativeEnum(ResponseFormatType);
|
|
1055
1020
|
|
|
1056
1021
|
/** @internal */
|
|
1057
|
-
export const
|
|
1058
|
-
typeof
|
|
1059
|
-
> =
|
|
1022
|
+
export const ResponseFormatType$outboundSchema: z.ZodNativeEnum<
|
|
1023
|
+
typeof ResponseFormatType
|
|
1024
|
+
> = ResponseFormatType$inboundSchema;
|
|
1060
1025
|
|
|
1061
1026
|
/**
|
|
1062
1027
|
* @internal
|
|
1063
1028
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1064
1029
|
*/
|
|
1065
|
-
export namespace
|
|
1066
|
-
/** @deprecated use `
|
|
1067
|
-
export const inboundSchema =
|
|
1068
|
-
/** @deprecated use `
|
|
1069
|
-
export const outboundSchema =
|
|
1030
|
+
export namespace ResponseFormatType$ {
|
|
1031
|
+
/** @deprecated use `ResponseFormatType$inboundSchema` instead. */
|
|
1032
|
+
export const inboundSchema = ResponseFormatType$inboundSchema;
|
|
1033
|
+
/** @deprecated use `ResponseFormatType$outboundSchema` instead. */
|
|
1034
|
+
export const outboundSchema = ResponseFormatType$outboundSchema;
|
|
1070
1035
|
}
|
|
1071
1036
|
|
|
1072
1037
|
/** @internal */
|
|
1073
|
-
export const
|
|
1074
|
-
|
|
1038
|
+
export const JsonSchema$inboundSchema: z.ZodType<
|
|
1039
|
+
JsonSchema,
|
|
1075
1040
|
z.ZodTypeDef,
|
|
1076
1041
|
unknown
|
|
1077
1042
|
> = z.object({
|
|
@@ -1081,17 +1046,17 @@ export const ResponseFormatJsonSchema$inboundSchema: z.ZodType<
|
|
|
1081
1046
|
});
|
|
1082
1047
|
|
|
1083
1048
|
/** @internal */
|
|
1084
|
-
export type
|
|
1049
|
+
export type JsonSchema$Outbound = {
|
|
1085
1050
|
name: string;
|
|
1086
1051
|
strict: boolean;
|
|
1087
1052
|
schema: { [k: string]: any };
|
|
1088
1053
|
};
|
|
1089
1054
|
|
|
1090
1055
|
/** @internal */
|
|
1091
|
-
export const
|
|
1092
|
-
|
|
1056
|
+
export const JsonSchema$outboundSchema: z.ZodType<
|
|
1057
|
+
JsonSchema$Outbound,
|
|
1093
1058
|
z.ZodTypeDef,
|
|
1094
|
-
|
|
1059
|
+
JsonSchema
|
|
1095
1060
|
> = z.object({
|
|
1096
1061
|
name: z.string(),
|
|
1097
1062
|
strict: z.boolean(),
|
|
@@ -1102,41 +1067,37 @@ export const ResponseFormatJsonSchema$outboundSchema: z.ZodType<
|
|
|
1102
1067
|
* @internal
|
|
1103
1068
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1104
1069
|
*/
|
|
1105
|
-
export namespace
|
|
1106
|
-
/** @deprecated use `
|
|
1107
|
-
export const inboundSchema =
|
|
1108
|
-
/** @deprecated use `
|
|
1109
|
-
export const outboundSchema =
|
|
1110
|
-
/** @deprecated use `
|
|
1111
|
-
export type Outbound =
|
|
1070
|
+
export namespace JsonSchema$ {
|
|
1071
|
+
/** @deprecated use `JsonSchema$inboundSchema` instead. */
|
|
1072
|
+
export const inboundSchema = JsonSchema$inboundSchema;
|
|
1073
|
+
/** @deprecated use `JsonSchema$outboundSchema` instead. */
|
|
1074
|
+
export const outboundSchema = JsonSchema$outboundSchema;
|
|
1075
|
+
/** @deprecated use `JsonSchema$Outbound` instead. */
|
|
1076
|
+
export type Outbound = JsonSchema$Outbound;
|
|
1112
1077
|
}
|
|
1113
1078
|
|
|
1114
|
-
export function
|
|
1115
|
-
|
|
1116
|
-
): string {
|
|
1117
|
-
return JSON.stringify(
|
|
1118
|
-
ResponseFormatJsonSchema$outboundSchema.parse(responseFormatJsonSchema),
|
|
1119
|
-
);
|
|
1079
|
+
export function jsonSchemaToJSON(jsonSchema: JsonSchema): string {
|
|
1080
|
+
return JSON.stringify(JsonSchema$outboundSchema.parse(jsonSchema));
|
|
1120
1081
|
}
|
|
1121
1082
|
|
|
1122
|
-
export function
|
|
1083
|
+
export function jsonSchemaFromJSON(
|
|
1123
1084
|
jsonString: string,
|
|
1124
|
-
): SafeParseResult<
|
|
1085
|
+
): SafeParseResult<JsonSchema, SDKValidationError> {
|
|
1125
1086
|
return safeParse(
|
|
1126
1087
|
jsonString,
|
|
1127
|
-
(x) =>
|
|
1128
|
-
`Failed to parse '
|
|
1088
|
+
(x) => JsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
1089
|
+
`Failed to parse 'JsonSchema' from JSON`,
|
|
1129
1090
|
);
|
|
1130
1091
|
}
|
|
1131
1092
|
|
|
1132
1093
|
/** @internal */
|
|
1133
|
-
export const
|
|
1134
|
-
|
|
1094
|
+
export const ResponseFormat1$inboundSchema: z.ZodType<
|
|
1095
|
+
ResponseFormat1,
|
|
1135
1096
|
z.ZodTypeDef,
|
|
1136
1097
|
unknown
|
|
1137
1098
|
> = z.object({
|
|
1138
|
-
type:
|
|
1139
|
-
json_schema: z.lazy(() =>
|
|
1099
|
+
type: ResponseFormatType$inboundSchema,
|
|
1100
|
+
json_schema: z.lazy(() => JsonSchema$inboundSchema),
|
|
1140
1101
|
}).transform((v) => {
|
|
1141
1102
|
return remap$(v, {
|
|
1142
1103
|
"json_schema": "jsonSchema",
|
|
@@ -1144,19 +1105,19 @@ export const CreatePromptResponseFormat1$inboundSchema: z.ZodType<
|
|
|
1144
1105
|
});
|
|
1145
1106
|
|
|
1146
1107
|
/** @internal */
|
|
1147
|
-
export type
|
|
1108
|
+
export type ResponseFormat1$Outbound = {
|
|
1148
1109
|
type: string;
|
|
1149
|
-
json_schema:
|
|
1110
|
+
json_schema: JsonSchema$Outbound;
|
|
1150
1111
|
};
|
|
1151
1112
|
|
|
1152
1113
|
/** @internal */
|
|
1153
|
-
export const
|
|
1154
|
-
|
|
1114
|
+
export const ResponseFormat1$outboundSchema: z.ZodType<
|
|
1115
|
+
ResponseFormat1$Outbound,
|
|
1155
1116
|
z.ZodTypeDef,
|
|
1156
|
-
|
|
1117
|
+
ResponseFormat1
|
|
1157
1118
|
> = z.object({
|
|
1158
|
-
type:
|
|
1159
|
-
jsonSchema: z.lazy(() =>
|
|
1119
|
+
type: ResponseFormatType$outboundSchema,
|
|
1120
|
+
jsonSchema: z.lazy(() => JsonSchema$outboundSchema),
|
|
1160
1121
|
}).transform((v) => {
|
|
1161
1122
|
return remap$(v, {
|
|
1162
1123
|
jsonSchema: "json_schema",
|
|
@@ -1167,157 +1128,149 @@ export const CreatePromptResponseFormat1$outboundSchema: z.ZodType<
|
|
|
1167
1128
|
* @internal
|
|
1168
1129
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1169
1130
|
*/
|
|
1170
|
-
export namespace
|
|
1171
|
-
/** @deprecated use `
|
|
1172
|
-
export const inboundSchema =
|
|
1173
|
-
/** @deprecated use `
|
|
1174
|
-
export const outboundSchema =
|
|
1175
|
-
/** @deprecated use `
|
|
1176
|
-
export type Outbound =
|
|
1131
|
+
export namespace ResponseFormat1$ {
|
|
1132
|
+
/** @deprecated use `ResponseFormat1$inboundSchema` instead. */
|
|
1133
|
+
export const inboundSchema = ResponseFormat1$inboundSchema;
|
|
1134
|
+
/** @deprecated use `ResponseFormat1$outboundSchema` instead. */
|
|
1135
|
+
export const outboundSchema = ResponseFormat1$outboundSchema;
|
|
1136
|
+
/** @deprecated use `ResponseFormat1$Outbound` instead. */
|
|
1137
|
+
export type Outbound = ResponseFormat1$Outbound;
|
|
1177
1138
|
}
|
|
1178
1139
|
|
|
1179
|
-
export function
|
|
1180
|
-
|
|
1140
|
+
export function responseFormat1ToJSON(
|
|
1141
|
+
responseFormat1: ResponseFormat1,
|
|
1181
1142
|
): string {
|
|
1182
|
-
return JSON.stringify(
|
|
1183
|
-
CreatePromptResponseFormat1$outboundSchema.parse(
|
|
1184
|
-
createPromptResponseFormat1,
|
|
1185
|
-
),
|
|
1186
|
-
);
|
|
1143
|
+
return JSON.stringify(ResponseFormat1$outboundSchema.parse(responseFormat1));
|
|
1187
1144
|
}
|
|
1188
1145
|
|
|
1189
|
-
export function
|
|
1146
|
+
export function responseFormat1FromJSON(
|
|
1190
1147
|
jsonString: string,
|
|
1191
|
-
): SafeParseResult<
|
|
1148
|
+
): SafeParseResult<ResponseFormat1, SDKValidationError> {
|
|
1192
1149
|
return safeParse(
|
|
1193
1150
|
jsonString,
|
|
1194
|
-
(x) =>
|
|
1195
|
-
`Failed to parse '
|
|
1151
|
+
(x) => ResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
1152
|
+
`Failed to parse 'ResponseFormat1' from JSON`,
|
|
1196
1153
|
);
|
|
1197
1154
|
}
|
|
1198
1155
|
|
|
1199
1156
|
/** @internal */
|
|
1200
|
-
export const
|
|
1201
|
-
|
|
1157
|
+
export const ResponseFormat$inboundSchema: z.ZodType<
|
|
1158
|
+
ResponseFormat,
|
|
1202
1159
|
z.ZodTypeDef,
|
|
1203
1160
|
unknown
|
|
1204
1161
|
> = z.union([
|
|
1205
|
-
z.lazy(() =>
|
|
1206
|
-
z.lazy(() =>
|
|
1162
|
+
z.lazy(() => ResponseFormat2$inboundSchema),
|
|
1163
|
+
z.lazy(() => ResponseFormat1$inboundSchema),
|
|
1207
1164
|
]);
|
|
1208
1165
|
|
|
1209
1166
|
/** @internal */
|
|
1210
|
-
export type
|
|
1211
|
-
|
|
|
1212
|
-
|
|
|
1167
|
+
export type ResponseFormat$Outbound =
|
|
1168
|
+
| ResponseFormat2$Outbound
|
|
1169
|
+
| ResponseFormat1$Outbound;
|
|
1213
1170
|
|
|
1214
1171
|
/** @internal */
|
|
1215
|
-
export const
|
|
1216
|
-
|
|
1172
|
+
export const ResponseFormat$outboundSchema: z.ZodType<
|
|
1173
|
+
ResponseFormat$Outbound,
|
|
1217
1174
|
z.ZodTypeDef,
|
|
1218
|
-
|
|
1175
|
+
ResponseFormat
|
|
1219
1176
|
> = z.union([
|
|
1220
|
-
z.lazy(() =>
|
|
1221
|
-
z.lazy(() =>
|
|
1177
|
+
z.lazy(() => ResponseFormat2$outboundSchema),
|
|
1178
|
+
z.lazy(() => ResponseFormat1$outboundSchema),
|
|
1222
1179
|
]);
|
|
1223
1180
|
|
|
1224
1181
|
/**
|
|
1225
1182
|
* @internal
|
|
1226
1183
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1227
1184
|
*/
|
|
1228
|
-
export namespace
|
|
1229
|
-
/** @deprecated use `
|
|
1230
|
-
export const inboundSchema =
|
|
1231
|
-
/** @deprecated use `
|
|
1232
|
-
export const outboundSchema =
|
|
1233
|
-
/** @deprecated use `
|
|
1234
|
-
export type Outbound =
|
|
1185
|
+
export namespace ResponseFormat$ {
|
|
1186
|
+
/** @deprecated use `ResponseFormat$inboundSchema` instead. */
|
|
1187
|
+
export const inboundSchema = ResponseFormat$inboundSchema;
|
|
1188
|
+
/** @deprecated use `ResponseFormat$outboundSchema` instead. */
|
|
1189
|
+
export const outboundSchema = ResponseFormat$outboundSchema;
|
|
1190
|
+
/** @deprecated use `ResponseFormat$Outbound` instead. */
|
|
1191
|
+
export type Outbound = ResponseFormat$Outbound;
|
|
1235
1192
|
}
|
|
1236
1193
|
|
|
1237
|
-
export function
|
|
1238
|
-
|
|
1239
|
-
): string {
|
|
1240
|
-
return JSON.stringify(
|
|
1241
|
-
CreatePromptResponseFormat$outboundSchema.parse(createPromptResponseFormat),
|
|
1242
|
-
);
|
|
1194
|
+
export function responseFormatToJSON(responseFormat: ResponseFormat): string {
|
|
1195
|
+
return JSON.stringify(ResponseFormat$outboundSchema.parse(responseFormat));
|
|
1243
1196
|
}
|
|
1244
1197
|
|
|
1245
|
-
export function
|
|
1198
|
+
export function responseFormatFromJSON(
|
|
1246
1199
|
jsonString: string,
|
|
1247
|
-
): SafeParseResult<
|
|
1200
|
+
): SafeParseResult<ResponseFormat, SDKValidationError> {
|
|
1248
1201
|
return safeParse(
|
|
1249
1202
|
jsonString,
|
|
1250
|
-
(x) =>
|
|
1251
|
-
`Failed to parse '
|
|
1203
|
+
(x) => ResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1204
|
+
`Failed to parse 'ResponseFormat' from JSON`,
|
|
1252
1205
|
);
|
|
1253
1206
|
}
|
|
1254
1207
|
|
|
1255
1208
|
/** @internal */
|
|
1256
|
-
export const
|
|
1257
|
-
typeof
|
|
1258
|
-
> = z.nativeEnum(
|
|
1209
|
+
export const PhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
1210
|
+
typeof PhotoRealVersion
|
|
1211
|
+
> = z.nativeEnum(PhotoRealVersion);
|
|
1259
1212
|
|
|
1260
1213
|
/** @internal */
|
|
1261
|
-
export const
|
|
1262
|
-
typeof
|
|
1263
|
-
> =
|
|
1214
|
+
export const PhotoRealVersion$outboundSchema: z.ZodNativeEnum<
|
|
1215
|
+
typeof PhotoRealVersion
|
|
1216
|
+
> = PhotoRealVersion$inboundSchema;
|
|
1264
1217
|
|
|
1265
1218
|
/**
|
|
1266
1219
|
* @internal
|
|
1267
1220
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1268
1221
|
*/
|
|
1269
|
-
export namespace
|
|
1270
|
-
/** @deprecated use `
|
|
1271
|
-
export const inboundSchema =
|
|
1272
|
-
/** @deprecated use `
|
|
1273
|
-
export const outboundSchema =
|
|
1222
|
+
export namespace PhotoRealVersion$ {
|
|
1223
|
+
/** @deprecated use `PhotoRealVersion$inboundSchema` instead. */
|
|
1224
|
+
export const inboundSchema = PhotoRealVersion$inboundSchema;
|
|
1225
|
+
/** @deprecated use `PhotoRealVersion$outboundSchema` instead. */
|
|
1226
|
+
export const outboundSchema = PhotoRealVersion$outboundSchema;
|
|
1274
1227
|
}
|
|
1275
1228
|
|
|
1276
1229
|
/** @internal */
|
|
1277
|
-
export const
|
|
1278
|
-
typeof
|
|
1279
|
-
> = z.nativeEnum(
|
|
1230
|
+
export const EncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
1231
|
+
typeof EncodingFormat
|
|
1232
|
+
> = z.nativeEnum(EncodingFormat);
|
|
1280
1233
|
|
|
1281
1234
|
/** @internal */
|
|
1282
|
-
export const
|
|
1283
|
-
typeof
|
|
1284
|
-
> =
|
|
1235
|
+
export const EncodingFormat$outboundSchema: z.ZodNativeEnum<
|
|
1236
|
+
typeof EncodingFormat
|
|
1237
|
+
> = EncodingFormat$inboundSchema;
|
|
1285
1238
|
|
|
1286
1239
|
/**
|
|
1287
1240
|
* @internal
|
|
1288
1241
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1289
1242
|
*/
|
|
1290
|
-
export namespace
|
|
1291
|
-
/** @deprecated use `
|
|
1292
|
-
export const inboundSchema =
|
|
1293
|
-
/** @deprecated use `
|
|
1294
|
-
export const outboundSchema =
|
|
1243
|
+
export namespace EncodingFormat$ {
|
|
1244
|
+
/** @deprecated use `EncodingFormat$inboundSchema` instead. */
|
|
1245
|
+
export const inboundSchema = EncodingFormat$inboundSchema;
|
|
1246
|
+
/** @deprecated use `EncodingFormat$outboundSchema` instead. */
|
|
1247
|
+
export const outboundSchema = EncodingFormat$outboundSchema;
|
|
1295
1248
|
}
|
|
1296
1249
|
|
|
1297
1250
|
/** @internal */
|
|
1298
|
-
export const
|
|
1299
|
-
typeof
|
|
1300
|
-
> = z.nativeEnum(
|
|
1251
|
+
export const ReasoningEffort$inboundSchema: z.ZodNativeEnum<
|
|
1252
|
+
typeof ReasoningEffort
|
|
1253
|
+
> = z.nativeEnum(ReasoningEffort);
|
|
1301
1254
|
|
|
1302
1255
|
/** @internal */
|
|
1303
|
-
export const
|
|
1304
|
-
typeof
|
|
1305
|
-
> =
|
|
1256
|
+
export const ReasoningEffort$outboundSchema: z.ZodNativeEnum<
|
|
1257
|
+
typeof ReasoningEffort
|
|
1258
|
+
> = ReasoningEffort$inboundSchema;
|
|
1306
1259
|
|
|
1307
1260
|
/**
|
|
1308
1261
|
* @internal
|
|
1309
1262
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1310
1263
|
*/
|
|
1311
|
-
export namespace
|
|
1312
|
-
/** @deprecated use `
|
|
1313
|
-
export const inboundSchema =
|
|
1314
|
-
/** @deprecated use `
|
|
1315
|
-
export const outboundSchema =
|
|
1264
|
+
export namespace ReasoningEffort$ {
|
|
1265
|
+
/** @deprecated use `ReasoningEffort$inboundSchema` instead. */
|
|
1266
|
+
export const inboundSchema = ReasoningEffort$inboundSchema;
|
|
1267
|
+
/** @deprecated use `ReasoningEffort$outboundSchema` instead. */
|
|
1268
|
+
export const outboundSchema = ReasoningEffort$outboundSchema;
|
|
1316
1269
|
}
|
|
1317
1270
|
|
|
1318
1271
|
/** @internal */
|
|
1319
|
-
export const
|
|
1320
|
-
|
|
1272
|
+
export const ModelParameters$inboundSchema: z.ZodType<
|
|
1273
|
+
ModelParameters,
|
|
1321
1274
|
z.ZodTypeDef,
|
|
1322
1275
|
unknown
|
|
1323
1276
|
> = z.object({
|
|
@@ -1331,17 +1284,17 @@ export const CreatePromptModelParameters$inboundSchema: z.ZodType<
|
|
|
1331
1284
|
seed: z.number().optional(),
|
|
1332
1285
|
format: CreatePromptFormat$inboundSchema.optional(),
|
|
1333
1286
|
dimensions: z.string().optional(),
|
|
1334
|
-
quality:
|
|
1287
|
+
quality: Quality$inboundSchema.optional(),
|
|
1335
1288
|
style: z.string().optional(),
|
|
1336
1289
|
responseFormat: z.nullable(
|
|
1337
1290
|
z.union([
|
|
1338
|
-
z.lazy(() =>
|
|
1339
|
-
z.lazy(() =>
|
|
1291
|
+
z.lazy(() => ResponseFormat2$inboundSchema),
|
|
1292
|
+
z.lazy(() => ResponseFormat1$inboundSchema),
|
|
1340
1293
|
]),
|
|
1341
1294
|
).optional(),
|
|
1342
|
-
photoRealVersion:
|
|
1343
|
-
encoding_format:
|
|
1344
|
-
reasoningEffort:
|
|
1295
|
+
photoRealVersion: PhotoRealVersion$inboundSchema.optional(),
|
|
1296
|
+
encoding_format: EncodingFormat$inboundSchema.optional(),
|
|
1297
|
+
reasoningEffort: ReasoningEffort$inboundSchema.optional(),
|
|
1345
1298
|
budgetTokens: z.number().optional(),
|
|
1346
1299
|
}).transform((v) => {
|
|
1347
1300
|
return remap$(v, {
|
|
@@ -1350,7 +1303,7 @@ export const CreatePromptModelParameters$inboundSchema: z.ZodType<
|
|
|
1350
1303
|
});
|
|
1351
1304
|
|
|
1352
1305
|
/** @internal */
|
|
1353
|
-
export type
|
|
1306
|
+
export type ModelParameters$Outbound = {
|
|
1354
1307
|
temperature?: number | undefined;
|
|
1355
1308
|
maxTokens?: number | undefined;
|
|
1356
1309
|
topK?: number | undefined;
|
|
@@ -1364,8 +1317,8 @@ export type CreatePromptModelParameters$Outbound = {
|
|
|
1364
1317
|
quality?: string | undefined;
|
|
1365
1318
|
style?: string | undefined;
|
|
1366
1319
|
responseFormat?:
|
|
1367
|
-
|
|
|
1368
|
-
|
|
|
1320
|
+
| ResponseFormat2$Outbound
|
|
1321
|
+
| ResponseFormat1$Outbound
|
|
1369
1322
|
| null
|
|
1370
1323
|
| undefined;
|
|
1371
1324
|
photoRealVersion?: string | undefined;
|
|
@@ -1375,10 +1328,10 @@ export type CreatePromptModelParameters$Outbound = {
|
|
|
1375
1328
|
};
|
|
1376
1329
|
|
|
1377
1330
|
/** @internal */
|
|
1378
|
-
export const
|
|
1379
|
-
|
|
1331
|
+
export const ModelParameters$outboundSchema: z.ZodType<
|
|
1332
|
+
ModelParameters$Outbound,
|
|
1380
1333
|
z.ZodTypeDef,
|
|
1381
|
-
|
|
1334
|
+
ModelParameters
|
|
1382
1335
|
> = z.object({
|
|
1383
1336
|
temperature: z.number().optional(),
|
|
1384
1337
|
maxTokens: z.number().optional(),
|
|
@@ -1390,17 +1343,17 @@ export const CreatePromptModelParameters$outboundSchema: z.ZodType<
|
|
|
1390
1343
|
seed: z.number().optional(),
|
|
1391
1344
|
format: CreatePromptFormat$outboundSchema.optional(),
|
|
1392
1345
|
dimensions: z.string().optional(),
|
|
1393
|
-
quality:
|
|
1346
|
+
quality: Quality$outboundSchema.optional(),
|
|
1394
1347
|
style: z.string().optional(),
|
|
1395
1348
|
responseFormat: z.nullable(
|
|
1396
1349
|
z.union([
|
|
1397
|
-
z.lazy(() =>
|
|
1398
|
-
z.lazy(() =>
|
|
1350
|
+
z.lazy(() => ResponseFormat2$outboundSchema),
|
|
1351
|
+
z.lazy(() => ResponseFormat1$outboundSchema),
|
|
1399
1352
|
]),
|
|
1400
1353
|
).optional(),
|
|
1401
|
-
photoRealVersion:
|
|
1402
|
-
encodingFormat:
|
|
1403
|
-
reasoningEffort:
|
|
1354
|
+
photoRealVersion: PhotoRealVersion$outboundSchema.optional(),
|
|
1355
|
+
encodingFormat: EncodingFormat$outboundSchema.optional(),
|
|
1356
|
+
reasoningEffort: ReasoningEffort$outboundSchema.optional(),
|
|
1404
1357
|
budgetTokens: z.number().optional(),
|
|
1405
1358
|
}).transform((v) => {
|
|
1406
1359
|
return remap$(v, {
|
|
@@ -1412,54 +1365,48 @@ export const CreatePromptModelParameters$outboundSchema: z.ZodType<
|
|
|
1412
1365
|
* @internal
|
|
1413
1366
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1414
1367
|
*/
|
|
1415
|
-
export namespace
|
|
1416
|
-
/** @deprecated use `
|
|
1417
|
-
export const inboundSchema =
|
|
1418
|
-
/** @deprecated use `
|
|
1419
|
-
export const outboundSchema =
|
|
1420
|
-
/** @deprecated use `
|
|
1421
|
-
export type Outbound =
|
|
1368
|
+
export namespace ModelParameters$ {
|
|
1369
|
+
/** @deprecated use `ModelParameters$inboundSchema` instead. */
|
|
1370
|
+
export const inboundSchema = ModelParameters$inboundSchema;
|
|
1371
|
+
/** @deprecated use `ModelParameters$outboundSchema` instead. */
|
|
1372
|
+
export const outboundSchema = ModelParameters$outboundSchema;
|
|
1373
|
+
/** @deprecated use `ModelParameters$Outbound` instead. */
|
|
1374
|
+
export type Outbound = ModelParameters$Outbound;
|
|
1422
1375
|
}
|
|
1423
1376
|
|
|
1424
|
-
export function
|
|
1425
|
-
|
|
1377
|
+
export function modelParametersToJSON(
|
|
1378
|
+
modelParameters: ModelParameters,
|
|
1426
1379
|
): string {
|
|
1427
|
-
return JSON.stringify(
|
|
1428
|
-
CreatePromptModelParameters$outboundSchema.parse(
|
|
1429
|
-
createPromptModelParameters,
|
|
1430
|
-
),
|
|
1431
|
-
);
|
|
1380
|
+
return JSON.stringify(ModelParameters$outboundSchema.parse(modelParameters));
|
|
1432
1381
|
}
|
|
1433
1382
|
|
|
1434
|
-
export function
|
|
1383
|
+
export function modelParametersFromJSON(
|
|
1435
1384
|
jsonString: string,
|
|
1436
|
-
): SafeParseResult<
|
|
1385
|
+
): SafeParseResult<ModelParameters, SDKValidationError> {
|
|
1437
1386
|
return safeParse(
|
|
1438
1387
|
jsonString,
|
|
1439
|
-
(x) =>
|
|
1440
|
-
`Failed to parse '
|
|
1388
|
+
(x) => ModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
1389
|
+
`Failed to parse 'ModelParameters' from JSON`,
|
|
1441
1390
|
);
|
|
1442
1391
|
}
|
|
1443
1392
|
|
|
1444
1393
|
/** @internal */
|
|
1445
|
-
export const
|
|
1446
|
-
|
|
1447
|
-
> = z.nativeEnum(CreatePromptProvider);
|
|
1394
|
+
export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
|
|
1395
|
+
.nativeEnum(Provider);
|
|
1448
1396
|
|
|
1449
1397
|
/** @internal */
|
|
1450
|
-
export const
|
|
1451
|
-
|
|
1452
|
-
> = CreatePromptProvider$inboundSchema;
|
|
1398
|
+
export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
|
|
1399
|
+
Provider$inboundSchema;
|
|
1453
1400
|
|
|
1454
1401
|
/**
|
|
1455
1402
|
* @internal
|
|
1456
1403
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1457
1404
|
*/
|
|
1458
|
-
export namespace
|
|
1459
|
-
/** @deprecated use `
|
|
1460
|
-
export const inboundSchema =
|
|
1461
|
-
/** @deprecated use `
|
|
1462
|
-
export const outboundSchema =
|
|
1405
|
+
export namespace Provider$ {
|
|
1406
|
+
/** @deprecated use `Provider$inboundSchema` instead. */
|
|
1407
|
+
export const inboundSchema = Provider$inboundSchema;
|
|
1408
|
+
/** @deprecated use `Provider$outboundSchema` instead. */
|
|
1409
|
+
export const outboundSchema = Provider$outboundSchema;
|
|
1463
1410
|
}
|
|
1464
1411
|
|
|
1465
1412
|
/** @internal */
|
|
@@ -2038,17 +1985,16 @@ export function createPromptMessagesFromJSON(
|
|
|
2038
1985
|
}
|
|
2039
1986
|
|
|
2040
1987
|
/** @internal */
|
|
2041
|
-
export const
|
|
2042
|
-
|
|
1988
|
+
export const PromptConfig$inboundSchema: z.ZodType<
|
|
1989
|
+
PromptConfig,
|
|
2043
1990
|
z.ZodTypeDef,
|
|
2044
1991
|
unknown
|
|
2045
1992
|
> = z.object({
|
|
2046
1993
|
stream: z.boolean().optional(),
|
|
2047
1994
|
model: z.string().optional(),
|
|
2048
|
-
model_type:
|
|
2049
|
-
model_parameters: z.lazy(() =>
|
|
2050
|
-
|
|
2051
|
-
provider: CreatePromptProvider$inboundSchema.optional(),
|
|
1995
|
+
model_type: ModelType$inboundSchema.optional(),
|
|
1996
|
+
model_parameters: z.lazy(() => ModelParameters$inboundSchema).optional(),
|
|
1997
|
+
provider: Provider$inboundSchema.optional(),
|
|
2052
1998
|
version: z.string().optional(),
|
|
2053
1999
|
messages: z.array(z.lazy(() => CreatePromptMessages$inboundSchema)),
|
|
2054
2000
|
}).transform((v) => {
|
|
@@ -2059,28 +2005,27 @@ export const CreatePromptPromptConfig$inboundSchema: z.ZodType<
|
|
|
2059
2005
|
});
|
|
2060
2006
|
|
|
2061
2007
|
/** @internal */
|
|
2062
|
-
export type
|
|
2008
|
+
export type PromptConfig$Outbound = {
|
|
2063
2009
|
stream?: boolean | undefined;
|
|
2064
2010
|
model?: string | undefined;
|
|
2065
2011
|
model_type?: string | undefined;
|
|
2066
|
-
model_parameters?:
|
|
2012
|
+
model_parameters?: ModelParameters$Outbound | undefined;
|
|
2067
2013
|
provider?: string | undefined;
|
|
2068
2014
|
version?: string | undefined;
|
|
2069
2015
|
messages: Array<CreatePromptMessages$Outbound>;
|
|
2070
2016
|
};
|
|
2071
2017
|
|
|
2072
2018
|
/** @internal */
|
|
2073
|
-
export const
|
|
2074
|
-
|
|
2019
|
+
export const PromptConfig$outboundSchema: z.ZodType<
|
|
2020
|
+
PromptConfig$Outbound,
|
|
2075
2021
|
z.ZodTypeDef,
|
|
2076
|
-
|
|
2022
|
+
PromptConfig
|
|
2077
2023
|
> = z.object({
|
|
2078
2024
|
stream: z.boolean().optional(),
|
|
2079
2025
|
model: z.string().optional(),
|
|
2080
|
-
modelType:
|
|
2081
|
-
modelParameters: z.lazy(() =>
|
|
2082
|
-
|
|
2083
|
-
provider: CreatePromptProvider$outboundSchema.optional(),
|
|
2026
|
+
modelType: ModelType$outboundSchema.optional(),
|
|
2027
|
+
modelParameters: z.lazy(() => ModelParameters$outboundSchema).optional(),
|
|
2028
|
+
provider: Provider$outboundSchema.optional(),
|
|
2084
2029
|
version: z.string().optional(),
|
|
2085
2030
|
messages: z.array(z.lazy(() => CreatePromptMessages$outboundSchema)),
|
|
2086
2031
|
}).transform((v) => {
|
|
@@ -2094,73 +2039,65 @@ export const CreatePromptPromptConfig$outboundSchema: z.ZodType<
|
|
|
2094
2039
|
* @internal
|
|
2095
2040
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2096
2041
|
*/
|
|
2097
|
-
export namespace
|
|
2098
|
-
/** @deprecated use `
|
|
2099
|
-
export const inboundSchema =
|
|
2100
|
-
/** @deprecated use `
|
|
2101
|
-
export const outboundSchema =
|
|
2102
|
-
/** @deprecated use `
|
|
2103
|
-
export type Outbound =
|
|
2042
|
+
export namespace PromptConfig$ {
|
|
2043
|
+
/** @deprecated use `PromptConfig$inboundSchema` instead. */
|
|
2044
|
+
export const inboundSchema = PromptConfig$inboundSchema;
|
|
2045
|
+
/** @deprecated use `PromptConfig$outboundSchema` instead. */
|
|
2046
|
+
export const outboundSchema = PromptConfig$outboundSchema;
|
|
2047
|
+
/** @deprecated use `PromptConfig$Outbound` instead. */
|
|
2048
|
+
export type Outbound = PromptConfig$Outbound;
|
|
2104
2049
|
}
|
|
2105
2050
|
|
|
2106
|
-
export function
|
|
2107
|
-
|
|
2108
|
-
): string {
|
|
2109
|
-
return JSON.stringify(
|
|
2110
|
-
CreatePromptPromptConfig$outboundSchema.parse(createPromptPromptConfig),
|
|
2111
|
-
);
|
|
2051
|
+
export function promptConfigToJSON(promptConfig: PromptConfig): string {
|
|
2052
|
+
return JSON.stringify(PromptConfig$outboundSchema.parse(promptConfig));
|
|
2112
2053
|
}
|
|
2113
2054
|
|
|
2114
|
-
export function
|
|
2055
|
+
export function promptConfigFromJSON(
|
|
2115
2056
|
jsonString: string,
|
|
2116
|
-
): SafeParseResult<
|
|
2057
|
+
): SafeParseResult<PromptConfig, SDKValidationError> {
|
|
2117
2058
|
return safeParse(
|
|
2118
2059
|
jsonString,
|
|
2119
|
-
(x) =>
|
|
2120
|
-
`Failed to parse '
|
|
2060
|
+
(x) => PromptConfig$inboundSchema.parse(JSON.parse(x)),
|
|
2061
|
+
`Failed to parse 'PromptConfig' from JSON`,
|
|
2121
2062
|
);
|
|
2122
2063
|
}
|
|
2123
2064
|
|
|
2124
2065
|
/** @internal */
|
|
2125
|
-
export const
|
|
2126
|
-
|
|
2127
|
-
> = z.nativeEnum(CreatePromptUseCases);
|
|
2066
|
+
export const UseCases$inboundSchema: z.ZodNativeEnum<typeof UseCases> = z
|
|
2067
|
+
.nativeEnum(UseCases);
|
|
2128
2068
|
|
|
2129
2069
|
/** @internal */
|
|
2130
|
-
export const
|
|
2131
|
-
|
|
2132
|
-
> = CreatePromptUseCases$inboundSchema;
|
|
2070
|
+
export const UseCases$outboundSchema: z.ZodNativeEnum<typeof UseCases> =
|
|
2071
|
+
UseCases$inboundSchema;
|
|
2133
2072
|
|
|
2134
2073
|
/**
|
|
2135
2074
|
* @internal
|
|
2136
2075
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2137
2076
|
*/
|
|
2138
|
-
export namespace
|
|
2139
|
-
/** @deprecated use `
|
|
2140
|
-
export const inboundSchema =
|
|
2141
|
-
/** @deprecated use `
|
|
2142
|
-
export const outboundSchema =
|
|
2077
|
+
export namespace UseCases$ {
|
|
2078
|
+
/** @deprecated use `UseCases$inboundSchema` instead. */
|
|
2079
|
+
export const inboundSchema = UseCases$inboundSchema;
|
|
2080
|
+
/** @deprecated use `UseCases$outboundSchema` instead. */
|
|
2081
|
+
export const outboundSchema = UseCases$outboundSchema;
|
|
2143
2082
|
}
|
|
2144
2083
|
|
|
2145
2084
|
/** @internal */
|
|
2146
|
-
export const
|
|
2147
|
-
|
|
2148
|
-
> = z.nativeEnum(CreatePromptLanguage);
|
|
2085
|
+
export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
|
|
2086
|
+
.nativeEnum(Language);
|
|
2149
2087
|
|
|
2150
2088
|
/** @internal */
|
|
2151
|
-
export const
|
|
2152
|
-
|
|
2153
|
-
> = CreatePromptLanguage$inboundSchema;
|
|
2089
|
+
export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
|
|
2090
|
+
Language$inboundSchema;
|
|
2154
2091
|
|
|
2155
2092
|
/**
|
|
2156
2093
|
* @internal
|
|
2157
2094
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2158
2095
|
*/
|
|
2159
|
-
export namespace
|
|
2160
|
-
/** @deprecated use `
|
|
2161
|
-
export const inboundSchema =
|
|
2162
|
-
/** @deprecated use `
|
|
2163
|
-
export const outboundSchema =
|
|
2096
|
+
export namespace Language$ {
|
|
2097
|
+
/** @deprecated use `Language$inboundSchema` instead. */
|
|
2098
|
+
export const inboundSchema = Language$inboundSchema;
|
|
2099
|
+
/** @deprecated use `Language$outboundSchema` instead. */
|
|
2100
|
+
export const outboundSchema = Language$outboundSchema;
|
|
2164
2101
|
}
|
|
2165
2102
|
|
|
2166
2103
|
/** @internal */
|
|
@@ -2169,8 +2106,8 @@ export const CreatePromptMetadata$inboundSchema: z.ZodType<
|
|
|
2169
2106
|
z.ZodTypeDef,
|
|
2170
2107
|
unknown
|
|
2171
2108
|
> = z.object({
|
|
2172
|
-
use_cases: z.array(
|
|
2173
|
-
language:
|
|
2109
|
+
use_cases: z.array(UseCases$inboundSchema).optional(),
|
|
2110
|
+
language: Language$inboundSchema.optional(),
|
|
2174
2111
|
}).transform((v) => {
|
|
2175
2112
|
return remap$(v, {
|
|
2176
2113
|
"use_cases": "useCases",
|
|
@@ -2189,8 +2126,8 @@ export const CreatePromptMetadata$outboundSchema: z.ZodType<
|
|
|
2189
2126
|
z.ZodTypeDef,
|
|
2190
2127
|
CreatePromptMetadata
|
|
2191
2128
|
> = z.object({
|
|
2192
|
-
useCases: z.array(
|
|
2193
|
-
language:
|
|
2129
|
+
useCases: z.array(UseCases$outboundSchema).optional(),
|
|
2130
|
+
language: Language$outboundSchema.optional(),
|
|
2194
2131
|
}).transform((v) => {
|
|
2195
2132
|
return remap$(v, {
|
|
2196
2133
|
useCases: "use_cases",
|
|
@@ -2236,7 +2173,7 @@ export const CreatePromptRequestBody$inboundSchema: z.ZodType<
|
|
|
2236
2173
|
> = z.object({
|
|
2237
2174
|
display_name: z.string(),
|
|
2238
2175
|
description: z.nullable(z.string()).optional(),
|
|
2239
|
-
prompt_config: z.lazy(() =>
|
|
2176
|
+
prompt_config: z.lazy(() => PromptConfig$inboundSchema),
|
|
2240
2177
|
metadata: z.lazy(() => CreatePromptMetadata$inboundSchema).optional(),
|
|
2241
2178
|
path: z.string(),
|
|
2242
2179
|
}).transform((v) => {
|
|
@@ -2250,7 +2187,7 @@ export const CreatePromptRequestBody$inboundSchema: z.ZodType<
|
|
|
2250
2187
|
export type CreatePromptRequestBody$Outbound = {
|
|
2251
2188
|
display_name: string;
|
|
2252
2189
|
description?: string | null | undefined;
|
|
2253
|
-
prompt_config:
|
|
2190
|
+
prompt_config: PromptConfig$Outbound;
|
|
2254
2191
|
metadata?: CreatePromptMetadata$Outbound | undefined;
|
|
2255
2192
|
path: string;
|
|
2256
2193
|
};
|
|
@@ -2263,7 +2200,7 @@ export const CreatePromptRequestBody$outboundSchema: z.ZodType<
|
|
|
2263
2200
|
> = z.object({
|
|
2264
2201
|
displayName: z.string(),
|
|
2265
2202
|
description: z.nullable(z.string()).optional(),
|
|
2266
|
-
promptConfig: z.lazy(() =>
|
|
2203
|
+
promptConfig: z.lazy(() => PromptConfig$outboundSchema),
|
|
2267
2204
|
metadata: z.lazy(() => CreatePromptMetadata$outboundSchema).optional(),
|
|
2268
2205
|
path: z.string(),
|
|
2269
2206
|
}).transform((v) => {
|
|
@@ -2326,24 +2263,24 @@ export namespace CreatePromptPromptsType$ {
|
|
|
2326
2263
|
}
|
|
2327
2264
|
|
|
2328
2265
|
/** @internal */
|
|
2329
|
-
export const
|
|
2330
|
-
typeof
|
|
2331
|
-
> = z.nativeEnum(
|
|
2266
|
+
export const CreatePromptModelType$inboundSchema: z.ZodNativeEnum<
|
|
2267
|
+
typeof CreatePromptModelType
|
|
2268
|
+
> = z.nativeEnum(CreatePromptModelType);
|
|
2332
2269
|
|
|
2333
2270
|
/** @internal */
|
|
2334
|
-
export const
|
|
2335
|
-
typeof
|
|
2336
|
-
> =
|
|
2271
|
+
export const CreatePromptModelType$outboundSchema: z.ZodNativeEnum<
|
|
2272
|
+
typeof CreatePromptModelType
|
|
2273
|
+
> = CreatePromptModelType$inboundSchema;
|
|
2337
2274
|
|
|
2338
2275
|
/**
|
|
2339
2276
|
* @internal
|
|
2340
2277
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2341
2278
|
*/
|
|
2342
|
-
export namespace
|
|
2343
|
-
/** @deprecated use `
|
|
2344
|
-
export const inboundSchema =
|
|
2345
|
-
/** @deprecated use `
|
|
2346
|
-
export const outboundSchema =
|
|
2279
|
+
export namespace CreatePromptModelType$ {
|
|
2280
|
+
/** @deprecated use `CreatePromptModelType$inboundSchema` instead. */
|
|
2281
|
+
export const inboundSchema = CreatePromptModelType$inboundSchema;
|
|
2282
|
+
/** @deprecated use `CreatePromptModelType$outboundSchema` instead. */
|
|
2283
|
+
export const outboundSchema = CreatePromptModelType$outboundSchema;
|
|
2347
2284
|
}
|
|
2348
2285
|
|
|
2349
2286
|
/** @internal */
|
|
@@ -2368,128 +2305,127 @@ export namespace CreatePromptPromptsFormat$ {
|
|
|
2368
2305
|
}
|
|
2369
2306
|
|
|
2370
2307
|
/** @internal */
|
|
2371
|
-
export const
|
|
2372
|
-
typeof
|
|
2373
|
-
> = z.nativeEnum(
|
|
2308
|
+
export const CreatePromptQuality$inboundSchema: z.ZodNativeEnum<
|
|
2309
|
+
typeof CreatePromptQuality
|
|
2310
|
+
> = z.nativeEnum(CreatePromptQuality);
|
|
2374
2311
|
|
|
2375
2312
|
/** @internal */
|
|
2376
|
-
export const
|
|
2377
|
-
typeof
|
|
2378
|
-
> =
|
|
2313
|
+
export const CreatePromptQuality$outboundSchema: z.ZodNativeEnum<
|
|
2314
|
+
typeof CreatePromptQuality
|
|
2315
|
+
> = CreatePromptQuality$inboundSchema;
|
|
2379
2316
|
|
|
2380
2317
|
/**
|
|
2381
2318
|
* @internal
|
|
2382
2319
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2383
2320
|
*/
|
|
2384
|
-
export namespace
|
|
2385
|
-
/** @deprecated use `
|
|
2386
|
-
export const inboundSchema =
|
|
2387
|
-
/** @deprecated use `
|
|
2388
|
-
export const outboundSchema =
|
|
2321
|
+
export namespace CreatePromptQuality$ {
|
|
2322
|
+
/** @deprecated use `CreatePromptQuality$inboundSchema` instead. */
|
|
2323
|
+
export const inboundSchema = CreatePromptQuality$inboundSchema;
|
|
2324
|
+
/** @deprecated use `CreatePromptQuality$outboundSchema` instead. */
|
|
2325
|
+
export const outboundSchema = CreatePromptQuality$outboundSchema;
|
|
2389
2326
|
}
|
|
2390
2327
|
|
|
2391
2328
|
/** @internal */
|
|
2392
|
-
export const
|
|
2393
|
-
z.ZodNativeEnum<typeof
|
|
2394
|
-
.nativeEnum(
|
|
2329
|
+
export const CreatePromptResponseFormatPromptsResponseType$inboundSchema:
|
|
2330
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> = z
|
|
2331
|
+
.nativeEnum(CreatePromptResponseFormatPromptsResponseType);
|
|
2395
2332
|
|
|
2396
2333
|
/** @internal */
|
|
2397
|
-
export const
|
|
2398
|
-
z.ZodNativeEnum<typeof
|
|
2399
|
-
|
|
2334
|
+
export const CreatePromptResponseFormatPromptsResponseType$outboundSchema:
|
|
2335
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> =
|
|
2336
|
+
CreatePromptResponseFormatPromptsResponseType$inboundSchema;
|
|
2400
2337
|
|
|
2401
2338
|
/**
|
|
2402
2339
|
* @internal
|
|
2403
2340
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2404
2341
|
*/
|
|
2405
|
-
export namespace
|
|
2406
|
-
/** @deprecated use `
|
|
2342
|
+
export namespace CreatePromptResponseFormatPromptsResponseType$ {
|
|
2343
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsResponseType$inboundSchema` instead. */
|
|
2407
2344
|
export const inboundSchema =
|
|
2408
|
-
|
|
2409
|
-
/** @deprecated use `
|
|
2345
|
+
CreatePromptResponseFormatPromptsResponseType$inboundSchema;
|
|
2346
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsResponseType$outboundSchema` instead. */
|
|
2410
2347
|
export const outboundSchema =
|
|
2411
|
-
|
|
2348
|
+
CreatePromptResponseFormatPromptsResponseType$outboundSchema;
|
|
2412
2349
|
}
|
|
2413
2350
|
|
|
2414
2351
|
/** @internal */
|
|
2415
|
-
export const
|
|
2416
|
-
|
|
2352
|
+
export const CreatePromptResponseFormat2$inboundSchema: z.ZodType<
|
|
2353
|
+
CreatePromptResponseFormat2,
|
|
2417
2354
|
z.ZodTypeDef,
|
|
2418
2355
|
unknown
|
|
2419
2356
|
> = z.object({
|
|
2420
|
-
type:
|
|
2357
|
+
type: CreatePromptResponseFormatPromptsResponseType$inboundSchema,
|
|
2421
2358
|
});
|
|
2422
2359
|
|
|
2423
2360
|
/** @internal */
|
|
2424
|
-
export type
|
|
2361
|
+
export type CreatePromptResponseFormat2$Outbound = {
|
|
2425
2362
|
type: string;
|
|
2426
2363
|
};
|
|
2427
2364
|
|
|
2428
2365
|
/** @internal */
|
|
2429
|
-
export const
|
|
2430
|
-
|
|
2366
|
+
export const CreatePromptResponseFormat2$outboundSchema: z.ZodType<
|
|
2367
|
+
CreatePromptResponseFormat2$Outbound,
|
|
2431
2368
|
z.ZodTypeDef,
|
|
2432
|
-
|
|
2369
|
+
CreatePromptResponseFormat2
|
|
2433
2370
|
> = z.object({
|
|
2434
|
-
type:
|
|
2371
|
+
type: CreatePromptResponseFormatPromptsResponseType$outboundSchema,
|
|
2435
2372
|
});
|
|
2436
2373
|
|
|
2437
2374
|
/**
|
|
2438
2375
|
* @internal
|
|
2439
2376
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2440
2377
|
*/
|
|
2441
|
-
export namespace
|
|
2442
|
-
/** @deprecated use `
|
|
2443
|
-
export const inboundSchema =
|
|
2444
|
-
/** @deprecated use `
|
|
2445
|
-
export const outboundSchema =
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
export type Outbound = CreatePromptResponseFormatPrompts2$Outbound;
|
|
2378
|
+
export namespace CreatePromptResponseFormat2$ {
|
|
2379
|
+
/** @deprecated use `CreatePromptResponseFormat2$inboundSchema` instead. */
|
|
2380
|
+
export const inboundSchema = CreatePromptResponseFormat2$inboundSchema;
|
|
2381
|
+
/** @deprecated use `CreatePromptResponseFormat2$outboundSchema` instead. */
|
|
2382
|
+
export const outboundSchema = CreatePromptResponseFormat2$outboundSchema;
|
|
2383
|
+
/** @deprecated use `CreatePromptResponseFormat2$Outbound` instead. */
|
|
2384
|
+
export type Outbound = CreatePromptResponseFormat2$Outbound;
|
|
2449
2385
|
}
|
|
2450
2386
|
|
|
2451
|
-
export function
|
|
2452
|
-
|
|
2387
|
+
export function createPromptResponseFormat2ToJSON(
|
|
2388
|
+
createPromptResponseFormat2: CreatePromptResponseFormat2,
|
|
2453
2389
|
): string {
|
|
2454
2390
|
return JSON.stringify(
|
|
2455
|
-
|
|
2456
|
-
|
|
2391
|
+
CreatePromptResponseFormat2$outboundSchema.parse(
|
|
2392
|
+
createPromptResponseFormat2,
|
|
2457
2393
|
),
|
|
2458
2394
|
);
|
|
2459
2395
|
}
|
|
2460
2396
|
|
|
2461
|
-
export function
|
|
2397
|
+
export function createPromptResponseFormat2FromJSON(
|
|
2462
2398
|
jsonString: string,
|
|
2463
|
-
): SafeParseResult<
|
|
2399
|
+
): SafeParseResult<CreatePromptResponseFormat2, SDKValidationError> {
|
|
2464
2400
|
return safeParse(
|
|
2465
2401
|
jsonString,
|
|
2466
|
-
(x) =>
|
|
2467
|
-
|
|
2468
|
-
`Failed to parse 'CreatePromptResponseFormatPrompts2' from JSON`,
|
|
2402
|
+
(x) => CreatePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
2403
|
+
`Failed to parse 'CreatePromptResponseFormat2' from JSON`,
|
|
2469
2404
|
);
|
|
2470
2405
|
}
|
|
2471
2406
|
|
|
2472
2407
|
/** @internal */
|
|
2473
|
-
export const
|
|
2474
|
-
z.ZodNativeEnum<typeof
|
|
2475
|
-
|
|
2408
|
+
export const CreatePromptResponseFormatPromptsType$inboundSchema:
|
|
2409
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> = z.nativeEnum(
|
|
2410
|
+
CreatePromptResponseFormatPromptsType,
|
|
2411
|
+
);
|
|
2476
2412
|
|
|
2477
2413
|
/** @internal */
|
|
2478
|
-
export const
|
|
2479
|
-
z.ZodNativeEnum<typeof
|
|
2480
|
-
|
|
2414
|
+
export const CreatePromptResponseFormatPromptsType$outboundSchema:
|
|
2415
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> =
|
|
2416
|
+
CreatePromptResponseFormatPromptsType$inboundSchema;
|
|
2481
2417
|
|
|
2482
2418
|
/**
|
|
2483
2419
|
* @internal
|
|
2484
2420
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2485
2421
|
*/
|
|
2486
|
-
export namespace
|
|
2487
|
-
/** @deprecated use `
|
|
2422
|
+
export namespace CreatePromptResponseFormatPromptsType$ {
|
|
2423
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsType$inboundSchema` instead. */
|
|
2488
2424
|
export const inboundSchema =
|
|
2489
|
-
|
|
2490
|
-
/** @deprecated use `
|
|
2425
|
+
CreatePromptResponseFormatPromptsType$inboundSchema;
|
|
2426
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsType$outboundSchema` instead. */
|
|
2491
2427
|
export const outboundSchema =
|
|
2492
|
-
|
|
2428
|
+
CreatePromptResponseFormatPromptsType$outboundSchema;
|
|
2493
2429
|
}
|
|
2494
2430
|
|
|
2495
2431
|
/** @internal */
|
|
@@ -2558,12 +2494,12 @@ export function createPromptResponseFormatJsonSchemaFromJSON(
|
|
|
2558
2494
|
}
|
|
2559
2495
|
|
|
2560
2496
|
/** @internal */
|
|
2561
|
-
export const
|
|
2562
|
-
|
|
2497
|
+
export const CreatePromptResponseFormat1$inboundSchema: z.ZodType<
|
|
2498
|
+
CreatePromptResponseFormat1,
|
|
2563
2499
|
z.ZodTypeDef,
|
|
2564
2500
|
unknown
|
|
2565
2501
|
> = z.object({
|
|
2566
|
-
type:
|
|
2502
|
+
type: CreatePromptResponseFormatPromptsType$inboundSchema,
|
|
2567
2503
|
json_schema: z.lazy(() => CreatePromptResponseFormatJsonSchema$inboundSchema),
|
|
2568
2504
|
}).transform((v) => {
|
|
2569
2505
|
return remap$(v, {
|
|
@@ -2572,18 +2508,18 @@ export const CreatePromptResponseFormatPrompts1$inboundSchema: z.ZodType<
|
|
|
2572
2508
|
});
|
|
2573
2509
|
|
|
2574
2510
|
/** @internal */
|
|
2575
|
-
export type
|
|
2511
|
+
export type CreatePromptResponseFormat1$Outbound = {
|
|
2576
2512
|
type: string;
|
|
2577
2513
|
json_schema: CreatePromptResponseFormatJsonSchema$Outbound;
|
|
2578
2514
|
};
|
|
2579
2515
|
|
|
2580
2516
|
/** @internal */
|
|
2581
|
-
export const
|
|
2582
|
-
|
|
2517
|
+
export const CreatePromptResponseFormat1$outboundSchema: z.ZodType<
|
|
2518
|
+
CreatePromptResponseFormat1$Outbound,
|
|
2583
2519
|
z.ZodTypeDef,
|
|
2584
|
-
|
|
2520
|
+
CreatePromptResponseFormat1
|
|
2585
2521
|
> = z.object({
|
|
2586
|
-
type:
|
|
2522
|
+
type: CreatePromptResponseFormatPromptsType$outboundSchema,
|
|
2587
2523
|
jsonSchema: z.lazy(() => CreatePromptResponseFormatJsonSchema$outboundSchema),
|
|
2588
2524
|
}).transform((v) => {
|
|
2589
2525
|
return remap$(v, {
|
|
@@ -2595,166 +2531,157 @@ export const CreatePromptResponseFormatPrompts1$outboundSchema: z.ZodType<
|
|
|
2595
2531
|
* @internal
|
|
2596
2532
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2597
2533
|
*/
|
|
2598
|
-
export namespace
|
|
2599
|
-
/** @deprecated use `
|
|
2600
|
-
export const inboundSchema =
|
|
2601
|
-
/** @deprecated use `
|
|
2602
|
-
export const outboundSchema =
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
export type Outbound = CreatePromptResponseFormatPrompts1$Outbound;
|
|
2534
|
+
export namespace CreatePromptResponseFormat1$ {
|
|
2535
|
+
/** @deprecated use `CreatePromptResponseFormat1$inboundSchema` instead. */
|
|
2536
|
+
export const inboundSchema = CreatePromptResponseFormat1$inboundSchema;
|
|
2537
|
+
/** @deprecated use `CreatePromptResponseFormat1$outboundSchema` instead. */
|
|
2538
|
+
export const outboundSchema = CreatePromptResponseFormat1$outboundSchema;
|
|
2539
|
+
/** @deprecated use `CreatePromptResponseFormat1$Outbound` instead. */
|
|
2540
|
+
export type Outbound = CreatePromptResponseFormat1$Outbound;
|
|
2606
2541
|
}
|
|
2607
2542
|
|
|
2608
|
-
export function
|
|
2609
|
-
|
|
2543
|
+
export function createPromptResponseFormat1ToJSON(
|
|
2544
|
+
createPromptResponseFormat1: CreatePromptResponseFormat1,
|
|
2610
2545
|
): string {
|
|
2611
2546
|
return JSON.stringify(
|
|
2612
|
-
|
|
2613
|
-
|
|
2547
|
+
CreatePromptResponseFormat1$outboundSchema.parse(
|
|
2548
|
+
createPromptResponseFormat1,
|
|
2614
2549
|
),
|
|
2615
2550
|
);
|
|
2616
2551
|
}
|
|
2617
2552
|
|
|
2618
|
-
export function
|
|
2553
|
+
export function createPromptResponseFormat1FromJSON(
|
|
2619
2554
|
jsonString: string,
|
|
2620
|
-
): SafeParseResult<
|
|
2555
|
+
): SafeParseResult<CreatePromptResponseFormat1, SDKValidationError> {
|
|
2621
2556
|
return safeParse(
|
|
2622
2557
|
jsonString,
|
|
2623
|
-
(x) =>
|
|
2624
|
-
|
|
2625
|
-
`Failed to parse 'CreatePromptResponseFormatPrompts1' from JSON`,
|
|
2558
|
+
(x) => CreatePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
2559
|
+
`Failed to parse 'CreatePromptResponseFormat1' from JSON`,
|
|
2626
2560
|
);
|
|
2627
2561
|
}
|
|
2628
2562
|
|
|
2629
2563
|
/** @internal */
|
|
2630
|
-
export const
|
|
2631
|
-
|
|
2564
|
+
export const CreatePromptResponseFormat$inboundSchema: z.ZodType<
|
|
2565
|
+
CreatePromptResponseFormat,
|
|
2632
2566
|
z.ZodTypeDef,
|
|
2633
2567
|
unknown
|
|
2634
2568
|
> = z.union([
|
|
2635
|
-
z.lazy(() =>
|
|
2636
|
-
z.lazy(() =>
|
|
2569
|
+
z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
|
|
2570
|
+
z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
|
|
2637
2571
|
]);
|
|
2638
2572
|
|
|
2639
2573
|
/** @internal */
|
|
2640
|
-
export type
|
|
2641
|
-
|
|
|
2642
|
-
|
|
|
2574
|
+
export type CreatePromptResponseFormat$Outbound =
|
|
2575
|
+
| CreatePromptResponseFormat2$Outbound
|
|
2576
|
+
| CreatePromptResponseFormat1$Outbound;
|
|
2643
2577
|
|
|
2644
2578
|
/** @internal */
|
|
2645
|
-
export const
|
|
2646
|
-
|
|
2579
|
+
export const CreatePromptResponseFormat$outboundSchema: z.ZodType<
|
|
2580
|
+
CreatePromptResponseFormat$Outbound,
|
|
2647
2581
|
z.ZodTypeDef,
|
|
2648
|
-
|
|
2582
|
+
CreatePromptResponseFormat
|
|
2649
2583
|
> = z.union([
|
|
2650
|
-
z.lazy(() =>
|
|
2651
|
-
z.lazy(() =>
|
|
2584
|
+
z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
|
|
2585
|
+
z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
|
|
2652
2586
|
]);
|
|
2653
2587
|
|
|
2654
2588
|
/**
|
|
2655
2589
|
* @internal
|
|
2656
2590
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2657
2591
|
*/
|
|
2658
|
-
export namespace
|
|
2659
|
-
/** @deprecated use `
|
|
2660
|
-
export const inboundSchema =
|
|
2661
|
-
/** @deprecated use `
|
|
2662
|
-
export const outboundSchema =
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
export type Outbound = CreatePromptPromptsResponseFormat$Outbound;
|
|
2592
|
+
export namespace CreatePromptResponseFormat$ {
|
|
2593
|
+
/** @deprecated use `CreatePromptResponseFormat$inboundSchema` instead. */
|
|
2594
|
+
export const inboundSchema = CreatePromptResponseFormat$inboundSchema;
|
|
2595
|
+
/** @deprecated use `CreatePromptResponseFormat$outboundSchema` instead. */
|
|
2596
|
+
export const outboundSchema = CreatePromptResponseFormat$outboundSchema;
|
|
2597
|
+
/** @deprecated use `CreatePromptResponseFormat$Outbound` instead. */
|
|
2598
|
+
export type Outbound = CreatePromptResponseFormat$Outbound;
|
|
2666
2599
|
}
|
|
2667
2600
|
|
|
2668
|
-
export function
|
|
2669
|
-
|
|
2601
|
+
export function createPromptResponseFormatToJSON(
|
|
2602
|
+
createPromptResponseFormat: CreatePromptResponseFormat,
|
|
2670
2603
|
): string {
|
|
2671
2604
|
return JSON.stringify(
|
|
2672
|
-
|
|
2673
|
-
createPromptPromptsResponseFormat,
|
|
2674
|
-
),
|
|
2605
|
+
CreatePromptResponseFormat$outboundSchema.parse(createPromptResponseFormat),
|
|
2675
2606
|
);
|
|
2676
2607
|
}
|
|
2677
2608
|
|
|
2678
|
-
export function
|
|
2609
|
+
export function createPromptResponseFormatFromJSON(
|
|
2679
2610
|
jsonString: string,
|
|
2680
|
-
): SafeParseResult<
|
|
2611
|
+
): SafeParseResult<CreatePromptResponseFormat, SDKValidationError> {
|
|
2681
2612
|
return safeParse(
|
|
2682
2613
|
jsonString,
|
|
2683
|
-
(x) =>
|
|
2684
|
-
`Failed to parse '
|
|
2614
|
+
(x) => CreatePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
2615
|
+
`Failed to parse 'CreatePromptResponseFormat' from JSON`,
|
|
2685
2616
|
);
|
|
2686
2617
|
}
|
|
2687
2618
|
|
|
2688
2619
|
/** @internal */
|
|
2689
|
-
export const
|
|
2690
|
-
typeof
|
|
2691
|
-
> = z.nativeEnum(
|
|
2620
|
+
export const CreatePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
2621
|
+
typeof CreatePromptPhotoRealVersion
|
|
2622
|
+
> = z.nativeEnum(CreatePromptPhotoRealVersion);
|
|
2692
2623
|
|
|
2693
2624
|
/** @internal */
|
|
2694
|
-
export const
|
|
2695
|
-
|
|
2696
|
-
|
|
2625
|
+
export const CreatePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
|
|
2626
|
+
typeof CreatePromptPhotoRealVersion
|
|
2627
|
+
> = CreatePromptPhotoRealVersion$inboundSchema;
|
|
2697
2628
|
|
|
2698
2629
|
/**
|
|
2699
2630
|
* @internal
|
|
2700
2631
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2701
2632
|
*/
|
|
2702
|
-
export namespace
|
|
2703
|
-
/** @deprecated use `
|
|
2704
|
-
export const inboundSchema =
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
export const outboundSchema =
|
|
2708
|
-
CreatePromptPromptsPhotoRealVersion$outboundSchema;
|
|
2633
|
+
export namespace CreatePromptPhotoRealVersion$ {
|
|
2634
|
+
/** @deprecated use `CreatePromptPhotoRealVersion$inboundSchema` instead. */
|
|
2635
|
+
export const inboundSchema = CreatePromptPhotoRealVersion$inboundSchema;
|
|
2636
|
+
/** @deprecated use `CreatePromptPhotoRealVersion$outboundSchema` instead. */
|
|
2637
|
+
export const outboundSchema = CreatePromptPhotoRealVersion$outboundSchema;
|
|
2709
2638
|
}
|
|
2710
2639
|
|
|
2711
2640
|
/** @internal */
|
|
2712
|
-
export const
|
|
2713
|
-
typeof
|
|
2714
|
-
> = z.nativeEnum(
|
|
2641
|
+
export const CreatePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
2642
|
+
typeof CreatePromptEncodingFormat
|
|
2643
|
+
> = z.nativeEnum(CreatePromptEncodingFormat);
|
|
2715
2644
|
|
|
2716
2645
|
/** @internal */
|
|
2717
|
-
export const
|
|
2718
|
-
typeof
|
|
2719
|
-
> =
|
|
2646
|
+
export const CreatePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
|
|
2647
|
+
typeof CreatePromptEncodingFormat
|
|
2648
|
+
> = CreatePromptEncodingFormat$inboundSchema;
|
|
2720
2649
|
|
|
2721
2650
|
/**
|
|
2722
2651
|
* @internal
|
|
2723
2652
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2724
2653
|
*/
|
|
2725
|
-
export namespace
|
|
2726
|
-
/** @deprecated use `
|
|
2727
|
-
export const inboundSchema =
|
|
2728
|
-
/** @deprecated use `
|
|
2729
|
-
export const outboundSchema =
|
|
2730
|
-
CreatePromptPromptsEncodingFormat$outboundSchema;
|
|
2654
|
+
export namespace CreatePromptEncodingFormat$ {
|
|
2655
|
+
/** @deprecated use `CreatePromptEncodingFormat$inboundSchema` instead. */
|
|
2656
|
+
export const inboundSchema = CreatePromptEncodingFormat$inboundSchema;
|
|
2657
|
+
/** @deprecated use `CreatePromptEncodingFormat$outboundSchema` instead. */
|
|
2658
|
+
export const outboundSchema = CreatePromptEncodingFormat$outboundSchema;
|
|
2731
2659
|
}
|
|
2732
2660
|
|
|
2733
2661
|
/** @internal */
|
|
2734
|
-
export const
|
|
2735
|
-
typeof
|
|
2736
|
-
> = z.nativeEnum(
|
|
2662
|
+
export const CreatePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
|
|
2663
|
+
typeof CreatePromptReasoningEffort
|
|
2664
|
+
> = z.nativeEnum(CreatePromptReasoningEffort);
|
|
2737
2665
|
|
|
2738
2666
|
/** @internal */
|
|
2739
|
-
export const
|
|
2740
|
-
typeof
|
|
2741
|
-
> =
|
|
2667
|
+
export const CreatePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
|
|
2668
|
+
typeof CreatePromptReasoningEffort
|
|
2669
|
+
> = CreatePromptReasoningEffort$inboundSchema;
|
|
2742
2670
|
|
|
2743
2671
|
/**
|
|
2744
2672
|
* @internal
|
|
2745
2673
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2746
2674
|
*/
|
|
2747
|
-
export namespace
|
|
2748
|
-
/** @deprecated use `
|
|
2749
|
-
export const inboundSchema =
|
|
2750
|
-
/** @deprecated use `
|
|
2751
|
-
export const outboundSchema =
|
|
2752
|
-
CreatePromptPromptsReasoningEffort$outboundSchema;
|
|
2675
|
+
export namespace CreatePromptReasoningEffort$ {
|
|
2676
|
+
/** @deprecated use `CreatePromptReasoningEffort$inboundSchema` instead. */
|
|
2677
|
+
export const inboundSchema = CreatePromptReasoningEffort$inboundSchema;
|
|
2678
|
+
/** @deprecated use `CreatePromptReasoningEffort$outboundSchema` instead. */
|
|
2679
|
+
export const outboundSchema = CreatePromptReasoningEffort$outboundSchema;
|
|
2753
2680
|
}
|
|
2754
2681
|
|
|
2755
2682
|
/** @internal */
|
|
2756
|
-
export const
|
|
2757
|
-
|
|
2683
|
+
export const CreatePromptModelParameters$inboundSchema: z.ZodType<
|
|
2684
|
+
CreatePromptModelParameters,
|
|
2758
2685
|
z.ZodTypeDef,
|
|
2759
2686
|
unknown
|
|
2760
2687
|
> = z.object({
|
|
@@ -2768,18 +2695,17 @@ export const CreatePromptPromptsModelParameters$inboundSchema: z.ZodType<
|
|
|
2768
2695
|
seed: z.number().optional(),
|
|
2769
2696
|
format: CreatePromptPromptsFormat$inboundSchema.optional(),
|
|
2770
2697
|
dimensions: z.string().optional(),
|
|
2771
|
-
quality:
|
|
2698
|
+
quality: CreatePromptQuality$inboundSchema.optional(),
|
|
2772
2699
|
style: z.string().optional(),
|
|
2773
2700
|
responseFormat: z.nullable(
|
|
2774
2701
|
z.union([
|
|
2775
|
-
z.lazy(() =>
|
|
2776
|
-
z.lazy(() =>
|
|
2702
|
+
z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
|
|
2703
|
+
z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
|
|
2777
2704
|
]),
|
|
2778
2705
|
).optional(),
|
|
2779
|
-
photoRealVersion:
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
reasoningEffort: CreatePromptPromptsReasoningEffort$inboundSchema.optional(),
|
|
2706
|
+
photoRealVersion: CreatePromptPhotoRealVersion$inboundSchema.optional(),
|
|
2707
|
+
encoding_format: CreatePromptEncodingFormat$inboundSchema.optional(),
|
|
2708
|
+
reasoningEffort: CreatePromptReasoningEffort$inboundSchema.optional(),
|
|
2783
2709
|
budgetTokens: z.number().optional(),
|
|
2784
2710
|
}).transform((v) => {
|
|
2785
2711
|
return remap$(v, {
|
|
@@ -2788,7 +2714,7 @@ export const CreatePromptPromptsModelParameters$inboundSchema: z.ZodType<
|
|
|
2788
2714
|
});
|
|
2789
2715
|
|
|
2790
2716
|
/** @internal */
|
|
2791
|
-
export type
|
|
2717
|
+
export type CreatePromptModelParameters$Outbound = {
|
|
2792
2718
|
temperature?: number | undefined;
|
|
2793
2719
|
maxTokens?: number | undefined;
|
|
2794
2720
|
topK?: number | undefined;
|
|
@@ -2802,8 +2728,8 @@ export type CreatePromptPromptsModelParameters$Outbound = {
|
|
|
2802
2728
|
quality?: string | undefined;
|
|
2803
2729
|
style?: string | undefined;
|
|
2804
2730
|
responseFormat?:
|
|
2805
|
-
|
|
|
2806
|
-
|
|
|
2731
|
+
| CreatePromptResponseFormat2$Outbound
|
|
2732
|
+
| CreatePromptResponseFormat1$Outbound
|
|
2807
2733
|
| null
|
|
2808
2734
|
| undefined;
|
|
2809
2735
|
photoRealVersion?: string | undefined;
|
|
@@ -2813,10 +2739,10 @@ export type CreatePromptPromptsModelParameters$Outbound = {
|
|
|
2813
2739
|
};
|
|
2814
2740
|
|
|
2815
2741
|
/** @internal */
|
|
2816
|
-
export const
|
|
2817
|
-
|
|
2742
|
+
export const CreatePromptModelParameters$outboundSchema: z.ZodType<
|
|
2743
|
+
CreatePromptModelParameters$Outbound,
|
|
2818
2744
|
z.ZodTypeDef,
|
|
2819
|
-
|
|
2745
|
+
CreatePromptModelParameters
|
|
2820
2746
|
> = z.object({
|
|
2821
2747
|
temperature: z.number().optional(),
|
|
2822
2748
|
maxTokens: z.number().optional(),
|
|
@@ -2828,18 +2754,17 @@ export const CreatePromptPromptsModelParameters$outboundSchema: z.ZodType<
|
|
|
2828
2754
|
seed: z.number().optional(),
|
|
2829
2755
|
format: CreatePromptPromptsFormat$outboundSchema.optional(),
|
|
2830
2756
|
dimensions: z.string().optional(),
|
|
2831
|
-
quality:
|
|
2757
|
+
quality: CreatePromptQuality$outboundSchema.optional(),
|
|
2832
2758
|
style: z.string().optional(),
|
|
2833
2759
|
responseFormat: z.nullable(
|
|
2834
2760
|
z.union([
|
|
2835
|
-
z.lazy(() =>
|
|
2836
|
-
z.lazy(() =>
|
|
2761
|
+
z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
|
|
2762
|
+
z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
|
|
2837
2763
|
]),
|
|
2838
2764
|
).optional(),
|
|
2839
|
-
photoRealVersion:
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
reasoningEffort: CreatePromptPromptsReasoningEffort$outboundSchema.optional(),
|
|
2765
|
+
photoRealVersion: CreatePromptPhotoRealVersion$outboundSchema.optional(),
|
|
2766
|
+
encodingFormat: CreatePromptEncodingFormat$outboundSchema.optional(),
|
|
2767
|
+
reasoningEffort: CreatePromptReasoningEffort$outboundSchema.optional(),
|
|
2843
2768
|
budgetTokens: z.number().optional(),
|
|
2844
2769
|
}).transform((v) => {
|
|
2845
2770
|
return remap$(v, {
|
|
@@ -2851,56 +2776,54 @@ export const CreatePromptPromptsModelParameters$outboundSchema: z.ZodType<
|
|
|
2851
2776
|
* @internal
|
|
2852
2777
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2853
2778
|
*/
|
|
2854
|
-
export namespace
|
|
2855
|
-
/** @deprecated use `
|
|
2856
|
-
export const inboundSchema =
|
|
2857
|
-
/** @deprecated use `
|
|
2858
|
-
export const outboundSchema =
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
export type Outbound = CreatePromptPromptsModelParameters$Outbound;
|
|
2779
|
+
export namespace CreatePromptModelParameters$ {
|
|
2780
|
+
/** @deprecated use `CreatePromptModelParameters$inboundSchema` instead. */
|
|
2781
|
+
export const inboundSchema = CreatePromptModelParameters$inboundSchema;
|
|
2782
|
+
/** @deprecated use `CreatePromptModelParameters$outboundSchema` instead. */
|
|
2783
|
+
export const outboundSchema = CreatePromptModelParameters$outboundSchema;
|
|
2784
|
+
/** @deprecated use `CreatePromptModelParameters$Outbound` instead. */
|
|
2785
|
+
export type Outbound = CreatePromptModelParameters$Outbound;
|
|
2862
2786
|
}
|
|
2863
2787
|
|
|
2864
|
-
export function
|
|
2865
|
-
|
|
2788
|
+
export function createPromptModelParametersToJSON(
|
|
2789
|
+
createPromptModelParameters: CreatePromptModelParameters,
|
|
2866
2790
|
): string {
|
|
2867
2791
|
return JSON.stringify(
|
|
2868
|
-
|
|
2869
|
-
|
|
2792
|
+
CreatePromptModelParameters$outboundSchema.parse(
|
|
2793
|
+
createPromptModelParameters,
|
|
2870
2794
|
),
|
|
2871
2795
|
);
|
|
2872
2796
|
}
|
|
2873
2797
|
|
|
2874
|
-
export function
|
|
2798
|
+
export function createPromptModelParametersFromJSON(
|
|
2875
2799
|
jsonString: string,
|
|
2876
|
-
): SafeParseResult<
|
|
2800
|
+
): SafeParseResult<CreatePromptModelParameters, SDKValidationError> {
|
|
2877
2801
|
return safeParse(
|
|
2878
2802
|
jsonString,
|
|
2879
|
-
(x) =>
|
|
2880
|
-
|
|
2881
|
-
`Failed to parse 'CreatePromptPromptsModelParameters' from JSON`,
|
|
2803
|
+
(x) => CreatePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
2804
|
+
`Failed to parse 'CreatePromptModelParameters' from JSON`,
|
|
2882
2805
|
);
|
|
2883
2806
|
}
|
|
2884
2807
|
|
|
2885
2808
|
/** @internal */
|
|
2886
|
-
export const
|
|
2887
|
-
typeof
|
|
2888
|
-
> = z.nativeEnum(
|
|
2809
|
+
export const CreatePromptProvider$inboundSchema: z.ZodNativeEnum<
|
|
2810
|
+
typeof CreatePromptProvider
|
|
2811
|
+
> = z.nativeEnum(CreatePromptProvider);
|
|
2889
2812
|
|
|
2890
2813
|
/** @internal */
|
|
2891
|
-
export const
|
|
2892
|
-
typeof
|
|
2893
|
-
> =
|
|
2814
|
+
export const CreatePromptProvider$outboundSchema: z.ZodNativeEnum<
|
|
2815
|
+
typeof CreatePromptProvider
|
|
2816
|
+
> = CreatePromptProvider$inboundSchema;
|
|
2894
2817
|
|
|
2895
2818
|
/**
|
|
2896
2819
|
* @internal
|
|
2897
2820
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2898
2821
|
*/
|
|
2899
|
-
export namespace
|
|
2900
|
-
/** @deprecated use `
|
|
2901
|
-
export const inboundSchema =
|
|
2902
|
-
/** @deprecated use `
|
|
2903
|
-
export const outboundSchema =
|
|
2822
|
+
export namespace CreatePromptProvider$ {
|
|
2823
|
+
/** @deprecated use `CreatePromptProvider$inboundSchema` instead. */
|
|
2824
|
+
export const inboundSchema = CreatePromptProvider$inboundSchema;
|
|
2825
|
+
/** @deprecated use `CreatePromptProvider$outboundSchema` instead. */
|
|
2826
|
+
export const outboundSchema = CreatePromptProvider$outboundSchema;
|
|
2904
2827
|
}
|
|
2905
2828
|
|
|
2906
2829
|
/** @internal */
|
|
@@ -3504,19 +3427,18 @@ export function createPromptPromptsMessagesFromJSON(
|
|
|
3504
3427
|
}
|
|
3505
3428
|
|
|
3506
3429
|
/** @internal */
|
|
3507
|
-
export const
|
|
3508
|
-
|
|
3430
|
+
export const CreatePromptPromptConfig$inboundSchema: z.ZodType<
|
|
3431
|
+
CreatePromptPromptConfig,
|
|
3509
3432
|
z.ZodTypeDef,
|
|
3510
3433
|
unknown
|
|
3511
3434
|
> = z.object({
|
|
3512
3435
|
stream: z.boolean().optional(),
|
|
3513
3436
|
model: z.string().optional(),
|
|
3514
3437
|
model_db_id: z.string().optional(),
|
|
3515
|
-
model_type:
|
|
3516
|
-
model_parameters: z.lazy(() =>
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
provider: CreatePromptPromptsProvider$inboundSchema.optional(),
|
|
3438
|
+
model_type: CreatePromptModelType$inboundSchema.optional(),
|
|
3439
|
+
model_parameters: z.lazy(() => CreatePromptModelParameters$inboundSchema)
|
|
3440
|
+
.optional(),
|
|
3441
|
+
provider: CreatePromptProvider$inboundSchema.optional(),
|
|
3520
3442
|
integration_id: z.nullable(z.string()).optional(),
|
|
3521
3443
|
version: z.string().optional(),
|
|
3522
3444
|
messages: z.array(z.lazy(() => CreatePromptPromptsMessages$inboundSchema)),
|
|
@@ -3530,12 +3452,12 @@ export const CreatePromptPromptsPromptConfig$inboundSchema: z.ZodType<
|
|
|
3530
3452
|
});
|
|
3531
3453
|
|
|
3532
3454
|
/** @internal */
|
|
3533
|
-
export type
|
|
3455
|
+
export type CreatePromptPromptConfig$Outbound = {
|
|
3534
3456
|
stream?: boolean | undefined;
|
|
3535
3457
|
model?: string | undefined;
|
|
3536
3458
|
model_db_id?: string | undefined;
|
|
3537
3459
|
model_type?: string | undefined;
|
|
3538
|
-
model_parameters?:
|
|
3460
|
+
model_parameters?: CreatePromptModelParameters$Outbound | undefined;
|
|
3539
3461
|
provider?: string | undefined;
|
|
3540
3462
|
integration_id?: string | null | undefined;
|
|
3541
3463
|
version?: string | undefined;
|
|
@@ -3543,19 +3465,18 @@ export type CreatePromptPromptsPromptConfig$Outbound = {
|
|
|
3543
3465
|
};
|
|
3544
3466
|
|
|
3545
3467
|
/** @internal */
|
|
3546
|
-
export const
|
|
3547
|
-
|
|
3468
|
+
export const CreatePromptPromptConfig$outboundSchema: z.ZodType<
|
|
3469
|
+
CreatePromptPromptConfig$Outbound,
|
|
3548
3470
|
z.ZodTypeDef,
|
|
3549
|
-
|
|
3471
|
+
CreatePromptPromptConfig
|
|
3550
3472
|
> = z.object({
|
|
3551
3473
|
stream: z.boolean().optional(),
|
|
3552
3474
|
model: z.string().optional(),
|
|
3553
3475
|
modelDbId: z.string().optional(),
|
|
3554
|
-
modelType:
|
|
3555
|
-
modelParameters: z.lazy(() =>
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
provider: CreatePromptPromptsProvider$outboundSchema.optional(),
|
|
3476
|
+
modelType: CreatePromptModelType$outboundSchema.optional(),
|
|
3477
|
+
modelParameters: z.lazy(() => CreatePromptModelParameters$outboundSchema)
|
|
3478
|
+
.optional(),
|
|
3479
|
+
provider: CreatePromptProvider$outboundSchema.optional(),
|
|
3559
3480
|
integrationId: z.nullable(z.string()).optional(),
|
|
3560
3481
|
version: z.string().optional(),
|
|
3561
3482
|
messages: z.array(z.lazy(() => CreatePromptPromptsMessages$outboundSchema)),
|
|
@@ -3572,75 +3493,73 @@ export const CreatePromptPromptsPromptConfig$outboundSchema: z.ZodType<
|
|
|
3572
3493
|
* @internal
|
|
3573
3494
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3574
3495
|
*/
|
|
3575
|
-
export namespace
|
|
3576
|
-
/** @deprecated use `
|
|
3577
|
-
export const inboundSchema =
|
|
3578
|
-
/** @deprecated use `
|
|
3579
|
-
export const outboundSchema =
|
|
3580
|
-
/** @deprecated use `
|
|
3581
|
-
export type Outbound =
|
|
3496
|
+
export namespace CreatePromptPromptConfig$ {
|
|
3497
|
+
/** @deprecated use `CreatePromptPromptConfig$inboundSchema` instead. */
|
|
3498
|
+
export const inboundSchema = CreatePromptPromptConfig$inboundSchema;
|
|
3499
|
+
/** @deprecated use `CreatePromptPromptConfig$outboundSchema` instead. */
|
|
3500
|
+
export const outboundSchema = CreatePromptPromptConfig$outboundSchema;
|
|
3501
|
+
/** @deprecated use `CreatePromptPromptConfig$Outbound` instead. */
|
|
3502
|
+
export type Outbound = CreatePromptPromptConfig$Outbound;
|
|
3582
3503
|
}
|
|
3583
3504
|
|
|
3584
|
-
export function
|
|
3585
|
-
|
|
3505
|
+
export function createPromptPromptConfigToJSON(
|
|
3506
|
+
createPromptPromptConfig: CreatePromptPromptConfig,
|
|
3586
3507
|
): string {
|
|
3587
3508
|
return JSON.stringify(
|
|
3588
|
-
|
|
3589
|
-
createPromptPromptsPromptConfig,
|
|
3590
|
-
),
|
|
3509
|
+
CreatePromptPromptConfig$outboundSchema.parse(createPromptPromptConfig),
|
|
3591
3510
|
);
|
|
3592
3511
|
}
|
|
3593
3512
|
|
|
3594
|
-
export function
|
|
3513
|
+
export function createPromptPromptConfigFromJSON(
|
|
3595
3514
|
jsonString: string,
|
|
3596
|
-
): SafeParseResult<
|
|
3515
|
+
): SafeParseResult<CreatePromptPromptConfig, SDKValidationError> {
|
|
3597
3516
|
return safeParse(
|
|
3598
3517
|
jsonString,
|
|
3599
|
-
(x) =>
|
|
3600
|
-
`Failed to parse '
|
|
3518
|
+
(x) => CreatePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3519
|
+
`Failed to parse 'CreatePromptPromptConfig' from JSON`,
|
|
3601
3520
|
);
|
|
3602
3521
|
}
|
|
3603
3522
|
|
|
3604
3523
|
/** @internal */
|
|
3605
|
-
export const
|
|
3606
|
-
typeof
|
|
3607
|
-
> = z.nativeEnum(
|
|
3524
|
+
export const CreatePromptUseCases$inboundSchema: z.ZodNativeEnum<
|
|
3525
|
+
typeof CreatePromptUseCases
|
|
3526
|
+
> = z.nativeEnum(CreatePromptUseCases);
|
|
3608
3527
|
|
|
3609
3528
|
/** @internal */
|
|
3610
|
-
export const
|
|
3611
|
-
typeof
|
|
3612
|
-
> =
|
|
3529
|
+
export const CreatePromptUseCases$outboundSchema: z.ZodNativeEnum<
|
|
3530
|
+
typeof CreatePromptUseCases
|
|
3531
|
+
> = CreatePromptUseCases$inboundSchema;
|
|
3613
3532
|
|
|
3614
3533
|
/**
|
|
3615
3534
|
* @internal
|
|
3616
3535
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3617
3536
|
*/
|
|
3618
|
-
export namespace
|
|
3619
|
-
/** @deprecated use `
|
|
3620
|
-
export const inboundSchema =
|
|
3621
|
-
/** @deprecated use `
|
|
3622
|
-
export const outboundSchema =
|
|
3537
|
+
export namespace CreatePromptUseCases$ {
|
|
3538
|
+
/** @deprecated use `CreatePromptUseCases$inboundSchema` instead. */
|
|
3539
|
+
export const inboundSchema = CreatePromptUseCases$inboundSchema;
|
|
3540
|
+
/** @deprecated use `CreatePromptUseCases$outboundSchema` instead. */
|
|
3541
|
+
export const outboundSchema = CreatePromptUseCases$outboundSchema;
|
|
3623
3542
|
}
|
|
3624
3543
|
|
|
3625
3544
|
/** @internal */
|
|
3626
|
-
export const
|
|
3627
|
-
typeof
|
|
3628
|
-
> = z.nativeEnum(
|
|
3545
|
+
export const CreatePromptLanguage$inboundSchema: z.ZodNativeEnum<
|
|
3546
|
+
typeof CreatePromptLanguage
|
|
3547
|
+
> = z.nativeEnum(CreatePromptLanguage);
|
|
3629
3548
|
|
|
3630
3549
|
/** @internal */
|
|
3631
|
-
export const
|
|
3632
|
-
typeof
|
|
3633
|
-
> =
|
|
3550
|
+
export const CreatePromptLanguage$outboundSchema: z.ZodNativeEnum<
|
|
3551
|
+
typeof CreatePromptLanguage
|
|
3552
|
+
> = CreatePromptLanguage$inboundSchema;
|
|
3634
3553
|
|
|
3635
3554
|
/**
|
|
3636
3555
|
* @internal
|
|
3637
3556
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3638
3557
|
*/
|
|
3639
|
-
export namespace
|
|
3640
|
-
/** @deprecated use `
|
|
3641
|
-
export const inboundSchema =
|
|
3642
|
-
/** @deprecated use `
|
|
3643
|
-
export const outboundSchema =
|
|
3558
|
+
export namespace CreatePromptLanguage$ {
|
|
3559
|
+
/** @deprecated use `CreatePromptLanguage$inboundSchema` instead. */
|
|
3560
|
+
export const inboundSchema = CreatePromptLanguage$inboundSchema;
|
|
3561
|
+
/** @deprecated use `CreatePromptLanguage$outboundSchema` instead. */
|
|
3562
|
+
export const outboundSchema = CreatePromptLanguage$outboundSchema;
|
|
3644
3563
|
}
|
|
3645
3564
|
|
|
3646
3565
|
/** @internal */
|
|
@@ -3649,8 +3568,8 @@ export const CreatePromptPromptsMetadata$inboundSchema: z.ZodType<
|
|
|
3649
3568
|
z.ZodTypeDef,
|
|
3650
3569
|
unknown
|
|
3651
3570
|
> = z.object({
|
|
3652
|
-
use_cases: z.array(
|
|
3653
|
-
language:
|
|
3571
|
+
use_cases: z.array(CreatePromptUseCases$inboundSchema).optional(),
|
|
3572
|
+
language: CreatePromptLanguage$inboundSchema.optional(),
|
|
3654
3573
|
}).transform((v) => {
|
|
3655
3574
|
return remap$(v, {
|
|
3656
3575
|
"use_cases": "useCases",
|
|
@@ -3669,8 +3588,8 @@ export const CreatePromptPromptsMetadata$outboundSchema: z.ZodType<
|
|
|
3669
3588
|
z.ZodTypeDef,
|
|
3670
3589
|
CreatePromptPromptsMetadata
|
|
3671
3590
|
> = z.object({
|
|
3672
|
-
useCases: z.array(
|
|
3673
|
-
language:
|
|
3591
|
+
useCases: z.array(CreatePromptUseCases$outboundSchema).optional(),
|
|
3592
|
+
language: CreatePromptLanguage$outboundSchema.optional(),
|
|
3674
3593
|
}).transform((v) => {
|
|
3675
3594
|
return remap$(v, {
|
|
3676
3595
|
useCases: "use_cases",
|
|
@@ -3726,7 +3645,7 @@ export const CreatePromptResponseBody$inboundSchema: z.ZodType<
|
|
|
3726
3645
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3727
3646
|
display_name: z.string(),
|
|
3728
3647
|
description: z.nullable(z.string()).optional(),
|
|
3729
|
-
prompt_config: z.lazy(() =>
|
|
3648
|
+
prompt_config: z.lazy(() => CreatePromptPromptConfig$inboundSchema),
|
|
3730
3649
|
metadata: z.lazy(() => CreatePromptPromptsMetadata$inboundSchema).optional(),
|
|
3731
3650
|
}).transform((v) => {
|
|
3732
3651
|
return remap$(v, {
|
|
@@ -3751,7 +3670,7 @@ export type CreatePromptResponseBody$Outbound = {
|
|
|
3751
3670
|
updated_by_id?: string | null | undefined;
|
|
3752
3671
|
display_name: string;
|
|
3753
3672
|
description?: string | null | undefined;
|
|
3754
|
-
prompt_config:
|
|
3673
|
+
prompt_config: CreatePromptPromptConfig$Outbound;
|
|
3755
3674
|
metadata?: CreatePromptPromptsMetadata$Outbound | undefined;
|
|
3756
3675
|
};
|
|
3757
3676
|
|
|
@@ -3771,7 +3690,7 @@ export const CreatePromptResponseBody$outboundSchema: z.ZodType<
|
|
|
3771
3690
|
updatedById: z.nullable(z.string()).optional(),
|
|
3772
3691
|
displayName: z.string(),
|
|
3773
3692
|
description: z.nullable(z.string()).optional(),
|
|
3774
|
-
promptConfig: z.lazy(() =>
|
|
3693
|
+
promptConfig: z.lazy(() => CreatePromptPromptConfig$outboundSchema),
|
|
3775
3694
|
metadata: z.lazy(() => CreatePromptPromptsMetadata$outboundSchema).optional(),
|
|
3776
3695
|
}).transform((v) => {
|
|
3777
3696
|
return remap$(v, {
|