@orq-ai/node 3.1.6 → 3.1.7
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/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/operations/createcontact.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/package.json +1 -1
- package/packages/orq-rc/README.md +8 -61
- package/packages/orq-rc/docs/sdks/deployments/README.md +0 -81
- package/packages/orq-rc/docs/sdks/files/README.md +8 -8
- package/packages/orq-rc/docs/sdks/{remoteconfig → remoteconfigs}/README.md +8 -8
- package/packages/orq-rc/jsr.json +1 -2
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/contactsCreate.ts +1 -0
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +1 -0
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +1 -0
- package/packages/orq-rc/src/funcs/deploymentsList.ts +1 -0
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +1 -0
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +1 -0
- package/packages/orq-rc/src/funcs/{filesUpload.ts → filesCreate.ts} +3 -2
- package/packages/orq-rc/src/funcs/filesDelete.ts +1 -0
- package/packages/orq-rc/src/funcs/filesGet.ts +5 -1
- package/packages/orq-rc/src/funcs/filesList.ts +6 -3
- package/packages/orq-rc/src/funcs/promptsCreate.ts +1 -0
- package/packages/orq-rc/src/funcs/promptsDelete.ts +1 -0
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +1 -0
- package/packages/orq-rc/src/funcs/promptsList.ts +1 -0
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +1 -0
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +1 -0
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +1 -0
- package/packages/orq-rc/src/funcs/{remoteconfigGetConfig.ts → remoteconfigsRetrieve.ts} +3 -2
- package/packages/orq-rc/src/hooks/types.ts +1 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/matchers.ts +1 -4
- package/packages/orq-rc/src/lib/security.ts +0 -1
- package/packages/orq-rc/src/models/errors/index.ts +0 -1
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createprompt.ts +668 -770
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +31 -16
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +0 -7
- package/packages/orq-rc/src/models/operations/updateprompt.ts +64 -81
- package/packages/orq-rc/src/sdk/deployments.ts +0 -19
- package/packages/orq-rc/src/sdk/files.ts +11 -5
- package/packages/orq-rc/src/sdk/{remoteconfig.ts → remoteconfigs.ts} +5 -5
- package/packages/orq-rc/src/sdk/sdk.ts +4 -10
- package/src/lib/config.ts +3 -3
- package/src/models/operations/createcontact.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/packages/orq-rc/docs/sdks/promptsnippets/README.md +0 -534
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -150
- package/packages/orq-rc/src/funcs/promptSnippetsCreate.ts +0 -128
- package/packages/orq-rc/src/funcs/promptSnippetsDelete.ts +0 -131
- package/packages/orq-rc/src/funcs/promptSnippetsGet.ts +0 -130
- package/packages/orq-rc/src/funcs/promptSnippetsGetByKey.ts +0 -132
- package/packages/orq-rc/src/funcs/promptSnippetsList.ts +0 -132
- package/packages/orq-rc/src/funcs/promptSnippetsUpdate.ts +0 -139
- package/packages/orq-rc/src/lib/event-streams.ts +0 -264
- package/packages/orq-rc/src/models/errors/updatepromptsnippet.ts +0 -71
- package/packages/orq-rc/src/models/operations/createpromptsnippet.ts +0 -6239
- package/packages/orq-rc/src/models/operations/deletepromptsnippet.ts +0 -69
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -3062
- package/packages/orq-rc/src/models/operations/findonebykeypromptsnippet.ts +0 -4483
- package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +0 -4343
- package/packages/orq-rc/src/models/operations/getallpromptsnippets.ts +0 -4472
- package/packages/orq-rc/src/models/operations/updatepromptsnippet.ts +0 -6544
- package/packages/orq-rc/src/sdk/promptsnippets.ts +0 -99
|
@@ -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,12 +26,12 @@ 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.
|
|
33
33
|
*/
|
|
34
|
-
export const
|
|
34
|
+
export const Format = {
|
|
35
35
|
Url: "url",
|
|
36
36
|
B64Json: "b64_json",
|
|
37
37
|
Text: "text",
|
|
@@ -40,47 +40,45 @@ export const CreatePromptFormat = {
|
|
|
40
40
|
/**
|
|
41
41
|
* Only supported on `image` models.
|
|
42
42
|
*/
|
|
43
|
-
export type
|
|
43
|
+
export type Format = ClosedEnum<typeof Format>;
|
|
44
44
|
|
|
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
|
*/
|
|
@@ -180,7 +170,7 @@ export type CreatePromptModelParameters = {
|
|
|
180
170
|
/**
|
|
181
171
|
* Only supported on `image` models.
|
|
182
172
|
*/
|
|
183
|
-
format?:
|
|
173
|
+
format?: Format | undefined;
|
|
184
174
|
/**
|
|
185
175
|
* Only supported on `image` models.
|
|
186
176
|
*/
|
|
@@ -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,26 +194,22 @@ 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
|
|
|
226
|
-
export const
|
|
212
|
+
export const Provider = {
|
|
227
213
|
Cohere: "cohere",
|
|
228
214
|
Openai: "openai",
|
|
229
215
|
Anthropic: "anthropic",
|
|
@@ -243,7 +229,7 @@ export const CreatePromptProvider = {
|
|
|
243
229
|
Togetherai: "togetherai",
|
|
244
230
|
Elevenlabs: "elevenlabs",
|
|
245
231
|
} as const;
|
|
246
|
-
export type
|
|
232
|
+
export type Provider = ClosedEnum<typeof Provider>;
|
|
247
233
|
|
|
248
234
|
/**
|
|
249
235
|
* The role of the prompt message
|
|
@@ -346,23 +332,23 @@ export type CreatePromptMessages = {
|
|
|
346
332
|
/**
|
|
347
333
|
* A list of messages compatible with the openAI schema
|
|
348
334
|
*/
|
|
349
|
-
export type
|
|
335
|
+
export type PromptConfig = {
|
|
350
336
|
stream?: boolean | undefined;
|
|
351
337
|
model?: string | undefined;
|
|
352
338
|
/**
|
|
353
339
|
* The type of the model
|
|
354
340
|
*/
|
|
355
|
-
modelType?:
|
|
341
|
+
modelType?: ModelType | undefined;
|
|
356
342
|
/**
|
|
357
343
|
* Model Parameters: Not all parameters apply to every model
|
|
358
344
|
*/
|
|
359
|
-
modelParameters?:
|
|
360
|
-
provider?:
|
|
345
|
+
modelParameters?: ModelParameters | undefined;
|
|
346
|
+
provider?: Provider | undefined;
|
|
361
347
|
version?: string | undefined;
|
|
362
348
|
messages: Array<CreatePromptMessages>;
|
|
363
349
|
};
|
|
364
350
|
|
|
365
|
-
export const
|
|
351
|
+
export const UseCases = {
|
|
366
352
|
Agents: "Agents",
|
|
367
353
|
AgentsSimulations: "Agents simulations",
|
|
368
354
|
APIInteraction: "API interaction",
|
|
@@ -380,12 +366,12 @@ export const CreatePromptUseCases = {
|
|
|
380
366
|
Summarization: "Summarization",
|
|
381
367
|
Tagging: "Tagging",
|
|
382
368
|
} as const;
|
|
383
|
-
export type
|
|
369
|
+
export type UseCases = ClosedEnum<typeof UseCases>;
|
|
384
370
|
|
|
385
371
|
/**
|
|
386
372
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
387
373
|
*/
|
|
388
|
-
export const
|
|
374
|
+
export const Language = {
|
|
389
375
|
Chinese: "Chinese",
|
|
390
376
|
Dutch: "Dutch",
|
|
391
377
|
English: "English",
|
|
@@ -397,17 +383,17 @@ export const CreatePromptLanguage = {
|
|
|
397
383
|
/**
|
|
398
384
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
399
385
|
*/
|
|
400
|
-
export type
|
|
386
|
+
export type Language = ClosedEnum<typeof Language>;
|
|
401
387
|
|
|
402
388
|
export type CreatePromptMetadata = {
|
|
403
389
|
/**
|
|
404
390
|
* 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
|
|
405
391
|
*/
|
|
406
|
-
useCases?: Array<
|
|
392
|
+
useCases?: Array<UseCases> | undefined;
|
|
407
393
|
/**
|
|
408
394
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
409
395
|
*/
|
|
410
|
-
language?:
|
|
396
|
+
language?: Language | undefined;
|
|
411
397
|
};
|
|
412
398
|
|
|
413
399
|
export type CreatePromptRequestBody = {
|
|
@@ -422,7 +408,7 @@ export type CreatePromptRequestBody = {
|
|
|
422
408
|
/**
|
|
423
409
|
* A list of messages compatible with the openAI schema
|
|
424
410
|
*/
|
|
425
|
-
promptConfig:
|
|
411
|
+
promptConfig: PromptConfig;
|
|
426
412
|
metadata?: CreatePromptMetadata | undefined;
|
|
427
413
|
/**
|
|
428
414
|
* 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.
|
|
@@ -440,7 +426,7 @@ export type CreatePromptPromptsType = ClosedEnum<
|
|
|
440
426
|
/**
|
|
441
427
|
* The type of the model
|
|
442
428
|
*/
|
|
443
|
-
export const
|
|
429
|
+
export const CreatePromptModelType = {
|
|
444
430
|
Chat: "chat",
|
|
445
431
|
Completion: "completion",
|
|
446
432
|
Embedding: "embedding",
|
|
@@ -454,14 +440,12 @@ export const CreatePromptPromptsModelType = {
|
|
|
454
440
|
/**
|
|
455
441
|
* The type of the model
|
|
456
442
|
*/
|
|
457
|
-
export type
|
|
458
|
-
typeof CreatePromptPromptsModelType
|
|
459
|
-
>;
|
|
443
|
+
export type CreatePromptModelType = ClosedEnum<typeof CreatePromptModelType>;
|
|
460
444
|
|
|
461
445
|
/**
|
|
462
446
|
* Only supported on `image` models.
|
|
463
447
|
*/
|
|
464
|
-
export const
|
|
448
|
+
export const CreatePromptFormat = {
|
|
465
449
|
Url: "url",
|
|
466
450
|
B64Json: "b64_json",
|
|
467
451
|
Text: "text",
|
|
@@ -470,51 +454,47 @@ export const CreatePromptPromptsFormat = {
|
|
|
470
454
|
/**
|
|
471
455
|
* Only supported on `image` models.
|
|
472
456
|
*/
|
|
473
|
-
export type
|
|
474
|
-
typeof CreatePromptPromptsFormat
|
|
475
|
-
>;
|
|
457
|
+
export type CreatePromptFormat = ClosedEnum<typeof CreatePromptFormat>;
|
|
476
458
|
|
|
477
459
|
/**
|
|
478
460
|
* Only supported on `image` models.
|
|
479
461
|
*/
|
|
480
|
-
export const
|
|
462
|
+
export const CreatePromptQuality = {
|
|
481
463
|
Standard: "standard",
|
|
482
464
|
Hd: "hd",
|
|
483
465
|
} as const;
|
|
484
466
|
/**
|
|
485
467
|
* Only supported on `image` models.
|
|
486
468
|
*/
|
|
487
|
-
export type
|
|
488
|
-
typeof CreatePromptPromptsQuality
|
|
489
|
-
>;
|
|
469
|
+
export type CreatePromptQuality = ClosedEnum<typeof CreatePromptQuality>;
|
|
490
470
|
|
|
491
|
-
export const
|
|
471
|
+
export const CreatePromptResponseFormatPromptsResponseType = {
|
|
492
472
|
JsonObject: "json_object",
|
|
493
473
|
} as const;
|
|
494
|
-
export type
|
|
495
|
-
typeof
|
|
474
|
+
export type CreatePromptResponseFormatPromptsResponseType = ClosedEnum<
|
|
475
|
+
typeof CreatePromptResponseFormatPromptsResponseType
|
|
496
476
|
>;
|
|
497
477
|
|
|
498
|
-
export type
|
|
499
|
-
type:
|
|
478
|
+
export type CreatePromptResponseFormat2 = {
|
|
479
|
+
type: CreatePromptResponseFormatPromptsResponseType;
|
|
500
480
|
};
|
|
501
481
|
|
|
502
|
-
export const
|
|
482
|
+
export const CreatePromptResponseFormatPromptsType = {
|
|
503
483
|
JsonSchema: "json_schema",
|
|
504
484
|
} as const;
|
|
505
|
-
export type
|
|
506
|
-
typeof
|
|
485
|
+
export type CreatePromptResponseFormatPromptsType = ClosedEnum<
|
|
486
|
+
typeof CreatePromptResponseFormatPromptsType
|
|
507
487
|
>;
|
|
508
488
|
|
|
509
|
-
export type
|
|
489
|
+
export type CreatePromptResponseFormatJsonSchema = {
|
|
510
490
|
name: string;
|
|
511
491
|
strict: boolean;
|
|
512
492
|
schema: { [k: string]: any };
|
|
513
493
|
};
|
|
514
494
|
|
|
515
|
-
export type
|
|
516
|
-
type:
|
|
517
|
-
jsonSchema:
|
|
495
|
+
export type CreatePromptResponseFormat1 = {
|
|
496
|
+
type: CreatePromptResponseFormatPromptsType;
|
|
497
|
+
jsonSchema: CreatePromptResponseFormatJsonSchema;
|
|
518
498
|
};
|
|
519
499
|
|
|
520
500
|
/**
|
|
@@ -528,42 +508,42 @@ export type CreatePromptResponseFormatPrompts1 = {
|
|
|
528
508
|
*
|
|
529
509
|
* 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.
|
|
530
510
|
*/
|
|
531
|
-
export type
|
|
532
|
-
|
|
|
533
|
-
|
|
|
511
|
+
export type CreatePromptResponseFormat =
|
|
512
|
+
| CreatePromptResponseFormat2
|
|
513
|
+
| CreatePromptResponseFormat1;
|
|
534
514
|
|
|
535
515
|
/**
|
|
536
516
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
537
517
|
*/
|
|
538
|
-
export const
|
|
518
|
+
export const CreatePromptPhotoRealVersion = {
|
|
539
519
|
V1: "v1",
|
|
540
520
|
V2: "v2",
|
|
541
521
|
} as const;
|
|
542
522
|
/**
|
|
543
523
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
544
524
|
*/
|
|
545
|
-
export type
|
|
546
|
-
typeof
|
|
525
|
+
export type CreatePromptPhotoRealVersion = ClosedEnum<
|
|
526
|
+
typeof CreatePromptPhotoRealVersion
|
|
547
527
|
>;
|
|
548
528
|
|
|
549
529
|
/**
|
|
550
530
|
* The format to return the embeddings
|
|
551
531
|
*/
|
|
552
|
-
export const
|
|
532
|
+
export const CreatePromptEncodingFormat = {
|
|
553
533
|
Float: "float",
|
|
554
534
|
Base64: "base64",
|
|
555
535
|
} as const;
|
|
556
536
|
/**
|
|
557
537
|
* The format to return the embeddings
|
|
558
538
|
*/
|
|
559
|
-
export type
|
|
560
|
-
typeof
|
|
539
|
+
export type CreatePromptEncodingFormat = ClosedEnum<
|
|
540
|
+
typeof CreatePromptEncodingFormat
|
|
561
541
|
>;
|
|
562
542
|
|
|
563
543
|
/**
|
|
564
544
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
565
545
|
*/
|
|
566
|
-
export const
|
|
546
|
+
export const CreatePromptReasoningEffort = {
|
|
567
547
|
Low: "low",
|
|
568
548
|
Medium: "medium",
|
|
569
549
|
High: "high",
|
|
@@ -571,14 +551,14 @@ export const CreatePromptPromptsReasoningEffort = {
|
|
|
571
551
|
/**
|
|
572
552
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
573
553
|
*/
|
|
574
|
-
export type
|
|
575
|
-
typeof
|
|
554
|
+
export type CreatePromptReasoningEffort = ClosedEnum<
|
|
555
|
+
typeof CreatePromptReasoningEffort
|
|
576
556
|
>;
|
|
577
557
|
|
|
578
558
|
/**
|
|
579
559
|
* Model Parameters: Not all parameters apply to every model
|
|
580
560
|
*/
|
|
581
|
-
export type
|
|
561
|
+
export type CreatePromptModelParameters = {
|
|
582
562
|
/**
|
|
583
563
|
* Only supported on `chat` and `completion` models.
|
|
584
564
|
*/
|
|
@@ -614,7 +594,7 @@ export type CreatePromptPromptsModelParameters = {
|
|
|
614
594
|
/**
|
|
615
595
|
* Only supported on `image` models.
|
|
616
596
|
*/
|
|
617
|
-
format?:
|
|
597
|
+
format?: CreatePromptFormat | undefined;
|
|
618
598
|
/**
|
|
619
599
|
* Only supported on `image` models.
|
|
620
600
|
*/
|
|
@@ -622,7 +602,7 @@ export type CreatePromptPromptsModelParameters = {
|
|
|
622
602
|
/**
|
|
623
603
|
* Only supported on `image` models.
|
|
624
604
|
*/
|
|
625
|
-
quality?:
|
|
605
|
+
quality?: CreatePromptQuality | undefined;
|
|
626
606
|
/**
|
|
627
607
|
* Only supported on `image` models.
|
|
628
608
|
*/
|
|
@@ -639,25 +619,25 @@ export type CreatePromptPromptsModelParameters = {
|
|
|
639
619
|
* 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.
|
|
640
620
|
*/
|
|
641
621
|
responseFormat?:
|
|
642
|
-
|
|
|
643
|
-
|
|
|
622
|
+
| CreatePromptResponseFormat2
|
|
623
|
+
| CreatePromptResponseFormat1
|
|
644
624
|
| null
|
|
645
625
|
| undefined;
|
|
646
626
|
/**
|
|
647
627
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
648
628
|
*/
|
|
649
|
-
photoRealVersion?:
|
|
629
|
+
photoRealVersion?: CreatePromptPhotoRealVersion | undefined;
|
|
650
630
|
/**
|
|
651
631
|
* The format to return the embeddings
|
|
652
632
|
*/
|
|
653
|
-
encodingFormat?:
|
|
633
|
+
encodingFormat?: CreatePromptEncodingFormat | undefined;
|
|
654
634
|
/**
|
|
655
635
|
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
656
636
|
*/
|
|
657
|
-
reasoningEffort?:
|
|
637
|
+
reasoningEffort?: CreatePromptReasoningEffort | undefined;
|
|
658
638
|
};
|
|
659
639
|
|
|
660
|
-
export const
|
|
640
|
+
export const CreatePromptProvider = {
|
|
661
641
|
Cohere: "cohere",
|
|
662
642
|
Openai: "openai",
|
|
663
643
|
Anthropic: "anthropic",
|
|
@@ -677,9 +657,7 @@ export const CreatePromptPromptsProvider = {
|
|
|
677
657
|
Togetherai: "togetherai",
|
|
678
658
|
Elevenlabs: "elevenlabs",
|
|
679
659
|
} as const;
|
|
680
|
-
export type
|
|
681
|
-
typeof CreatePromptPromptsProvider
|
|
682
|
-
>;
|
|
660
|
+
export type CreatePromptProvider = ClosedEnum<typeof CreatePromptProvider>;
|
|
683
661
|
|
|
684
662
|
/**
|
|
685
663
|
* The role of the prompt message
|
|
@@ -794,7 +772,7 @@ export type CreatePromptPromptsMessages = {
|
|
|
794
772
|
/**
|
|
795
773
|
* A list of messages compatible with the openAI schema
|
|
796
774
|
*/
|
|
797
|
-
export type
|
|
775
|
+
export type CreatePromptPromptConfig = {
|
|
798
776
|
stream?: boolean | undefined;
|
|
799
777
|
model?: string | undefined;
|
|
800
778
|
/**
|
|
@@ -804,12 +782,12 @@ export type CreatePromptPromptsPromptConfig = {
|
|
|
804
782
|
/**
|
|
805
783
|
* The type of the model
|
|
806
784
|
*/
|
|
807
|
-
modelType?:
|
|
785
|
+
modelType?: CreatePromptModelType | undefined;
|
|
808
786
|
/**
|
|
809
787
|
* Model Parameters: Not all parameters apply to every model
|
|
810
788
|
*/
|
|
811
|
-
modelParameters?:
|
|
812
|
-
provider?:
|
|
789
|
+
modelParameters?: CreatePromptModelParameters | undefined;
|
|
790
|
+
provider?: CreatePromptProvider | undefined;
|
|
813
791
|
/**
|
|
814
792
|
* The id of the resource
|
|
815
793
|
*/
|
|
@@ -818,7 +796,7 @@ export type CreatePromptPromptsPromptConfig = {
|
|
|
818
796
|
messages: Array<CreatePromptPromptsMessages>;
|
|
819
797
|
};
|
|
820
798
|
|
|
821
|
-
export const
|
|
799
|
+
export const CreatePromptUseCases = {
|
|
822
800
|
Agents: "Agents",
|
|
823
801
|
AgentsSimulations: "Agents simulations",
|
|
824
802
|
APIInteraction: "API interaction",
|
|
@@ -836,14 +814,12 @@ export const CreatePromptPromptsUseCases = {
|
|
|
836
814
|
Summarization: "Summarization",
|
|
837
815
|
Tagging: "Tagging",
|
|
838
816
|
} as const;
|
|
839
|
-
export type
|
|
840
|
-
typeof CreatePromptPromptsUseCases
|
|
841
|
-
>;
|
|
817
|
+
export type CreatePromptUseCases = ClosedEnum<typeof CreatePromptUseCases>;
|
|
842
818
|
|
|
843
819
|
/**
|
|
844
820
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
845
821
|
*/
|
|
846
|
-
export const
|
|
822
|
+
export const CreatePromptLanguage = {
|
|
847
823
|
Chinese: "Chinese",
|
|
848
824
|
Dutch: "Dutch",
|
|
849
825
|
English: "English",
|
|
@@ -855,19 +831,17 @@ export const CreatePromptPromptsLanguage = {
|
|
|
855
831
|
/**
|
|
856
832
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
857
833
|
*/
|
|
858
|
-
export type
|
|
859
|
-
typeof CreatePromptPromptsLanguage
|
|
860
|
-
>;
|
|
834
|
+
export type CreatePromptLanguage = ClosedEnum<typeof CreatePromptLanguage>;
|
|
861
835
|
|
|
862
836
|
export type CreatePromptPromptsMetadata = {
|
|
863
837
|
/**
|
|
864
838
|
* 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
|
|
865
839
|
*/
|
|
866
|
-
useCases?: Array<
|
|
840
|
+
useCases?: Array<CreatePromptUseCases> | undefined;
|
|
867
841
|
/**
|
|
868
842
|
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
869
843
|
*/
|
|
870
|
-
language?:
|
|
844
|
+
language?: CreatePromptLanguage | undefined;
|
|
871
845
|
};
|
|
872
846
|
|
|
873
847
|
/**
|
|
@@ -893,177 +867,164 @@ export type CreatePromptResponseBody = {
|
|
|
893
867
|
/**
|
|
894
868
|
* A list of messages compatible with the openAI schema
|
|
895
869
|
*/
|
|
896
|
-
promptConfig:
|
|
870
|
+
promptConfig: CreatePromptPromptConfig;
|
|
897
871
|
metadata?: CreatePromptPromptsMetadata | undefined;
|
|
898
872
|
};
|
|
899
873
|
|
|
900
874
|
/** @internal */
|
|
901
|
-
export const
|
|
902
|
-
|
|
903
|
-
> = z.nativeEnum(CreatePromptModelType);
|
|
875
|
+
export const ModelType$inboundSchema: z.ZodNativeEnum<typeof ModelType> = z
|
|
876
|
+
.nativeEnum(ModelType);
|
|
904
877
|
|
|
905
878
|
/** @internal */
|
|
906
|
-
export const
|
|
907
|
-
|
|
908
|
-
> = CreatePromptModelType$inboundSchema;
|
|
879
|
+
export const ModelType$outboundSchema: z.ZodNativeEnum<typeof ModelType> =
|
|
880
|
+
ModelType$inboundSchema;
|
|
909
881
|
|
|
910
882
|
/**
|
|
911
883
|
* @internal
|
|
912
884
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
913
885
|
*/
|
|
914
|
-
export namespace
|
|
915
|
-
/** @deprecated use `
|
|
916
|
-
export const inboundSchema =
|
|
917
|
-
/** @deprecated use `
|
|
918
|
-
export const outboundSchema =
|
|
886
|
+
export namespace ModelType$ {
|
|
887
|
+
/** @deprecated use `ModelType$inboundSchema` instead. */
|
|
888
|
+
export const inboundSchema = ModelType$inboundSchema;
|
|
889
|
+
/** @deprecated use `ModelType$outboundSchema` instead. */
|
|
890
|
+
export const outboundSchema = ModelType$outboundSchema;
|
|
919
891
|
}
|
|
920
892
|
|
|
921
893
|
/** @internal */
|
|
922
|
-
export const
|
|
923
|
-
|
|
924
|
-
> = z.nativeEnum(CreatePromptFormat);
|
|
894
|
+
export const Format$inboundSchema: z.ZodNativeEnum<typeof Format> = z
|
|
895
|
+
.nativeEnum(Format);
|
|
925
896
|
|
|
926
897
|
/** @internal */
|
|
927
|
-
export const
|
|
928
|
-
|
|
929
|
-
> = CreatePromptFormat$inboundSchema;
|
|
898
|
+
export const Format$outboundSchema: z.ZodNativeEnum<typeof Format> =
|
|
899
|
+
Format$inboundSchema;
|
|
930
900
|
|
|
931
901
|
/**
|
|
932
902
|
* @internal
|
|
933
903
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
934
904
|
*/
|
|
935
|
-
export namespace
|
|
936
|
-
/** @deprecated use `
|
|
937
|
-
export const inboundSchema =
|
|
938
|
-
/** @deprecated use `
|
|
939
|
-
export const outboundSchema =
|
|
905
|
+
export namespace Format$ {
|
|
906
|
+
/** @deprecated use `Format$inboundSchema` instead. */
|
|
907
|
+
export const inboundSchema = Format$inboundSchema;
|
|
908
|
+
/** @deprecated use `Format$outboundSchema` instead. */
|
|
909
|
+
export const outboundSchema = Format$outboundSchema;
|
|
940
910
|
}
|
|
941
911
|
|
|
942
912
|
/** @internal */
|
|
943
|
-
export const
|
|
944
|
-
|
|
945
|
-
> = z.nativeEnum(CreatePromptQuality);
|
|
913
|
+
export const Quality$inboundSchema: z.ZodNativeEnum<typeof Quality> = z
|
|
914
|
+
.nativeEnum(Quality);
|
|
946
915
|
|
|
947
916
|
/** @internal */
|
|
948
|
-
export const
|
|
949
|
-
|
|
950
|
-
> = CreatePromptQuality$inboundSchema;
|
|
917
|
+
export const Quality$outboundSchema: z.ZodNativeEnum<typeof Quality> =
|
|
918
|
+
Quality$inboundSchema;
|
|
951
919
|
|
|
952
920
|
/**
|
|
953
921
|
* @internal
|
|
954
922
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
955
923
|
*/
|
|
956
|
-
export namespace
|
|
957
|
-
/** @deprecated use `
|
|
958
|
-
export const inboundSchema =
|
|
959
|
-
/** @deprecated use `
|
|
960
|
-
export const outboundSchema =
|
|
924
|
+
export namespace Quality$ {
|
|
925
|
+
/** @deprecated use `Quality$inboundSchema` instead. */
|
|
926
|
+
export const inboundSchema = Quality$inboundSchema;
|
|
927
|
+
/** @deprecated use `Quality$outboundSchema` instead. */
|
|
928
|
+
export const outboundSchema = Quality$outboundSchema;
|
|
961
929
|
}
|
|
962
930
|
|
|
963
931
|
/** @internal */
|
|
964
|
-
export const
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
);
|
|
932
|
+
export const CreatePromptResponseFormatType$inboundSchema: z.ZodNativeEnum<
|
|
933
|
+
typeof CreatePromptResponseFormatType
|
|
934
|
+
> = z.nativeEnum(CreatePromptResponseFormatType);
|
|
968
935
|
|
|
969
936
|
/** @internal */
|
|
970
|
-
export const
|
|
971
|
-
|
|
972
|
-
|
|
937
|
+
export const CreatePromptResponseFormatType$outboundSchema: z.ZodNativeEnum<
|
|
938
|
+
typeof CreatePromptResponseFormatType
|
|
939
|
+
> = CreatePromptResponseFormatType$inboundSchema;
|
|
973
940
|
|
|
974
941
|
/**
|
|
975
942
|
* @internal
|
|
976
943
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
977
944
|
*/
|
|
978
|
-
export namespace
|
|
979
|
-
/** @deprecated use `
|
|
980
|
-
export const inboundSchema =
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
export const outboundSchema =
|
|
984
|
-
CreatePromptResponseFormatPromptsType$outboundSchema;
|
|
945
|
+
export namespace CreatePromptResponseFormatType$ {
|
|
946
|
+
/** @deprecated use `CreatePromptResponseFormatType$inboundSchema` instead. */
|
|
947
|
+
export const inboundSchema = CreatePromptResponseFormatType$inboundSchema;
|
|
948
|
+
/** @deprecated use `CreatePromptResponseFormatType$outboundSchema` instead. */
|
|
949
|
+
export const outboundSchema = CreatePromptResponseFormatType$outboundSchema;
|
|
985
950
|
}
|
|
986
951
|
|
|
987
952
|
/** @internal */
|
|
988
|
-
export const
|
|
989
|
-
|
|
953
|
+
export const ResponseFormat2$inboundSchema: z.ZodType<
|
|
954
|
+
ResponseFormat2,
|
|
990
955
|
z.ZodTypeDef,
|
|
991
956
|
unknown
|
|
992
957
|
> = z.object({
|
|
993
|
-
type:
|
|
958
|
+
type: CreatePromptResponseFormatType$inboundSchema,
|
|
994
959
|
});
|
|
995
960
|
|
|
996
961
|
/** @internal */
|
|
997
|
-
export type
|
|
962
|
+
export type ResponseFormat2$Outbound = {
|
|
998
963
|
type: string;
|
|
999
964
|
};
|
|
1000
965
|
|
|
1001
966
|
/** @internal */
|
|
1002
|
-
export const
|
|
1003
|
-
|
|
967
|
+
export const ResponseFormat2$outboundSchema: z.ZodType<
|
|
968
|
+
ResponseFormat2$Outbound,
|
|
1004
969
|
z.ZodTypeDef,
|
|
1005
|
-
|
|
970
|
+
ResponseFormat2
|
|
1006
971
|
> = z.object({
|
|
1007
|
-
type:
|
|
972
|
+
type: CreatePromptResponseFormatType$outboundSchema,
|
|
1008
973
|
});
|
|
1009
974
|
|
|
1010
975
|
/**
|
|
1011
976
|
* @internal
|
|
1012
977
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1013
978
|
*/
|
|
1014
|
-
export namespace
|
|
1015
|
-
/** @deprecated use `
|
|
1016
|
-
export const inboundSchema =
|
|
1017
|
-
/** @deprecated use `
|
|
1018
|
-
export const outboundSchema =
|
|
1019
|
-
/** @deprecated use `
|
|
1020
|
-
export type Outbound =
|
|
979
|
+
export namespace ResponseFormat2$ {
|
|
980
|
+
/** @deprecated use `ResponseFormat2$inboundSchema` instead. */
|
|
981
|
+
export const inboundSchema = ResponseFormat2$inboundSchema;
|
|
982
|
+
/** @deprecated use `ResponseFormat2$outboundSchema` instead. */
|
|
983
|
+
export const outboundSchema = ResponseFormat2$outboundSchema;
|
|
984
|
+
/** @deprecated use `ResponseFormat2$Outbound` instead. */
|
|
985
|
+
export type Outbound = ResponseFormat2$Outbound;
|
|
1021
986
|
}
|
|
1022
987
|
|
|
1023
|
-
export function
|
|
1024
|
-
|
|
988
|
+
export function responseFormat2ToJSON(
|
|
989
|
+
responseFormat2: ResponseFormat2,
|
|
1025
990
|
): string {
|
|
1026
|
-
return JSON.stringify(
|
|
1027
|
-
CreatePromptResponseFormat2$outboundSchema.parse(
|
|
1028
|
-
createPromptResponseFormat2,
|
|
1029
|
-
),
|
|
1030
|
-
);
|
|
991
|
+
return JSON.stringify(ResponseFormat2$outboundSchema.parse(responseFormat2));
|
|
1031
992
|
}
|
|
1032
993
|
|
|
1033
|
-
export function
|
|
994
|
+
export function responseFormat2FromJSON(
|
|
1034
995
|
jsonString: string,
|
|
1035
|
-
): SafeParseResult<
|
|
996
|
+
): SafeParseResult<ResponseFormat2, SDKValidationError> {
|
|
1036
997
|
return safeParse(
|
|
1037
998
|
jsonString,
|
|
1038
|
-
(x) =>
|
|
1039
|
-
`Failed to parse '
|
|
999
|
+
(x) => ResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
1000
|
+
`Failed to parse 'ResponseFormat2' from JSON`,
|
|
1040
1001
|
);
|
|
1041
1002
|
}
|
|
1042
1003
|
|
|
1043
1004
|
/** @internal */
|
|
1044
|
-
export const
|
|
1045
|
-
typeof
|
|
1046
|
-
> = z.nativeEnum(
|
|
1005
|
+
export const ResponseFormatType$inboundSchema: z.ZodNativeEnum<
|
|
1006
|
+
typeof ResponseFormatType
|
|
1007
|
+
> = z.nativeEnum(ResponseFormatType);
|
|
1047
1008
|
|
|
1048
1009
|
/** @internal */
|
|
1049
|
-
export const
|
|
1050
|
-
typeof
|
|
1051
|
-
> =
|
|
1010
|
+
export const ResponseFormatType$outboundSchema: z.ZodNativeEnum<
|
|
1011
|
+
typeof ResponseFormatType
|
|
1012
|
+
> = ResponseFormatType$inboundSchema;
|
|
1052
1013
|
|
|
1053
1014
|
/**
|
|
1054
1015
|
* @internal
|
|
1055
1016
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1056
1017
|
*/
|
|
1057
|
-
export namespace
|
|
1058
|
-
/** @deprecated use `
|
|
1059
|
-
export const inboundSchema =
|
|
1060
|
-
/** @deprecated use `
|
|
1061
|
-
export const outboundSchema =
|
|
1018
|
+
export namespace ResponseFormatType$ {
|
|
1019
|
+
/** @deprecated use `ResponseFormatType$inboundSchema` instead. */
|
|
1020
|
+
export const inboundSchema = ResponseFormatType$inboundSchema;
|
|
1021
|
+
/** @deprecated use `ResponseFormatType$outboundSchema` instead. */
|
|
1022
|
+
export const outboundSchema = ResponseFormatType$outboundSchema;
|
|
1062
1023
|
}
|
|
1063
1024
|
|
|
1064
1025
|
/** @internal */
|
|
1065
|
-
export const
|
|
1066
|
-
|
|
1026
|
+
export const JsonSchema$inboundSchema: z.ZodType<
|
|
1027
|
+
JsonSchema,
|
|
1067
1028
|
z.ZodTypeDef,
|
|
1068
1029
|
unknown
|
|
1069
1030
|
> = z.object({
|
|
@@ -1073,17 +1034,17 @@ export const CreatePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
|
|
|
1073
1034
|
});
|
|
1074
1035
|
|
|
1075
1036
|
/** @internal */
|
|
1076
|
-
export type
|
|
1037
|
+
export type JsonSchema$Outbound = {
|
|
1077
1038
|
name: string;
|
|
1078
1039
|
strict: boolean;
|
|
1079
1040
|
schema: { [k: string]: any };
|
|
1080
1041
|
};
|
|
1081
1042
|
|
|
1082
1043
|
/** @internal */
|
|
1083
|
-
export const
|
|
1084
|
-
|
|
1044
|
+
export const JsonSchema$outboundSchema: z.ZodType<
|
|
1045
|
+
JsonSchema$Outbound,
|
|
1085
1046
|
z.ZodTypeDef,
|
|
1086
|
-
|
|
1047
|
+
JsonSchema
|
|
1087
1048
|
> = z.object({
|
|
1088
1049
|
name: z.string(),
|
|
1089
1050
|
strict: z.boolean(),
|
|
@@ -1094,46 +1055,37 @@ export const CreatePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
|
|
|
1094
1055
|
* @internal
|
|
1095
1056
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1096
1057
|
*/
|
|
1097
|
-
export namespace
|
|
1098
|
-
/** @deprecated use `
|
|
1099
|
-
export const inboundSchema =
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
/** @deprecated use `CreatePromptResponseFormatJsonSchema$Outbound` instead. */
|
|
1105
|
-
export type Outbound = CreatePromptResponseFormatJsonSchema$Outbound;
|
|
1058
|
+
export namespace JsonSchema$ {
|
|
1059
|
+
/** @deprecated use `JsonSchema$inboundSchema` instead. */
|
|
1060
|
+
export const inboundSchema = JsonSchema$inboundSchema;
|
|
1061
|
+
/** @deprecated use `JsonSchema$outboundSchema` instead. */
|
|
1062
|
+
export const outboundSchema = JsonSchema$outboundSchema;
|
|
1063
|
+
/** @deprecated use `JsonSchema$Outbound` instead. */
|
|
1064
|
+
export type Outbound = JsonSchema$Outbound;
|
|
1106
1065
|
}
|
|
1107
1066
|
|
|
1108
|
-
export function
|
|
1109
|
-
|
|
1110
|
-
): string {
|
|
1111
|
-
return JSON.stringify(
|
|
1112
|
-
CreatePromptResponseFormatJsonSchema$outboundSchema.parse(
|
|
1113
|
-
createPromptResponseFormatJsonSchema,
|
|
1114
|
-
),
|
|
1115
|
-
);
|
|
1067
|
+
export function jsonSchemaToJSON(jsonSchema: JsonSchema): string {
|
|
1068
|
+
return JSON.stringify(JsonSchema$outboundSchema.parse(jsonSchema));
|
|
1116
1069
|
}
|
|
1117
1070
|
|
|
1118
|
-
export function
|
|
1071
|
+
export function jsonSchemaFromJSON(
|
|
1119
1072
|
jsonString: string,
|
|
1120
|
-
): SafeParseResult<
|
|
1073
|
+
): SafeParseResult<JsonSchema, SDKValidationError> {
|
|
1121
1074
|
return safeParse(
|
|
1122
1075
|
jsonString,
|
|
1123
|
-
(x) =>
|
|
1124
|
-
|
|
1125
|
-
`Failed to parse 'CreatePromptResponseFormatJsonSchema' from JSON`,
|
|
1076
|
+
(x) => JsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
1077
|
+
`Failed to parse 'JsonSchema' from JSON`,
|
|
1126
1078
|
);
|
|
1127
1079
|
}
|
|
1128
1080
|
|
|
1129
1081
|
/** @internal */
|
|
1130
|
-
export const
|
|
1131
|
-
|
|
1082
|
+
export const ResponseFormat1$inboundSchema: z.ZodType<
|
|
1083
|
+
ResponseFormat1,
|
|
1132
1084
|
z.ZodTypeDef,
|
|
1133
1085
|
unknown
|
|
1134
1086
|
> = z.object({
|
|
1135
|
-
type:
|
|
1136
|
-
json_schema: z.lazy(() =>
|
|
1087
|
+
type: ResponseFormatType$inboundSchema,
|
|
1088
|
+
json_schema: z.lazy(() => JsonSchema$inboundSchema),
|
|
1137
1089
|
}).transform((v) => {
|
|
1138
1090
|
return remap$(v, {
|
|
1139
1091
|
"json_schema": "jsonSchema",
|
|
@@ -1141,19 +1093,19 @@ export const CreatePromptResponseFormat1$inboundSchema: z.ZodType<
|
|
|
1141
1093
|
});
|
|
1142
1094
|
|
|
1143
1095
|
/** @internal */
|
|
1144
|
-
export type
|
|
1096
|
+
export type ResponseFormat1$Outbound = {
|
|
1145
1097
|
type: string;
|
|
1146
|
-
json_schema:
|
|
1098
|
+
json_schema: JsonSchema$Outbound;
|
|
1147
1099
|
};
|
|
1148
1100
|
|
|
1149
1101
|
/** @internal */
|
|
1150
|
-
export const
|
|
1151
|
-
|
|
1102
|
+
export const ResponseFormat1$outboundSchema: z.ZodType<
|
|
1103
|
+
ResponseFormat1$Outbound,
|
|
1152
1104
|
z.ZodTypeDef,
|
|
1153
|
-
|
|
1105
|
+
ResponseFormat1
|
|
1154
1106
|
> = z.object({
|
|
1155
|
-
type:
|
|
1156
|
-
jsonSchema: z.lazy(() =>
|
|
1107
|
+
type: ResponseFormatType$outboundSchema,
|
|
1108
|
+
jsonSchema: z.lazy(() => JsonSchema$outboundSchema),
|
|
1157
1109
|
}).transform((v) => {
|
|
1158
1110
|
return remap$(v, {
|
|
1159
1111
|
jsonSchema: "json_schema",
|
|
@@ -1164,157 +1116,149 @@ export const CreatePromptResponseFormat1$outboundSchema: z.ZodType<
|
|
|
1164
1116
|
* @internal
|
|
1165
1117
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1166
1118
|
*/
|
|
1167
|
-
export namespace
|
|
1168
|
-
/** @deprecated use `
|
|
1169
|
-
export const inboundSchema =
|
|
1170
|
-
/** @deprecated use `
|
|
1171
|
-
export const outboundSchema =
|
|
1172
|
-
/** @deprecated use `
|
|
1173
|
-
export type Outbound =
|
|
1119
|
+
export namespace ResponseFormat1$ {
|
|
1120
|
+
/** @deprecated use `ResponseFormat1$inboundSchema` instead. */
|
|
1121
|
+
export const inboundSchema = ResponseFormat1$inboundSchema;
|
|
1122
|
+
/** @deprecated use `ResponseFormat1$outboundSchema` instead. */
|
|
1123
|
+
export const outboundSchema = ResponseFormat1$outboundSchema;
|
|
1124
|
+
/** @deprecated use `ResponseFormat1$Outbound` instead. */
|
|
1125
|
+
export type Outbound = ResponseFormat1$Outbound;
|
|
1174
1126
|
}
|
|
1175
1127
|
|
|
1176
|
-
export function
|
|
1177
|
-
|
|
1128
|
+
export function responseFormat1ToJSON(
|
|
1129
|
+
responseFormat1: ResponseFormat1,
|
|
1178
1130
|
): string {
|
|
1179
|
-
return JSON.stringify(
|
|
1180
|
-
CreatePromptResponseFormat1$outboundSchema.parse(
|
|
1181
|
-
createPromptResponseFormat1,
|
|
1182
|
-
),
|
|
1183
|
-
);
|
|
1131
|
+
return JSON.stringify(ResponseFormat1$outboundSchema.parse(responseFormat1));
|
|
1184
1132
|
}
|
|
1185
1133
|
|
|
1186
|
-
export function
|
|
1134
|
+
export function responseFormat1FromJSON(
|
|
1187
1135
|
jsonString: string,
|
|
1188
|
-
): SafeParseResult<
|
|
1136
|
+
): SafeParseResult<ResponseFormat1, SDKValidationError> {
|
|
1189
1137
|
return safeParse(
|
|
1190
1138
|
jsonString,
|
|
1191
|
-
(x) =>
|
|
1192
|
-
`Failed to parse '
|
|
1139
|
+
(x) => ResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
1140
|
+
`Failed to parse 'ResponseFormat1' from JSON`,
|
|
1193
1141
|
);
|
|
1194
1142
|
}
|
|
1195
1143
|
|
|
1196
1144
|
/** @internal */
|
|
1197
|
-
export const
|
|
1198
|
-
|
|
1145
|
+
export const ResponseFormat$inboundSchema: z.ZodType<
|
|
1146
|
+
ResponseFormat,
|
|
1199
1147
|
z.ZodTypeDef,
|
|
1200
1148
|
unknown
|
|
1201
1149
|
> = z.union([
|
|
1202
|
-
z.lazy(() =>
|
|
1203
|
-
z.lazy(() =>
|
|
1150
|
+
z.lazy(() => ResponseFormat2$inboundSchema),
|
|
1151
|
+
z.lazy(() => ResponseFormat1$inboundSchema),
|
|
1204
1152
|
]);
|
|
1205
1153
|
|
|
1206
1154
|
/** @internal */
|
|
1207
|
-
export type
|
|
1208
|
-
|
|
|
1209
|
-
|
|
|
1155
|
+
export type ResponseFormat$Outbound =
|
|
1156
|
+
| ResponseFormat2$Outbound
|
|
1157
|
+
| ResponseFormat1$Outbound;
|
|
1210
1158
|
|
|
1211
1159
|
/** @internal */
|
|
1212
|
-
export const
|
|
1213
|
-
|
|
1160
|
+
export const ResponseFormat$outboundSchema: z.ZodType<
|
|
1161
|
+
ResponseFormat$Outbound,
|
|
1214
1162
|
z.ZodTypeDef,
|
|
1215
|
-
|
|
1163
|
+
ResponseFormat
|
|
1216
1164
|
> = z.union([
|
|
1217
|
-
z.lazy(() =>
|
|
1218
|
-
z.lazy(() =>
|
|
1165
|
+
z.lazy(() => ResponseFormat2$outboundSchema),
|
|
1166
|
+
z.lazy(() => ResponseFormat1$outboundSchema),
|
|
1219
1167
|
]);
|
|
1220
1168
|
|
|
1221
1169
|
/**
|
|
1222
1170
|
* @internal
|
|
1223
1171
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1224
1172
|
*/
|
|
1225
|
-
export namespace
|
|
1226
|
-
/** @deprecated use `
|
|
1227
|
-
export const inboundSchema =
|
|
1228
|
-
/** @deprecated use `
|
|
1229
|
-
export const outboundSchema =
|
|
1230
|
-
/** @deprecated use `
|
|
1231
|
-
export type Outbound =
|
|
1173
|
+
export namespace ResponseFormat$ {
|
|
1174
|
+
/** @deprecated use `ResponseFormat$inboundSchema` instead. */
|
|
1175
|
+
export const inboundSchema = ResponseFormat$inboundSchema;
|
|
1176
|
+
/** @deprecated use `ResponseFormat$outboundSchema` instead. */
|
|
1177
|
+
export const outboundSchema = ResponseFormat$outboundSchema;
|
|
1178
|
+
/** @deprecated use `ResponseFormat$Outbound` instead. */
|
|
1179
|
+
export type Outbound = ResponseFormat$Outbound;
|
|
1232
1180
|
}
|
|
1233
1181
|
|
|
1234
|
-
export function
|
|
1235
|
-
|
|
1236
|
-
): string {
|
|
1237
|
-
return JSON.stringify(
|
|
1238
|
-
CreatePromptResponseFormat$outboundSchema.parse(createPromptResponseFormat),
|
|
1239
|
-
);
|
|
1182
|
+
export function responseFormatToJSON(responseFormat: ResponseFormat): string {
|
|
1183
|
+
return JSON.stringify(ResponseFormat$outboundSchema.parse(responseFormat));
|
|
1240
1184
|
}
|
|
1241
1185
|
|
|
1242
|
-
export function
|
|
1186
|
+
export function responseFormatFromJSON(
|
|
1243
1187
|
jsonString: string,
|
|
1244
|
-
): SafeParseResult<
|
|
1188
|
+
): SafeParseResult<ResponseFormat, SDKValidationError> {
|
|
1245
1189
|
return safeParse(
|
|
1246
1190
|
jsonString,
|
|
1247
|
-
(x) =>
|
|
1248
|
-
`Failed to parse '
|
|
1191
|
+
(x) => ResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1192
|
+
`Failed to parse 'ResponseFormat' from JSON`,
|
|
1249
1193
|
);
|
|
1250
1194
|
}
|
|
1251
1195
|
|
|
1252
1196
|
/** @internal */
|
|
1253
|
-
export const
|
|
1254
|
-
typeof
|
|
1255
|
-
> = z.nativeEnum(
|
|
1197
|
+
export const PhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
1198
|
+
typeof PhotoRealVersion
|
|
1199
|
+
> = z.nativeEnum(PhotoRealVersion);
|
|
1256
1200
|
|
|
1257
1201
|
/** @internal */
|
|
1258
|
-
export const
|
|
1259
|
-
typeof
|
|
1260
|
-
> =
|
|
1202
|
+
export const PhotoRealVersion$outboundSchema: z.ZodNativeEnum<
|
|
1203
|
+
typeof PhotoRealVersion
|
|
1204
|
+
> = PhotoRealVersion$inboundSchema;
|
|
1261
1205
|
|
|
1262
1206
|
/**
|
|
1263
1207
|
* @internal
|
|
1264
1208
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1265
1209
|
*/
|
|
1266
|
-
export namespace
|
|
1267
|
-
/** @deprecated use `
|
|
1268
|
-
export const inboundSchema =
|
|
1269
|
-
/** @deprecated use `
|
|
1270
|
-
export const outboundSchema =
|
|
1210
|
+
export namespace PhotoRealVersion$ {
|
|
1211
|
+
/** @deprecated use `PhotoRealVersion$inboundSchema` instead. */
|
|
1212
|
+
export const inboundSchema = PhotoRealVersion$inboundSchema;
|
|
1213
|
+
/** @deprecated use `PhotoRealVersion$outboundSchema` instead. */
|
|
1214
|
+
export const outboundSchema = PhotoRealVersion$outboundSchema;
|
|
1271
1215
|
}
|
|
1272
1216
|
|
|
1273
1217
|
/** @internal */
|
|
1274
|
-
export const
|
|
1275
|
-
typeof
|
|
1276
|
-
> = z.nativeEnum(
|
|
1218
|
+
export const EncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
1219
|
+
typeof EncodingFormat
|
|
1220
|
+
> = z.nativeEnum(EncodingFormat);
|
|
1277
1221
|
|
|
1278
1222
|
/** @internal */
|
|
1279
|
-
export const
|
|
1280
|
-
typeof
|
|
1281
|
-
> =
|
|
1223
|
+
export const EncodingFormat$outboundSchema: z.ZodNativeEnum<
|
|
1224
|
+
typeof EncodingFormat
|
|
1225
|
+
> = EncodingFormat$inboundSchema;
|
|
1282
1226
|
|
|
1283
1227
|
/**
|
|
1284
1228
|
* @internal
|
|
1285
1229
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1286
1230
|
*/
|
|
1287
|
-
export namespace
|
|
1288
|
-
/** @deprecated use `
|
|
1289
|
-
export const inboundSchema =
|
|
1290
|
-
/** @deprecated use `
|
|
1291
|
-
export const outboundSchema =
|
|
1231
|
+
export namespace EncodingFormat$ {
|
|
1232
|
+
/** @deprecated use `EncodingFormat$inboundSchema` instead. */
|
|
1233
|
+
export const inboundSchema = EncodingFormat$inboundSchema;
|
|
1234
|
+
/** @deprecated use `EncodingFormat$outboundSchema` instead. */
|
|
1235
|
+
export const outboundSchema = EncodingFormat$outboundSchema;
|
|
1292
1236
|
}
|
|
1293
1237
|
|
|
1294
1238
|
/** @internal */
|
|
1295
|
-
export const
|
|
1296
|
-
typeof
|
|
1297
|
-
> = z.nativeEnum(
|
|
1239
|
+
export const ReasoningEffort$inboundSchema: z.ZodNativeEnum<
|
|
1240
|
+
typeof ReasoningEffort
|
|
1241
|
+
> = z.nativeEnum(ReasoningEffort);
|
|
1298
1242
|
|
|
1299
1243
|
/** @internal */
|
|
1300
|
-
export const
|
|
1301
|
-
typeof
|
|
1302
|
-
> =
|
|
1244
|
+
export const ReasoningEffort$outboundSchema: z.ZodNativeEnum<
|
|
1245
|
+
typeof ReasoningEffort
|
|
1246
|
+
> = ReasoningEffort$inboundSchema;
|
|
1303
1247
|
|
|
1304
1248
|
/**
|
|
1305
1249
|
* @internal
|
|
1306
1250
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1307
1251
|
*/
|
|
1308
|
-
export namespace
|
|
1309
|
-
/** @deprecated use `
|
|
1310
|
-
export const inboundSchema =
|
|
1311
|
-
/** @deprecated use `
|
|
1312
|
-
export const outboundSchema =
|
|
1252
|
+
export namespace ReasoningEffort$ {
|
|
1253
|
+
/** @deprecated use `ReasoningEffort$inboundSchema` instead. */
|
|
1254
|
+
export const inboundSchema = ReasoningEffort$inboundSchema;
|
|
1255
|
+
/** @deprecated use `ReasoningEffort$outboundSchema` instead. */
|
|
1256
|
+
export const outboundSchema = ReasoningEffort$outboundSchema;
|
|
1313
1257
|
}
|
|
1314
1258
|
|
|
1315
1259
|
/** @internal */
|
|
1316
|
-
export const
|
|
1317
|
-
|
|
1260
|
+
export const ModelParameters$inboundSchema: z.ZodType<
|
|
1261
|
+
ModelParameters,
|
|
1318
1262
|
z.ZodTypeDef,
|
|
1319
1263
|
unknown
|
|
1320
1264
|
> = z.object({
|
|
@@ -1326,19 +1270,19 @@ export const CreatePromptModelParameters$inboundSchema: z.ZodType<
|
|
|
1326
1270
|
presencePenalty: z.number().optional(),
|
|
1327
1271
|
numImages: z.number().optional(),
|
|
1328
1272
|
seed: z.number().optional(),
|
|
1329
|
-
format:
|
|
1273
|
+
format: Format$inboundSchema.optional(),
|
|
1330
1274
|
dimensions: z.string().optional(),
|
|
1331
|
-
quality:
|
|
1275
|
+
quality: Quality$inboundSchema.optional(),
|
|
1332
1276
|
style: z.string().optional(),
|
|
1333
1277
|
responseFormat: z.nullable(
|
|
1334
1278
|
z.union([
|
|
1335
|
-
z.lazy(() =>
|
|
1336
|
-
z.lazy(() =>
|
|
1279
|
+
z.lazy(() => ResponseFormat2$inboundSchema),
|
|
1280
|
+
z.lazy(() => ResponseFormat1$inboundSchema),
|
|
1337
1281
|
]),
|
|
1338
1282
|
).optional(),
|
|
1339
|
-
photoRealVersion:
|
|
1340
|
-
encoding_format:
|
|
1341
|
-
reasoningEffort:
|
|
1283
|
+
photoRealVersion: PhotoRealVersion$inboundSchema.optional(),
|
|
1284
|
+
encoding_format: EncodingFormat$inboundSchema.optional(),
|
|
1285
|
+
reasoningEffort: ReasoningEffort$inboundSchema.optional(),
|
|
1342
1286
|
}).transform((v) => {
|
|
1343
1287
|
return remap$(v, {
|
|
1344
1288
|
"encoding_format": "encodingFormat",
|
|
@@ -1346,7 +1290,7 @@ export const CreatePromptModelParameters$inboundSchema: z.ZodType<
|
|
|
1346
1290
|
});
|
|
1347
1291
|
|
|
1348
1292
|
/** @internal */
|
|
1349
|
-
export type
|
|
1293
|
+
export type ModelParameters$Outbound = {
|
|
1350
1294
|
temperature?: number | undefined;
|
|
1351
1295
|
maxTokens?: number | undefined;
|
|
1352
1296
|
topK?: number | undefined;
|
|
@@ -1360,8 +1304,8 @@ export type CreatePromptModelParameters$Outbound = {
|
|
|
1360
1304
|
quality?: string | undefined;
|
|
1361
1305
|
style?: string | undefined;
|
|
1362
1306
|
responseFormat?:
|
|
1363
|
-
|
|
|
1364
|
-
|
|
|
1307
|
+
| ResponseFormat2$Outbound
|
|
1308
|
+
| ResponseFormat1$Outbound
|
|
1365
1309
|
| null
|
|
1366
1310
|
| undefined;
|
|
1367
1311
|
photoRealVersion?: string | undefined;
|
|
@@ -1370,10 +1314,10 @@ export type CreatePromptModelParameters$Outbound = {
|
|
|
1370
1314
|
};
|
|
1371
1315
|
|
|
1372
1316
|
/** @internal */
|
|
1373
|
-
export const
|
|
1374
|
-
|
|
1317
|
+
export const ModelParameters$outboundSchema: z.ZodType<
|
|
1318
|
+
ModelParameters$Outbound,
|
|
1375
1319
|
z.ZodTypeDef,
|
|
1376
|
-
|
|
1320
|
+
ModelParameters
|
|
1377
1321
|
> = z.object({
|
|
1378
1322
|
temperature: z.number().optional(),
|
|
1379
1323
|
maxTokens: z.number().optional(),
|
|
@@ -1383,19 +1327,19 @@ export const CreatePromptModelParameters$outboundSchema: z.ZodType<
|
|
|
1383
1327
|
presencePenalty: z.number().optional(),
|
|
1384
1328
|
numImages: z.number().optional(),
|
|
1385
1329
|
seed: z.number().optional(),
|
|
1386
|
-
format:
|
|
1330
|
+
format: Format$outboundSchema.optional(),
|
|
1387
1331
|
dimensions: z.string().optional(),
|
|
1388
|
-
quality:
|
|
1332
|
+
quality: Quality$outboundSchema.optional(),
|
|
1389
1333
|
style: z.string().optional(),
|
|
1390
1334
|
responseFormat: z.nullable(
|
|
1391
1335
|
z.union([
|
|
1392
|
-
z.lazy(() =>
|
|
1393
|
-
z.lazy(() =>
|
|
1336
|
+
z.lazy(() => ResponseFormat2$outboundSchema),
|
|
1337
|
+
z.lazy(() => ResponseFormat1$outboundSchema),
|
|
1394
1338
|
]),
|
|
1395
1339
|
).optional(),
|
|
1396
|
-
photoRealVersion:
|
|
1397
|
-
encodingFormat:
|
|
1398
|
-
reasoningEffort:
|
|
1340
|
+
photoRealVersion: PhotoRealVersion$outboundSchema.optional(),
|
|
1341
|
+
encodingFormat: EncodingFormat$outboundSchema.optional(),
|
|
1342
|
+
reasoningEffort: ReasoningEffort$outboundSchema.optional(),
|
|
1399
1343
|
}).transform((v) => {
|
|
1400
1344
|
return remap$(v, {
|
|
1401
1345
|
encodingFormat: "encoding_format",
|
|
@@ -1406,54 +1350,48 @@ export const CreatePromptModelParameters$outboundSchema: z.ZodType<
|
|
|
1406
1350
|
* @internal
|
|
1407
1351
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1408
1352
|
*/
|
|
1409
|
-
export namespace
|
|
1410
|
-
/** @deprecated use `
|
|
1411
|
-
export const inboundSchema =
|
|
1412
|
-
/** @deprecated use `
|
|
1413
|
-
export const outboundSchema =
|
|
1414
|
-
/** @deprecated use `
|
|
1415
|
-
export type Outbound =
|
|
1353
|
+
export namespace ModelParameters$ {
|
|
1354
|
+
/** @deprecated use `ModelParameters$inboundSchema` instead. */
|
|
1355
|
+
export const inboundSchema = ModelParameters$inboundSchema;
|
|
1356
|
+
/** @deprecated use `ModelParameters$outboundSchema` instead. */
|
|
1357
|
+
export const outboundSchema = ModelParameters$outboundSchema;
|
|
1358
|
+
/** @deprecated use `ModelParameters$Outbound` instead. */
|
|
1359
|
+
export type Outbound = ModelParameters$Outbound;
|
|
1416
1360
|
}
|
|
1417
1361
|
|
|
1418
|
-
export function
|
|
1419
|
-
|
|
1362
|
+
export function modelParametersToJSON(
|
|
1363
|
+
modelParameters: ModelParameters,
|
|
1420
1364
|
): string {
|
|
1421
|
-
return JSON.stringify(
|
|
1422
|
-
CreatePromptModelParameters$outboundSchema.parse(
|
|
1423
|
-
createPromptModelParameters,
|
|
1424
|
-
),
|
|
1425
|
-
);
|
|
1365
|
+
return JSON.stringify(ModelParameters$outboundSchema.parse(modelParameters));
|
|
1426
1366
|
}
|
|
1427
1367
|
|
|
1428
|
-
export function
|
|
1368
|
+
export function modelParametersFromJSON(
|
|
1429
1369
|
jsonString: string,
|
|
1430
|
-
): SafeParseResult<
|
|
1370
|
+
): SafeParseResult<ModelParameters, SDKValidationError> {
|
|
1431
1371
|
return safeParse(
|
|
1432
1372
|
jsonString,
|
|
1433
|
-
(x) =>
|
|
1434
|
-
`Failed to parse '
|
|
1373
|
+
(x) => ModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
1374
|
+
`Failed to parse 'ModelParameters' from JSON`,
|
|
1435
1375
|
);
|
|
1436
1376
|
}
|
|
1437
1377
|
|
|
1438
1378
|
/** @internal */
|
|
1439
|
-
export const
|
|
1440
|
-
|
|
1441
|
-
> = z.nativeEnum(CreatePromptProvider);
|
|
1379
|
+
export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
|
|
1380
|
+
.nativeEnum(Provider);
|
|
1442
1381
|
|
|
1443
1382
|
/** @internal */
|
|
1444
|
-
export const
|
|
1445
|
-
|
|
1446
|
-
> = CreatePromptProvider$inboundSchema;
|
|
1383
|
+
export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
|
|
1384
|
+
Provider$inboundSchema;
|
|
1447
1385
|
|
|
1448
1386
|
/**
|
|
1449
1387
|
* @internal
|
|
1450
1388
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1451
1389
|
*/
|
|
1452
|
-
export namespace
|
|
1453
|
-
/** @deprecated use `
|
|
1454
|
-
export const inboundSchema =
|
|
1455
|
-
/** @deprecated use `
|
|
1456
|
-
export const outboundSchema =
|
|
1390
|
+
export namespace Provider$ {
|
|
1391
|
+
/** @deprecated use `Provider$inboundSchema` instead. */
|
|
1392
|
+
export const inboundSchema = Provider$inboundSchema;
|
|
1393
|
+
/** @deprecated use `Provider$outboundSchema` instead. */
|
|
1394
|
+
export const outboundSchema = Provider$outboundSchema;
|
|
1457
1395
|
}
|
|
1458
1396
|
|
|
1459
1397
|
/** @internal */
|
|
@@ -2032,17 +1970,16 @@ export function createPromptMessagesFromJSON(
|
|
|
2032
1970
|
}
|
|
2033
1971
|
|
|
2034
1972
|
/** @internal */
|
|
2035
|
-
export const
|
|
2036
|
-
|
|
1973
|
+
export const PromptConfig$inboundSchema: z.ZodType<
|
|
1974
|
+
PromptConfig,
|
|
2037
1975
|
z.ZodTypeDef,
|
|
2038
1976
|
unknown
|
|
2039
1977
|
> = z.object({
|
|
2040
1978
|
stream: z.boolean().optional(),
|
|
2041
1979
|
model: z.string().optional(),
|
|
2042
|
-
model_type:
|
|
2043
|
-
model_parameters: z.lazy(() =>
|
|
2044
|
-
|
|
2045
|
-
provider: CreatePromptProvider$inboundSchema.optional(),
|
|
1980
|
+
model_type: ModelType$inboundSchema.optional(),
|
|
1981
|
+
model_parameters: z.lazy(() => ModelParameters$inboundSchema).optional(),
|
|
1982
|
+
provider: Provider$inboundSchema.optional(),
|
|
2046
1983
|
version: z.string().optional(),
|
|
2047
1984
|
messages: z.array(z.lazy(() => CreatePromptMessages$inboundSchema)),
|
|
2048
1985
|
}).transform((v) => {
|
|
@@ -2053,28 +1990,27 @@ export const CreatePromptPromptConfig$inboundSchema: z.ZodType<
|
|
|
2053
1990
|
});
|
|
2054
1991
|
|
|
2055
1992
|
/** @internal */
|
|
2056
|
-
export type
|
|
1993
|
+
export type PromptConfig$Outbound = {
|
|
2057
1994
|
stream?: boolean | undefined;
|
|
2058
1995
|
model?: string | undefined;
|
|
2059
1996
|
model_type?: string | undefined;
|
|
2060
|
-
model_parameters?:
|
|
1997
|
+
model_parameters?: ModelParameters$Outbound | undefined;
|
|
2061
1998
|
provider?: string | undefined;
|
|
2062
1999
|
version?: string | undefined;
|
|
2063
2000
|
messages: Array<CreatePromptMessages$Outbound>;
|
|
2064
2001
|
};
|
|
2065
2002
|
|
|
2066
2003
|
/** @internal */
|
|
2067
|
-
export const
|
|
2068
|
-
|
|
2004
|
+
export const PromptConfig$outboundSchema: z.ZodType<
|
|
2005
|
+
PromptConfig$Outbound,
|
|
2069
2006
|
z.ZodTypeDef,
|
|
2070
|
-
|
|
2007
|
+
PromptConfig
|
|
2071
2008
|
> = z.object({
|
|
2072
2009
|
stream: z.boolean().optional(),
|
|
2073
2010
|
model: z.string().optional(),
|
|
2074
|
-
modelType:
|
|
2075
|
-
modelParameters: z.lazy(() =>
|
|
2076
|
-
|
|
2077
|
-
provider: CreatePromptProvider$outboundSchema.optional(),
|
|
2011
|
+
modelType: ModelType$outboundSchema.optional(),
|
|
2012
|
+
modelParameters: z.lazy(() => ModelParameters$outboundSchema).optional(),
|
|
2013
|
+
provider: Provider$outboundSchema.optional(),
|
|
2078
2014
|
version: z.string().optional(),
|
|
2079
2015
|
messages: z.array(z.lazy(() => CreatePromptMessages$outboundSchema)),
|
|
2080
2016
|
}).transform((v) => {
|
|
@@ -2088,73 +2024,65 @@ export const CreatePromptPromptConfig$outboundSchema: z.ZodType<
|
|
|
2088
2024
|
* @internal
|
|
2089
2025
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2090
2026
|
*/
|
|
2091
|
-
export namespace
|
|
2092
|
-
/** @deprecated use `
|
|
2093
|
-
export const inboundSchema =
|
|
2094
|
-
/** @deprecated use `
|
|
2095
|
-
export const outboundSchema =
|
|
2096
|
-
/** @deprecated use `
|
|
2097
|
-
export type Outbound =
|
|
2027
|
+
export namespace PromptConfig$ {
|
|
2028
|
+
/** @deprecated use `PromptConfig$inboundSchema` instead. */
|
|
2029
|
+
export const inboundSchema = PromptConfig$inboundSchema;
|
|
2030
|
+
/** @deprecated use `PromptConfig$outboundSchema` instead. */
|
|
2031
|
+
export const outboundSchema = PromptConfig$outboundSchema;
|
|
2032
|
+
/** @deprecated use `PromptConfig$Outbound` instead. */
|
|
2033
|
+
export type Outbound = PromptConfig$Outbound;
|
|
2098
2034
|
}
|
|
2099
2035
|
|
|
2100
|
-
export function
|
|
2101
|
-
|
|
2102
|
-
): string {
|
|
2103
|
-
return JSON.stringify(
|
|
2104
|
-
CreatePromptPromptConfig$outboundSchema.parse(createPromptPromptConfig),
|
|
2105
|
-
);
|
|
2036
|
+
export function promptConfigToJSON(promptConfig: PromptConfig): string {
|
|
2037
|
+
return JSON.stringify(PromptConfig$outboundSchema.parse(promptConfig));
|
|
2106
2038
|
}
|
|
2107
2039
|
|
|
2108
|
-
export function
|
|
2040
|
+
export function promptConfigFromJSON(
|
|
2109
2041
|
jsonString: string,
|
|
2110
|
-
): SafeParseResult<
|
|
2042
|
+
): SafeParseResult<PromptConfig, SDKValidationError> {
|
|
2111
2043
|
return safeParse(
|
|
2112
2044
|
jsonString,
|
|
2113
|
-
(x) =>
|
|
2114
|
-
`Failed to parse '
|
|
2045
|
+
(x) => PromptConfig$inboundSchema.parse(JSON.parse(x)),
|
|
2046
|
+
`Failed to parse 'PromptConfig' from JSON`,
|
|
2115
2047
|
);
|
|
2116
2048
|
}
|
|
2117
2049
|
|
|
2118
2050
|
/** @internal */
|
|
2119
|
-
export const
|
|
2120
|
-
|
|
2121
|
-
> = z.nativeEnum(CreatePromptUseCases);
|
|
2051
|
+
export const UseCases$inboundSchema: z.ZodNativeEnum<typeof UseCases> = z
|
|
2052
|
+
.nativeEnum(UseCases);
|
|
2122
2053
|
|
|
2123
2054
|
/** @internal */
|
|
2124
|
-
export const
|
|
2125
|
-
|
|
2126
|
-
> = CreatePromptUseCases$inboundSchema;
|
|
2055
|
+
export const UseCases$outboundSchema: z.ZodNativeEnum<typeof UseCases> =
|
|
2056
|
+
UseCases$inboundSchema;
|
|
2127
2057
|
|
|
2128
2058
|
/**
|
|
2129
2059
|
* @internal
|
|
2130
2060
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2131
2061
|
*/
|
|
2132
|
-
export namespace
|
|
2133
|
-
/** @deprecated use `
|
|
2134
|
-
export const inboundSchema =
|
|
2135
|
-
/** @deprecated use `
|
|
2136
|
-
export const outboundSchema =
|
|
2062
|
+
export namespace UseCases$ {
|
|
2063
|
+
/** @deprecated use `UseCases$inboundSchema` instead. */
|
|
2064
|
+
export const inboundSchema = UseCases$inboundSchema;
|
|
2065
|
+
/** @deprecated use `UseCases$outboundSchema` instead. */
|
|
2066
|
+
export const outboundSchema = UseCases$outboundSchema;
|
|
2137
2067
|
}
|
|
2138
2068
|
|
|
2139
2069
|
/** @internal */
|
|
2140
|
-
export const
|
|
2141
|
-
|
|
2142
|
-
> = z.nativeEnum(CreatePromptLanguage);
|
|
2070
|
+
export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
|
|
2071
|
+
.nativeEnum(Language);
|
|
2143
2072
|
|
|
2144
2073
|
/** @internal */
|
|
2145
|
-
export const
|
|
2146
|
-
|
|
2147
|
-
> = CreatePromptLanguage$inboundSchema;
|
|
2074
|
+
export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
|
|
2075
|
+
Language$inboundSchema;
|
|
2148
2076
|
|
|
2149
2077
|
/**
|
|
2150
2078
|
* @internal
|
|
2151
2079
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2152
2080
|
*/
|
|
2153
|
-
export namespace
|
|
2154
|
-
/** @deprecated use `
|
|
2155
|
-
export const inboundSchema =
|
|
2156
|
-
/** @deprecated use `
|
|
2157
|
-
export const outboundSchema =
|
|
2081
|
+
export namespace Language$ {
|
|
2082
|
+
/** @deprecated use `Language$inboundSchema` instead. */
|
|
2083
|
+
export const inboundSchema = Language$inboundSchema;
|
|
2084
|
+
/** @deprecated use `Language$outboundSchema` instead. */
|
|
2085
|
+
export const outboundSchema = Language$outboundSchema;
|
|
2158
2086
|
}
|
|
2159
2087
|
|
|
2160
2088
|
/** @internal */
|
|
@@ -2163,8 +2091,8 @@ export const CreatePromptMetadata$inboundSchema: z.ZodType<
|
|
|
2163
2091
|
z.ZodTypeDef,
|
|
2164
2092
|
unknown
|
|
2165
2093
|
> = z.object({
|
|
2166
|
-
use_cases: z.array(
|
|
2167
|
-
language:
|
|
2094
|
+
use_cases: z.array(UseCases$inboundSchema).optional(),
|
|
2095
|
+
language: Language$inboundSchema.optional(),
|
|
2168
2096
|
}).transform((v) => {
|
|
2169
2097
|
return remap$(v, {
|
|
2170
2098
|
"use_cases": "useCases",
|
|
@@ -2183,8 +2111,8 @@ export const CreatePromptMetadata$outboundSchema: z.ZodType<
|
|
|
2183
2111
|
z.ZodTypeDef,
|
|
2184
2112
|
CreatePromptMetadata
|
|
2185
2113
|
> = z.object({
|
|
2186
|
-
useCases: z.array(
|
|
2187
|
-
language:
|
|
2114
|
+
useCases: z.array(UseCases$outboundSchema).optional(),
|
|
2115
|
+
language: Language$outboundSchema.optional(),
|
|
2188
2116
|
}).transform((v) => {
|
|
2189
2117
|
return remap$(v, {
|
|
2190
2118
|
useCases: "use_cases",
|
|
@@ -2230,7 +2158,7 @@ export const CreatePromptRequestBody$inboundSchema: z.ZodType<
|
|
|
2230
2158
|
> = z.object({
|
|
2231
2159
|
display_name: z.string(),
|
|
2232
2160
|
description: z.nullable(z.string()).optional(),
|
|
2233
|
-
prompt_config: z.lazy(() =>
|
|
2161
|
+
prompt_config: z.lazy(() => PromptConfig$inboundSchema),
|
|
2234
2162
|
metadata: z.lazy(() => CreatePromptMetadata$inboundSchema).optional(),
|
|
2235
2163
|
path: z.string(),
|
|
2236
2164
|
}).transform((v) => {
|
|
@@ -2244,7 +2172,7 @@ export const CreatePromptRequestBody$inboundSchema: z.ZodType<
|
|
|
2244
2172
|
export type CreatePromptRequestBody$Outbound = {
|
|
2245
2173
|
display_name: string;
|
|
2246
2174
|
description?: string | null | undefined;
|
|
2247
|
-
prompt_config:
|
|
2175
|
+
prompt_config: PromptConfig$Outbound;
|
|
2248
2176
|
metadata?: CreatePromptMetadata$Outbound | undefined;
|
|
2249
2177
|
path: string;
|
|
2250
2178
|
};
|
|
@@ -2257,7 +2185,7 @@ export const CreatePromptRequestBody$outboundSchema: z.ZodType<
|
|
|
2257
2185
|
> = z.object({
|
|
2258
2186
|
displayName: z.string(),
|
|
2259
2187
|
description: z.nullable(z.string()).optional(),
|
|
2260
|
-
promptConfig: z.lazy(() =>
|
|
2188
|
+
promptConfig: z.lazy(() => PromptConfig$outboundSchema),
|
|
2261
2189
|
metadata: z.lazy(() => CreatePromptMetadata$outboundSchema).optional(),
|
|
2262
2190
|
path: z.string(),
|
|
2263
2191
|
}).transform((v) => {
|
|
@@ -2320,255 +2248,244 @@ export namespace CreatePromptPromptsType$ {
|
|
|
2320
2248
|
}
|
|
2321
2249
|
|
|
2322
2250
|
/** @internal */
|
|
2323
|
-
export const
|
|
2324
|
-
typeof
|
|
2325
|
-
> = z.nativeEnum(
|
|
2251
|
+
export const CreatePromptModelType$inboundSchema: z.ZodNativeEnum<
|
|
2252
|
+
typeof CreatePromptModelType
|
|
2253
|
+
> = z.nativeEnum(CreatePromptModelType);
|
|
2326
2254
|
|
|
2327
2255
|
/** @internal */
|
|
2328
|
-
export const
|
|
2329
|
-
typeof
|
|
2330
|
-
> =
|
|
2256
|
+
export const CreatePromptModelType$outboundSchema: z.ZodNativeEnum<
|
|
2257
|
+
typeof CreatePromptModelType
|
|
2258
|
+
> = CreatePromptModelType$inboundSchema;
|
|
2331
2259
|
|
|
2332
2260
|
/**
|
|
2333
2261
|
* @internal
|
|
2334
2262
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2335
2263
|
*/
|
|
2336
|
-
export namespace
|
|
2337
|
-
/** @deprecated use `
|
|
2338
|
-
export const inboundSchema =
|
|
2339
|
-
/** @deprecated use `
|
|
2340
|
-
export const outboundSchema =
|
|
2264
|
+
export namespace CreatePromptModelType$ {
|
|
2265
|
+
/** @deprecated use `CreatePromptModelType$inboundSchema` instead. */
|
|
2266
|
+
export const inboundSchema = CreatePromptModelType$inboundSchema;
|
|
2267
|
+
/** @deprecated use `CreatePromptModelType$outboundSchema` instead. */
|
|
2268
|
+
export const outboundSchema = CreatePromptModelType$outboundSchema;
|
|
2341
2269
|
}
|
|
2342
2270
|
|
|
2343
2271
|
/** @internal */
|
|
2344
|
-
export const
|
|
2345
|
-
typeof
|
|
2346
|
-
> = z.nativeEnum(
|
|
2272
|
+
export const CreatePromptFormat$inboundSchema: z.ZodNativeEnum<
|
|
2273
|
+
typeof CreatePromptFormat
|
|
2274
|
+
> = z.nativeEnum(CreatePromptFormat);
|
|
2347
2275
|
|
|
2348
2276
|
/** @internal */
|
|
2349
|
-
export const
|
|
2350
|
-
typeof
|
|
2351
|
-
> =
|
|
2277
|
+
export const CreatePromptFormat$outboundSchema: z.ZodNativeEnum<
|
|
2278
|
+
typeof CreatePromptFormat
|
|
2279
|
+
> = CreatePromptFormat$inboundSchema;
|
|
2352
2280
|
|
|
2353
2281
|
/**
|
|
2354
2282
|
* @internal
|
|
2355
2283
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2356
2284
|
*/
|
|
2357
|
-
export namespace
|
|
2358
|
-
/** @deprecated use `
|
|
2359
|
-
export const inboundSchema =
|
|
2360
|
-
/** @deprecated use `
|
|
2361
|
-
export const outboundSchema =
|
|
2285
|
+
export namespace CreatePromptFormat$ {
|
|
2286
|
+
/** @deprecated use `CreatePromptFormat$inboundSchema` instead. */
|
|
2287
|
+
export const inboundSchema = CreatePromptFormat$inboundSchema;
|
|
2288
|
+
/** @deprecated use `CreatePromptFormat$outboundSchema` instead. */
|
|
2289
|
+
export const outboundSchema = CreatePromptFormat$outboundSchema;
|
|
2362
2290
|
}
|
|
2363
2291
|
|
|
2364
2292
|
/** @internal */
|
|
2365
|
-
export const
|
|
2366
|
-
typeof
|
|
2367
|
-
> = z.nativeEnum(
|
|
2293
|
+
export const CreatePromptQuality$inboundSchema: z.ZodNativeEnum<
|
|
2294
|
+
typeof CreatePromptQuality
|
|
2295
|
+
> = z.nativeEnum(CreatePromptQuality);
|
|
2368
2296
|
|
|
2369
2297
|
/** @internal */
|
|
2370
|
-
export const
|
|
2371
|
-
typeof
|
|
2372
|
-
> =
|
|
2298
|
+
export const CreatePromptQuality$outboundSchema: z.ZodNativeEnum<
|
|
2299
|
+
typeof CreatePromptQuality
|
|
2300
|
+
> = CreatePromptQuality$inboundSchema;
|
|
2373
2301
|
|
|
2374
2302
|
/**
|
|
2375
2303
|
* @internal
|
|
2376
2304
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2377
2305
|
*/
|
|
2378
|
-
export namespace
|
|
2379
|
-
/** @deprecated use `
|
|
2380
|
-
export const inboundSchema =
|
|
2381
|
-
/** @deprecated use `
|
|
2382
|
-
export const outboundSchema =
|
|
2306
|
+
export namespace CreatePromptQuality$ {
|
|
2307
|
+
/** @deprecated use `CreatePromptQuality$inboundSchema` instead. */
|
|
2308
|
+
export const inboundSchema = CreatePromptQuality$inboundSchema;
|
|
2309
|
+
/** @deprecated use `CreatePromptQuality$outboundSchema` instead. */
|
|
2310
|
+
export const outboundSchema = CreatePromptQuality$outboundSchema;
|
|
2383
2311
|
}
|
|
2384
2312
|
|
|
2385
2313
|
/** @internal */
|
|
2386
|
-
export const
|
|
2387
|
-
z.ZodNativeEnum<typeof
|
|
2388
|
-
.nativeEnum(
|
|
2314
|
+
export const CreatePromptResponseFormatPromptsResponseType$inboundSchema:
|
|
2315
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> = z
|
|
2316
|
+
.nativeEnum(CreatePromptResponseFormatPromptsResponseType);
|
|
2389
2317
|
|
|
2390
2318
|
/** @internal */
|
|
2391
|
-
export const
|
|
2392
|
-
z.ZodNativeEnum<typeof
|
|
2393
|
-
|
|
2319
|
+
export const CreatePromptResponseFormatPromptsResponseType$outboundSchema:
|
|
2320
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> =
|
|
2321
|
+
CreatePromptResponseFormatPromptsResponseType$inboundSchema;
|
|
2394
2322
|
|
|
2395
2323
|
/**
|
|
2396
2324
|
* @internal
|
|
2397
2325
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2398
2326
|
*/
|
|
2399
|
-
export namespace
|
|
2400
|
-
/** @deprecated use `
|
|
2327
|
+
export namespace CreatePromptResponseFormatPromptsResponseType$ {
|
|
2328
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsResponseType$inboundSchema` instead. */
|
|
2401
2329
|
export const inboundSchema =
|
|
2402
|
-
|
|
2403
|
-
/** @deprecated use `
|
|
2330
|
+
CreatePromptResponseFormatPromptsResponseType$inboundSchema;
|
|
2331
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsResponseType$outboundSchema` instead. */
|
|
2404
2332
|
export const outboundSchema =
|
|
2405
|
-
|
|
2333
|
+
CreatePromptResponseFormatPromptsResponseType$outboundSchema;
|
|
2406
2334
|
}
|
|
2407
2335
|
|
|
2408
2336
|
/** @internal */
|
|
2409
|
-
export const
|
|
2410
|
-
|
|
2337
|
+
export const CreatePromptResponseFormat2$inboundSchema: z.ZodType<
|
|
2338
|
+
CreatePromptResponseFormat2,
|
|
2411
2339
|
z.ZodTypeDef,
|
|
2412
2340
|
unknown
|
|
2413
2341
|
> = z.object({
|
|
2414
|
-
type:
|
|
2342
|
+
type: CreatePromptResponseFormatPromptsResponseType$inboundSchema,
|
|
2415
2343
|
});
|
|
2416
2344
|
|
|
2417
2345
|
/** @internal */
|
|
2418
|
-
export type
|
|
2346
|
+
export type CreatePromptResponseFormat2$Outbound = {
|
|
2419
2347
|
type: string;
|
|
2420
2348
|
};
|
|
2421
2349
|
|
|
2422
2350
|
/** @internal */
|
|
2423
|
-
export const
|
|
2424
|
-
|
|
2351
|
+
export const CreatePromptResponseFormat2$outboundSchema: z.ZodType<
|
|
2352
|
+
CreatePromptResponseFormat2$Outbound,
|
|
2425
2353
|
z.ZodTypeDef,
|
|
2426
|
-
|
|
2354
|
+
CreatePromptResponseFormat2
|
|
2427
2355
|
> = z.object({
|
|
2428
|
-
type:
|
|
2356
|
+
type: CreatePromptResponseFormatPromptsResponseType$outboundSchema,
|
|
2429
2357
|
});
|
|
2430
2358
|
|
|
2431
2359
|
/**
|
|
2432
2360
|
* @internal
|
|
2433
2361
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2434
2362
|
*/
|
|
2435
|
-
export namespace
|
|
2436
|
-
/** @deprecated use `
|
|
2437
|
-
export const inboundSchema =
|
|
2438
|
-
/** @deprecated use `
|
|
2439
|
-
export const outboundSchema =
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
export type Outbound = CreatePromptResponseFormatPrompts2$Outbound;
|
|
2363
|
+
export namespace CreatePromptResponseFormat2$ {
|
|
2364
|
+
/** @deprecated use `CreatePromptResponseFormat2$inboundSchema` instead. */
|
|
2365
|
+
export const inboundSchema = CreatePromptResponseFormat2$inboundSchema;
|
|
2366
|
+
/** @deprecated use `CreatePromptResponseFormat2$outboundSchema` instead. */
|
|
2367
|
+
export const outboundSchema = CreatePromptResponseFormat2$outboundSchema;
|
|
2368
|
+
/** @deprecated use `CreatePromptResponseFormat2$Outbound` instead. */
|
|
2369
|
+
export type Outbound = CreatePromptResponseFormat2$Outbound;
|
|
2443
2370
|
}
|
|
2444
2371
|
|
|
2445
|
-
export function
|
|
2446
|
-
|
|
2372
|
+
export function createPromptResponseFormat2ToJSON(
|
|
2373
|
+
createPromptResponseFormat2: CreatePromptResponseFormat2,
|
|
2447
2374
|
): string {
|
|
2448
2375
|
return JSON.stringify(
|
|
2449
|
-
|
|
2450
|
-
|
|
2376
|
+
CreatePromptResponseFormat2$outboundSchema.parse(
|
|
2377
|
+
createPromptResponseFormat2,
|
|
2451
2378
|
),
|
|
2452
2379
|
);
|
|
2453
2380
|
}
|
|
2454
2381
|
|
|
2455
|
-
export function
|
|
2382
|
+
export function createPromptResponseFormat2FromJSON(
|
|
2456
2383
|
jsonString: string,
|
|
2457
|
-
): SafeParseResult<
|
|
2384
|
+
): SafeParseResult<CreatePromptResponseFormat2, SDKValidationError> {
|
|
2458
2385
|
return safeParse(
|
|
2459
2386
|
jsonString,
|
|
2460
|
-
(x) =>
|
|
2461
|
-
|
|
2462
|
-
`Failed to parse 'CreatePromptResponseFormatPrompts2' from JSON`,
|
|
2387
|
+
(x) => CreatePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
2388
|
+
`Failed to parse 'CreatePromptResponseFormat2' from JSON`,
|
|
2463
2389
|
);
|
|
2464
2390
|
}
|
|
2465
2391
|
|
|
2466
2392
|
/** @internal */
|
|
2467
|
-
export const
|
|
2468
|
-
z.ZodNativeEnum<typeof
|
|
2469
|
-
|
|
2393
|
+
export const CreatePromptResponseFormatPromptsType$inboundSchema:
|
|
2394
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> = z.nativeEnum(
|
|
2395
|
+
CreatePromptResponseFormatPromptsType,
|
|
2396
|
+
);
|
|
2470
2397
|
|
|
2471
2398
|
/** @internal */
|
|
2472
|
-
export const
|
|
2473
|
-
z.ZodNativeEnum<typeof
|
|
2474
|
-
|
|
2399
|
+
export const CreatePromptResponseFormatPromptsType$outboundSchema:
|
|
2400
|
+
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> =
|
|
2401
|
+
CreatePromptResponseFormatPromptsType$inboundSchema;
|
|
2475
2402
|
|
|
2476
2403
|
/**
|
|
2477
2404
|
* @internal
|
|
2478
2405
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2479
2406
|
*/
|
|
2480
|
-
export namespace
|
|
2481
|
-
/** @deprecated use `
|
|
2407
|
+
export namespace CreatePromptResponseFormatPromptsType$ {
|
|
2408
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsType$inboundSchema` instead. */
|
|
2482
2409
|
export const inboundSchema =
|
|
2483
|
-
|
|
2484
|
-
/** @deprecated use `
|
|
2410
|
+
CreatePromptResponseFormatPromptsType$inboundSchema;
|
|
2411
|
+
/** @deprecated use `CreatePromptResponseFormatPromptsType$outboundSchema` instead. */
|
|
2485
2412
|
export const outboundSchema =
|
|
2486
|
-
|
|
2413
|
+
CreatePromptResponseFormatPromptsType$outboundSchema;
|
|
2487
2414
|
}
|
|
2488
2415
|
|
|
2489
2416
|
/** @internal */
|
|
2490
|
-
export const
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
});
|
|
2417
|
+
export const CreatePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
|
|
2418
|
+
CreatePromptResponseFormatJsonSchema,
|
|
2419
|
+
z.ZodTypeDef,
|
|
2420
|
+
unknown
|
|
2421
|
+
> = z.object({
|
|
2422
|
+
name: z.string(),
|
|
2423
|
+
strict: z.boolean(),
|
|
2424
|
+
schema: z.record(z.any()),
|
|
2425
|
+
});
|
|
2500
2426
|
|
|
2501
2427
|
/** @internal */
|
|
2502
|
-
export type
|
|
2428
|
+
export type CreatePromptResponseFormatJsonSchema$Outbound = {
|
|
2503
2429
|
name: string;
|
|
2504
2430
|
strict: boolean;
|
|
2505
2431
|
schema: { [k: string]: any };
|
|
2506
2432
|
};
|
|
2507
2433
|
|
|
2508
2434
|
/** @internal */
|
|
2509
|
-
export const
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
});
|
|
2435
|
+
export const CreatePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
|
|
2436
|
+
CreatePromptResponseFormatJsonSchema$Outbound,
|
|
2437
|
+
z.ZodTypeDef,
|
|
2438
|
+
CreatePromptResponseFormatJsonSchema
|
|
2439
|
+
> = z.object({
|
|
2440
|
+
name: z.string(),
|
|
2441
|
+
strict: z.boolean(),
|
|
2442
|
+
schema: z.record(z.any()),
|
|
2443
|
+
});
|
|
2519
2444
|
|
|
2520
2445
|
/**
|
|
2521
2446
|
* @internal
|
|
2522
2447
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2523
2448
|
*/
|
|
2524
|
-
export namespace
|
|
2525
|
-
/** @deprecated use `
|
|
2449
|
+
export namespace CreatePromptResponseFormatJsonSchema$ {
|
|
2450
|
+
/** @deprecated use `CreatePromptResponseFormatJsonSchema$inboundSchema` instead. */
|
|
2526
2451
|
export const inboundSchema =
|
|
2527
|
-
|
|
2528
|
-
/** @deprecated use `
|
|
2452
|
+
CreatePromptResponseFormatJsonSchema$inboundSchema;
|
|
2453
|
+
/** @deprecated use `CreatePromptResponseFormatJsonSchema$outboundSchema` instead. */
|
|
2529
2454
|
export const outboundSchema =
|
|
2530
|
-
|
|
2531
|
-
/** @deprecated use `
|
|
2532
|
-
export type Outbound =
|
|
2455
|
+
CreatePromptResponseFormatJsonSchema$outboundSchema;
|
|
2456
|
+
/** @deprecated use `CreatePromptResponseFormatJsonSchema$Outbound` instead. */
|
|
2457
|
+
export type Outbound = CreatePromptResponseFormatJsonSchema$Outbound;
|
|
2533
2458
|
}
|
|
2534
2459
|
|
|
2535
|
-
export function
|
|
2536
|
-
|
|
2537
|
-
CreatePromptResponseFormatPromptsJsonSchema,
|
|
2460
|
+
export function createPromptResponseFormatJsonSchemaToJSON(
|
|
2461
|
+
createPromptResponseFormatJsonSchema: CreatePromptResponseFormatJsonSchema,
|
|
2538
2462
|
): string {
|
|
2539
2463
|
return JSON.stringify(
|
|
2540
|
-
|
|
2541
|
-
|
|
2464
|
+
CreatePromptResponseFormatJsonSchema$outboundSchema.parse(
|
|
2465
|
+
createPromptResponseFormatJsonSchema,
|
|
2542
2466
|
),
|
|
2543
2467
|
);
|
|
2544
2468
|
}
|
|
2545
2469
|
|
|
2546
|
-
export function
|
|
2470
|
+
export function createPromptResponseFormatJsonSchemaFromJSON(
|
|
2547
2471
|
jsonString: string,
|
|
2548
|
-
): SafeParseResult<
|
|
2549
|
-
CreatePromptResponseFormatPromptsJsonSchema,
|
|
2550
|
-
SDKValidationError
|
|
2551
|
-
> {
|
|
2472
|
+
): SafeParseResult<CreatePromptResponseFormatJsonSchema, SDKValidationError> {
|
|
2552
2473
|
return safeParse(
|
|
2553
2474
|
jsonString,
|
|
2554
2475
|
(x) =>
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
),
|
|
2558
|
-
`Failed to parse 'CreatePromptResponseFormatPromptsJsonSchema' from JSON`,
|
|
2476
|
+
CreatePromptResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
2477
|
+
`Failed to parse 'CreatePromptResponseFormatJsonSchema' from JSON`,
|
|
2559
2478
|
);
|
|
2560
2479
|
}
|
|
2561
2480
|
|
|
2562
2481
|
/** @internal */
|
|
2563
|
-
export const
|
|
2564
|
-
|
|
2482
|
+
export const CreatePromptResponseFormat1$inboundSchema: z.ZodType<
|
|
2483
|
+
CreatePromptResponseFormat1,
|
|
2565
2484
|
z.ZodTypeDef,
|
|
2566
2485
|
unknown
|
|
2567
2486
|
> = z.object({
|
|
2568
|
-
type:
|
|
2569
|
-
json_schema: z.lazy(() =>
|
|
2570
|
-
CreatePromptResponseFormatPromptsJsonSchema$inboundSchema
|
|
2571
|
-
),
|
|
2487
|
+
type: CreatePromptResponseFormatPromptsType$inboundSchema,
|
|
2488
|
+
json_schema: z.lazy(() => CreatePromptResponseFormatJsonSchema$inboundSchema),
|
|
2572
2489
|
}).transform((v) => {
|
|
2573
2490
|
return remap$(v, {
|
|
2574
2491
|
"json_schema": "jsonSchema",
|
|
@@ -2576,21 +2493,19 @@ export const CreatePromptResponseFormatPrompts1$inboundSchema: z.ZodType<
|
|
|
2576
2493
|
});
|
|
2577
2494
|
|
|
2578
2495
|
/** @internal */
|
|
2579
|
-
export type
|
|
2496
|
+
export type CreatePromptResponseFormat1$Outbound = {
|
|
2580
2497
|
type: string;
|
|
2581
|
-
json_schema:
|
|
2498
|
+
json_schema: CreatePromptResponseFormatJsonSchema$Outbound;
|
|
2582
2499
|
};
|
|
2583
2500
|
|
|
2584
2501
|
/** @internal */
|
|
2585
|
-
export const
|
|
2586
|
-
|
|
2502
|
+
export const CreatePromptResponseFormat1$outboundSchema: z.ZodType<
|
|
2503
|
+
CreatePromptResponseFormat1$Outbound,
|
|
2587
2504
|
z.ZodTypeDef,
|
|
2588
|
-
|
|
2505
|
+
CreatePromptResponseFormat1
|
|
2589
2506
|
> = z.object({
|
|
2590
|
-
type:
|
|
2591
|
-
jsonSchema: z.lazy(() =>
|
|
2592
|
-
CreatePromptResponseFormatPromptsJsonSchema$outboundSchema
|
|
2593
|
-
),
|
|
2507
|
+
type: CreatePromptResponseFormatPromptsType$outboundSchema,
|
|
2508
|
+
jsonSchema: z.lazy(() => CreatePromptResponseFormatJsonSchema$outboundSchema),
|
|
2594
2509
|
}).transform((v) => {
|
|
2595
2510
|
return remap$(v, {
|
|
2596
2511
|
jsonSchema: "json_schema",
|
|
@@ -2601,166 +2516,157 @@ export const CreatePromptResponseFormatPrompts1$outboundSchema: z.ZodType<
|
|
|
2601
2516
|
* @internal
|
|
2602
2517
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2603
2518
|
*/
|
|
2604
|
-
export namespace
|
|
2605
|
-
/** @deprecated use `
|
|
2606
|
-
export const inboundSchema =
|
|
2607
|
-
/** @deprecated use `
|
|
2608
|
-
export const outboundSchema =
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
export type Outbound = CreatePromptResponseFormatPrompts1$Outbound;
|
|
2519
|
+
export namespace CreatePromptResponseFormat1$ {
|
|
2520
|
+
/** @deprecated use `CreatePromptResponseFormat1$inboundSchema` instead. */
|
|
2521
|
+
export const inboundSchema = CreatePromptResponseFormat1$inboundSchema;
|
|
2522
|
+
/** @deprecated use `CreatePromptResponseFormat1$outboundSchema` instead. */
|
|
2523
|
+
export const outboundSchema = CreatePromptResponseFormat1$outboundSchema;
|
|
2524
|
+
/** @deprecated use `CreatePromptResponseFormat1$Outbound` instead. */
|
|
2525
|
+
export type Outbound = CreatePromptResponseFormat1$Outbound;
|
|
2612
2526
|
}
|
|
2613
2527
|
|
|
2614
|
-
export function
|
|
2615
|
-
|
|
2528
|
+
export function createPromptResponseFormat1ToJSON(
|
|
2529
|
+
createPromptResponseFormat1: CreatePromptResponseFormat1,
|
|
2616
2530
|
): string {
|
|
2617
2531
|
return JSON.stringify(
|
|
2618
|
-
|
|
2619
|
-
|
|
2532
|
+
CreatePromptResponseFormat1$outboundSchema.parse(
|
|
2533
|
+
createPromptResponseFormat1,
|
|
2620
2534
|
),
|
|
2621
2535
|
);
|
|
2622
2536
|
}
|
|
2623
2537
|
|
|
2624
|
-
export function
|
|
2538
|
+
export function createPromptResponseFormat1FromJSON(
|
|
2625
2539
|
jsonString: string,
|
|
2626
|
-
): SafeParseResult<
|
|
2540
|
+
): SafeParseResult<CreatePromptResponseFormat1, SDKValidationError> {
|
|
2627
2541
|
return safeParse(
|
|
2628
2542
|
jsonString,
|
|
2629
|
-
(x) =>
|
|
2630
|
-
|
|
2631
|
-
`Failed to parse 'CreatePromptResponseFormatPrompts1' from JSON`,
|
|
2543
|
+
(x) => CreatePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
2544
|
+
`Failed to parse 'CreatePromptResponseFormat1' from JSON`,
|
|
2632
2545
|
);
|
|
2633
2546
|
}
|
|
2634
2547
|
|
|
2635
2548
|
/** @internal */
|
|
2636
|
-
export const
|
|
2637
|
-
|
|
2549
|
+
export const CreatePromptResponseFormat$inboundSchema: z.ZodType<
|
|
2550
|
+
CreatePromptResponseFormat,
|
|
2638
2551
|
z.ZodTypeDef,
|
|
2639
2552
|
unknown
|
|
2640
2553
|
> = z.union([
|
|
2641
|
-
z.lazy(() =>
|
|
2642
|
-
z.lazy(() =>
|
|
2554
|
+
z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
|
|
2555
|
+
z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
|
|
2643
2556
|
]);
|
|
2644
2557
|
|
|
2645
2558
|
/** @internal */
|
|
2646
|
-
export type
|
|
2647
|
-
|
|
|
2648
|
-
|
|
|
2559
|
+
export type CreatePromptResponseFormat$Outbound =
|
|
2560
|
+
| CreatePromptResponseFormat2$Outbound
|
|
2561
|
+
| CreatePromptResponseFormat1$Outbound;
|
|
2649
2562
|
|
|
2650
2563
|
/** @internal */
|
|
2651
|
-
export const
|
|
2652
|
-
|
|
2564
|
+
export const CreatePromptResponseFormat$outboundSchema: z.ZodType<
|
|
2565
|
+
CreatePromptResponseFormat$Outbound,
|
|
2653
2566
|
z.ZodTypeDef,
|
|
2654
|
-
|
|
2567
|
+
CreatePromptResponseFormat
|
|
2655
2568
|
> = z.union([
|
|
2656
|
-
z.lazy(() =>
|
|
2657
|
-
z.lazy(() =>
|
|
2569
|
+
z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
|
|
2570
|
+
z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
|
|
2658
2571
|
]);
|
|
2659
2572
|
|
|
2660
2573
|
/**
|
|
2661
2574
|
* @internal
|
|
2662
2575
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2663
2576
|
*/
|
|
2664
|
-
export namespace
|
|
2665
|
-
/** @deprecated use `
|
|
2666
|
-
export const inboundSchema =
|
|
2667
|
-
/** @deprecated use `
|
|
2668
|
-
export const outboundSchema =
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
export type Outbound = CreatePromptPromptsResponseFormat$Outbound;
|
|
2577
|
+
export namespace CreatePromptResponseFormat$ {
|
|
2578
|
+
/** @deprecated use `CreatePromptResponseFormat$inboundSchema` instead. */
|
|
2579
|
+
export const inboundSchema = CreatePromptResponseFormat$inboundSchema;
|
|
2580
|
+
/** @deprecated use `CreatePromptResponseFormat$outboundSchema` instead. */
|
|
2581
|
+
export const outboundSchema = CreatePromptResponseFormat$outboundSchema;
|
|
2582
|
+
/** @deprecated use `CreatePromptResponseFormat$Outbound` instead. */
|
|
2583
|
+
export type Outbound = CreatePromptResponseFormat$Outbound;
|
|
2672
2584
|
}
|
|
2673
2585
|
|
|
2674
|
-
export function
|
|
2675
|
-
|
|
2586
|
+
export function createPromptResponseFormatToJSON(
|
|
2587
|
+
createPromptResponseFormat: CreatePromptResponseFormat,
|
|
2676
2588
|
): string {
|
|
2677
2589
|
return JSON.stringify(
|
|
2678
|
-
|
|
2679
|
-
createPromptPromptsResponseFormat,
|
|
2680
|
-
),
|
|
2590
|
+
CreatePromptResponseFormat$outboundSchema.parse(createPromptResponseFormat),
|
|
2681
2591
|
);
|
|
2682
2592
|
}
|
|
2683
2593
|
|
|
2684
|
-
export function
|
|
2594
|
+
export function createPromptResponseFormatFromJSON(
|
|
2685
2595
|
jsonString: string,
|
|
2686
|
-
): SafeParseResult<
|
|
2596
|
+
): SafeParseResult<CreatePromptResponseFormat, SDKValidationError> {
|
|
2687
2597
|
return safeParse(
|
|
2688
2598
|
jsonString,
|
|
2689
|
-
(x) =>
|
|
2690
|
-
`Failed to parse '
|
|
2599
|
+
(x) => CreatePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
2600
|
+
`Failed to parse 'CreatePromptResponseFormat' from JSON`,
|
|
2691
2601
|
);
|
|
2692
2602
|
}
|
|
2693
2603
|
|
|
2694
2604
|
/** @internal */
|
|
2695
|
-
export const
|
|
2696
|
-
typeof
|
|
2697
|
-
> = z.nativeEnum(
|
|
2605
|
+
export const CreatePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
2606
|
+
typeof CreatePromptPhotoRealVersion
|
|
2607
|
+
> = z.nativeEnum(CreatePromptPhotoRealVersion);
|
|
2698
2608
|
|
|
2699
2609
|
/** @internal */
|
|
2700
|
-
export const
|
|
2701
|
-
|
|
2702
|
-
|
|
2610
|
+
export const CreatePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
|
|
2611
|
+
typeof CreatePromptPhotoRealVersion
|
|
2612
|
+
> = CreatePromptPhotoRealVersion$inboundSchema;
|
|
2703
2613
|
|
|
2704
2614
|
/**
|
|
2705
2615
|
* @internal
|
|
2706
2616
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2707
2617
|
*/
|
|
2708
|
-
export namespace
|
|
2709
|
-
/** @deprecated use `
|
|
2710
|
-
export const inboundSchema =
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
export const outboundSchema =
|
|
2714
|
-
CreatePromptPromptsPhotoRealVersion$outboundSchema;
|
|
2618
|
+
export namespace CreatePromptPhotoRealVersion$ {
|
|
2619
|
+
/** @deprecated use `CreatePromptPhotoRealVersion$inboundSchema` instead. */
|
|
2620
|
+
export const inboundSchema = CreatePromptPhotoRealVersion$inboundSchema;
|
|
2621
|
+
/** @deprecated use `CreatePromptPhotoRealVersion$outboundSchema` instead. */
|
|
2622
|
+
export const outboundSchema = CreatePromptPhotoRealVersion$outboundSchema;
|
|
2715
2623
|
}
|
|
2716
2624
|
|
|
2717
2625
|
/** @internal */
|
|
2718
|
-
export const
|
|
2719
|
-
typeof
|
|
2720
|
-
> = z.nativeEnum(
|
|
2626
|
+
export const CreatePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
2627
|
+
typeof CreatePromptEncodingFormat
|
|
2628
|
+
> = z.nativeEnum(CreatePromptEncodingFormat);
|
|
2721
2629
|
|
|
2722
2630
|
/** @internal */
|
|
2723
|
-
export const
|
|
2724
|
-
typeof
|
|
2725
|
-
> =
|
|
2631
|
+
export const CreatePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
|
|
2632
|
+
typeof CreatePromptEncodingFormat
|
|
2633
|
+
> = CreatePromptEncodingFormat$inboundSchema;
|
|
2726
2634
|
|
|
2727
2635
|
/**
|
|
2728
2636
|
* @internal
|
|
2729
2637
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2730
2638
|
*/
|
|
2731
|
-
export namespace
|
|
2732
|
-
/** @deprecated use `
|
|
2733
|
-
export const inboundSchema =
|
|
2734
|
-
/** @deprecated use `
|
|
2735
|
-
export const outboundSchema =
|
|
2736
|
-
CreatePromptPromptsEncodingFormat$outboundSchema;
|
|
2639
|
+
export namespace CreatePromptEncodingFormat$ {
|
|
2640
|
+
/** @deprecated use `CreatePromptEncodingFormat$inboundSchema` instead. */
|
|
2641
|
+
export const inboundSchema = CreatePromptEncodingFormat$inboundSchema;
|
|
2642
|
+
/** @deprecated use `CreatePromptEncodingFormat$outboundSchema` instead. */
|
|
2643
|
+
export const outboundSchema = CreatePromptEncodingFormat$outboundSchema;
|
|
2737
2644
|
}
|
|
2738
2645
|
|
|
2739
2646
|
/** @internal */
|
|
2740
|
-
export const
|
|
2741
|
-
typeof
|
|
2742
|
-
> = z.nativeEnum(
|
|
2647
|
+
export const CreatePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
|
|
2648
|
+
typeof CreatePromptReasoningEffort
|
|
2649
|
+
> = z.nativeEnum(CreatePromptReasoningEffort);
|
|
2743
2650
|
|
|
2744
2651
|
/** @internal */
|
|
2745
|
-
export const
|
|
2746
|
-
typeof
|
|
2747
|
-
> =
|
|
2652
|
+
export const CreatePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
|
|
2653
|
+
typeof CreatePromptReasoningEffort
|
|
2654
|
+
> = CreatePromptReasoningEffort$inboundSchema;
|
|
2748
2655
|
|
|
2749
2656
|
/**
|
|
2750
2657
|
* @internal
|
|
2751
2658
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2752
2659
|
*/
|
|
2753
|
-
export namespace
|
|
2754
|
-
/** @deprecated use `
|
|
2755
|
-
export const inboundSchema =
|
|
2756
|
-
/** @deprecated use `
|
|
2757
|
-
export const outboundSchema =
|
|
2758
|
-
CreatePromptPromptsReasoningEffort$outboundSchema;
|
|
2660
|
+
export namespace CreatePromptReasoningEffort$ {
|
|
2661
|
+
/** @deprecated use `CreatePromptReasoningEffort$inboundSchema` instead. */
|
|
2662
|
+
export const inboundSchema = CreatePromptReasoningEffort$inboundSchema;
|
|
2663
|
+
/** @deprecated use `CreatePromptReasoningEffort$outboundSchema` instead. */
|
|
2664
|
+
export const outboundSchema = CreatePromptReasoningEffort$outboundSchema;
|
|
2759
2665
|
}
|
|
2760
2666
|
|
|
2761
2667
|
/** @internal */
|
|
2762
|
-
export const
|
|
2763
|
-
|
|
2668
|
+
export const CreatePromptModelParameters$inboundSchema: z.ZodType<
|
|
2669
|
+
CreatePromptModelParameters,
|
|
2764
2670
|
z.ZodTypeDef,
|
|
2765
2671
|
unknown
|
|
2766
2672
|
> = z.object({
|
|
@@ -2772,20 +2678,19 @@ export const CreatePromptPromptsModelParameters$inboundSchema: z.ZodType<
|
|
|
2772
2678
|
presencePenalty: z.number().optional(),
|
|
2773
2679
|
numImages: z.number().optional(),
|
|
2774
2680
|
seed: z.number().optional(),
|
|
2775
|
-
format:
|
|
2681
|
+
format: CreatePromptFormat$inboundSchema.optional(),
|
|
2776
2682
|
dimensions: z.string().optional(),
|
|
2777
|
-
quality:
|
|
2683
|
+
quality: CreatePromptQuality$inboundSchema.optional(),
|
|
2778
2684
|
style: z.string().optional(),
|
|
2779
2685
|
responseFormat: z.nullable(
|
|
2780
2686
|
z.union([
|
|
2781
|
-
z.lazy(() =>
|
|
2782
|
-
z.lazy(() =>
|
|
2687
|
+
z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
|
|
2688
|
+
z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
|
|
2783
2689
|
]),
|
|
2784
2690
|
).optional(),
|
|
2785
|
-
photoRealVersion:
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
reasoningEffort: CreatePromptPromptsReasoningEffort$inboundSchema.optional(),
|
|
2691
|
+
photoRealVersion: CreatePromptPhotoRealVersion$inboundSchema.optional(),
|
|
2692
|
+
encoding_format: CreatePromptEncodingFormat$inboundSchema.optional(),
|
|
2693
|
+
reasoningEffort: CreatePromptReasoningEffort$inboundSchema.optional(),
|
|
2789
2694
|
}).transform((v) => {
|
|
2790
2695
|
return remap$(v, {
|
|
2791
2696
|
"encoding_format": "encodingFormat",
|
|
@@ -2793,7 +2698,7 @@ export const CreatePromptPromptsModelParameters$inboundSchema: z.ZodType<
|
|
|
2793
2698
|
});
|
|
2794
2699
|
|
|
2795
2700
|
/** @internal */
|
|
2796
|
-
export type
|
|
2701
|
+
export type CreatePromptModelParameters$Outbound = {
|
|
2797
2702
|
temperature?: number | undefined;
|
|
2798
2703
|
maxTokens?: number | undefined;
|
|
2799
2704
|
topK?: number | undefined;
|
|
@@ -2807,8 +2712,8 @@ export type CreatePromptPromptsModelParameters$Outbound = {
|
|
|
2807
2712
|
quality?: string | undefined;
|
|
2808
2713
|
style?: string | undefined;
|
|
2809
2714
|
responseFormat?:
|
|
2810
|
-
|
|
|
2811
|
-
|
|
|
2715
|
+
| CreatePromptResponseFormat2$Outbound
|
|
2716
|
+
| CreatePromptResponseFormat1$Outbound
|
|
2812
2717
|
| null
|
|
2813
2718
|
| undefined;
|
|
2814
2719
|
photoRealVersion?: string | undefined;
|
|
@@ -2817,10 +2722,10 @@ export type CreatePromptPromptsModelParameters$Outbound = {
|
|
|
2817
2722
|
};
|
|
2818
2723
|
|
|
2819
2724
|
/** @internal */
|
|
2820
|
-
export const
|
|
2821
|
-
|
|
2725
|
+
export const CreatePromptModelParameters$outboundSchema: z.ZodType<
|
|
2726
|
+
CreatePromptModelParameters$Outbound,
|
|
2822
2727
|
z.ZodTypeDef,
|
|
2823
|
-
|
|
2728
|
+
CreatePromptModelParameters
|
|
2824
2729
|
> = z.object({
|
|
2825
2730
|
temperature: z.number().optional(),
|
|
2826
2731
|
maxTokens: z.number().optional(),
|
|
@@ -2830,20 +2735,19 @@ export const CreatePromptPromptsModelParameters$outboundSchema: z.ZodType<
|
|
|
2830
2735
|
presencePenalty: z.number().optional(),
|
|
2831
2736
|
numImages: z.number().optional(),
|
|
2832
2737
|
seed: z.number().optional(),
|
|
2833
|
-
format:
|
|
2738
|
+
format: CreatePromptFormat$outboundSchema.optional(),
|
|
2834
2739
|
dimensions: z.string().optional(),
|
|
2835
|
-
quality:
|
|
2740
|
+
quality: CreatePromptQuality$outboundSchema.optional(),
|
|
2836
2741
|
style: z.string().optional(),
|
|
2837
2742
|
responseFormat: z.nullable(
|
|
2838
2743
|
z.union([
|
|
2839
|
-
z.lazy(() =>
|
|
2840
|
-
z.lazy(() =>
|
|
2744
|
+
z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
|
|
2745
|
+
z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
|
|
2841
2746
|
]),
|
|
2842
2747
|
).optional(),
|
|
2843
|
-
photoRealVersion:
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
reasoningEffort: CreatePromptPromptsReasoningEffort$outboundSchema.optional(),
|
|
2748
|
+
photoRealVersion: CreatePromptPhotoRealVersion$outboundSchema.optional(),
|
|
2749
|
+
encodingFormat: CreatePromptEncodingFormat$outboundSchema.optional(),
|
|
2750
|
+
reasoningEffort: CreatePromptReasoningEffort$outboundSchema.optional(),
|
|
2847
2751
|
}).transform((v) => {
|
|
2848
2752
|
return remap$(v, {
|
|
2849
2753
|
encodingFormat: "encoding_format",
|
|
@@ -2854,56 +2758,54 @@ export const CreatePromptPromptsModelParameters$outboundSchema: z.ZodType<
|
|
|
2854
2758
|
* @internal
|
|
2855
2759
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2856
2760
|
*/
|
|
2857
|
-
export namespace
|
|
2858
|
-
/** @deprecated use `
|
|
2859
|
-
export const inboundSchema =
|
|
2860
|
-
/** @deprecated use `
|
|
2861
|
-
export const outboundSchema =
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
export type Outbound = CreatePromptPromptsModelParameters$Outbound;
|
|
2761
|
+
export namespace CreatePromptModelParameters$ {
|
|
2762
|
+
/** @deprecated use `CreatePromptModelParameters$inboundSchema` instead. */
|
|
2763
|
+
export const inboundSchema = CreatePromptModelParameters$inboundSchema;
|
|
2764
|
+
/** @deprecated use `CreatePromptModelParameters$outboundSchema` instead. */
|
|
2765
|
+
export const outboundSchema = CreatePromptModelParameters$outboundSchema;
|
|
2766
|
+
/** @deprecated use `CreatePromptModelParameters$Outbound` instead. */
|
|
2767
|
+
export type Outbound = CreatePromptModelParameters$Outbound;
|
|
2865
2768
|
}
|
|
2866
2769
|
|
|
2867
|
-
export function
|
|
2868
|
-
|
|
2770
|
+
export function createPromptModelParametersToJSON(
|
|
2771
|
+
createPromptModelParameters: CreatePromptModelParameters,
|
|
2869
2772
|
): string {
|
|
2870
2773
|
return JSON.stringify(
|
|
2871
|
-
|
|
2872
|
-
|
|
2774
|
+
CreatePromptModelParameters$outboundSchema.parse(
|
|
2775
|
+
createPromptModelParameters,
|
|
2873
2776
|
),
|
|
2874
2777
|
);
|
|
2875
2778
|
}
|
|
2876
2779
|
|
|
2877
|
-
export function
|
|
2780
|
+
export function createPromptModelParametersFromJSON(
|
|
2878
2781
|
jsonString: string,
|
|
2879
|
-
): SafeParseResult<
|
|
2782
|
+
): SafeParseResult<CreatePromptModelParameters, SDKValidationError> {
|
|
2880
2783
|
return safeParse(
|
|
2881
2784
|
jsonString,
|
|
2882
|
-
(x) =>
|
|
2883
|
-
|
|
2884
|
-
`Failed to parse 'CreatePromptPromptsModelParameters' from JSON`,
|
|
2785
|
+
(x) => CreatePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
2786
|
+
`Failed to parse 'CreatePromptModelParameters' from JSON`,
|
|
2885
2787
|
);
|
|
2886
2788
|
}
|
|
2887
2789
|
|
|
2888
2790
|
/** @internal */
|
|
2889
|
-
export const
|
|
2890
|
-
typeof
|
|
2891
|
-
> = z.nativeEnum(
|
|
2791
|
+
export const CreatePromptProvider$inboundSchema: z.ZodNativeEnum<
|
|
2792
|
+
typeof CreatePromptProvider
|
|
2793
|
+
> = z.nativeEnum(CreatePromptProvider);
|
|
2892
2794
|
|
|
2893
2795
|
/** @internal */
|
|
2894
|
-
export const
|
|
2895
|
-
typeof
|
|
2896
|
-
> =
|
|
2796
|
+
export const CreatePromptProvider$outboundSchema: z.ZodNativeEnum<
|
|
2797
|
+
typeof CreatePromptProvider
|
|
2798
|
+
> = CreatePromptProvider$inboundSchema;
|
|
2897
2799
|
|
|
2898
2800
|
/**
|
|
2899
2801
|
* @internal
|
|
2900
2802
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2901
2803
|
*/
|
|
2902
|
-
export namespace
|
|
2903
|
-
/** @deprecated use `
|
|
2904
|
-
export const inboundSchema =
|
|
2905
|
-
/** @deprecated use `
|
|
2906
|
-
export const outboundSchema =
|
|
2804
|
+
export namespace CreatePromptProvider$ {
|
|
2805
|
+
/** @deprecated use `CreatePromptProvider$inboundSchema` instead. */
|
|
2806
|
+
export const inboundSchema = CreatePromptProvider$inboundSchema;
|
|
2807
|
+
/** @deprecated use `CreatePromptProvider$outboundSchema` instead. */
|
|
2808
|
+
export const outboundSchema = CreatePromptProvider$outboundSchema;
|
|
2907
2809
|
}
|
|
2908
2810
|
|
|
2909
2811
|
/** @internal */
|
|
@@ -3507,19 +3409,18 @@ export function createPromptPromptsMessagesFromJSON(
|
|
|
3507
3409
|
}
|
|
3508
3410
|
|
|
3509
3411
|
/** @internal */
|
|
3510
|
-
export const
|
|
3511
|
-
|
|
3412
|
+
export const CreatePromptPromptConfig$inboundSchema: z.ZodType<
|
|
3413
|
+
CreatePromptPromptConfig,
|
|
3512
3414
|
z.ZodTypeDef,
|
|
3513
3415
|
unknown
|
|
3514
3416
|
> = z.object({
|
|
3515
3417
|
stream: z.boolean().optional(),
|
|
3516
3418
|
model: z.string().optional(),
|
|
3517
3419
|
model_db_id: z.string().optional(),
|
|
3518
|
-
model_type:
|
|
3519
|
-
model_parameters: z.lazy(() =>
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
provider: CreatePromptPromptsProvider$inboundSchema.optional(),
|
|
3420
|
+
model_type: CreatePromptModelType$inboundSchema.optional(),
|
|
3421
|
+
model_parameters: z.lazy(() => CreatePromptModelParameters$inboundSchema)
|
|
3422
|
+
.optional(),
|
|
3423
|
+
provider: CreatePromptProvider$inboundSchema.optional(),
|
|
3523
3424
|
integration_id: z.nullable(z.string()).optional(),
|
|
3524
3425
|
version: z.string().optional(),
|
|
3525
3426
|
messages: z.array(z.lazy(() => CreatePromptPromptsMessages$inboundSchema)),
|
|
@@ -3533,12 +3434,12 @@ export const CreatePromptPromptsPromptConfig$inboundSchema: z.ZodType<
|
|
|
3533
3434
|
});
|
|
3534
3435
|
|
|
3535
3436
|
/** @internal */
|
|
3536
|
-
export type
|
|
3437
|
+
export type CreatePromptPromptConfig$Outbound = {
|
|
3537
3438
|
stream?: boolean | undefined;
|
|
3538
3439
|
model?: string | undefined;
|
|
3539
3440
|
model_db_id?: string | undefined;
|
|
3540
3441
|
model_type?: string | undefined;
|
|
3541
|
-
model_parameters?:
|
|
3442
|
+
model_parameters?: CreatePromptModelParameters$Outbound | undefined;
|
|
3542
3443
|
provider?: string | undefined;
|
|
3543
3444
|
integration_id?: string | null | undefined;
|
|
3544
3445
|
version?: string | undefined;
|
|
@@ -3546,19 +3447,18 @@ export type CreatePromptPromptsPromptConfig$Outbound = {
|
|
|
3546
3447
|
};
|
|
3547
3448
|
|
|
3548
3449
|
/** @internal */
|
|
3549
|
-
export const
|
|
3550
|
-
|
|
3450
|
+
export const CreatePromptPromptConfig$outboundSchema: z.ZodType<
|
|
3451
|
+
CreatePromptPromptConfig$Outbound,
|
|
3551
3452
|
z.ZodTypeDef,
|
|
3552
|
-
|
|
3453
|
+
CreatePromptPromptConfig
|
|
3553
3454
|
> = z.object({
|
|
3554
3455
|
stream: z.boolean().optional(),
|
|
3555
3456
|
model: z.string().optional(),
|
|
3556
3457
|
modelDbId: z.string().optional(),
|
|
3557
|
-
modelType:
|
|
3558
|
-
modelParameters: z.lazy(() =>
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
provider: CreatePromptPromptsProvider$outboundSchema.optional(),
|
|
3458
|
+
modelType: CreatePromptModelType$outboundSchema.optional(),
|
|
3459
|
+
modelParameters: z.lazy(() => CreatePromptModelParameters$outboundSchema)
|
|
3460
|
+
.optional(),
|
|
3461
|
+
provider: CreatePromptProvider$outboundSchema.optional(),
|
|
3562
3462
|
integrationId: z.nullable(z.string()).optional(),
|
|
3563
3463
|
version: z.string().optional(),
|
|
3564
3464
|
messages: z.array(z.lazy(() => CreatePromptPromptsMessages$outboundSchema)),
|
|
@@ -3575,75 +3475,73 @@ export const CreatePromptPromptsPromptConfig$outboundSchema: z.ZodType<
|
|
|
3575
3475
|
* @internal
|
|
3576
3476
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3577
3477
|
*/
|
|
3578
|
-
export namespace
|
|
3579
|
-
/** @deprecated use `
|
|
3580
|
-
export const inboundSchema =
|
|
3581
|
-
/** @deprecated use `
|
|
3582
|
-
export const outboundSchema =
|
|
3583
|
-
/** @deprecated use `
|
|
3584
|
-
export type Outbound =
|
|
3478
|
+
export namespace CreatePromptPromptConfig$ {
|
|
3479
|
+
/** @deprecated use `CreatePromptPromptConfig$inboundSchema` instead. */
|
|
3480
|
+
export const inboundSchema = CreatePromptPromptConfig$inboundSchema;
|
|
3481
|
+
/** @deprecated use `CreatePromptPromptConfig$outboundSchema` instead. */
|
|
3482
|
+
export const outboundSchema = CreatePromptPromptConfig$outboundSchema;
|
|
3483
|
+
/** @deprecated use `CreatePromptPromptConfig$Outbound` instead. */
|
|
3484
|
+
export type Outbound = CreatePromptPromptConfig$Outbound;
|
|
3585
3485
|
}
|
|
3586
3486
|
|
|
3587
|
-
export function
|
|
3588
|
-
|
|
3487
|
+
export function createPromptPromptConfigToJSON(
|
|
3488
|
+
createPromptPromptConfig: CreatePromptPromptConfig,
|
|
3589
3489
|
): string {
|
|
3590
3490
|
return JSON.stringify(
|
|
3591
|
-
|
|
3592
|
-
createPromptPromptsPromptConfig,
|
|
3593
|
-
),
|
|
3491
|
+
CreatePromptPromptConfig$outboundSchema.parse(createPromptPromptConfig),
|
|
3594
3492
|
);
|
|
3595
3493
|
}
|
|
3596
3494
|
|
|
3597
|
-
export function
|
|
3495
|
+
export function createPromptPromptConfigFromJSON(
|
|
3598
3496
|
jsonString: string,
|
|
3599
|
-
): SafeParseResult<
|
|
3497
|
+
): SafeParseResult<CreatePromptPromptConfig, SDKValidationError> {
|
|
3600
3498
|
return safeParse(
|
|
3601
3499
|
jsonString,
|
|
3602
|
-
(x) =>
|
|
3603
|
-
`Failed to parse '
|
|
3500
|
+
(x) => CreatePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3501
|
+
`Failed to parse 'CreatePromptPromptConfig' from JSON`,
|
|
3604
3502
|
);
|
|
3605
3503
|
}
|
|
3606
3504
|
|
|
3607
3505
|
/** @internal */
|
|
3608
|
-
export const
|
|
3609
|
-
typeof
|
|
3610
|
-
> = z.nativeEnum(
|
|
3506
|
+
export const CreatePromptUseCases$inboundSchema: z.ZodNativeEnum<
|
|
3507
|
+
typeof CreatePromptUseCases
|
|
3508
|
+
> = z.nativeEnum(CreatePromptUseCases);
|
|
3611
3509
|
|
|
3612
3510
|
/** @internal */
|
|
3613
|
-
export const
|
|
3614
|
-
typeof
|
|
3615
|
-
> =
|
|
3511
|
+
export const CreatePromptUseCases$outboundSchema: z.ZodNativeEnum<
|
|
3512
|
+
typeof CreatePromptUseCases
|
|
3513
|
+
> = CreatePromptUseCases$inboundSchema;
|
|
3616
3514
|
|
|
3617
3515
|
/**
|
|
3618
3516
|
* @internal
|
|
3619
3517
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3620
3518
|
*/
|
|
3621
|
-
export namespace
|
|
3622
|
-
/** @deprecated use `
|
|
3623
|
-
export const inboundSchema =
|
|
3624
|
-
/** @deprecated use `
|
|
3625
|
-
export const outboundSchema =
|
|
3519
|
+
export namespace CreatePromptUseCases$ {
|
|
3520
|
+
/** @deprecated use `CreatePromptUseCases$inboundSchema` instead. */
|
|
3521
|
+
export const inboundSchema = CreatePromptUseCases$inboundSchema;
|
|
3522
|
+
/** @deprecated use `CreatePromptUseCases$outboundSchema` instead. */
|
|
3523
|
+
export const outboundSchema = CreatePromptUseCases$outboundSchema;
|
|
3626
3524
|
}
|
|
3627
3525
|
|
|
3628
3526
|
/** @internal */
|
|
3629
|
-
export const
|
|
3630
|
-
typeof
|
|
3631
|
-
> = z.nativeEnum(
|
|
3527
|
+
export const CreatePromptLanguage$inboundSchema: z.ZodNativeEnum<
|
|
3528
|
+
typeof CreatePromptLanguage
|
|
3529
|
+
> = z.nativeEnum(CreatePromptLanguage);
|
|
3632
3530
|
|
|
3633
3531
|
/** @internal */
|
|
3634
|
-
export const
|
|
3635
|
-
typeof
|
|
3636
|
-
> =
|
|
3532
|
+
export const CreatePromptLanguage$outboundSchema: z.ZodNativeEnum<
|
|
3533
|
+
typeof CreatePromptLanguage
|
|
3534
|
+
> = CreatePromptLanguage$inboundSchema;
|
|
3637
3535
|
|
|
3638
3536
|
/**
|
|
3639
3537
|
* @internal
|
|
3640
3538
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3641
3539
|
*/
|
|
3642
|
-
export namespace
|
|
3643
|
-
/** @deprecated use `
|
|
3644
|
-
export const inboundSchema =
|
|
3645
|
-
/** @deprecated use `
|
|
3646
|
-
export const outboundSchema =
|
|
3540
|
+
export namespace CreatePromptLanguage$ {
|
|
3541
|
+
/** @deprecated use `CreatePromptLanguage$inboundSchema` instead. */
|
|
3542
|
+
export const inboundSchema = CreatePromptLanguage$inboundSchema;
|
|
3543
|
+
/** @deprecated use `CreatePromptLanguage$outboundSchema` instead. */
|
|
3544
|
+
export const outboundSchema = CreatePromptLanguage$outboundSchema;
|
|
3647
3545
|
}
|
|
3648
3546
|
|
|
3649
3547
|
/** @internal */
|
|
@@ -3652,8 +3550,8 @@ export const CreatePromptPromptsMetadata$inboundSchema: z.ZodType<
|
|
|
3652
3550
|
z.ZodTypeDef,
|
|
3653
3551
|
unknown
|
|
3654
3552
|
> = z.object({
|
|
3655
|
-
use_cases: z.array(
|
|
3656
|
-
language:
|
|
3553
|
+
use_cases: z.array(CreatePromptUseCases$inboundSchema).optional(),
|
|
3554
|
+
language: CreatePromptLanguage$inboundSchema.optional(),
|
|
3657
3555
|
}).transform((v) => {
|
|
3658
3556
|
return remap$(v, {
|
|
3659
3557
|
"use_cases": "useCases",
|
|
@@ -3672,8 +3570,8 @@ export const CreatePromptPromptsMetadata$outboundSchema: z.ZodType<
|
|
|
3672
3570
|
z.ZodTypeDef,
|
|
3673
3571
|
CreatePromptPromptsMetadata
|
|
3674
3572
|
> = z.object({
|
|
3675
|
-
useCases: z.array(
|
|
3676
|
-
language:
|
|
3573
|
+
useCases: z.array(CreatePromptUseCases$outboundSchema).optional(),
|
|
3574
|
+
language: CreatePromptLanguage$outboundSchema.optional(),
|
|
3677
3575
|
}).transform((v) => {
|
|
3678
3576
|
return remap$(v, {
|
|
3679
3577
|
useCases: "use_cases",
|
|
@@ -3729,7 +3627,7 @@ export const CreatePromptResponseBody$inboundSchema: z.ZodType<
|
|
|
3729
3627
|
updated_by_id: z.string().optional(),
|
|
3730
3628
|
display_name: z.string(),
|
|
3731
3629
|
description: z.nullable(z.string()).optional(),
|
|
3732
|
-
prompt_config: z.lazy(() =>
|
|
3630
|
+
prompt_config: z.lazy(() => CreatePromptPromptConfig$inboundSchema),
|
|
3733
3631
|
metadata: z.lazy(() => CreatePromptPromptsMetadata$inboundSchema).optional(),
|
|
3734
3632
|
}).transform((v) => {
|
|
3735
3633
|
return remap$(v, {
|
|
@@ -3754,7 +3652,7 @@ export type CreatePromptResponseBody$Outbound = {
|
|
|
3754
3652
|
updated_by_id?: string | undefined;
|
|
3755
3653
|
display_name: string;
|
|
3756
3654
|
description?: string | null | undefined;
|
|
3757
|
-
prompt_config:
|
|
3655
|
+
prompt_config: CreatePromptPromptConfig$Outbound;
|
|
3758
3656
|
metadata?: CreatePromptPromptsMetadata$Outbound | undefined;
|
|
3759
3657
|
};
|
|
3760
3658
|
|
|
@@ -3774,7 +3672,7 @@ export const CreatePromptResponseBody$outboundSchema: z.ZodType<
|
|
|
3774
3672
|
updatedById: z.string().optional(),
|
|
3775
3673
|
displayName: z.string(),
|
|
3776
3674
|
description: z.nullable(z.string()).optional(),
|
|
3777
|
-
promptConfig: z.lazy(() =>
|
|
3675
|
+
promptConfig: z.lazy(() => CreatePromptPromptConfig$outboundSchema),
|
|
3778
3676
|
metadata: z.lazy(() => CreatePromptPromptsMetadata$outboundSchema).optional(),
|
|
3779
3677
|
}).transform((v) => {
|
|
3780
3678
|
return remap$(v, {
|