@orq-ai/node 3.2.6 → 3.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +33 -36
- package/bin/mcp-server.js.map +20 -20
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/server.js.map +1 -1
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/package.json +3 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/FUNCTIONS.md +0 -106
- package/packages/orq-rc/README.md +0 -622
- package/packages/orq-rc/RUNTIMES.md +0 -48
- package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
- package/packages/orq-rc/docs/sdks/datasets/README.md +0 -934
- package/packages/orq-rc/docs/sdks/deployments/README.md +0 -235
- package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
- package/packages/orq-rc/docs/sdks/files/README.md +0 -305
- package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
- package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
- package/packages/orq-rc/docs/sdks/prompts/README.md +0 -608
- package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
- package/packages/orq-rc/jsr.json +0 -27
- package/packages/orq-rc/package-lock.json +0 -3217
- package/packages/orq-rc/package.json +0 -45
- package/packages/orq-rc/src/core.ts +0 -13
- package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -154
- package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -161
- package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -159
- package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -161
- package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +0 -165
- package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -161
- package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -176
- package/packages/orq-rc/src/funcs/datasetsList.ts +0 -162
- package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -169
- package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -169
- package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -175
- package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -170
- package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -173
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -162
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
- package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -171
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -162
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -154
- package/packages/orq-rc/src/funcs/filesCreate.ts +0 -177
- package/packages/orq-rc/src/funcs/filesDelete.ts +0 -158
- package/packages/orq-rc/src/funcs/filesGet.ts +0 -160
- package/packages/orq-rc/src/funcs/filesList.ts +0 -162
- package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -154
- package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -158
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -175
- package/packages/orq-rc/src/funcs/promptsList.ts +0 -162
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -168
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -160
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -167
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -155
- package/packages/orq-rc/src/hooks/global.ts +0 -44
- package/packages/orq-rc/src/hooks/hooks.ts +0 -132
- package/packages/orq-rc/src/hooks/index.ts +0 -6
- package/packages/orq-rc/src/hooks/registration.ts +0 -15
- package/packages/orq-rc/src/hooks/types.ts +0 -110
- package/packages/orq-rc/src/index.ts +0 -7
- package/packages/orq-rc/src/lib/base64.ts +0 -37
- package/packages/orq-rc/src/lib/config.ts +0 -70
- package/packages/orq-rc/src/lib/dlv.ts +0 -53
- package/packages/orq-rc/src/lib/encodings.ts +0 -483
- package/packages/orq-rc/src/lib/env.ts +0 -73
- package/packages/orq-rc/src/lib/files.ts +0 -40
- package/packages/orq-rc/src/lib/http.ts +0 -323
- package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
- package/packages/orq-rc/src/lib/logger.ts +0 -9
- package/packages/orq-rc/src/lib/matchers.ts +0 -322
- package/packages/orq-rc/src/lib/primitives.ts +0 -150
- package/packages/orq-rc/src/lib/retries.ts +0 -218
- package/packages/orq-rc/src/lib/schemas.ts +0 -91
- package/packages/orq-rc/src/lib/sdks.ts +0 -395
- package/packages/orq-rc/src/lib/security.ts +0 -253
- package/packages/orq-rc/src/lib/url.ts +0 -33
- package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
- package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
- package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
- package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
- package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
- package/packages/orq-rc/src/mcp-server/prompts.ts +0 -110
- package/packages/orq-rc/src/mcp-server/resources.ts +0 -158
- package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
- package/packages/orq-rc/src/mcp-server/server.ts +0 -123
- package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
- package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
- package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
- package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools.ts +0 -126
- package/packages/orq-rc/src/models/components/deployments.ts +0 -4164
- package/packages/orq-rc/src/models/components/index.ts +0 -6
- package/packages/orq-rc/src/models/components/security.ts +0 -71
- package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
- package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
- package/packages/orq-rc/src/models/errors/index.ts +0 -10
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
- package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -1816
- package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
- package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -1740
- package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
- package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3816
- package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
- package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -4936
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -6090
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1199
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -2194
- package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
- package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
- package/packages/orq-rc/src/models/operations/filelist.ts +0 -377
- package/packages/orq-rc/src/models/operations/fileupload.ts +0 -324
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2165
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1989
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1987
- package/packages/orq-rc/src/models/operations/index.ts +0 -34
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1115
- package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -448
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2163
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -924
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -1729
- package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -374
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3831
- package/packages/orq-rc/src/sdk/contacts.ts +0 -27
- package/packages/orq-rc/src/sdk/datasets.ts +0 -222
- package/packages/orq-rc/src/sdk/deployments.ts +0 -70
- package/packages/orq-rc/src/sdk/feedback.ts +0 -27
- package/packages/orq-rc/src/sdk/files.ts +0 -78
- package/packages/orq-rc/src/sdk/index.ts +0 -5
- package/packages/orq-rc/src/sdk/metrics.ts +0 -27
- package/packages/orq-rc/src/sdk/prompts.ts +0 -126
- package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
- package/packages/orq-rc/src/sdk/sdk.ts +0 -49
- package/packages/orq-rc/src/types/async.ts +0 -68
- package/packages/orq-rc/src/types/blobs.ts +0 -31
- package/packages/orq-rc/src/types/constdatetime.ts +0 -15
- package/packages/orq-rc/src/types/enums.ts +0 -16
- package/packages/orq-rc/src/types/fp.ts +0 -50
- package/packages/orq-rc/src/types/index.ts +0 -11
- package/packages/orq-rc/src/types/operations.ts +0 -105
- package/packages/orq-rc/src/types/rfcdate.ts +0 -54
- package/packages/orq-rc/src/types/streams.ts +0 -21
- package/packages/orq-rc/tsconfig.json +0 -41
|
@@ -1,3816 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The type of the model
|
|
14
|
-
*/
|
|
15
|
-
export const CreatePromptModelType = {
|
|
16
|
-
Chat: "chat",
|
|
17
|
-
Completion: "completion",
|
|
18
|
-
Embedding: "embedding",
|
|
19
|
-
Vision: "vision",
|
|
20
|
-
Image: "image",
|
|
21
|
-
Tts: "tts",
|
|
22
|
-
Stt: "stt",
|
|
23
|
-
Rerank: "rerank",
|
|
24
|
-
Moderations: "moderations",
|
|
25
|
-
} as const;
|
|
26
|
-
/**
|
|
27
|
-
* The type of the model
|
|
28
|
-
*/
|
|
29
|
-
export type CreatePromptModelType = ClosedEnum<typeof CreatePromptModelType>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Only supported on `image` models.
|
|
33
|
-
*/
|
|
34
|
-
export const CreatePromptFormat = {
|
|
35
|
-
Url: "url",
|
|
36
|
-
B64Json: "b64_json",
|
|
37
|
-
Text: "text",
|
|
38
|
-
JsonObject: "json_object",
|
|
39
|
-
} as const;
|
|
40
|
-
/**
|
|
41
|
-
* Only supported on `image` models.
|
|
42
|
-
*/
|
|
43
|
-
export type CreatePromptFormat = ClosedEnum<typeof CreatePromptFormat>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Only supported on `image` models.
|
|
47
|
-
*/
|
|
48
|
-
export const CreatePromptQuality = {
|
|
49
|
-
Standard: "standard",
|
|
50
|
-
Hd: "hd",
|
|
51
|
-
} as const;
|
|
52
|
-
/**
|
|
53
|
-
* Only supported on `image` models.
|
|
54
|
-
*/
|
|
55
|
-
export type CreatePromptQuality = ClosedEnum<typeof CreatePromptQuality>;
|
|
56
|
-
|
|
57
|
-
export const CreatePromptResponseFormatPromptsType = {
|
|
58
|
-
JsonObject: "json_object",
|
|
59
|
-
} as const;
|
|
60
|
-
export type CreatePromptResponseFormatPromptsType = ClosedEnum<
|
|
61
|
-
typeof CreatePromptResponseFormatPromptsType
|
|
62
|
-
>;
|
|
63
|
-
|
|
64
|
-
export type CreatePromptResponseFormat2 = {
|
|
65
|
-
type: CreatePromptResponseFormatPromptsType;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const CreatePromptResponseFormatType = {
|
|
69
|
-
JsonSchema: "json_schema",
|
|
70
|
-
} as const;
|
|
71
|
-
export type CreatePromptResponseFormatType = ClosedEnum<
|
|
72
|
-
typeof CreatePromptResponseFormatType
|
|
73
|
-
>;
|
|
74
|
-
|
|
75
|
-
export type ResponseFormatJsonSchema = {
|
|
76
|
-
name: string;
|
|
77
|
-
strict: boolean;
|
|
78
|
-
schema: { [k: string]: any };
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export type CreatePromptResponseFormat1 = {
|
|
82
|
-
type: CreatePromptResponseFormatType;
|
|
83
|
-
jsonSchema: ResponseFormatJsonSchema;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* An object specifying the format that the model must output.
|
|
88
|
-
*
|
|
89
|
-
* @remarks
|
|
90
|
-
*
|
|
91
|
-
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
|
|
92
|
-
*
|
|
93
|
-
* Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
|
|
94
|
-
*
|
|
95
|
-
* 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
|
-
*/
|
|
97
|
-
export type CreatePromptResponseFormat =
|
|
98
|
-
| CreatePromptResponseFormat2
|
|
99
|
-
| CreatePromptResponseFormat1;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
103
|
-
*/
|
|
104
|
-
export const CreatePromptPhotoRealVersion = {
|
|
105
|
-
V1: "v1",
|
|
106
|
-
V2: "v2",
|
|
107
|
-
} as const;
|
|
108
|
-
/**
|
|
109
|
-
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
110
|
-
*/
|
|
111
|
-
export type CreatePromptPhotoRealVersion = ClosedEnum<
|
|
112
|
-
typeof CreatePromptPhotoRealVersion
|
|
113
|
-
>;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* The format to return the embeddings
|
|
117
|
-
*/
|
|
118
|
-
export const CreatePromptEncodingFormat = {
|
|
119
|
-
Float: "float",
|
|
120
|
-
Base64: "base64",
|
|
121
|
-
} as const;
|
|
122
|
-
/**
|
|
123
|
-
* The format to return the embeddings
|
|
124
|
-
*/
|
|
125
|
-
export type CreatePromptEncodingFormat = ClosedEnum<
|
|
126
|
-
typeof CreatePromptEncodingFormat
|
|
127
|
-
>;
|
|
128
|
-
|
|
129
|
-
/**
|
|
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.
|
|
131
|
-
*/
|
|
132
|
-
export const CreatePromptReasoningEffort = {
|
|
133
|
-
Low: "low",
|
|
134
|
-
Medium: "medium",
|
|
135
|
-
High: "high",
|
|
136
|
-
} as const;
|
|
137
|
-
/**
|
|
138
|
-
* 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
|
-
*/
|
|
140
|
-
export type CreatePromptReasoningEffort = ClosedEnum<
|
|
141
|
-
typeof CreatePromptReasoningEffort
|
|
142
|
-
>;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Model Parameters: Not all parameters apply to every model
|
|
146
|
-
*/
|
|
147
|
-
export type CreatePromptModelParameters = {
|
|
148
|
-
/**
|
|
149
|
-
* Only supported on `chat` and `completion` models.
|
|
150
|
-
*/
|
|
151
|
-
temperature?: number | undefined;
|
|
152
|
-
/**
|
|
153
|
-
* Only supported on `chat` and `completion` models.
|
|
154
|
-
*/
|
|
155
|
-
maxTokens?: number | undefined;
|
|
156
|
-
/**
|
|
157
|
-
* Only supported on `chat` and `completion` models.
|
|
158
|
-
*/
|
|
159
|
-
topK?: number | undefined;
|
|
160
|
-
/**
|
|
161
|
-
* Only supported on `chat` and `completion` models.
|
|
162
|
-
*/
|
|
163
|
-
topP?: number | undefined;
|
|
164
|
-
/**
|
|
165
|
-
* Only supported on `chat` and `completion` models.
|
|
166
|
-
*/
|
|
167
|
-
frequencyPenalty?: number | undefined;
|
|
168
|
-
/**
|
|
169
|
-
* Only supported on `chat` and `completion` models.
|
|
170
|
-
*/
|
|
171
|
-
presencePenalty?: number | undefined;
|
|
172
|
-
/**
|
|
173
|
-
* Only supported on `image` models.
|
|
174
|
-
*/
|
|
175
|
-
numImages?: number | undefined;
|
|
176
|
-
/**
|
|
177
|
-
* Best effort deterministic seed for the model. Currently only OpenAI models support these
|
|
178
|
-
*/
|
|
179
|
-
seed?: number | undefined;
|
|
180
|
-
/**
|
|
181
|
-
* Only supported on `image` models.
|
|
182
|
-
*/
|
|
183
|
-
format?: CreatePromptFormat | undefined;
|
|
184
|
-
/**
|
|
185
|
-
* Only supported on `image` models.
|
|
186
|
-
*/
|
|
187
|
-
dimensions?: string | undefined;
|
|
188
|
-
/**
|
|
189
|
-
* Only supported on `image` models.
|
|
190
|
-
*/
|
|
191
|
-
quality?: CreatePromptQuality | undefined;
|
|
192
|
-
/**
|
|
193
|
-
* Only supported on `image` models.
|
|
194
|
-
*/
|
|
195
|
-
style?: string | undefined;
|
|
196
|
-
/**
|
|
197
|
-
* An object specifying the format that the model must output.
|
|
198
|
-
*
|
|
199
|
-
* @remarks
|
|
200
|
-
*
|
|
201
|
-
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
|
|
202
|
-
*
|
|
203
|
-
* Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
|
|
204
|
-
*
|
|
205
|
-
* 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
|
-
*/
|
|
207
|
-
responseFormat?:
|
|
208
|
-
| CreatePromptResponseFormat2
|
|
209
|
-
| CreatePromptResponseFormat1
|
|
210
|
-
| null
|
|
211
|
-
| undefined;
|
|
212
|
-
/**
|
|
213
|
-
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
214
|
-
*/
|
|
215
|
-
photoRealVersion?: CreatePromptPhotoRealVersion | undefined;
|
|
216
|
-
/**
|
|
217
|
-
* The format to return the embeddings
|
|
218
|
-
*/
|
|
219
|
-
encodingFormat?: CreatePromptEncodingFormat | undefined;
|
|
220
|
-
/**
|
|
221
|
-
* 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
|
-
*/
|
|
223
|
-
reasoningEffort?: CreatePromptReasoningEffort | undefined;
|
|
224
|
-
/**
|
|
225
|
-
* Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
|
|
226
|
-
*/
|
|
227
|
-
budgetTokens?: number | undefined;
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
export const CreatePromptProvider = {
|
|
231
|
-
Cohere: "cohere",
|
|
232
|
-
Openai: "openai",
|
|
233
|
-
Anthropic: "anthropic",
|
|
234
|
-
Huggingface: "huggingface",
|
|
235
|
-
Replicate: "replicate",
|
|
236
|
-
Google: "google",
|
|
237
|
-
GoogleAi: "google-ai",
|
|
238
|
-
Azure: "azure",
|
|
239
|
-
Aws: "aws",
|
|
240
|
-
Anyscale: "anyscale",
|
|
241
|
-
Perplexity: "perplexity",
|
|
242
|
-
Groq: "groq",
|
|
243
|
-
Fal: "fal",
|
|
244
|
-
Leonardoai: "leonardoai",
|
|
245
|
-
Nvidia: "nvidia",
|
|
246
|
-
Jina: "jina",
|
|
247
|
-
Togetherai: "togetherai",
|
|
248
|
-
Elevenlabs: "elevenlabs",
|
|
249
|
-
} as const;
|
|
250
|
-
export type CreatePromptProvider = ClosedEnum<typeof CreatePromptProvider>;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* The role of the prompt message
|
|
254
|
-
*/
|
|
255
|
-
export const CreatePromptRole = {
|
|
256
|
-
System: "system",
|
|
257
|
-
Assistant: "assistant",
|
|
258
|
-
User: "user",
|
|
259
|
-
Exception: "exception",
|
|
260
|
-
Tool: "tool",
|
|
261
|
-
Prompt: "prompt",
|
|
262
|
-
Correction: "correction",
|
|
263
|
-
ExpectedOutput: "expected_output",
|
|
264
|
-
} as const;
|
|
265
|
-
/**
|
|
266
|
-
* The role of the prompt message
|
|
267
|
-
*/
|
|
268
|
-
export type CreatePromptRole = ClosedEnum<typeof CreatePromptRole>;
|
|
269
|
-
|
|
270
|
-
export const CreatePrompt2PromptsType = {
|
|
271
|
-
ImageUrl: "image_url",
|
|
272
|
-
} as const;
|
|
273
|
-
export type CreatePrompt2PromptsType = ClosedEnum<
|
|
274
|
-
typeof CreatePrompt2PromptsType
|
|
275
|
-
>;
|
|
276
|
-
|
|
277
|
-
export type CreatePrompt2ImageUrl = {
|
|
278
|
-
/**
|
|
279
|
-
* Either a URL of the image or the base64 encoded data URI.
|
|
280
|
-
*/
|
|
281
|
-
url: string;
|
|
282
|
-
/**
|
|
283
|
-
* Specifies the detail level of the image. Currently only supported with OpenAI models
|
|
284
|
-
*/
|
|
285
|
-
detail?: string | undefined;
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* The image part of the prompt message. Only supported with vision models.
|
|
290
|
-
*/
|
|
291
|
-
export type CreatePrompt22 = {
|
|
292
|
-
type: CreatePrompt2PromptsType;
|
|
293
|
-
imageUrl: CreatePrompt2ImageUrl;
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
export const CreatePrompt2Type = {
|
|
297
|
-
Text: "text",
|
|
298
|
-
} as const;
|
|
299
|
-
export type CreatePrompt2Type = ClosedEnum<typeof CreatePrompt2Type>;
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Text content part of a prompt message
|
|
303
|
-
*/
|
|
304
|
-
export type CreatePrompt21 = {
|
|
305
|
-
type: CreatePrompt2Type;
|
|
306
|
-
text: string;
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
export type CreatePromptContent2 = CreatePrompt21 | CreatePrompt22;
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
313
|
-
*/
|
|
314
|
-
export type CreatePromptContent =
|
|
315
|
-
| string
|
|
316
|
-
| Array<CreatePrompt21 | CreatePrompt22>;
|
|
317
|
-
|
|
318
|
-
export const CreatePromptType = {
|
|
319
|
-
Function: "function",
|
|
320
|
-
} as const;
|
|
321
|
-
export type CreatePromptType = ClosedEnum<typeof CreatePromptType>;
|
|
322
|
-
|
|
323
|
-
export type CreatePromptFunction = {
|
|
324
|
-
name: string;
|
|
325
|
-
/**
|
|
326
|
-
* JSON string arguments for the functions
|
|
327
|
-
*/
|
|
328
|
-
arguments: string;
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
export type CreatePromptToolCalls = {
|
|
332
|
-
id?: string | undefined;
|
|
333
|
-
index?: number | undefined;
|
|
334
|
-
type: CreatePromptType;
|
|
335
|
-
function: CreatePromptFunction;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
export type CreatePromptMessages = {
|
|
339
|
-
/**
|
|
340
|
-
* The role of the prompt message
|
|
341
|
-
*/
|
|
342
|
-
role: CreatePromptRole;
|
|
343
|
-
/**
|
|
344
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
345
|
-
*/
|
|
346
|
-
content: string | Array<CreatePrompt21 | CreatePrompt22>;
|
|
347
|
-
toolCalls?: Array<CreatePromptToolCalls> | undefined;
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* A list of messages compatible with the openAI schema
|
|
352
|
-
*/
|
|
353
|
-
export type CreatePromptPromptConfig = {
|
|
354
|
-
stream?: boolean | undefined;
|
|
355
|
-
model?: string | undefined;
|
|
356
|
-
/**
|
|
357
|
-
* The type of the model
|
|
358
|
-
*/
|
|
359
|
-
modelType?: CreatePromptModelType | undefined;
|
|
360
|
-
/**
|
|
361
|
-
* Model Parameters: Not all parameters apply to every model
|
|
362
|
-
*/
|
|
363
|
-
modelParameters?: CreatePromptModelParameters | undefined;
|
|
364
|
-
provider?: CreatePromptProvider | undefined;
|
|
365
|
-
version?: string | undefined;
|
|
366
|
-
messages: Array<CreatePromptMessages>;
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
export const CreatePromptUseCases = {
|
|
370
|
-
Agents: "Agents",
|
|
371
|
-
AgentsSimulations: "Agents simulations",
|
|
372
|
-
APIInteraction: "API interaction",
|
|
373
|
-
AutonomousAgents: "Autonomous Agents",
|
|
374
|
-
Chatbots: "Chatbots",
|
|
375
|
-
Classification: "Classification",
|
|
376
|
-
CodeUnderstanding: "Code understanding",
|
|
377
|
-
CodeWriting: "Code writing",
|
|
378
|
-
DocumentsQA: "Documents QA",
|
|
379
|
-
Conversation: "Conversation",
|
|
380
|
-
Extraction: "Extraction",
|
|
381
|
-
MultiModal: "Multi-modal",
|
|
382
|
-
SelfChecking: "Self-checking",
|
|
383
|
-
Sql: "SQL",
|
|
384
|
-
Summarization: "Summarization",
|
|
385
|
-
Tagging: "Tagging",
|
|
386
|
-
} as const;
|
|
387
|
-
export type CreatePromptUseCases = ClosedEnum<typeof CreatePromptUseCases>;
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
391
|
-
*/
|
|
392
|
-
export const CreatePromptLanguage = {
|
|
393
|
-
Chinese: "Chinese",
|
|
394
|
-
Dutch: "Dutch",
|
|
395
|
-
English: "English",
|
|
396
|
-
French: "French",
|
|
397
|
-
German: "German",
|
|
398
|
-
Russian: "Russian",
|
|
399
|
-
Spanish: "Spanish",
|
|
400
|
-
} as const;
|
|
401
|
-
/**
|
|
402
|
-
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
403
|
-
*/
|
|
404
|
-
export type CreatePromptLanguage = ClosedEnum<typeof CreatePromptLanguage>;
|
|
405
|
-
|
|
406
|
-
export type CreatePromptMetadata = {
|
|
407
|
-
/**
|
|
408
|
-
* A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
|
|
409
|
-
*/
|
|
410
|
-
useCases?: Array<CreatePromptUseCases> | undefined;
|
|
411
|
-
/**
|
|
412
|
-
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
413
|
-
*/
|
|
414
|
-
language?: CreatePromptLanguage | undefined;
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
export type CreatePromptRequestBody = {
|
|
418
|
-
/**
|
|
419
|
-
* The prompt’s name, meant to be displayable in the UI.
|
|
420
|
-
*/
|
|
421
|
-
displayName: string;
|
|
422
|
-
/**
|
|
423
|
-
* The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
|
|
424
|
-
*/
|
|
425
|
-
description?: string | null | undefined;
|
|
426
|
-
/**
|
|
427
|
-
* A list of messages compatible with the openAI schema
|
|
428
|
-
*/
|
|
429
|
-
promptConfig: CreatePromptPromptConfig;
|
|
430
|
-
metadata?: CreatePromptMetadata | undefined;
|
|
431
|
-
/**
|
|
432
|
-
* 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.
|
|
433
|
-
*/
|
|
434
|
-
path: string;
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
export const CreatePromptPromptsType = {
|
|
438
|
-
Prompt: "prompt",
|
|
439
|
-
} as const;
|
|
440
|
-
export type CreatePromptPromptsType = ClosedEnum<
|
|
441
|
-
typeof CreatePromptPromptsType
|
|
442
|
-
>;
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* The type of the model
|
|
446
|
-
*/
|
|
447
|
-
export const CreatePromptPromptsModelType = {
|
|
448
|
-
Chat: "chat",
|
|
449
|
-
Completion: "completion",
|
|
450
|
-
Embedding: "embedding",
|
|
451
|
-
Vision: "vision",
|
|
452
|
-
Image: "image",
|
|
453
|
-
Tts: "tts",
|
|
454
|
-
Stt: "stt",
|
|
455
|
-
Rerank: "rerank",
|
|
456
|
-
Moderations: "moderations",
|
|
457
|
-
} as const;
|
|
458
|
-
/**
|
|
459
|
-
* The type of the model
|
|
460
|
-
*/
|
|
461
|
-
export type CreatePromptPromptsModelType = ClosedEnum<
|
|
462
|
-
typeof CreatePromptPromptsModelType
|
|
463
|
-
>;
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Only supported on `image` models.
|
|
467
|
-
*/
|
|
468
|
-
export const CreatePromptPromptsFormat = {
|
|
469
|
-
Url: "url",
|
|
470
|
-
B64Json: "b64_json",
|
|
471
|
-
Text: "text",
|
|
472
|
-
JsonObject: "json_object",
|
|
473
|
-
} as const;
|
|
474
|
-
/**
|
|
475
|
-
* Only supported on `image` models.
|
|
476
|
-
*/
|
|
477
|
-
export type CreatePromptPromptsFormat = ClosedEnum<
|
|
478
|
-
typeof CreatePromptPromptsFormat
|
|
479
|
-
>;
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Only supported on `image` models.
|
|
483
|
-
*/
|
|
484
|
-
export const CreatePromptPromptsQuality = {
|
|
485
|
-
Standard: "standard",
|
|
486
|
-
Hd: "hd",
|
|
487
|
-
} as const;
|
|
488
|
-
/**
|
|
489
|
-
* Only supported on `image` models.
|
|
490
|
-
*/
|
|
491
|
-
export type CreatePromptPromptsQuality = ClosedEnum<
|
|
492
|
-
typeof CreatePromptPromptsQuality
|
|
493
|
-
>;
|
|
494
|
-
|
|
495
|
-
export const CreatePromptResponseFormatPromptsResponse200Type = {
|
|
496
|
-
JsonObject: "json_object",
|
|
497
|
-
} as const;
|
|
498
|
-
export type CreatePromptResponseFormatPromptsResponse200Type = ClosedEnum<
|
|
499
|
-
typeof CreatePromptResponseFormatPromptsResponse200Type
|
|
500
|
-
>;
|
|
501
|
-
|
|
502
|
-
export type CreatePromptResponseFormatPrompts2 = {
|
|
503
|
-
type: CreatePromptResponseFormatPromptsResponse200Type;
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
export const CreatePromptResponseFormatPromptsResponseType = {
|
|
507
|
-
JsonSchema: "json_schema",
|
|
508
|
-
} as const;
|
|
509
|
-
export type CreatePromptResponseFormatPromptsResponseType = ClosedEnum<
|
|
510
|
-
typeof CreatePromptResponseFormatPromptsResponseType
|
|
511
|
-
>;
|
|
512
|
-
|
|
513
|
-
export type CreatePromptResponseFormatJsonSchema = {
|
|
514
|
-
name: string;
|
|
515
|
-
strict: boolean;
|
|
516
|
-
schema: { [k: string]: any };
|
|
517
|
-
};
|
|
518
|
-
|
|
519
|
-
export type CreatePromptResponseFormatPrompts1 = {
|
|
520
|
-
type: CreatePromptResponseFormatPromptsResponseType;
|
|
521
|
-
jsonSchema: CreatePromptResponseFormatJsonSchema;
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* An object specifying the format that the model must output.
|
|
526
|
-
*
|
|
527
|
-
* @remarks
|
|
528
|
-
*
|
|
529
|
-
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
|
|
530
|
-
*
|
|
531
|
-
* Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
|
|
532
|
-
*
|
|
533
|
-
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
534
|
-
*/
|
|
535
|
-
export type CreatePromptPromptsResponseFormat =
|
|
536
|
-
| CreatePromptResponseFormatPrompts2
|
|
537
|
-
| CreatePromptResponseFormatPrompts1;
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
541
|
-
*/
|
|
542
|
-
export const CreatePromptPromptsPhotoRealVersion = {
|
|
543
|
-
V1: "v1",
|
|
544
|
-
V2: "v2",
|
|
545
|
-
} as const;
|
|
546
|
-
/**
|
|
547
|
-
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
548
|
-
*/
|
|
549
|
-
export type CreatePromptPromptsPhotoRealVersion = ClosedEnum<
|
|
550
|
-
typeof CreatePromptPromptsPhotoRealVersion
|
|
551
|
-
>;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* The format to return the embeddings
|
|
555
|
-
*/
|
|
556
|
-
export const CreatePromptPromptsEncodingFormat = {
|
|
557
|
-
Float: "float",
|
|
558
|
-
Base64: "base64",
|
|
559
|
-
} as const;
|
|
560
|
-
/**
|
|
561
|
-
* The format to return the embeddings
|
|
562
|
-
*/
|
|
563
|
-
export type CreatePromptPromptsEncodingFormat = ClosedEnum<
|
|
564
|
-
typeof CreatePromptPromptsEncodingFormat
|
|
565
|
-
>;
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
569
|
-
*/
|
|
570
|
-
export const CreatePromptPromptsReasoningEffort = {
|
|
571
|
-
Low: "low",
|
|
572
|
-
Medium: "medium",
|
|
573
|
-
High: "high",
|
|
574
|
-
} as const;
|
|
575
|
-
/**
|
|
576
|
-
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
577
|
-
*/
|
|
578
|
-
export type CreatePromptPromptsReasoningEffort = ClosedEnum<
|
|
579
|
-
typeof CreatePromptPromptsReasoningEffort
|
|
580
|
-
>;
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Model Parameters: Not all parameters apply to every model
|
|
584
|
-
*/
|
|
585
|
-
export type CreatePromptPromptsModelParameters = {
|
|
586
|
-
/**
|
|
587
|
-
* Only supported on `chat` and `completion` models.
|
|
588
|
-
*/
|
|
589
|
-
temperature?: number | undefined;
|
|
590
|
-
/**
|
|
591
|
-
* Only supported on `chat` and `completion` models.
|
|
592
|
-
*/
|
|
593
|
-
maxTokens?: number | undefined;
|
|
594
|
-
/**
|
|
595
|
-
* Only supported on `chat` and `completion` models.
|
|
596
|
-
*/
|
|
597
|
-
topK?: number | undefined;
|
|
598
|
-
/**
|
|
599
|
-
* Only supported on `chat` and `completion` models.
|
|
600
|
-
*/
|
|
601
|
-
topP?: number | undefined;
|
|
602
|
-
/**
|
|
603
|
-
* Only supported on `chat` and `completion` models.
|
|
604
|
-
*/
|
|
605
|
-
frequencyPenalty?: number | undefined;
|
|
606
|
-
/**
|
|
607
|
-
* Only supported on `chat` and `completion` models.
|
|
608
|
-
*/
|
|
609
|
-
presencePenalty?: number | undefined;
|
|
610
|
-
/**
|
|
611
|
-
* Only supported on `image` models.
|
|
612
|
-
*/
|
|
613
|
-
numImages?: number | undefined;
|
|
614
|
-
/**
|
|
615
|
-
* Best effort deterministic seed for the model. Currently only OpenAI models support these
|
|
616
|
-
*/
|
|
617
|
-
seed?: number | undefined;
|
|
618
|
-
/**
|
|
619
|
-
* Only supported on `image` models.
|
|
620
|
-
*/
|
|
621
|
-
format?: CreatePromptPromptsFormat | undefined;
|
|
622
|
-
/**
|
|
623
|
-
* Only supported on `image` models.
|
|
624
|
-
*/
|
|
625
|
-
dimensions?: string | undefined;
|
|
626
|
-
/**
|
|
627
|
-
* Only supported on `image` models.
|
|
628
|
-
*/
|
|
629
|
-
quality?: CreatePromptPromptsQuality | undefined;
|
|
630
|
-
/**
|
|
631
|
-
* Only supported on `image` models.
|
|
632
|
-
*/
|
|
633
|
-
style?: string | undefined;
|
|
634
|
-
/**
|
|
635
|
-
* An object specifying the format that the model must output.
|
|
636
|
-
*
|
|
637
|
-
* @remarks
|
|
638
|
-
*
|
|
639
|
-
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
|
|
640
|
-
*
|
|
641
|
-
* Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
|
|
642
|
-
*
|
|
643
|
-
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
644
|
-
*/
|
|
645
|
-
responseFormat?:
|
|
646
|
-
| CreatePromptResponseFormatPrompts2
|
|
647
|
-
| CreatePromptResponseFormatPrompts1
|
|
648
|
-
| null
|
|
649
|
-
| undefined;
|
|
650
|
-
/**
|
|
651
|
-
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
652
|
-
*/
|
|
653
|
-
photoRealVersion?: CreatePromptPromptsPhotoRealVersion | undefined;
|
|
654
|
-
/**
|
|
655
|
-
* The format to return the embeddings
|
|
656
|
-
*/
|
|
657
|
-
encodingFormat?: CreatePromptPromptsEncodingFormat | undefined;
|
|
658
|
-
/**
|
|
659
|
-
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
660
|
-
*/
|
|
661
|
-
reasoningEffort?: CreatePromptPromptsReasoningEffort | undefined;
|
|
662
|
-
/**
|
|
663
|
-
* Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
|
|
664
|
-
*/
|
|
665
|
-
budgetTokens?: number | undefined;
|
|
666
|
-
};
|
|
667
|
-
|
|
668
|
-
export const CreatePromptPromptsProvider = {
|
|
669
|
-
Cohere: "cohere",
|
|
670
|
-
Openai: "openai",
|
|
671
|
-
Anthropic: "anthropic",
|
|
672
|
-
Huggingface: "huggingface",
|
|
673
|
-
Replicate: "replicate",
|
|
674
|
-
Google: "google",
|
|
675
|
-
GoogleAi: "google-ai",
|
|
676
|
-
Azure: "azure",
|
|
677
|
-
Aws: "aws",
|
|
678
|
-
Anyscale: "anyscale",
|
|
679
|
-
Perplexity: "perplexity",
|
|
680
|
-
Groq: "groq",
|
|
681
|
-
Fal: "fal",
|
|
682
|
-
Leonardoai: "leonardoai",
|
|
683
|
-
Nvidia: "nvidia",
|
|
684
|
-
Jina: "jina",
|
|
685
|
-
Togetherai: "togetherai",
|
|
686
|
-
Elevenlabs: "elevenlabs",
|
|
687
|
-
} as const;
|
|
688
|
-
export type CreatePromptPromptsProvider = ClosedEnum<
|
|
689
|
-
typeof CreatePromptPromptsProvider
|
|
690
|
-
>;
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* The role of the prompt message
|
|
694
|
-
*/
|
|
695
|
-
export const CreatePromptPromptsRole = {
|
|
696
|
-
System: "system",
|
|
697
|
-
Assistant: "assistant",
|
|
698
|
-
User: "user",
|
|
699
|
-
Exception: "exception",
|
|
700
|
-
Tool: "tool",
|
|
701
|
-
Prompt: "prompt",
|
|
702
|
-
Correction: "correction",
|
|
703
|
-
ExpectedOutput: "expected_output",
|
|
704
|
-
} as const;
|
|
705
|
-
/**
|
|
706
|
-
* The role of the prompt message
|
|
707
|
-
*/
|
|
708
|
-
export type CreatePromptPromptsRole = ClosedEnum<
|
|
709
|
-
typeof CreatePromptPromptsRole
|
|
710
|
-
>;
|
|
711
|
-
|
|
712
|
-
export const CreatePrompt2PromptsResponse200Type = {
|
|
713
|
-
ImageUrl: "image_url",
|
|
714
|
-
} as const;
|
|
715
|
-
export type CreatePrompt2PromptsResponse200Type = ClosedEnum<
|
|
716
|
-
typeof CreatePrompt2PromptsResponse200Type
|
|
717
|
-
>;
|
|
718
|
-
|
|
719
|
-
export type CreatePrompt2PromptsImageUrl = {
|
|
720
|
-
/**
|
|
721
|
-
* The orq.ai id of the image
|
|
722
|
-
*/
|
|
723
|
-
id?: string | undefined;
|
|
724
|
-
/**
|
|
725
|
-
* Either a URL of the image or the base64 encoded data URI.
|
|
726
|
-
*/
|
|
727
|
-
url: string;
|
|
728
|
-
/**
|
|
729
|
-
* Specifies the detail level of the image. Currently only supported with OpenAI models
|
|
730
|
-
*/
|
|
731
|
-
detail?: string | undefined;
|
|
732
|
-
};
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* The image part of the prompt message. Only supported with vision models.
|
|
736
|
-
*/
|
|
737
|
-
export type CreatePrompt2Prompts2 = {
|
|
738
|
-
type: CreatePrompt2PromptsResponse200Type;
|
|
739
|
-
imageUrl: CreatePrompt2PromptsImageUrl;
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
export const CreatePrompt2PromptsResponseType = {
|
|
743
|
-
Text: "text",
|
|
744
|
-
} as const;
|
|
745
|
-
export type CreatePrompt2PromptsResponseType = ClosedEnum<
|
|
746
|
-
typeof CreatePrompt2PromptsResponseType
|
|
747
|
-
>;
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* Text content part of a prompt message
|
|
751
|
-
*/
|
|
752
|
-
export type CreatePrompt2Prompts1 = {
|
|
753
|
-
type: CreatePrompt2PromptsResponseType;
|
|
754
|
-
text: string;
|
|
755
|
-
};
|
|
756
|
-
|
|
757
|
-
export type CreatePromptContentPrompts2 =
|
|
758
|
-
| CreatePrompt2Prompts1
|
|
759
|
-
| CreatePrompt2Prompts2;
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
763
|
-
*/
|
|
764
|
-
export type CreatePromptPromptsContent =
|
|
765
|
-
| string
|
|
766
|
-
| Array<CreatePrompt2Prompts1 | CreatePrompt2Prompts2>;
|
|
767
|
-
|
|
768
|
-
export const CreatePromptPromptsResponseType = {
|
|
769
|
-
Function: "function",
|
|
770
|
-
} as const;
|
|
771
|
-
export type CreatePromptPromptsResponseType = ClosedEnum<
|
|
772
|
-
typeof CreatePromptPromptsResponseType
|
|
773
|
-
>;
|
|
774
|
-
|
|
775
|
-
export type CreatePromptPromptsFunction = {
|
|
776
|
-
name: string;
|
|
777
|
-
/**
|
|
778
|
-
* JSON string arguments for the functions
|
|
779
|
-
*/
|
|
780
|
-
arguments: string;
|
|
781
|
-
};
|
|
782
|
-
|
|
783
|
-
export type CreatePromptPromptsToolCalls = {
|
|
784
|
-
id?: string | undefined;
|
|
785
|
-
index?: number | undefined;
|
|
786
|
-
type: CreatePromptPromptsResponseType;
|
|
787
|
-
function: CreatePromptPromptsFunction;
|
|
788
|
-
};
|
|
789
|
-
|
|
790
|
-
export type CreatePromptPromptsMessages = {
|
|
791
|
-
/**
|
|
792
|
-
* The role of the prompt message
|
|
793
|
-
*/
|
|
794
|
-
role: CreatePromptPromptsRole;
|
|
795
|
-
/**
|
|
796
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
797
|
-
*/
|
|
798
|
-
content: string | Array<CreatePrompt2Prompts1 | CreatePrompt2Prompts2>;
|
|
799
|
-
toolCalls?: Array<CreatePromptPromptsToolCalls> | undefined;
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* A list of messages compatible with the openAI schema
|
|
804
|
-
*/
|
|
805
|
-
export type CreatePromptPromptsPromptConfig = {
|
|
806
|
-
stream?: boolean | undefined;
|
|
807
|
-
model?: string | undefined;
|
|
808
|
-
/**
|
|
809
|
-
* The id of the resource
|
|
810
|
-
*/
|
|
811
|
-
modelDbId?: string | undefined;
|
|
812
|
-
/**
|
|
813
|
-
* The type of the model
|
|
814
|
-
*/
|
|
815
|
-
modelType?: CreatePromptPromptsModelType | undefined;
|
|
816
|
-
/**
|
|
817
|
-
* Model Parameters: Not all parameters apply to every model
|
|
818
|
-
*/
|
|
819
|
-
modelParameters?: CreatePromptPromptsModelParameters | undefined;
|
|
820
|
-
provider?: CreatePromptPromptsProvider | undefined;
|
|
821
|
-
/**
|
|
822
|
-
* The id of the resource
|
|
823
|
-
*/
|
|
824
|
-
integrationId?: string | null | undefined;
|
|
825
|
-
version?: string | undefined;
|
|
826
|
-
messages: Array<CreatePromptPromptsMessages>;
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
export const CreatePromptPromptsUseCases = {
|
|
830
|
-
Agents: "Agents",
|
|
831
|
-
AgentsSimulations: "Agents simulations",
|
|
832
|
-
APIInteraction: "API interaction",
|
|
833
|
-
AutonomousAgents: "Autonomous Agents",
|
|
834
|
-
Chatbots: "Chatbots",
|
|
835
|
-
Classification: "Classification",
|
|
836
|
-
CodeUnderstanding: "Code understanding",
|
|
837
|
-
CodeWriting: "Code writing",
|
|
838
|
-
DocumentsQA: "Documents QA",
|
|
839
|
-
Conversation: "Conversation",
|
|
840
|
-
Extraction: "Extraction",
|
|
841
|
-
MultiModal: "Multi-modal",
|
|
842
|
-
SelfChecking: "Self-checking",
|
|
843
|
-
Sql: "SQL",
|
|
844
|
-
Summarization: "Summarization",
|
|
845
|
-
Tagging: "Tagging",
|
|
846
|
-
} as const;
|
|
847
|
-
export type CreatePromptPromptsUseCases = ClosedEnum<
|
|
848
|
-
typeof CreatePromptPromptsUseCases
|
|
849
|
-
>;
|
|
850
|
-
|
|
851
|
-
/**
|
|
852
|
-
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
853
|
-
*/
|
|
854
|
-
export const CreatePromptPromptsLanguage = {
|
|
855
|
-
Chinese: "Chinese",
|
|
856
|
-
Dutch: "Dutch",
|
|
857
|
-
English: "English",
|
|
858
|
-
French: "French",
|
|
859
|
-
German: "German",
|
|
860
|
-
Russian: "Russian",
|
|
861
|
-
Spanish: "Spanish",
|
|
862
|
-
} as const;
|
|
863
|
-
/**
|
|
864
|
-
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
865
|
-
*/
|
|
866
|
-
export type CreatePromptPromptsLanguage = ClosedEnum<
|
|
867
|
-
typeof CreatePromptPromptsLanguage
|
|
868
|
-
>;
|
|
869
|
-
|
|
870
|
-
export type CreatePromptPromptsMetadata = {
|
|
871
|
-
/**
|
|
872
|
-
* A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
|
|
873
|
-
*/
|
|
874
|
-
useCases?: Array<CreatePromptPromptsUseCases> | undefined;
|
|
875
|
-
/**
|
|
876
|
-
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
877
|
-
*/
|
|
878
|
-
language?: CreatePromptPromptsLanguage | undefined;
|
|
879
|
-
};
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* Prompt created.
|
|
883
|
-
*/
|
|
884
|
-
export type CreatePromptResponseBody = {
|
|
885
|
-
id: string;
|
|
886
|
-
type: CreatePromptPromptsType;
|
|
887
|
-
owner: string;
|
|
888
|
-
domainId: string;
|
|
889
|
-
created: string;
|
|
890
|
-
updated: string;
|
|
891
|
-
createdById?: string | null | undefined;
|
|
892
|
-
updatedById?: string | null | undefined;
|
|
893
|
-
/**
|
|
894
|
-
* The prompt’s name, meant to be displayable in the UI.
|
|
895
|
-
*/
|
|
896
|
-
displayName: string;
|
|
897
|
-
/**
|
|
898
|
-
* The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
|
|
899
|
-
*/
|
|
900
|
-
description?: string | null | undefined;
|
|
901
|
-
/**
|
|
902
|
-
* A list of messages compatible with the openAI schema
|
|
903
|
-
*/
|
|
904
|
-
promptConfig: CreatePromptPromptsPromptConfig;
|
|
905
|
-
metadata?: CreatePromptPromptsMetadata | undefined;
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
/** @internal */
|
|
909
|
-
export const CreatePromptModelType$inboundSchema: z.ZodNativeEnum<
|
|
910
|
-
typeof CreatePromptModelType
|
|
911
|
-
> = z.nativeEnum(CreatePromptModelType);
|
|
912
|
-
|
|
913
|
-
/** @internal */
|
|
914
|
-
export const CreatePromptModelType$outboundSchema: z.ZodNativeEnum<
|
|
915
|
-
typeof CreatePromptModelType
|
|
916
|
-
> = CreatePromptModelType$inboundSchema;
|
|
917
|
-
|
|
918
|
-
/**
|
|
919
|
-
* @internal
|
|
920
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
921
|
-
*/
|
|
922
|
-
export namespace CreatePromptModelType$ {
|
|
923
|
-
/** @deprecated use `CreatePromptModelType$inboundSchema` instead. */
|
|
924
|
-
export const inboundSchema = CreatePromptModelType$inboundSchema;
|
|
925
|
-
/** @deprecated use `CreatePromptModelType$outboundSchema` instead. */
|
|
926
|
-
export const outboundSchema = CreatePromptModelType$outboundSchema;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
/** @internal */
|
|
930
|
-
export const CreatePromptFormat$inboundSchema: z.ZodNativeEnum<
|
|
931
|
-
typeof CreatePromptFormat
|
|
932
|
-
> = z.nativeEnum(CreatePromptFormat);
|
|
933
|
-
|
|
934
|
-
/** @internal */
|
|
935
|
-
export const CreatePromptFormat$outboundSchema: z.ZodNativeEnum<
|
|
936
|
-
typeof CreatePromptFormat
|
|
937
|
-
> = CreatePromptFormat$inboundSchema;
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* @internal
|
|
941
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
942
|
-
*/
|
|
943
|
-
export namespace CreatePromptFormat$ {
|
|
944
|
-
/** @deprecated use `CreatePromptFormat$inboundSchema` instead. */
|
|
945
|
-
export const inboundSchema = CreatePromptFormat$inboundSchema;
|
|
946
|
-
/** @deprecated use `CreatePromptFormat$outboundSchema` instead. */
|
|
947
|
-
export const outboundSchema = CreatePromptFormat$outboundSchema;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
/** @internal */
|
|
951
|
-
export const CreatePromptQuality$inboundSchema: z.ZodNativeEnum<
|
|
952
|
-
typeof CreatePromptQuality
|
|
953
|
-
> = z.nativeEnum(CreatePromptQuality);
|
|
954
|
-
|
|
955
|
-
/** @internal */
|
|
956
|
-
export const CreatePromptQuality$outboundSchema: z.ZodNativeEnum<
|
|
957
|
-
typeof CreatePromptQuality
|
|
958
|
-
> = CreatePromptQuality$inboundSchema;
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* @internal
|
|
962
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
963
|
-
*/
|
|
964
|
-
export namespace CreatePromptQuality$ {
|
|
965
|
-
/** @deprecated use `CreatePromptQuality$inboundSchema` instead. */
|
|
966
|
-
export const inboundSchema = CreatePromptQuality$inboundSchema;
|
|
967
|
-
/** @deprecated use `CreatePromptQuality$outboundSchema` instead. */
|
|
968
|
-
export const outboundSchema = CreatePromptQuality$outboundSchema;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
/** @internal */
|
|
972
|
-
export const CreatePromptResponseFormatPromptsType$inboundSchema:
|
|
973
|
-
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> = z.nativeEnum(
|
|
974
|
-
CreatePromptResponseFormatPromptsType,
|
|
975
|
-
);
|
|
976
|
-
|
|
977
|
-
/** @internal */
|
|
978
|
-
export const CreatePromptResponseFormatPromptsType$outboundSchema:
|
|
979
|
-
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> =
|
|
980
|
-
CreatePromptResponseFormatPromptsType$inboundSchema;
|
|
981
|
-
|
|
982
|
-
/**
|
|
983
|
-
* @internal
|
|
984
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
985
|
-
*/
|
|
986
|
-
export namespace CreatePromptResponseFormatPromptsType$ {
|
|
987
|
-
/** @deprecated use `CreatePromptResponseFormatPromptsType$inboundSchema` instead. */
|
|
988
|
-
export const inboundSchema =
|
|
989
|
-
CreatePromptResponseFormatPromptsType$inboundSchema;
|
|
990
|
-
/** @deprecated use `CreatePromptResponseFormatPromptsType$outboundSchema` instead. */
|
|
991
|
-
export const outboundSchema =
|
|
992
|
-
CreatePromptResponseFormatPromptsType$outboundSchema;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
/** @internal */
|
|
996
|
-
export const CreatePromptResponseFormat2$inboundSchema: z.ZodType<
|
|
997
|
-
CreatePromptResponseFormat2,
|
|
998
|
-
z.ZodTypeDef,
|
|
999
|
-
unknown
|
|
1000
|
-
> = z.object({
|
|
1001
|
-
type: CreatePromptResponseFormatPromptsType$inboundSchema,
|
|
1002
|
-
});
|
|
1003
|
-
|
|
1004
|
-
/** @internal */
|
|
1005
|
-
export type CreatePromptResponseFormat2$Outbound = {
|
|
1006
|
-
type: string;
|
|
1007
|
-
};
|
|
1008
|
-
|
|
1009
|
-
/** @internal */
|
|
1010
|
-
export const CreatePromptResponseFormat2$outboundSchema: z.ZodType<
|
|
1011
|
-
CreatePromptResponseFormat2$Outbound,
|
|
1012
|
-
z.ZodTypeDef,
|
|
1013
|
-
CreatePromptResponseFormat2
|
|
1014
|
-
> = z.object({
|
|
1015
|
-
type: CreatePromptResponseFormatPromptsType$outboundSchema,
|
|
1016
|
-
});
|
|
1017
|
-
|
|
1018
|
-
/**
|
|
1019
|
-
* @internal
|
|
1020
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1021
|
-
*/
|
|
1022
|
-
export namespace CreatePromptResponseFormat2$ {
|
|
1023
|
-
/** @deprecated use `CreatePromptResponseFormat2$inboundSchema` instead. */
|
|
1024
|
-
export const inboundSchema = CreatePromptResponseFormat2$inboundSchema;
|
|
1025
|
-
/** @deprecated use `CreatePromptResponseFormat2$outboundSchema` instead. */
|
|
1026
|
-
export const outboundSchema = CreatePromptResponseFormat2$outboundSchema;
|
|
1027
|
-
/** @deprecated use `CreatePromptResponseFormat2$Outbound` instead. */
|
|
1028
|
-
export type Outbound = CreatePromptResponseFormat2$Outbound;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
export function createPromptResponseFormat2ToJSON(
|
|
1032
|
-
createPromptResponseFormat2: CreatePromptResponseFormat2,
|
|
1033
|
-
): string {
|
|
1034
|
-
return JSON.stringify(
|
|
1035
|
-
CreatePromptResponseFormat2$outboundSchema.parse(
|
|
1036
|
-
createPromptResponseFormat2,
|
|
1037
|
-
),
|
|
1038
|
-
);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
export function createPromptResponseFormat2FromJSON(
|
|
1042
|
-
jsonString: string,
|
|
1043
|
-
): SafeParseResult<CreatePromptResponseFormat2, SDKValidationError> {
|
|
1044
|
-
return safeParse(
|
|
1045
|
-
jsonString,
|
|
1046
|
-
(x) => CreatePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
1047
|
-
`Failed to parse 'CreatePromptResponseFormat2' from JSON`,
|
|
1048
|
-
);
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
/** @internal */
|
|
1052
|
-
export const CreatePromptResponseFormatType$inboundSchema: z.ZodNativeEnum<
|
|
1053
|
-
typeof CreatePromptResponseFormatType
|
|
1054
|
-
> = z.nativeEnum(CreatePromptResponseFormatType);
|
|
1055
|
-
|
|
1056
|
-
/** @internal */
|
|
1057
|
-
export const CreatePromptResponseFormatType$outboundSchema: z.ZodNativeEnum<
|
|
1058
|
-
typeof CreatePromptResponseFormatType
|
|
1059
|
-
> = CreatePromptResponseFormatType$inboundSchema;
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* @internal
|
|
1063
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1064
|
-
*/
|
|
1065
|
-
export namespace CreatePromptResponseFormatType$ {
|
|
1066
|
-
/** @deprecated use `CreatePromptResponseFormatType$inboundSchema` instead. */
|
|
1067
|
-
export const inboundSchema = CreatePromptResponseFormatType$inboundSchema;
|
|
1068
|
-
/** @deprecated use `CreatePromptResponseFormatType$outboundSchema` instead. */
|
|
1069
|
-
export const outboundSchema = CreatePromptResponseFormatType$outboundSchema;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
/** @internal */
|
|
1073
|
-
export const ResponseFormatJsonSchema$inboundSchema: z.ZodType<
|
|
1074
|
-
ResponseFormatJsonSchema,
|
|
1075
|
-
z.ZodTypeDef,
|
|
1076
|
-
unknown
|
|
1077
|
-
> = z.object({
|
|
1078
|
-
name: z.string(),
|
|
1079
|
-
strict: z.boolean(),
|
|
1080
|
-
schema: z.record(z.any()),
|
|
1081
|
-
});
|
|
1082
|
-
|
|
1083
|
-
/** @internal */
|
|
1084
|
-
export type ResponseFormatJsonSchema$Outbound = {
|
|
1085
|
-
name: string;
|
|
1086
|
-
strict: boolean;
|
|
1087
|
-
schema: { [k: string]: any };
|
|
1088
|
-
};
|
|
1089
|
-
|
|
1090
|
-
/** @internal */
|
|
1091
|
-
export const ResponseFormatJsonSchema$outboundSchema: z.ZodType<
|
|
1092
|
-
ResponseFormatJsonSchema$Outbound,
|
|
1093
|
-
z.ZodTypeDef,
|
|
1094
|
-
ResponseFormatJsonSchema
|
|
1095
|
-
> = z.object({
|
|
1096
|
-
name: z.string(),
|
|
1097
|
-
strict: z.boolean(),
|
|
1098
|
-
schema: z.record(z.any()),
|
|
1099
|
-
});
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* @internal
|
|
1103
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1104
|
-
*/
|
|
1105
|
-
export namespace ResponseFormatJsonSchema$ {
|
|
1106
|
-
/** @deprecated use `ResponseFormatJsonSchema$inboundSchema` instead. */
|
|
1107
|
-
export const inboundSchema = ResponseFormatJsonSchema$inboundSchema;
|
|
1108
|
-
/** @deprecated use `ResponseFormatJsonSchema$outboundSchema` instead. */
|
|
1109
|
-
export const outboundSchema = ResponseFormatJsonSchema$outboundSchema;
|
|
1110
|
-
/** @deprecated use `ResponseFormatJsonSchema$Outbound` instead. */
|
|
1111
|
-
export type Outbound = ResponseFormatJsonSchema$Outbound;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
export function responseFormatJsonSchemaToJSON(
|
|
1115
|
-
responseFormatJsonSchema: ResponseFormatJsonSchema,
|
|
1116
|
-
): string {
|
|
1117
|
-
return JSON.stringify(
|
|
1118
|
-
ResponseFormatJsonSchema$outboundSchema.parse(responseFormatJsonSchema),
|
|
1119
|
-
);
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
export function responseFormatJsonSchemaFromJSON(
|
|
1123
|
-
jsonString: string,
|
|
1124
|
-
): SafeParseResult<ResponseFormatJsonSchema, SDKValidationError> {
|
|
1125
|
-
return safeParse(
|
|
1126
|
-
jsonString,
|
|
1127
|
-
(x) => ResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
1128
|
-
`Failed to parse 'ResponseFormatJsonSchema' from JSON`,
|
|
1129
|
-
);
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
/** @internal */
|
|
1133
|
-
export const CreatePromptResponseFormat1$inboundSchema: z.ZodType<
|
|
1134
|
-
CreatePromptResponseFormat1,
|
|
1135
|
-
z.ZodTypeDef,
|
|
1136
|
-
unknown
|
|
1137
|
-
> = z.object({
|
|
1138
|
-
type: CreatePromptResponseFormatType$inboundSchema,
|
|
1139
|
-
json_schema: z.lazy(() => ResponseFormatJsonSchema$inboundSchema),
|
|
1140
|
-
}).transform((v) => {
|
|
1141
|
-
return remap$(v, {
|
|
1142
|
-
"json_schema": "jsonSchema",
|
|
1143
|
-
});
|
|
1144
|
-
});
|
|
1145
|
-
|
|
1146
|
-
/** @internal */
|
|
1147
|
-
export type CreatePromptResponseFormat1$Outbound = {
|
|
1148
|
-
type: string;
|
|
1149
|
-
json_schema: ResponseFormatJsonSchema$Outbound;
|
|
1150
|
-
};
|
|
1151
|
-
|
|
1152
|
-
/** @internal */
|
|
1153
|
-
export const CreatePromptResponseFormat1$outboundSchema: z.ZodType<
|
|
1154
|
-
CreatePromptResponseFormat1$Outbound,
|
|
1155
|
-
z.ZodTypeDef,
|
|
1156
|
-
CreatePromptResponseFormat1
|
|
1157
|
-
> = z.object({
|
|
1158
|
-
type: CreatePromptResponseFormatType$outboundSchema,
|
|
1159
|
-
jsonSchema: z.lazy(() => ResponseFormatJsonSchema$outboundSchema),
|
|
1160
|
-
}).transform((v) => {
|
|
1161
|
-
return remap$(v, {
|
|
1162
|
-
jsonSchema: "json_schema",
|
|
1163
|
-
});
|
|
1164
|
-
});
|
|
1165
|
-
|
|
1166
|
-
/**
|
|
1167
|
-
* @internal
|
|
1168
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1169
|
-
*/
|
|
1170
|
-
export namespace CreatePromptResponseFormat1$ {
|
|
1171
|
-
/** @deprecated use `CreatePromptResponseFormat1$inboundSchema` instead. */
|
|
1172
|
-
export const inboundSchema = CreatePromptResponseFormat1$inboundSchema;
|
|
1173
|
-
/** @deprecated use `CreatePromptResponseFormat1$outboundSchema` instead. */
|
|
1174
|
-
export const outboundSchema = CreatePromptResponseFormat1$outboundSchema;
|
|
1175
|
-
/** @deprecated use `CreatePromptResponseFormat1$Outbound` instead. */
|
|
1176
|
-
export type Outbound = CreatePromptResponseFormat1$Outbound;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
export function createPromptResponseFormat1ToJSON(
|
|
1180
|
-
createPromptResponseFormat1: CreatePromptResponseFormat1,
|
|
1181
|
-
): string {
|
|
1182
|
-
return JSON.stringify(
|
|
1183
|
-
CreatePromptResponseFormat1$outboundSchema.parse(
|
|
1184
|
-
createPromptResponseFormat1,
|
|
1185
|
-
),
|
|
1186
|
-
);
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
export function createPromptResponseFormat1FromJSON(
|
|
1190
|
-
jsonString: string,
|
|
1191
|
-
): SafeParseResult<CreatePromptResponseFormat1, SDKValidationError> {
|
|
1192
|
-
return safeParse(
|
|
1193
|
-
jsonString,
|
|
1194
|
-
(x) => CreatePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
1195
|
-
`Failed to parse 'CreatePromptResponseFormat1' from JSON`,
|
|
1196
|
-
);
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
/** @internal */
|
|
1200
|
-
export const CreatePromptResponseFormat$inboundSchema: z.ZodType<
|
|
1201
|
-
CreatePromptResponseFormat,
|
|
1202
|
-
z.ZodTypeDef,
|
|
1203
|
-
unknown
|
|
1204
|
-
> = z.union([
|
|
1205
|
-
z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
|
|
1206
|
-
z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
|
|
1207
|
-
]);
|
|
1208
|
-
|
|
1209
|
-
/** @internal */
|
|
1210
|
-
export type CreatePromptResponseFormat$Outbound =
|
|
1211
|
-
| CreatePromptResponseFormat2$Outbound
|
|
1212
|
-
| CreatePromptResponseFormat1$Outbound;
|
|
1213
|
-
|
|
1214
|
-
/** @internal */
|
|
1215
|
-
export const CreatePromptResponseFormat$outboundSchema: z.ZodType<
|
|
1216
|
-
CreatePromptResponseFormat$Outbound,
|
|
1217
|
-
z.ZodTypeDef,
|
|
1218
|
-
CreatePromptResponseFormat
|
|
1219
|
-
> = z.union([
|
|
1220
|
-
z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
|
|
1221
|
-
z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
|
|
1222
|
-
]);
|
|
1223
|
-
|
|
1224
|
-
/**
|
|
1225
|
-
* @internal
|
|
1226
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1227
|
-
*/
|
|
1228
|
-
export namespace CreatePromptResponseFormat$ {
|
|
1229
|
-
/** @deprecated use `CreatePromptResponseFormat$inboundSchema` instead. */
|
|
1230
|
-
export const inboundSchema = CreatePromptResponseFormat$inboundSchema;
|
|
1231
|
-
/** @deprecated use `CreatePromptResponseFormat$outboundSchema` instead. */
|
|
1232
|
-
export const outboundSchema = CreatePromptResponseFormat$outboundSchema;
|
|
1233
|
-
/** @deprecated use `CreatePromptResponseFormat$Outbound` instead. */
|
|
1234
|
-
export type Outbound = CreatePromptResponseFormat$Outbound;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
export function createPromptResponseFormatToJSON(
|
|
1238
|
-
createPromptResponseFormat: CreatePromptResponseFormat,
|
|
1239
|
-
): string {
|
|
1240
|
-
return JSON.stringify(
|
|
1241
|
-
CreatePromptResponseFormat$outboundSchema.parse(createPromptResponseFormat),
|
|
1242
|
-
);
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
export function createPromptResponseFormatFromJSON(
|
|
1246
|
-
jsonString: string,
|
|
1247
|
-
): SafeParseResult<CreatePromptResponseFormat, SDKValidationError> {
|
|
1248
|
-
return safeParse(
|
|
1249
|
-
jsonString,
|
|
1250
|
-
(x) => CreatePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1251
|
-
`Failed to parse 'CreatePromptResponseFormat' from JSON`,
|
|
1252
|
-
);
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
/** @internal */
|
|
1256
|
-
export const CreatePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
1257
|
-
typeof CreatePromptPhotoRealVersion
|
|
1258
|
-
> = z.nativeEnum(CreatePromptPhotoRealVersion);
|
|
1259
|
-
|
|
1260
|
-
/** @internal */
|
|
1261
|
-
export const CreatePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
|
|
1262
|
-
typeof CreatePromptPhotoRealVersion
|
|
1263
|
-
> = CreatePromptPhotoRealVersion$inboundSchema;
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* @internal
|
|
1267
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1268
|
-
*/
|
|
1269
|
-
export namespace CreatePromptPhotoRealVersion$ {
|
|
1270
|
-
/** @deprecated use `CreatePromptPhotoRealVersion$inboundSchema` instead. */
|
|
1271
|
-
export const inboundSchema = CreatePromptPhotoRealVersion$inboundSchema;
|
|
1272
|
-
/** @deprecated use `CreatePromptPhotoRealVersion$outboundSchema` instead. */
|
|
1273
|
-
export const outboundSchema = CreatePromptPhotoRealVersion$outboundSchema;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
/** @internal */
|
|
1277
|
-
export const CreatePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
1278
|
-
typeof CreatePromptEncodingFormat
|
|
1279
|
-
> = z.nativeEnum(CreatePromptEncodingFormat);
|
|
1280
|
-
|
|
1281
|
-
/** @internal */
|
|
1282
|
-
export const CreatePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
|
|
1283
|
-
typeof CreatePromptEncodingFormat
|
|
1284
|
-
> = CreatePromptEncodingFormat$inboundSchema;
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* @internal
|
|
1288
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1289
|
-
*/
|
|
1290
|
-
export namespace CreatePromptEncodingFormat$ {
|
|
1291
|
-
/** @deprecated use `CreatePromptEncodingFormat$inboundSchema` instead. */
|
|
1292
|
-
export const inboundSchema = CreatePromptEncodingFormat$inboundSchema;
|
|
1293
|
-
/** @deprecated use `CreatePromptEncodingFormat$outboundSchema` instead. */
|
|
1294
|
-
export const outboundSchema = CreatePromptEncodingFormat$outboundSchema;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
/** @internal */
|
|
1298
|
-
export const CreatePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
|
|
1299
|
-
typeof CreatePromptReasoningEffort
|
|
1300
|
-
> = z.nativeEnum(CreatePromptReasoningEffort);
|
|
1301
|
-
|
|
1302
|
-
/** @internal */
|
|
1303
|
-
export const CreatePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
|
|
1304
|
-
typeof CreatePromptReasoningEffort
|
|
1305
|
-
> = CreatePromptReasoningEffort$inboundSchema;
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* @internal
|
|
1309
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1310
|
-
*/
|
|
1311
|
-
export namespace CreatePromptReasoningEffort$ {
|
|
1312
|
-
/** @deprecated use `CreatePromptReasoningEffort$inboundSchema` instead. */
|
|
1313
|
-
export const inboundSchema = CreatePromptReasoningEffort$inboundSchema;
|
|
1314
|
-
/** @deprecated use `CreatePromptReasoningEffort$outboundSchema` instead. */
|
|
1315
|
-
export const outboundSchema = CreatePromptReasoningEffort$outboundSchema;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
/** @internal */
|
|
1319
|
-
export const CreatePromptModelParameters$inboundSchema: z.ZodType<
|
|
1320
|
-
CreatePromptModelParameters,
|
|
1321
|
-
z.ZodTypeDef,
|
|
1322
|
-
unknown
|
|
1323
|
-
> = z.object({
|
|
1324
|
-
temperature: z.number().optional(),
|
|
1325
|
-
maxTokens: z.number().optional(),
|
|
1326
|
-
topK: z.number().optional(),
|
|
1327
|
-
topP: z.number().optional(),
|
|
1328
|
-
frequencyPenalty: z.number().optional(),
|
|
1329
|
-
presencePenalty: z.number().optional(),
|
|
1330
|
-
numImages: z.number().optional(),
|
|
1331
|
-
seed: z.number().optional(),
|
|
1332
|
-
format: CreatePromptFormat$inboundSchema.optional(),
|
|
1333
|
-
dimensions: z.string().optional(),
|
|
1334
|
-
quality: CreatePromptQuality$inboundSchema.optional(),
|
|
1335
|
-
style: z.string().optional(),
|
|
1336
|
-
responseFormat: z.nullable(
|
|
1337
|
-
z.union([
|
|
1338
|
-
z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
|
|
1339
|
-
z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
|
|
1340
|
-
]),
|
|
1341
|
-
).optional(),
|
|
1342
|
-
photoRealVersion: CreatePromptPhotoRealVersion$inboundSchema.optional(),
|
|
1343
|
-
encoding_format: CreatePromptEncodingFormat$inboundSchema.optional(),
|
|
1344
|
-
reasoningEffort: CreatePromptReasoningEffort$inboundSchema.optional(),
|
|
1345
|
-
budgetTokens: z.number().optional(),
|
|
1346
|
-
}).transform((v) => {
|
|
1347
|
-
return remap$(v, {
|
|
1348
|
-
"encoding_format": "encodingFormat",
|
|
1349
|
-
});
|
|
1350
|
-
});
|
|
1351
|
-
|
|
1352
|
-
/** @internal */
|
|
1353
|
-
export type CreatePromptModelParameters$Outbound = {
|
|
1354
|
-
temperature?: number | undefined;
|
|
1355
|
-
maxTokens?: number | undefined;
|
|
1356
|
-
topK?: number | undefined;
|
|
1357
|
-
topP?: number | undefined;
|
|
1358
|
-
frequencyPenalty?: number | undefined;
|
|
1359
|
-
presencePenalty?: number | undefined;
|
|
1360
|
-
numImages?: number | undefined;
|
|
1361
|
-
seed?: number | undefined;
|
|
1362
|
-
format?: string | undefined;
|
|
1363
|
-
dimensions?: string | undefined;
|
|
1364
|
-
quality?: string | undefined;
|
|
1365
|
-
style?: string | undefined;
|
|
1366
|
-
responseFormat?:
|
|
1367
|
-
| CreatePromptResponseFormat2$Outbound
|
|
1368
|
-
| CreatePromptResponseFormat1$Outbound
|
|
1369
|
-
| null
|
|
1370
|
-
| undefined;
|
|
1371
|
-
photoRealVersion?: string | undefined;
|
|
1372
|
-
encoding_format?: string | undefined;
|
|
1373
|
-
reasoningEffort?: string | undefined;
|
|
1374
|
-
budgetTokens?: number | undefined;
|
|
1375
|
-
};
|
|
1376
|
-
|
|
1377
|
-
/** @internal */
|
|
1378
|
-
export const CreatePromptModelParameters$outboundSchema: z.ZodType<
|
|
1379
|
-
CreatePromptModelParameters$Outbound,
|
|
1380
|
-
z.ZodTypeDef,
|
|
1381
|
-
CreatePromptModelParameters
|
|
1382
|
-
> = z.object({
|
|
1383
|
-
temperature: z.number().optional(),
|
|
1384
|
-
maxTokens: z.number().optional(),
|
|
1385
|
-
topK: z.number().optional(),
|
|
1386
|
-
topP: z.number().optional(),
|
|
1387
|
-
frequencyPenalty: z.number().optional(),
|
|
1388
|
-
presencePenalty: z.number().optional(),
|
|
1389
|
-
numImages: z.number().optional(),
|
|
1390
|
-
seed: z.number().optional(),
|
|
1391
|
-
format: CreatePromptFormat$outboundSchema.optional(),
|
|
1392
|
-
dimensions: z.string().optional(),
|
|
1393
|
-
quality: CreatePromptQuality$outboundSchema.optional(),
|
|
1394
|
-
style: z.string().optional(),
|
|
1395
|
-
responseFormat: z.nullable(
|
|
1396
|
-
z.union([
|
|
1397
|
-
z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
|
|
1398
|
-
z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
|
|
1399
|
-
]),
|
|
1400
|
-
).optional(),
|
|
1401
|
-
photoRealVersion: CreatePromptPhotoRealVersion$outboundSchema.optional(),
|
|
1402
|
-
encodingFormat: CreatePromptEncodingFormat$outboundSchema.optional(),
|
|
1403
|
-
reasoningEffort: CreatePromptReasoningEffort$outboundSchema.optional(),
|
|
1404
|
-
budgetTokens: z.number().optional(),
|
|
1405
|
-
}).transform((v) => {
|
|
1406
|
-
return remap$(v, {
|
|
1407
|
-
encodingFormat: "encoding_format",
|
|
1408
|
-
});
|
|
1409
|
-
});
|
|
1410
|
-
|
|
1411
|
-
/**
|
|
1412
|
-
* @internal
|
|
1413
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1414
|
-
*/
|
|
1415
|
-
export namespace CreatePromptModelParameters$ {
|
|
1416
|
-
/** @deprecated use `CreatePromptModelParameters$inboundSchema` instead. */
|
|
1417
|
-
export const inboundSchema = CreatePromptModelParameters$inboundSchema;
|
|
1418
|
-
/** @deprecated use `CreatePromptModelParameters$outboundSchema` instead. */
|
|
1419
|
-
export const outboundSchema = CreatePromptModelParameters$outboundSchema;
|
|
1420
|
-
/** @deprecated use `CreatePromptModelParameters$Outbound` instead. */
|
|
1421
|
-
export type Outbound = CreatePromptModelParameters$Outbound;
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
export function createPromptModelParametersToJSON(
|
|
1425
|
-
createPromptModelParameters: CreatePromptModelParameters,
|
|
1426
|
-
): string {
|
|
1427
|
-
return JSON.stringify(
|
|
1428
|
-
CreatePromptModelParameters$outboundSchema.parse(
|
|
1429
|
-
createPromptModelParameters,
|
|
1430
|
-
),
|
|
1431
|
-
);
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
export function createPromptModelParametersFromJSON(
|
|
1435
|
-
jsonString: string,
|
|
1436
|
-
): SafeParseResult<CreatePromptModelParameters, SDKValidationError> {
|
|
1437
|
-
return safeParse(
|
|
1438
|
-
jsonString,
|
|
1439
|
-
(x) => CreatePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
1440
|
-
`Failed to parse 'CreatePromptModelParameters' from JSON`,
|
|
1441
|
-
);
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
/** @internal */
|
|
1445
|
-
export const CreatePromptProvider$inboundSchema: z.ZodNativeEnum<
|
|
1446
|
-
typeof CreatePromptProvider
|
|
1447
|
-
> = z.nativeEnum(CreatePromptProvider);
|
|
1448
|
-
|
|
1449
|
-
/** @internal */
|
|
1450
|
-
export const CreatePromptProvider$outboundSchema: z.ZodNativeEnum<
|
|
1451
|
-
typeof CreatePromptProvider
|
|
1452
|
-
> = CreatePromptProvider$inboundSchema;
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* @internal
|
|
1456
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1457
|
-
*/
|
|
1458
|
-
export namespace CreatePromptProvider$ {
|
|
1459
|
-
/** @deprecated use `CreatePromptProvider$inboundSchema` instead. */
|
|
1460
|
-
export const inboundSchema = CreatePromptProvider$inboundSchema;
|
|
1461
|
-
/** @deprecated use `CreatePromptProvider$outboundSchema` instead. */
|
|
1462
|
-
export const outboundSchema = CreatePromptProvider$outboundSchema;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
/** @internal */
|
|
1466
|
-
export const CreatePromptRole$inboundSchema: z.ZodNativeEnum<
|
|
1467
|
-
typeof CreatePromptRole
|
|
1468
|
-
> = z.nativeEnum(CreatePromptRole);
|
|
1469
|
-
|
|
1470
|
-
/** @internal */
|
|
1471
|
-
export const CreatePromptRole$outboundSchema: z.ZodNativeEnum<
|
|
1472
|
-
typeof CreatePromptRole
|
|
1473
|
-
> = CreatePromptRole$inboundSchema;
|
|
1474
|
-
|
|
1475
|
-
/**
|
|
1476
|
-
* @internal
|
|
1477
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1478
|
-
*/
|
|
1479
|
-
export namespace CreatePromptRole$ {
|
|
1480
|
-
/** @deprecated use `CreatePromptRole$inboundSchema` instead. */
|
|
1481
|
-
export const inboundSchema = CreatePromptRole$inboundSchema;
|
|
1482
|
-
/** @deprecated use `CreatePromptRole$outboundSchema` instead. */
|
|
1483
|
-
export const outboundSchema = CreatePromptRole$outboundSchema;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
/** @internal */
|
|
1487
|
-
export const CreatePrompt2PromptsType$inboundSchema: z.ZodNativeEnum<
|
|
1488
|
-
typeof CreatePrompt2PromptsType
|
|
1489
|
-
> = z.nativeEnum(CreatePrompt2PromptsType);
|
|
1490
|
-
|
|
1491
|
-
/** @internal */
|
|
1492
|
-
export const CreatePrompt2PromptsType$outboundSchema: z.ZodNativeEnum<
|
|
1493
|
-
typeof CreatePrompt2PromptsType
|
|
1494
|
-
> = CreatePrompt2PromptsType$inboundSchema;
|
|
1495
|
-
|
|
1496
|
-
/**
|
|
1497
|
-
* @internal
|
|
1498
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1499
|
-
*/
|
|
1500
|
-
export namespace CreatePrompt2PromptsType$ {
|
|
1501
|
-
/** @deprecated use `CreatePrompt2PromptsType$inboundSchema` instead. */
|
|
1502
|
-
export const inboundSchema = CreatePrompt2PromptsType$inboundSchema;
|
|
1503
|
-
/** @deprecated use `CreatePrompt2PromptsType$outboundSchema` instead. */
|
|
1504
|
-
export const outboundSchema = CreatePrompt2PromptsType$outboundSchema;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
/** @internal */
|
|
1508
|
-
export const CreatePrompt2ImageUrl$inboundSchema: z.ZodType<
|
|
1509
|
-
CreatePrompt2ImageUrl,
|
|
1510
|
-
z.ZodTypeDef,
|
|
1511
|
-
unknown
|
|
1512
|
-
> = z.object({
|
|
1513
|
-
url: z.string(),
|
|
1514
|
-
detail: z.string().optional(),
|
|
1515
|
-
});
|
|
1516
|
-
|
|
1517
|
-
/** @internal */
|
|
1518
|
-
export type CreatePrompt2ImageUrl$Outbound = {
|
|
1519
|
-
url: string;
|
|
1520
|
-
detail?: string | undefined;
|
|
1521
|
-
};
|
|
1522
|
-
|
|
1523
|
-
/** @internal */
|
|
1524
|
-
export const CreatePrompt2ImageUrl$outboundSchema: z.ZodType<
|
|
1525
|
-
CreatePrompt2ImageUrl$Outbound,
|
|
1526
|
-
z.ZodTypeDef,
|
|
1527
|
-
CreatePrompt2ImageUrl
|
|
1528
|
-
> = z.object({
|
|
1529
|
-
url: z.string(),
|
|
1530
|
-
detail: z.string().optional(),
|
|
1531
|
-
});
|
|
1532
|
-
|
|
1533
|
-
/**
|
|
1534
|
-
* @internal
|
|
1535
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1536
|
-
*/
|
|
1537
|
-
export namespace CreatePrompt2ImageUrl$ {
|
|
1538
|
-
/** @deprecated use `CreatePrompt2ImageUrl$inboundSchema` instead. */
|
|
1539
|
-
export const inboundSchema = CreatePrompt2ImageUrl$inboundSchema;
|
|
1540
|
-
/** @deprecated use `CreatePrompt2ImageUrl$outboundSchema` instead. */
|
|
1541
|
-
export const outboundSchema = CreatePrompt2ImageUrl$outboundSchema;
|
|
1542
|
-
/** @deprecated use `CreatePrompt2ImageUrl$Outbound` instead. */
|
|
1543
|
-
export type Outbound = CreatePrompt2ImageUrl$Outbound;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
export function createPrompt2ImageUrlToJSON(
|
|
1547
|
-
createPrompt2ImageUrl: CreatePrompt2ImageUrl,
|
|
1548
|
-
): string {
|
|
1549
|
-
return JSON.stringify(
|
|
1550
|
-
CreatePrompt2ImageUrl$outboundSchema.parse(createPrompt2ImageUrl),
|
|
1551
|
-
);
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
export function createPrompt2ImageUrlFromJSON(
|
|
1555
|
-
jsonString: string,
|
|
1556
|
-
): SafeParseResult<CreatePrompt2ImageUrl, SDKValidationError> {
|
|
1557
|
-
return safeParse(
|
|
1558
|
-
jsonString,
|
|
1559
|
-
(x) => CreatePrompt2ImageUrl$inboundSchema.parse(JSON.parse(x)),
|
|
1560
|
-
`Failed to parse 'CreatePrompt2ImageUrl' from JSON`,
|
|
1561
|
-
);
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
/** @internal */
|
|
1565
|
-
export const CreatePrompt22$inboundSchema: z.ZodType<
|
|
1566
|
-
CreatePrompt22,
|
|
1567
|
-
z.ZodTypeDef,
|
|
1568
|
-
unknown
|
|
1569
|
-
> = z.object({
|
|
1570
|
-
type: CreatePrompt2PromptsType$inboundSchema,
|
|
1571
|
-
image_url: z.lazy(() => CreatePrompt2ImageUrl$inboundSchema),
|
|
1572
|
-
}).transform((v) => {
|
|
1573
|
-
return remap$(v, {
|
|
1574
|
-
"image_url": "imageUrl",
|
|
1575
|
-
});
|
|
1576
|
-
});
|
|
1577
|
-
|
|
1578
|
-
/** @internal */
|
|
1579
|
-
export type CreatePrompt22$Outbound = {
|
|
1580
|
-
type: string;
|
|
1581
|
-
image_url: CreatePrompt2ImageUrl$Outbound;
|
|
1582
|
-
};
|
|
1583
|
-
|
|
1584
|
-
/** @internal */
|
|
1585
|
-
export const CreatePrompt22$outboundSchema: z.ZodType<
|
|
1586
|
-
CreatePrompt22$Outbound,
|
|
1587
|
-
z.ZodTypeDef,
|
|
1588
|
-
CreatePrompt22
|
|
1589
|
-
> = z.object({
|
|
1590
|
-
type: CreatePrompt2PromptsType$outboundSchema,
|
|
1591
|
-
imageUrl: z.lazy(() => CreatePrompt2ImageUrl$outboundSchema),
|
|
1592
|
-
}).transform((v) => {
|
|
1593
|
-
return remap$(v, {
|
|
1594
|
-
imageUrl: "image_url",
|
|
1595
|
-
});
|
|
1596
|
-
});
|
|
1597
|
-
|
|
1598
|
-
/**
|
|
1599
|
-
* @internal
|
|
1600
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1601
|
-
*/
|
|
1602
|
-
export namespace CreatePrompt22$ {
|
|
1603
|
-
/** @deprecated use `CreatePrompt22$inboundSchema` instead. */
|
|
1604
|
-
export const inboundSchema = CreatePrompt22$inboundSchema;
|
|
1605
|
-
/** @deprecated use `CreatePrompt22$outboundSchema` instead. */
|
|
1606
|
-
export const outboundSchema = CreatePrompt22$outboundSchema;
|
|
1607
|
-
/** @deprecated use `CreatePrompt22$Outbound` instead. */
|
|
1608
|
-
export type Outbound = CreatePrompt22$Outbound;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
export function createPrompt22ToJSON(createPrompt22: CreatePrompt22): string {
|
|
1612
|
-
return JSON.stringify(CreatePrompt22$outboundSchema.parse(createPrompt22));
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
export function createPrompt22FromJSON(
|
|
1616
|
-
jsonString: string,
|
|
1617
|
-
): SafeParseResult<CreatePrompt22, SDKValidationError> {
|
|
1618
|
-
return safeParse(
|
|
1619
|
-
jsonString,
|
|
1620
|
-
(x) => CreatePrompt22$inboundSchema.parse(JSON.parse(x)),
|
|
1621
|
-
`Failed to parse 'CreatePrompt22' from JSON`,
|
|
1622
|
-
);
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
/** @internal */
|
|
1626
|
-
export const CreatePrompt2Type$inboundSchema: z.ZodNativeEnum<
|
|
1627
|
-
typeof CreatePrompt2Type
|
|
1628
|
-
> = z.nativeEnum(CreatePrompt2Type);
|
|
1629
|
-
|
|
1630
|
-
/** @internal */
|
|
1631
|
-
export const CreatePrompt2Type$outboundSchema: z.ZodNativeEnum<
|
|
1632
|
-
typeof CreatePrompt2Type
|
|
1633
|
-
> = CreatePrompt2Type$inboundSchema;
|
|
1634
|
-
|
|
1635
|
-
/**
|
|
1636
|
-
* @internal
|
|
1637
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1638
|
-
*/
|
|
1639
|
-
export namespace CreatePrompt2Type$ {
|
|
1640
|
-
/** @deprecated use `CreatePrompt2Type$inboundSchema` instead. */
|
|
1641
|
-
export const inboundSchema = CreatePrompt2Type$inboundSchema;
|
|
1642
|
-
/** @deprecated use `CreatePrompt2Type$outboundSchema` instead. */
|
|
1643
|
-
export const outboundSchema = CreatePrompt2Type$outboundSchema;
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
/** @internal */
|
|
1647
|
-
export const CreatePrompt21$inboundSchema: z.ZodType<
|
|
1648
|
-
CreatePrompt21,
|
|
1649
|
-
z.ZodTypeDef,
|
|
1650
|
-
unknown
|
|
1651
|
-
> = z.object({
|
|
1652
|
-
type: CreatePrompt2Type$inboundSchema,
|
|
1653
|
-
text: z.string(),
|
|
1654
|
-
});
|
|
1655
|
-
|
|
1656
|
-
/** @internal */
|
|
1657
|
-
export type CreatePrompt21$Outbound = {
|
|
1658
|
-
type: string;
|
|
1659
|
-
text: string;
|
|
1660
|
-
};
|
|
1661
|
-
|
|
1662
|
-
/** @internal */
|
|
1663
|
-
export const CreatePrompt21$outboundSchema: z.ZodType<
|
|
1664
|
-
CreatePrompt21$Outbound,
|
|
1665
|
-
z.ZodTypeDef,
|
|
1666
|
-
CreatePrompt21
|
|
1667
|
-
> = z.object({
|
|
1668
|
-
type: CreatePrompt2Type$outboundSchema,
|
|
1669
|
-
text: z.string(),
|
|
1670
|
-
});
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* @internal
|
|
1674
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1675
|
-
*/
|
|
1676
|
-
export namespace CreatePrompt21$ {
|
|
1677
|
-
/** @deprecated use `CreatePrompt21$inboundSchema` instead. */
|
|
1678
|
-
export const inboundSchema = CreatePrompt21$inboundSchema;
|
|
1679
|
-
/** @deprecated use `CreatePrompt21$outboundSchema` instead. */
|
|
1680
|
-
export const outboundSchema = CreatePrompt21$outboundSchema;
|
|
1681
|
-
/** @deprecated use `CreatePrompt21$Outbound` instead. */
|
|
1682
|
-
export type Outbound = CreatePrompt21$Outbound;
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
export function createPrompt21ToJSON(createPrompt21: CreatePrompt21): string {
|
|
1686
|
-
return JSON.stringify(CreatePrompt21$outboundSchema.parse(createPrompt21));
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
export function createPrompt21FromJSON(
|
|
1690
|
-
jsonString: string,
|
|
1691
|
-
): SafeParseResult<CreatePrompt21, SDKValidationError> {
|
|
1692
|
-
return safeParse(
|
|
1693
|
-
jsonString,
|
|
1694
|
-
(x) => CreatePrompt21$inboundSchema.parse(JSON.parse(x)),
|
|
1695
|
-
`Failed to parse 'CreatePrompt21' from JSON`,
|
|
1696
|
-
);
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
/** @internal */
|
|
1700
|
-
export const CreatePromptContent2$inboundSchema: z.ZodType<
|
|
1701
|
-
CreatePromptContent2,
|
|
1702
|
-
z.ZodTypeDef,
|
|
1703
|
-
unknown
|
|
1704
|
-
> = z.union([
|
|
1705
|
-
z.lazy(() => CreatePrompt21$inboundSchema),
|
|
1706
|
-
z.lazy(() => CreatePrompt22$inboundSchema),
|
|
1707
|
-
]);
|
|
1708
|
-
|
|
1709
|
-
/** @internal */
|
|
1710
|
-
export type CreatePromptContent2$Outbound =
|
|
1711
|
-
| CreatePrompt21$Outbound
|
|
1712
|
-
| CreatePrompt22$Outbound;
|
|
1713
|
-
|
|
1714
|
-
/** @internal */
|
|
1715
|
-
export const CreatePromptContent2$outboundSchema: z.ZodType<
|
|
1716
|
-
CreatePromptContent2$Outbound,
|
|
1717
|
-
z.ZodTypeDef,
|
|
1718
|
-
CreatePromptContent2
|
|
1719
|
-
> = z.union([
|
|
1720
|
-
z.lazy(() => CreatePrompt21$outboundSchema),
|
|
1721
|
-
z.lazy(() => CreatePrompt22$outboundSchema),
|
|
1722
|
-
]);
|
|
1723
|
-
|
|
1724
|
-
/**
|
|
1725
|
-
* @internal
|
|
1726
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1727
|
-
*/
|
|
1728
|
-
export namespace CreatePromptContent2$ {
|
|
1729
|
-
/** @deprecated use `CreatePromptContent2$inboundSchema` instead. */
|
|
1730
|
-
export const inboundSchema = CreatePromptContent2$inboundSchema;
|
|
1731
|
-
/** @deprecated use `CreatePromptContent2$outboundSchema` instead. */
|
|
1732
|
-
export const outboundSchema = CreatePromptContent2$outboundSchema;
|
|
1733
|
-
/** @deprecated use `CreatePromptContent2$Outbound` instead. */
|
|
1734
|
-
export type Outbound = CreatePromptContent2$Outbound;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
export function createPromptContent2ToJSON(
|
|
1738
|
-
createPromptContent2: CreatePromptContent2,
|
|
1739
|
-
): string {
|
|
1740
|
-
return JSON.stringify(
|
|
1741
|
-
CreatePromptContent2$outboundSchema.parse(createPromptContent2),
|
|
1742
|
-
);
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
export function createPromptContent2FromJSON(
|
|
1746
|
-
jsonString: string,
|
|
1747
|
-
): SafeParseResult<CreatePromptContent2, SDKValidationError> {
|
|
1748
|
-
return safeParse(
|
|
1749
|
-
jsonString,
|
|
1750
|
-
(x) => CreatePromptContent2$inboundSchema.parse(JSON.parse(x)),
|
|
1751
|
-
`Failed to parse 'CreatePromptContent2' from JSON`,
|
|
1752
|
-
);
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
/** @internal */
|
|
1756
|
-
export const CreatePromptContent$inboundSchema: z.ZodType<
|
|
1757
|
-
CreatePromptContent,
|
|
1758
|
-
z.ZodTypeDef,
|
|
1759
|
-
unknown
|
|
1760
|
-
> = z.union([
|
|
1761
|
-
z.string(),
|
|
1762
|
-
z.array(z.union([
|
|
1763
|
-
z.lazy(() => CreatePrompt21$inboundSchema),
|
|
1764
|
-
z.lazy(() => CreatePrompt22$inboundSchema),
|
|
1765
|
-
])),
|
|
1766
|
-
]);
|
|
1767
|
-
|
|
1768
|
-
/** @internal */
|
|
1769
|
-
export type CreatePromptContent$Outbound =
|
|
1770
|
-
| string
|
|
1771
|
-
| Array<CreatePrompt21$Outbound | CreatePrompt22$Outbound>;
|
|
1772
|
-
|
|
1773
|
-
/** @internal */
|
|
1774
|
-
export const CreatePromptContent$outboundSchema: z.ZodType<
|
|
1775
|
-
CreatePromptContent$Outbound,
|
|
1776
|
-
z.ZodTypeDef,
|
|
1777
|
-
CreatePromptContent
|
|
1778
|
-
> = z.union([
|
|
1779
|
-
z.string(),
|
|
1780
|
-
z.array(z.union([
|
|
1781
|
-
z.lazy(() => CreatePrompt21$outboundSchema),
|
|
1782
|
-
z.lazy(() => CreatePrompt22$outboundSchema),
|
|
1783
|
-
])),
|
|
1784
|
-
]);
|
|
1785
|
-
|
|
1786
|
-
/**
|
|
1787
|
-
* @internal
|
|
1788
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1789
|
-
*/
|
|
1790
|
-
export namespace CreatePromptContent$ {
|
|
1791
|
-
/** @deprecated use `CreatePromptContent$inboundSchema` instead. */
|
|
1792
|
-
export const inboundSchema = CreatePromptContent$inboundSchema;
|
|
1793
|
-
/** @deprecated use `CreatePromptContent$outboundSchema` instead. */
|
|
1794
|
-
export const outboundSchema = CreatePromptContent$outboundSchema;
|
|
1795
|
-
/** @deprecated use `CreatePromptContent$Outbound` instead. */
|
|
1796
|
-
export type Outbound = CreatePromptContent$Outbound;
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
export function createPromptContentToJSON(
|
|
1800
|
-
createPromptContent: CreatePromptContent,
|
|
1801
|
-
): string {
|
|
1802
|
-
return JSON.stringify(
|
|
1803
|
-
CreatePromptContent$outboundSchema.parse(createPromptContent),
|
|
1804
|
-
);
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
export function createPromptContentFromJSON(
|
|
1808
|
-
jsonString: string,
|
|
1809
|
-
): SafeParseResult<CreatePromptContent, SDKValidationError> {
|
|
1810
|
-
return safeParse(
|
|
1811
|
-
jsonString,
|
|
1812
|
-
(x) => CreatePromptContent$inboundSchema.parse(JSON.parse(x)),
|
|
1813
|
-
`Failed to parse 'CreatePromptContent' from JSON`,
|
|
1814
|
-
);
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
/** @internal */
|
|
1818
|
-
export const CreatePromptType$inboundSchema: z.ZodNativeEnum<
|
|
1819
|
-
typeof CreatePromptType
|
|
1820
|
-
> = z.nativeEnum(CreatePromptType);
|
|
1821
|
-
|
|
1822
|
-
/** @internal */
|
|
1823
|
-
export const CreatePromptType$outboundSchema: z.ZodNativeEnum<
|
|
1824
|
-
typeof CreatePromptType
|
|
1825
|
-
> = CreatePromptType$inboundSchema;
|
|
1826
|
-
|
|
1827
|
-
/**
|
|
1828
|
-
* @internal
|
|
1829
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1830
|
-
*/
|
|
1831
|
-
export namespace CreatePromptType$ {
|
|
1832
|
-
/** @deprecated use `CreatePromptType$inboundSchema` instead. */
|
|
1833
|
-
export const inboundSchema = CreatePromptType$inboundSchema;
|
|
1834
|
-
/** @deprecated use `CreatePromptType$outboundSchema` instead. */
|
|
1835
|
-
export const outboundSchema = CreatePromptType$outboundSchema;
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
/** @internal */
|
|
1839
|
-
export const CreatePromptFunction$inboundSchema: z.ZodType<
|
|
1840
|
-
CreatePromptFunction,
|
|
1841
|
-
z.ZodTypeDef,
|
|
1842
|
-
unknown
|
|
1843
|
-
> = z.object({
|
|
1844
|
-
name: z.string(),
|
|
1845
|
-
arguments: z.string(),
|
|
1846
|
-
});
|
|
1847
|
-
|
|
1848
|
-
/** @internal */
|
|
1849
|
-
export type CreatePromptFunction$Outbound = {
|
|
1850
|
-
name: string;
|
|
1851
|
-
arguments: string;
|
|
1852
|
-
};
|
|
1853
|
-
|
|
1854
|
-
/** @internal */
|
|
1855
|
-
export const CreatePromptFunction$outboundSchema: z.ZodType<
|
|
1856
|
-
CreatePromptFunction$Outbound,
|
|
1857
|
-
z.ZodTypeDef,
|
|
1858
|
-
CreatePromptFunction
|
|
1859
|
-
> = z.object({
|
|
1860
|
-
name: z.string(),
|
|
1861
|
-
arguments: z.string(),
|
|
1862
|
-
});
|
|
1863
|
-
|
|
1864
|
-
/**
|
|
1865
|
-
* @internal
|
|
1866
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1867
|
-
*/
|
|
1868
|
-
export namespace CreatePromptFunction$ {
|
|
1869
|
-
/** @deprecated use `CreatePromptFunction$inboundSchema` instead. */
|
|
1870
|
-
export const inboundSchema = CreatePromptFunction$inboundSchema;
|
|
1871
|
-
/** @deprecated use `CreatePromptFunction$outboundSchema` instead. */
|
|
1872
|
-
export const outboundSchema = CreatePromptFunction$outboundSchema;
|
|
1873
|
-
/** @deprecated use `CreatePromptFunction$Outbound` instead. */
|
|
1874
|
-
export type Outbound = CreatePromptFunction$Outbound;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
export function createPromptFunctionToJSON(
|
|
1878
|
-
createPromptFunction: CreatePromptFunction,
|
|
1879
|
-
): string {
|
|
1880
|
-
return JSON.stringify(
|
|
1881
|
-
CreatePromptFunction$outboundSchema.parse(createPromptFunction),
|
|
1882
|
-
);
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
export function createPromptFunctionFromJSON(
|
|
1886
|
-
jsonString: string,
|
|
1887
|
-
): SafeParseResult<CreatePromptFunction, SDKValidationError> {
|
|
1888
|
-
return safeParse(
|
|
1889
|
-
jsonString,
|
|
1890
|
-
(x) => CreatePromptFunction$inboundSchema.parse(JSON.parse(x)),
|
|
1891
|
-
`Failed to parse 'CreatePromptFunction' from JSON`,
|
|
1892
|
-
);
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
/** @internal */
|
|
1896
|
-
export const CreatePromptToolCalls$inboundSchema: z.ZodType<
|
|
1897
|
-
CreatePromptToolCalls,
|
|
1898
|
-
z.ZodTypeDef,
|
|
1899
|
-
unknown
|
|
1900
|
-
> = z.object({
|
|
1901
|
-
id: z.string().optional(),
|
|
1902
|
-
index: z.number().optional(),
|
|
1903
|
-
type: CreatePromptType$inboundSchema,
|
|
1904
|
-
function: z.lazy(() => CreatePromptFunction$inboundSchema),
|
|
1905
|
-
});
|
|
1906
|
-
|
|
1907
|
-
/** @internal */
|
|
1908
|
-
export type CreatePromptToolCalls$Outbound = {
|
|
1909
|
-
id?: string | undefined;
|
|
1910
|
-
index?: number | undefined;
|
|
1911
|
-
type: string;
|
|
1912
|
-
function: CreatePromptFunction$Outbound;
|
|
1913
|
-
};
|
|
1914
|
-
|
|
1915
|
-
/** @internal */
|
|
1916
|
-
export const CreatePromptToolCalls$outboundSchema: z.ZodType<
|
|
1917
|
-
CreatePromptToolCalls$Outbound,
|
|
1918
|
-
z.ZodTypeDef,
|
|
1919
|
-
CreatePromptToolCalls
|
|
1920
|
-
> = z.object({
|
|
1921
|
-
id: z.string().optional(),
|
|
1922
|
-
index: z.number().optional(),
|
|
1923
|
-
type: CreatePromptType$outboundSchema,
|
|
1924
|
-
function: z.lazy(() => CreatePromptFunction$outboundSchema),
|
|
1925
|
-
});
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* @internal
|
|
1929
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1930
|
-
*/
|
|
1931
|
-
export namespace CreatePromptToolCalls$ {
|
|
1932
|
-
/** @deprecated use `CreatePromptToolCalls$inboundSchema` instead. */
|
|
1933
|
-
export const inboundSchema = CreatePromptToolCalls$inboundSchema;
|
|
1934
|
-
/** @deprecated use `CreatePromptToolCalls$outboundSchema` instead. */
|
|
1935
|
-
export const outboundSchema = CreatePromptToolCalls$outboundSchema;
|
|
1936
|
-
/** @deprecated use `CreatePromptToolCalls$Outbound` instead. */
|
|
1937
|
-
export type Outbound = CreatePromptToolCalls$Outbound;
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
export function createPromptToolCallsToJSON(
|
|
1941
|
-
createPromptToolCalls: CreatePromptToolCalls,
|
|
1942
|
-
): string {
|
|
1943
|
-
return JSON.stringify(
|
|
1944
|
-
CreatePromptToolCalls$outboundSchema.parse(createPromptToolCalls),
|
|
1945
|
-
);
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
export function createPromptToolCallsFromJSON(
|
|
1949
|
-
jsonString: string,
|
|
1950
|
-
): SafeParseResult<CreatePromptToolCalls, SDKValidationError> {
|
|
1951
|
-
return safeParse(
|
|
1952
|
-
jsonString,
|
|
1953
|
-
(x) => CreatePromptToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
1954
|
-
`Failed to parse 'CreatePromptToolCalls' from JSON`,
|
|
1955
|
-
);
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
/** @internal */
|
|
1959
|
-
export const CreatePromptMessages$inboundSchema: z.ZodType<
|
|
1960
|
-
CreatePromptMessages,
|
|
1961
|
-
z.ZodTypeDef,
|
|
1962
|
-
unknown
|
|
1963
|
-
> = z.object({
|
|
1964
|
-
role: CreatePromptRole$inboundSchema,
|
|
1965
|
-
content: z.union([
|
|
1966
|
-
z.string(),
|
|
1967
|
-
z.array(z.union([
|
|
1968
|
-
z.lazy(() => CreatePrompt21$inboundSchema),
|
|
1969
|
-
z.lazy(() => CreatePrompt22$inboundSchema),
|
|
1970
|
-
])),
|
|
1971
|
-
]),
|
|
1972
|
-
tool_calls: z.array(z.lazy(() => CreatePromptToolCalls$inboundSchema))
|
|
1973
|
-
.optional(),
|
|
1974
|
-
}).transform((v) => {
|
|
1975
|
-
return remap$(v, {
|
|
1976
|
-
"tool_calls": "toolCalls",
|
|
1977
|
-
});
|
|
1978
|
-
});
|
|
1979
|
-
|
|
1980
|
-
/** @internal */
|
|
1981
|
-
export type CreatePromptMessages$Outbound = {
|
|
1982
|
-
role: string;
|
|
1983
|
-
content: string | Array<CreatePrompt21$Outbound | CreatePrompt22$Outbound>;
|
|
1984
|
-
tool_calls?: Array<CreatePromptToolCalls$Outbound> | undefined;
|
|
1985
|
-
};
|
|
1986
|
-
|
|
1987
|
-
/** @internal */
|
|
1988
|
-
export const CreatePromptMessages$outboundSchema: z.ZodType<
|
|
1989
|
-
CreatePromptMessages$Outbound,
|
|
1990
|
-
z.ZodTypeDef,
|
|
1991
|
-
CreatePromptMessages
|
|
1992
|
-
> = z.object({
|
|
1993
|
-
role: CreatePromptRole$outboundSchema,
|
|
1994
|
-
content: z.union([
|
|
1995
|
-
z.string(),
|
|
1996
|
-
z.array(z.union([
|
|
1997
|
-
z.lazy(() => CreatePrompt21$outboundSchema),
|
|
1998
|
-
z.lazy(() => CreatePrompt22$outboundSchema),
|
|
1999
|
-
])),
|
|
2000
|
-
]),
|
|
2001
|
-
toolCalls: z.array(z.lazy(() => CreatePromptToolCalls$outboundSchema))
|
|
2002
|
-
.optional(),
|
|
2003
|
-
}).transform((v) => {
|
|
2004
|
-
return remap$(v, {
|
|
2005
|
-
toolCalls: "tool_calls",
|
|
2006
|
-
});
|
|
2007
|
-
});
|
|
2008
|
-
|
|
2009
|
-
/**
|
|
2010
|
-
* @internal
|
|
2011
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2012
|
-
*/
|
|
2013
|
-
export namespace CreatePromptMessages$ {
|
|
2014
|
-
/** @deprecated use `CreatePromptMessages$inboundSchema` instead. */
|
|
2015
|
-
export const inboundSchema = CreatePromptMessages$inboundSchema;
|
|
2016
|
-
/** @deprecated use `CreatePromptMessages$outboundSchema` instead. */
|
|
2017
|
-
export const outboundSchema = CreatePromptMessages$outboundSchema;
|
|
2018
|
-
/** @deprecated use `CreatePromptMessages$Outbound` instead. */
|
|
2019
|
-
export type Outbound = CreatePromptMessages$Outbound;
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
export function createPromptMessagesToJSON(
|
|
2023
|
-
createPromptMessages: CreatePromptMessages,
|
|
2024
|
-
): string {
|
|
2025
|
-
return JSON.stringify(
|
|
2026
|
-
CreatePromptMessages$outboundSchema.parse(createPromptMessages),
|
|
2027
|
-
);
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
export function createPromptMessagesFromJSON(
|
|
2031
|
-
jsonString: string,
|
|
2032
|
-
): SafeParseResult<CreatePromptMessages, SDKValidationError> {
|
|
2033
|
-
return safeParse(
|
|
2034
|
-
jsonString,
|
|
2035
|
-
(x) => CreatePromptMessages$inboundSchema.parse(JSON.parse(x)),
|
|
2036
|
-
`Failed to parse 'CreatePromptMessages' from JSON`,
|
|
2037
|
-
);
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
/** @internal */
|
|
2041
|
-
export const CreatePromptPromptConfig$inboundSchema: z.ZodType<
|
|
2042
|
-
CreatePromptPromptConfig,
|
|
2043
|
-
z.ZodTypeDef,
|
|
2044
|
-
unknown
|
|
2045
|
-
> = z.object({
|
|
2046
|
-
stream: z.boolean().optional(),
|
|
2047
|
-
model: z.string().optional(),
|
|
2048
|
-
model_type: CreatePromptModelType$inboundSchema.optional(),
|
|
2049
|
-
model_parameters: z.lazy(() => CreatePromptModelParameters$inboundSchema)
|
|
2050
|
-
.optional(),
|
|
2051
|
-
provider: CreatePromptProvider$inboundSchema.optional(),
|
|
2052
|
-
version: z.string().optional(),
|
|
2053
|
-
messages: z.array(z.lazy(() => CreatePromptMessages$inboundSchema)),
|
|
2054
|
-
}).transform((v) => {
|
|
2055
|
-
return remap$(v, {
|
|
2056
|
-
"model_type": "modelType",
|
|
2057
|
-
"model_parameters": "modelParameters",
|
|
2058
|
-
});
|
|
2059
|
-
});
|
|
2060
|
-
|
|
2061
|
-
/** @internal */
|
|
2062
|
-
export type CreatePromptPromptConfig$Outbound = {
|
|
2063
|
-
stream?: boolean | undefined;
|
|
2064
|
-
model?: string | undefined;
|
|
2065
|
-
model_type?: string | undefined;
|
|
2066
|
-
model_parameters?: CreatePromptModelParameters$Outbound | undefined;
|
|
2067
|
-
provider?: string | undefined;
|
|
2068
|
-
version?: string | undefined;
|
|
2069
|
-
messages: Array<CreatePromptMessages$Outbound>;
|
|
2070
|
-
};
|
|
2071
|
-
|
|
2072
|
-
/** @internal */
|
|
2073
|
-
export const CreatePromptPromptConfig$outboundSchema: z.ZodType<
|
|
2074
|
-
CreatePromptPromptConfig$Outbound,
|
|
2075
|
-
z.ZodTypeDef,
|
|
2076
|
-
CreatePromptPromptConfig
|
|
2077
|
-
> = z.object({
|
|
2078
|
-
stream: z.boolean().optional(),
|
|
2079
|
-
model: z.string().optional(),
|
|
2080
|
-
modelType: CreatePromptModelType$outboundSchema.optional(),
|
|
2081
|
-
modelParameters: z.lazy(() => CreatePromptModelParameters$outboundSchema)
|
|
2082
|
-
.optional(),
|
|
2083
|
-
provider: CreatePromptProvider$outboundSchema.optional(),
|
|
2084
|
-
version: z.string().optional(),
|
|
2085
|
-
messages: z.array(z.lazy(() => CreatePromptMessages$outboundSchema)),
|
|
2086
|
-
}).transform((v) => {
|
|
2087
|
-
return remap$(v, {
|
|
2088
|
-
modelType: "model_type",
|
|
2089
|
-
modelParameters: "model_parameters",
|
|
2090
|
-
});
|
|
2091
|
-
});
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* @internal
|
|
2095
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2096
|
-
*/
|
|
2097
|
-
export namespace CreatePromptPromptConfig$ {
|
|
2098
|
-
/** @deprecated use `CreatePromptPromptConfig$inboundSchema` instead. */
|
|
2099
|
-
export const inboundSchema = CreatePromptPromptConfig$inboundSchema;
|
|
2100
|
-
/** @deprecated use `CreatePromptPromptConfig$outboundSchema` instead. */
|
|
2101
|
-
export const outboundSchema = CreatePromptPromptConfig$outboundSchema;
|
|
2102
|
-
/** @deprecated use `CreatePromptPromptConfig$Outbound` instead. */
|
|
2103
|
-
export type Outbound = CreatePromptPromptConfig$Outbound;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
export function createPromptPromptConfigToJSON(
|
|
2107
|
-
createPromptPromptConfig: CreatePromptPromptConfig,
|
|
2108
|
-
): string {
|
|
2109
|
-
return JSON.stringify(
|
|
2110
|
-
CreatePromptPromptConfig$outboundSchema.parse(createPromptPromptConfig),
|
|
2111
|
-
);
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
export function createPromptPromptConfigFromJSON(
|
|
2115
|
-
jsonString: string,
|
|
2116
|
-
): SafeParseResult<CreatePromptPromptConfig, SDKValidationError> {
|
|
2117
|
-
return safeParse(
|
|
2118
|
-
jsonString,
|
|
2119
|
-
(x) => CreatePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
|
|
2120
|
-
`Failed to parse 'CreatePromptPromptConfig' from JSON`,
|
|
2121
|
-
);
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2124
|
-
/** @internal */
|
|
2125
|
-
export const CreatePromptUseCases$inboundSchema: z.ZodNativeEnum<
|
|
2126
|
-
typeof CreatePromptUseCases
|
|
2127
|
-
> = z.nativeEnum(CreatePromptUseCases);
|
|
2128
|
-
|
|
2129
|
-
/** @internal */
|
|
2130
|
-
export const CreatePromptUseCases$outboundSchema: z.ZodNativeEnum<
|
|
2131
|
-
typeof CreatePromptUseCases
|
|
2132
|
-
> = CreatePromptUseCases$inboundSchema;
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* @internal
|
|
2136
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2137
|
-
*/
|
|
2138
|
-
export namespace CreatePromptUseCases$ {
|
|
2139
|
-
/** @deprecated use `CreatePromptUseCases$inboundSchema` instead. */
|
|
2140
|
-
export const inboundSchema = CreatePromptUseCases$inboundSchema;
|
|
2141
|
-
/** @deprecated use `CreatePromptUseCases$outboundSchema` instead. */
|
|
2142
|
-
export const outboundSchema = CreatePromptUseCases$outboundSchema;
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
/** @internal */
|
|
2146
|
-
export const CreatePromptLanguage$inboundSchema: z.ZodNativeEnum<
|
|
2147
|
-
typeof CreatePromptLanguage
|
|
2148
|
-
> = z.nativeEnum(CreatePromptLanguage);
|
|
2149
|
-
|
|
2150
|
-
/** @internal */
|
|
2151
|
-
export const CreatePromptLanguage$outboundSchema: z.ZodNativeEnum<
|
|
2152
|
-
typeof CreatePromptLanguage
|
|
2153
|
-
> = CreatePromptLanguage$inboundSchema;
|
|
2154
|
-
|
|
2155
|
-
/**
|
|
2156
|
-
* @internal
|
|
2157
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2158
|
-
*/
|
|
2159
|
-
export namespace CreatePromptLanguage$ {
|
|
2160
|
-
/** @deprecated use `CreatePromptLanguage$inboundSchema` instead. */
|
|
2161
|
-
export const inboundSchema = CreatePromptLanguage$inboundSchema;
|
|
2162
|
-
/** @deprecated use `CreatePromptLanguage$outboundSchema` instead. */
|
|
2163
|
-
export const outboundSchema = CreatePromptLanguage$outboundSchema;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
/** @internal */
|
|
2167
|
-
export const CreatePromptMetadata$inboundSchema: z.ZodType<
|
|
2168
|
-
CreatePromptMetadata,
|
|
2169
|
-
z.ZodTypeDef,
|
|
2170
|
-
unknown
|
|
2171
|
-
> = z.object({
|
|
2172
|
-
use_cases: z.array(CreatePromptUseCases$inboundSchema).optional(),
|
|
2173
|
-
language: CreatePromptLanguage$inboundSchema.optional(),
|
|
2174
|
-
}).transform((v) => {
|
|
2175
|
-
return remap$(v, {
|
|
2176
|
-
"use_cases": "useCases",
|
|
2177
|
-
});
|
|
2178
|
-
});
|
|
2179
|
-
|
|
2180
|
-
/** @internal */
|
|
2181
|
-
export type CreatePromptMetadata$Outbound = {
|
|
2182
|
-
use_cases?: Array<string> | undefined;
|
|
2183
|
-
language?: string | undefined;
|
|
2184
|
-
};
|
|
2185
|
-
|
|
2186
|
-
/** @internal */
|
|
2187
|
-
export const CreatePromptMetadata$outboundSchema: z.ZodType<
|
|
2188
|
-
CreatePromptMetadata$Outbound,
|
|
2189
|
-
z.ZodTypeDef,
|
|
2190
|
-
CreatePromptMetadata
|
|
2191
|
-
> = z.object({
|
|
2192
|
-
useCases: z.array(CreatePromptUseCases$outboundSchema).optional(),
|
|
2193
|
-
language: CreatePromptLanguage$outboundSchema.optional(),
|
|
2194
|
-
}).transform((v) => {
|
|
2195
|
-
return remap$(v, {
|
|
2196
|
-
useCases: "use_cases",
|
|
2197
|
-
});
|
|
2198
|
-
});
|
|
2199
|
-
|
|
2200
|
-
/**
|
|
2201
|
-
* @internal
|
|
2202
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2203
|
-
*/
|
|
2204
|
-
export namespace CreatePromptMetadata$ {
|
|
2205
|
-
/** @deprecated use `CreatePromptMetadata$inboundSchema` instead. */
|
|
2206
|
-
export const inboundSchema = CreatePromptMetadata$inboundSchema;
|
|
2207
|
-
/** @deprecated use `CreatePromptMetadata$outboundSchema` instead. */
|
|
2208
|
-
export const outboundSchema = CreatePromptMetadata$outboundSchema;
|
|
2209
|
-
/** @deprecated use `CreatePromptMetadata$Outbound` instead. */
|
|
2210
|
-
export type Outbound = CreatePromptMetadata$Outbound;
|
|
2211
|
-
}
|
|
2212
|
-
|
|
2213
|
-
export function createPromptMetadataToJSON(
|
|
2214
|
-
createPromptMetadata: CreatePromptMetadata,
|
|
2215
|
-
): string {
|
|
2216
|
-
return JSON.stringify(
|
|
2217
|
-
CreatePromptMetadata$outboundSchema.parse(createPromptMetadata),
|
|
2218
|
-
);
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
export function createPromptMetadataFromJSON(
|
|
2222
|
-
jsonString: string,
|
|
2223
|
-
): SafeParseResult<CreatePromptMetadata, SDKValidationError> {
|
|
2224
|
-
return safeParse(
|
|
2225
|
-
jsonString,
|
|
2226
|
-
(x) => CreatePromptMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
2227
|
-
`Failed to parse 'CreatePromptMetadata' from JSON`,
|
|
2228
|
-
);
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
/** @internal */
|
|
2232
|
-
export const CreatePromptRequestBody$inboundSchema: z.ZodType<
|
|
2233
|
-
CreatePromptRequestBody,
|
|
2234
|
-
z.ZodTypeDef,
|
|
2235
|
-
unknown
|
|
2236
|
-
> = z.object({
|
|
2237
|
-
display_name: z.string(),
|
|
2238
|
-
description: z.nullable(z.string()).optional(),
|
|
2239
|
-
prompt_config: z.lazy(() => CreatePromptPromptConfig$inboundSchema),
|
|
2240
|
-
metadata: z.lazy(() => CreatePromptMetadata$inboundSchema).optional(),
|
|
2241
|
-
path: z.string(),
|
|
2242
|
-
}).transform((v) => {
|
|
2243
|
-
return remap$(v, {
|
|
2244
|
-
"display_name": "displayName",
|
|
2245
|
-
"prompt_config": "promptConfig",
|
|
2246
|
-
});
|
|
2247
|
-
});
|
|
2248
|
-
|
|
2249
|
-
/** @internal */
|
|
2250
|
-
export type CreatePromptRequestBody$Outbound = {
|
|
2251
|
-
display_name: string;
|
|
2252
|
-
description?: string | null | undefined;
|
|
2253
|
-
prompt_config: CreatePromptPromptConfig$Outbound;
|
|
2254
|
-
metadata?: CreatePromptMetadata$Outbound | undefined;
|
|
2255
|
-
path: string;
|
|
2256
|
-
};
|
|
2257
|
-
|
|
2258
|
-
/** @internal */
|
|
2259
|
-
export const CreatePromptRequestBody$outboundSchema: z.ZodType<
|
|
2260
|
-
CreatePromptRequestBody$Outbound,
|
|
2261
|
-
z.ZodTypeDef,
|
|
2262
|
-
CreatePromptRequestBody
|
|
2263
|
-
> = z.object({
|
|
2264
|
-
displayName: z.string(),
|
|
2265
|
-
description: z.nullable(z.string()).optional(),
|
|
2266
|
-
promptConfig: z.lazy(() => CreatePromptPromptConfig$outboundSchema),
|
|
2267
|
-
metadata: z.lazy(() => CreatePromptMetadata$outboundSchema).optional(),
|
|
2268
|
-
path: z.string(),
|
|
2269
|
-
}).transform((v) => {
|
|
2270
|
-
return remap$(v, {
|
|
2271
|
-
displayName: "display_name",
|
|
2272
|
-
promptConfig: "prompt_config",
|
|
2273
|
-
});
|
|
2274
|
-
});
|
|
2275
|
-
|
|
2276
|
-
/**
|
|
2277
|
-
* @internal
|
|
2278
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2279
|
-
*/
|
|
2280
|
-
export namespace CreatePromptRequestBody$ {
|
|
2281
|
-
/** @deprecated use `CreatePromptRequestBody$inboundSchema` instead. */
|
|
2282
|
-
export const inboundSchema = CreatePromptRequestBody$inboundSchema;
|
|
2283
|
-
/** @deprecated use `CreatePromptRequestBody$outboundSchema` instead. */
|
|
2284
|
-
export const outboundSchema = CreatePromptRequestBody$outboundSchema;
|
|
2285
|
-
/** @deprecated use `CreatePromptRequestBody$Outbound` instead. */
|
|
2286
|
-
export type Outbound = CreatePromptRequestBody$Outbound;
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
export function createPromptRequestBodyToJSON(
|
|
2290
|
-
createPromptRequestBody: CreatePromptRequestBody,
|
|
2291
|
-
): string {
|
|
2292
|
-
return JSON.stringify(
|
|
2293
|
-
CreatePromptRequestBody$outboundSchema.parse(createPromptRequestBody),
|
|
2294
|
-
);
|
|
2295
|
-
}
|
|
2296
|
-
|
|
2297
|
-
export function createPromptRequestBodyFromJSON(
|
|
2298
|
-
jsonString: string,
|
|
2299
|
-
): SafeParseResult<CreatePromptRequestBody, SDKValidationError> {
|
|
2300
|
-
return safeParse(
|
|
2301
|
-
jsonString,
|
|
2302
|
-
(x) => CreatePromptRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
2303
|
-
`Failed to parse 'CreatePromptRequestBody' from JSON`,
|
|
2304
|
-
);
|
|
2305
|
-
}
|
|
2306
|
-
|
|
2307
|
-
/** @internal */
|
|
2308
|
-
export const CreatePromptPromptsType$inboundSchema: z.ZodNativeEnum<
|
|
2309
|
-
typeof CreatePromptPromptsType
|
|
2310
|
-
> = z.nativeEnum(CreatePromptPromptsType);
|
|
2311
|
-
|
|
2312
|
-
/** @internal */
|
|
2313
|
-
export const CreatePromptPromptsType$outboundSchema: z.ZodNativeEnum<
|
|
2314
|
-
typeof CreatePromptPromptsType
|
|
2315
|
-
> = CreatePromptPromptsType$inboundSchema;
|
|
2316
|
-
|
|
2317
|
-
/**
|
|
2318
|
-
* @internal
|
|
2319
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2320
|
-
*/
|
|
2321
|
-
export namespace CreatePromptPromptsType$ {
|
|
2322
|
-
/** @deprecated use `CreatePromptPromptsType$inboundSchema` instead. */
|
|
2323
|
-
export const inboundSchema = CreatePromptPromptsType$inboundSchema;
|
|
2324
|
-
/** @deprecated use `CreatePromptPromptsType$outboundSchema` instead. */
|
|
2325
|
-
export const outboundSchema = CreatePromptPromptsType$outboundSchema;
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
/** @internal */
|
|
2329
|
-
export const CreatePromptPromptsModelType$inboundSchema: z.ZodNativeEnum<
|
|
2330
|
-
typeof CreatePromptPromptsModelType
|
|
2331
|
-
> = z.nativeEnum(CreatePromptPromptsModelType);
|
|
2332
|
-
|
|
2333
|
-
/** @internal */
|
|
2334
|
-
export const CreatePromptPromptsModelType$outboundSchema: z.ZodNativeEnum<
|
|
2335
|
-
typeof CreatePromptPromptsModelType
|
|
2336
|
-
> = CreatePromptPromptsModelType$inboundSchema;
|
|
2337
|
-
|
|
2338
|
-
/**
|
|
2339
|
-
* @internal
|
|
2340
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2341
|
-
*/
|
|
2342
|
-
export namespace CreatePromptPromptsModelType$ {
|
|
2343
|
-
/** @deprecated use `CreatePromptPromptsModelType$inboundSchema` instead. */
|
|
2344
|
-
export const inboundSchema = CreatePromptPromptsModelType$inboundSchema;
|
|
2345
|
-
/** @deprecated use `CreatePromptPromptsModelType$outboundSchema` instead. */
|
|
2346
|
-
export const outboundSchema = CreatePromptPromptsModelType$outboundSchema;
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
|
-
/** @internal */
|
|
2350
|
-
export const CreatePromptPromptsFormat$inboundSchema: z.ZodNativeEnum<
|
|
2351
|
-
typeof CreatePromptPromptsFormat
|
|
2352
|
-
> = z.nativeEnum(CreatePromptPromptsFormat);
|
|
2353
|
-
|
|
2354
|
-
/** @internal */
|
|
2355
|
-
export const CreatePromptPromptsFormat$outboundSchema: z.ZodNativeEnum<
|
|
2356
|
-
typeof CreatePromptPromptsFormat
|
|
2357
|
-
> = CreatePromptPromptsFormat$inboundSchema;
|
|
2358
|
-
|
|
2359
|
-
/**
|
|
2360
|
-
* @internal
|
|
2361
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2362
|
-
*/
|
|
2363
|
-
export namespace CreatePromptPromptsFormat$ {
|
|
2364
|
-
/** @deprecated use `CreatePromptPromptsFormat$inboundSchema` instead. */
|
|
2365
|
-
export const inboundSchema = CreatePromptPromptsFormat$inboundSchema;
|
|
2366
|
-
/** @deprecated use `CreatePromptPromptsFormat$outboundSchema` instead. */
|
|
2367
|
-
export const outboundSchema = CreatePromptPromptsFormat$outboundSchema;
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
/** @internal */
|
|
2371
|
-
export const CreatePromptPromptsQuality$inboundSchema: z.ZodNativeEnum<
|
|
2372
|
-
typeof CreatePromptPromptsQuality
|
|
2373
|
-
> = z.nativeEnum(CreatePromptPromptsQuality);
|
|
2374
|
-
|
|
2375
|
-
/** @internal */
|
|
2376
|
-
export const CreatePromptPromptsQuality$outboundSchema: z.ZodNativeEnum<
|
|
2377
|
-
typeof CreatePromptPromptsQuality
|
|
2378
|
-
> = CreatePromptPromptsQuality$inboundSchema;
|
|
2379
|
-
|
|
2380
|
-
/**
|
|
2381
|
-
* @internal
|
|
2382
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2383
|
-
*/
|
|
2384
|
-
export namespace CreatePromptPromptsQuality$ {
|
|
2385
|
-
/** @deprecated use `CreatePromptPromptsQuality$inboundSchema` instead. */
|
|
2386
|
-
export const inboundSchema = CreatePromptPromptsQuality$inboundSchema;
|
|
2387
|
-
/** @deprecated use `CreatePromptPromptsQuality$outboundSchema` instead. */
|
|
2388
|
-
export const outboundSchema = CreatePromptPromptsQuality$outboundSchema;
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
/** @internal */
|
|
2392
|
-
export const CreatePromptResponseFormatPromptsResponse200Type$inboundSchema:
|
|
2393
|
-
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponse200Type> = z
|
|
2394
|
-
.nativeEnum(CreatePromptResponseFormatPromptsResponse200Type);
|
|
2395
|
-
|
|
2396
|
-
/** @internal */
|
|
2397
|
-
export const CreatePromptResponseFormatPromptsResponse200Type$outboundSchema:
|
|
2398
|
-
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponse200Type> =
|
|
2399
|
-
CreatePromptResponseFormatPromptsResponse200Type$inboundSchema;
|
|
2400
|
-
|
|
2401
|
-
/**
|
|
2402
|
-
* @internal
|
|
2403
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2404
|
-
*/
|
|
2405
|
-
export namespace CreatePromptResponseFormatPromptsResponse200Type$ {
|
|
2406
|
-
/** @deprecated use `CreatePromptResponseFormatPromptsResponse200Type$inboundSchema` instead. */
|
|
2407
|
-
export const inboundSchema =
|
|
2408
|
-
CreatePromptResponseFormatPromptsResponse200Type$inboundSchema;
|
|
2409
|
-
/** @deprecated use `CreatePromptResponseFormatPromptsResponse200Type$outboundSchema` instead. */
|
|
2410
|
-
export const outboundSchema =
|
|
2411
|
-
CreatePromptResponseFormatPromptsResponse200Type$outboundSchema;
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
/** @internal */
|
|
2415
|
-
export const CreatePromptResponseFormatPrompts2$inboundSchema: z.ZodType<
|
|
2416
|
-
CreatePromptResponseFormatPrompts2,
|
|
2417
|
-
z.ZodTypeDef,
|
|
2418
|
-
unknown
|
|
2419
|
-
> = z.object({
|
|
2420
|
-
type: CreatePromptResponseFormatPromptsResponse200Type$inboundSchema,
|
|
2421
|
-
});
|
|
2422
|
-
|
|
2423
|
-
/** @internal */
|
|
2424
|
-
export type CreatePromptResponseFormatPrompts2$Outbound = {
|
|
2425
|
-
type: string;
|
|
2426
|
-
};
|
|
2427
|
-
|
|
2428
|
-
/** @internal */
|
|
2429
|
-
export const CreatePromptResponseFormatPrompts2$outboundSchema: z.ZodType<
|
|
2430
|
-
CreatePromptResponseFormatPrompts2$Outbound,
|
|
2431
|
-
z.ZodTypeDef,
|
|
2432
|
-
CreatePromptResponseFormatPrompts2
|
|
2433
|
-
> = z.object({
|
|
2434
|
-
type: CreatePromptResponseFormatPromptsResponse200Type$outboundSchema,
|
|
2435
|
-
});
|
|
2436
|
-
|
|
2437
|
-
/**
|
|
2438
|
-
* @internal
|
|
2439
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2440
|
-
*/
|
|
2441
|
-
export namespace CreatePromptResponseFormatPrompts2$ {
|
|
2442
|
-
/** @deprecated use `CreatePromptResponseFormatPrompts2$inboundSchema` instead. */
|
|
2443
|
-
export const inboundSchema = CreatePromptResponseFormatPrompts2$inboundSchema;
|
|
2444
|
-
/** @deprecated use `CreatePromptResponseFormatPrompts2$outboundSchema` instead. */
|
|
2445
|
-
export const outboundSchema =
|
|
2446
|
-
CreatePromptResponseFormatPrompts2$outboundSchema;
|
|
2447
|
-
/** @deprecated use `CreatePromptResponseFormatPrompts2$Outbound` instead. */
|
|
2448
|
-
export type Outbound = CreatePromptResponseFormatPrompts2$Outbound;
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
export function createPromptResponseFormatPrompts2ToJSON(
|
|
2452
|
-
createPromptResponseFormatPrompts2: CreatePromptResponseFormatPrompts2,
|
|
2453
|
-
): string {
|
|
2454
|
-
return JSON.stringify(
|
|
2455
|
-
CreatePromptResponseFormatPrompts2$outboundSchema.parse(
|
|
2456
|
-
createPromptResponseFormatPrompts2,
|
|
2457
|
-
),
|
|
2458
|
-
);
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
export function createPromptResponseFormatPrompts2FromJSON(
|
|
2462
|
-
jsonString: string,
|
|
2463
|
-
): SafeParseResult<CreatePromptResponseFormatPrompts2, SDKValidationError> {
|
|
2464
|
-
return safeParse(
|
|
2465
|
-
jsonString,
|
|
2466
|
-
(x) =>
|
|
2467
|
-
CreatePromptResponseFormatPrompts2$inboundSchema.parse(JSON.parse(x)),
|
|
2468
|
-
`Failed to parse 'CreatePromptResponseFormatPrompts2' from JSON`,
|
|
2469
|
-
);
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
/** @internal */
|
|
2473
|
-
export const CreatePromptResponseFormatPromptsResponseType$inboundSchema:
|
|
2474
|
-
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> = z
|
|
2475
|
-
.nativeEnum(CreatePromptResponseFormatPromptsResponseType);
|
|
2476
|
-
|
|
2477
|
-
/** @internal */
|
|
2478
|
-
export const CreatePromptResponseFormatPromptsResponseType$outboundSchema:
|
|
2479
|
-
z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> =
|
|
2480
|
-
CreatePromptResponseFormatPromptsResponseType$inboundSchema;
|
|
2481
|
-
|
|
2482
|
-
/**
|
|
2483
|
-
* @internal
|
|
2484
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2485
|
-
*/
|
|
2486
|
-
export namespace CreatePromptResponseFormatPromptsResponseType$ {
|
|
2487
|
-
/** @deprecated use `CreatePromptResponseFormatPromptsResponseType$inboundSchema` instead. */
|
|
2488
|
-
export const inboundSchema =
|
|
2489
|
-
CreatePromptResponseFormatPromptsResponseType$inboundSchema;
|
|
2490
|
-
/** @deprecated use `CreatePromptResponseFormatPromptsResponseType$outboundSchema` instead. */
|
|
2491
|
-
export const outboundSchema =
|
|
2492
|
-
CreatePromptResponseFormatPromptsResponseType$outboundSchema;
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
/** @internal */
|
|
2496
|
-
export const CreatePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
|
|
2497
|
-
CreatePromptResponseFormatJsonSchema,
|
|
2498
|
-
z.ZodTypeDef,
|
|
2499
|
-
unknown
|
|
2500
|
-
> = z.object({
|
|
2501
|
-
name: z.string(),
|
|
2502
|
-
strict: z.boolean(),
|
|
2503
|
-
schema: z.record(z.any()),
|
|
2504
|
-
});
|
|
2505
|
-
|
|
2506
|
-
/** @internal */
|
|
2507
|
-
export type CreatePromptResponseFormatJsonSchema$Outbound = {
|
|
2508
|
-
name: string;
|
|
2509
|
-
strict: boolean;
|
|
2510
|
-
schema: { [k: string]: any };
|
|
2511
|
-
};
|
|
2512
|
-
|
|
2513
|
-
/** @internal */
|
|
2514
|
-
export const CreatePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
|
|
2515
|
-
CreatePromptResponseFormatJsonSchema$Outbound,
|
|
2516
|
-
z.ZodTypeDef,
|
|
2517
|
-
CreatePromptResponseFormatJsonSchema
|
|
2518
|
-
> = z.object({
|
|
2519
|
-
name: z.string(),
|
|
2520
|
-
strict: z.boolean(),
|
|
2521
|
-
schema: z.record(z.any()),
|
|
2522
|
-
});
|
|
2523
|
-
|
|
2524
|
-
/**
|
|
2525
|
-
* @internal
|
|
2526
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2527
|
-
*/
|
|
2528
|
-
export namespace CreatePromptResponseFormatJsonSchema$ {
|
|
2529
|
-
/** @deprecated use `CreatePromptResponseFormatJsonSchema$inboundSchema` instead. */
|
|
2530
|
-
export const inboundSchema =
|
|
2531
|
-
CreatePromptResponseFormatJsonSchema$inboundSchema;
|
|
2532
|
-
/** @deprecated use `CreatePromptResponseFormatJsonSchema$outboundSchema` instead. */
|
|
2533
|
-
export const outboundSchema =
|
|
2534
|
-
CreatePromptResponseFormatJsonSchema$outboundSchema;
|
|
2535
|
-
/** @deprecated use `CreatePromptResponseFormatJsonSchema$Outbound` instead. */
|
|
2536
|
-
export type Outbound = CreatePromptResponseFormatJsonSchema$Outbound;
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
export function createPromptResponseFormatJsonSchemaToJSON(
|
|
2540
|
-
createPromptResponseFormatJsonSchema: CreatePromptResponseFormatJsonSchema,
|
|
2541
|
-
): string {
|
|
2542
|
-
return JSON.stringify(
|
|
2543
|
-
CreatePromptResponseFormatJsonSchema$outboundSchema.parse(
|
|
2544
|
-
createPromptResponseFormatJsonSchema,
|
|
2545
|
-
),
|
|
2546
|
-
);
|
|
2547
|
-
}
|
|
2548
|
-
|
|
2549
|
-
export function createPromptResponseFormatJsonSchemaFromJSON(
|
|
2550
|
-
jsonString: string,
|
|
2551
|
-
): SafeParseResult<CreatePromptResponseFormatJsonSchema, SDKValidationError> {
|
|
2552
|
-
return safeParse(
|
|
2553
|
-
jsonString,
|
|
2554
|
-
(x) =>
|
|
2555
|
-
CreatePromptResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
2556
|
-
`Failed to parse 'CreatePromptResponseFormatJsonSchema' from JSON`,
|
|
2557
|
-
);
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
/** @internal */
|
|
2561
|
-
export const CreatePromptResponseFormatPrompts1$inboundSchema: z.ZodType<
|
|
2562
|
-
CreatePromptResponseFormatPrompts1,
|
|
2563
|
-
z.ZodTypeDef,
|
|
2564
|
-
unknown
|
|
2565
|
-
> = z.object({
|
|
2566
|
-
type: CreatePromptResponseFormatPromptsResponseType$inboundSchema,
|
|
2567
|
-
json_schema: z.lazy(() => CreatePromptResponseFormatJsonSchema$inboundSchema),
|
|
2568
|
-
}).transform((v) => {
|
|
2569
|
-
return remap$(v, {
|
|
2570
|
-
"json_schema": "jsonSchema",
|
|
2571
|
-
});
|
|
2572
|
-
});
|
|
2573
|
-
|
|
2574
|
-
/** @internal */
|
|
2575
|
-
export type CreatePromptResponseFormatPrompts1$Outbound = {
|
|
2576
|
-
type: string;
|
|
2577
|
-
json_schema: CreatePromptResponseFormatJsonSchema$Outbound;
|
|
2578
|
-
};
|
|
2579
|
-
|
|
2580
|
-
/** @internal */
|
|
2581
|
-
export const CreatePromptResponseFormatPrompts1$outboundSchema: z.ZodType<
|
|
2582
|
-
CreatePromptResponseFormatPrompts1$Outbound,
|
|
2583
|
-
z.ZodTypeDef,
|
|
2584
|
-
CreatePromptResponseFormatPrompts1
|
|
2585
|
-
> = z.object({
|
|
2586
|
-
type: CreatePromptResponseFormatPromptsResponseType$outboundSchema,
|
|
2587
|
-
jsonSchema: z.lazy(() => CreatePromptResponseFormatJsonSchema$outboundSchema),
|
|
2588
|
-
}).transform((v) => {
|
|
2589
|
-
return remap$(v, {
|
|
2590
|
-
jsonSchema: "json_schema",
|
|
2591
|
-
});
|
|
2592
|
-
});
|
|
2593
|
-
|
|
2594
|
-
/**
|
|
2595
|
-
* @internal
|
|
2596
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2597
|
-
*/
|
|
2598
|
-
export namespace CreatePromptResponseFormatPrompts1$ {
|
|
2599
|
-
/** @deprecated use `CreatePromptResponseFormatPrompts1$inboundSchema` instead. */
|
|
2600
|
-
export const inboundSchema = CreatePromptResponseFormatPrompts1$inboundSchema;
|
|
2601
|
-
/** @deprecated use `CreatePromptResponseFormatPrompts1$outboundSchema` instead. */
|
|
2602
|
-
export const outboundSchema =
|
|
2603
|
-
CreatePromptResponseFormatPrompts1$outboundSchema;
|
|
2604
|
-
/** @deprecated use `CreatePromptResponseFormatPrompts1$Outbound` instead. */
|
|
2605
|
-
export type Outbound = CreatePromptResponseFormatPrompts1$Outbound;
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
|
-
export function createPromptResponseFormatPrompts1ToJSON(
|
|
2609
|
-
createPromptResponseFormatPrompts1: CreatePromptResponseFormatPrompts1,
|
|
2610
|
-
): string {
|
|
2611
|
-
return JSON.stringify(
|
|
2612
|
-
CreatePromptResponseFormatPrompts1$outboundSchema.parse(
|
|
2613
|
-
createPromptResponseFormatPrompts1,
|
|
2614
|
-
),
|
|
2615
|
-
);
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
export function createPromptResponseFormatPrompts1FromJSON(
|
|
2619
|
-
jsonString: string,
|
|
2620
|
-
): SafeParseResult<CreatePromptResponseFormatPrompts1, SDKValidationError> {
|
|
2621
|
-
return safeParse(
|
|
2622
|
-
jsonString,
|
|
2623
|
-
(x) =>
|
|
2624
|
-
CreatePromptResponseFormatPrompts1$inboundSchema.parse(JSON.parse(x)),
|
|
2625
|
-
`Failed to parse 'CreatePromptResponseFormatPrompts1' from JSON`,
|
|
2626
|
-
);
|
|
2627
|
-
}
|
|
2628
|
-
|
|
2629
|
-
/** @internal */
|
|
2630
|
-
export const CreatePromptPromptsResponseFormat$inboundSchema: z.ZodType<
|
|
2631
|
-
CreatePromptPromptsResponseFormat,
|
|
2632
|
-
z.ZodTypeDef,
|
|
2633
|
-
unknown
|
|
2634
|
-
> = z.union([
|
|
2635
|
-
z.lazy(() => CreatePromptResponseFormatPrompts2$inboundSchema),
|
|
2636
|
-
z.lazy(() => CreatePromptResponseFormatPrompts1$inboundSchema),
|
|
2637
|
-
]);
|
|
2638
|
-
|
|
2639
|
-
/** @internal */
|
|
2640
|
-
export type CreatePromptPromptsResponseFormat$Outbound =
|
|
2641
|
-
| CreatePromptResponseFormatPrompts2$Outbound
|
|
2642
|
-
| CreatePromptResponseFormatPrompts1$Outbound;
|
|
2643
|
-
|
|
2644
|
-
/** @internal */
|
|
2645
|
-
export const CreatePromptPromptsResponseFormat$outboundSchema: z.ZodType<
|
|
2646
|
-
CreatePromptPromptsResponseFormat$Outbound,
|
|
2647
|
-
z.ZodTypeDef,
|
|
2648
|
-
CreatePromptPromptsResponseFormat
|
|
2649
|
-
> = z.union([
|
|
2650
|
-
z.lazy(() => CreatePromptResponseFormatPrompts2$outboundSchema),
|
|
2651
|
-
z.lazy(() => CreatePromptResponseFormatPrompts1$outboundSchema),
|
|
2652
|
-
]);
|
|
2653
|
-
|
|
2654
|
-
/**
|
|
2655
|
-
* @internal
|
|
2656
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2657
|
-
*/
|
|
2658
|
-
export namespace CreatePromptPromptsResponseFormat$ {
|
|
2659
|
-
/** @deprecated use `CreatePromptPromptsResponseFormat$inboundSchema` instead. */
|
|
2660
|
-
export const inboundSchema = CreatePromptPromptsResponseFormat$inboundSchema;
|
|
2661
|
-
/** @deprecated use `CreatePromptPromptsResponseFormat$outboundSchema` instead. */
|
|
2662
|
-
export const outboundSchema =
|
|
2663
|
-
CreatePromptPromptsResponseFormat$outboundSchema;
|
|
2664
|
-
/** @deprecated use `CreatePromptPromptsResponseFormat$Outbound` instead. */
|
|
2665
|
-
export type Outbound = CreatePromptPromptsResponseFormat$Outbound;
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2668
|
-
export function createPromptPromptsResponseFormatToJSON(
|
|
2669
|
-
createPromptPromptsResponseFormat: CreatePromptPromptsResponseFormat,
|
|
2670
|
-
): string {
|
|
2671
|
-
return JSON.stringify(
|
|
2672
|
-
CreatePromptPromptsResponseFormat$outboundSchema.parse(
|
|
2673
|
-
createPromptPromptsResponseFormat,
|
|
2674
|
-
),
|
|
2675
|
-
);
|
|
2676
|
-
}
|
|
2677
|
-
|
|
2678
|
-
export function createPromptPromptsResponseFormatFromJSON(
|
|
2679
|
-
jsonString: string,
|
|
2680
|
-
): SafeParseResult<CreatePromptPromptsResponseFormat, SDKValidationError> {
|
|
2681
|
-
return safeParse(
|
|
2682
|
-
jsonString,
|
|
2683
|
-
(x) => CreatePromptPromptsResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
2684
|
-
`Failed to parse 'CreatePromptPromptsResponseFormat' from JSON`,
|
|
2685
|
-
);
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
/** @internal */
|
|
2689
|
-
export const CreatePromptPromptsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
2690
|
-
typeof CreatePromptPromptsPhotoRealVersion
|
|
2691
|
-
> = z.nativeEnum(CreatePromptPromptsPhotoRealVersion);
|
|
2692
|
-
|
|
2693
|
-
/** @internal */
|
|
2694
|
-
export const CreatePromptPromptsPhotoRealVersion$outboundSchema:
|
|
2695
|
-
z.ZodNativeEnum<typeof CreatePromptPromptsPhotoRealVersion> =
|
|
2696
|
-
CreatePromptPromptsPhotoRealVersion$inboundSchema;
|
|
2697
|
-
|
|
2698
|
-
/**
|
|
2699
|
-
* @internal
|
|
2700
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2701
|
-
*/
|
|
2702
|
-
export namespace CreatePromptPromptsPhotoRealVersion$ {
|
|
2703
|
-
/** @deprecated use `CreatePromptPromptsPhotoRealVersion$inboundSchema` instead. */
|
|
2704
|
-
export const inboundSchema =
|
|
2705
|
-
CreatePromptPromptsPhotoRealVersion$inboundSchema;
|
|
2706
|
-
/** @deprecated use `CreatePromptPromptsPhotoRealVersion$outboundSchema` instead. */
|
|
2707
|
-
export const outboundSchema =
|
|
2708
|
-
CreatePromptPromptsPhotoRealVersion$outboundSchema;
|
|
2709
|
-
}
|
|
2710
|
-
|
|
2711
|
-
/** @internal */
|
|
2712
|
-
export const CreatePromptPromptsEncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
2713
|
-
typeof CreatePromptPromptsEncodingFormat
|
|
2714
|
-
> = z.nativeEnum(CreatePromptPromptsEncodingFormat);
|
|
2715
|
-
|
|
2716
|
-
/** @internal */
|
|
2717
|
-
export const CreatePromptPromptsEncodingFormat$outboundSchema: z.ZodNativeEnum<
|
|
2718
|
-
typeof CreatePromptPromptsEncodingFormat
|
|
2719
|
-
> = CreatePromptPromptsEncodingFormat$inboundSchema;
|
|
2720
|
-
|
|
2721
|
-
/**
|
|
2722
|
-
* @internal
|
|
2723
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2724
|
-
*/
|
|
2725
|
-
export namespace CreatePromptPromptsEncodingFormat$ {
|
|
2726
|
-
/** @deprecated use `CreatePromptPromptsEncodingFormat$inboundSchema` instead. */
|
|
2727
|
-
export const inboundSchema = CreatePromptPromptsEncodingFormat$inboundSchema;
|
|
2728
|
-
/** @deprecated use `CreatePromptPromptsEncodingFormat$outboundSchema` instead. */
|
|
2729
|
-
export const outboundSchema =
|
|
2730
|
-
CreatePromptPromptsEncodingFormat$outboundSchema;
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
/** @internal */
|
|
2734
|
-
export const CreatePromptPromptsReasoningEffort$inboundSchema: z.ZodNativeEnum<
|
|
2735
|
-
typeof CreatePromptPromptsReasoningEffort
|
|
2736
|
-
> = z.nativeEnum(CreatePromptPromptsReasoningEffort);
|
|
2737
|
-
|
|
2738
|
-
/** @internal */
|
|
2739
|
-
export const CreatePromptPromptsReasoningEffort$outboundSchema: z.ZodNativeEnum<
|
|
2740
|
-
typeof CreatePromptPromptsReasoningEffort
|
|
2741
|
-
> = CreatePromptPromptsReasoningEffort$inboundSchema;
|
|
2742
|
-
|
|
2743
|
-
/**
|
|
2744
|
-
* @internal
|
|
2745
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2746
|
-
*/
|
|
2747
|
-
export namespace CreatePromptPromptsReasoningEffort$ {
|
|
2748
|
-
/** @deprecated use `CreatePromptPromptsReasoningEffort$inboundSchema` instead. */
|
|
2749
|
-
export const inboundSchema = CreatePromptPromptsReasoningEffort$inboundSchema;
|
|
2750
|
-
/** @deprecated use `CreatePromptPromptsReasoningEffort$outboundSchema` instead. */
|
|
2751
|
-
export const outboundSchema =
|
|
2752
|
-
CreatePromptPromptsReasoningEffort$outboundSchema;
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
/** @internal */
|
|
2756
|
-
export const CreatePromptPromptsModelParameters$inboundSchema: z.ZodType<
|
|
2757
|
-
CreatePromptPromptsModelParameters,
|
|
2758
|
-
z.ZodTypeDef,
|
|
2759
|
-
unknown
|
|
2760
|
-
> = z.object({
|
|
2761
|
-
temperature: z.number().optional(),
|
|
2762
|
-
maxTokens: z.number().optional(),
|
|
2763
|
-
topK: z.number().optional(),
|
|
2764
|
-
topP: z.number().optional(),
|
|
2765
|
-
frequencyPenalty: z.number().optional(),
|
|
2766
|
-
presencePenalty: z.number().optional(),
|
|
2767
|
-
numImages: z.number().optional(),
|
|
2768
|
-
seed: z.number().optional(),
|
|
2769
|
-
format: CreatePromptPromptsFormat$inboundSchema.optional(),
|
|
2770
|
-
dimensions: z.string().optional(),
|
|
2771
|
-
quality: CreatePromptPromptsQuality$inboundSchema.optional(),
|
|
2772
|
-
style: z.string().optional(),
|
|
2773
|
-
responseFormat: z.nullable(
|
|
2774
|
-
z.union([
|
|
2775
|
-
z.lazy(() => CreatePromptResponseFormatPrompts2$inboundSchema),
|
|
2776
|
-
z.lazy(() => CreatePromptResponseFormatPrompts1$inboundSchema),
|
|
2777
|
-
]),
|
|
2778
|
-
).optional(),
|
|
2779
|
-
photoRealVersion: CreatePromptPromptsPhotoRealVersion$inboundSchema
|
|
2780
|
-
.optional(),
|
|
2781
|
-
encoding_format: CreatePromptPromptsEncodingFormat$inboundSchema.optional(),
|
|
2782
|
-
reasoningEffort: CreatePromptPromptsReasoningEffort$inboundSchema.optional(),
|
|
2783
|
-
budgetTokens: z.number().optional(),
|
|
2784
|
-
}).transform((v) => {
|
|
2785
|
-
return remap$(v, {
|
|
2786
|
-
"encoding_format": "encodingFormat",
|
|
2787
|
-
});
|
|
2788
|
-
});
|
|
2789
|
-
|
|
2790
|
-
/** @internal */
|
|
2791
|
-
export type CreatePromptPromptsModelParameters$Outbound = {
|
|
2792
|
-
temperature?: number | undefined;
|
|
2793
|
-
maxTokens?: number | undefined;
|
|
2794
|
-
topK?: number | undefined;
|
|
2795
|
-
topP?: number | undefined;
|
|
2796
|
-
frequencyPenalty?: number | undefined;
|
|
2797
|
-
presencePenalty?: number | undefined;
|
|
2798
|
-
numImages?: number | undefined;
|
|
2799
|
-
seed?: number | undefined;
|
|
2800
|
-
format?: string | undefined;
|
|
2801
|
-
dimensions?: string | undefined;
|
|
2802
|
-
quality?: string | undefined;
|
|
2803
|
-
style?: string | undefined;
|
|
2804
|
-
responseFormat?:
|
|
2805
|
-
| CreatePromptResponseFormatPrompts2$Outbound
|
|
2806
|
-
| CreatePromptResponseFormatPrompts1$Outbound
|
|
2807
|
-
| null
|
|
2808
|
-
| undefined;
|
|
2809
|
-
photoRealVersion?: string | undefined;
|
|
2810
|
-
encoding_format?: string | undefined;
|
|
2811
|
-
reasoningEffort?: string | undefined;
|
|
2812
|
-
budgetTokens?: number | undefined;
|
|
2813
|
-
};
|
|
2814
|
-
|
|
2815
|
-
/** @internal */
|
|
2816
|
-
export const CreatePromptPromptsModelParameters$outboundSchema: z.ZodType<
|
|
2817
|
-
CreatePromptPromptsModelParameters$Outbound,
|
|
2818
|
-
z.ZodTypeDef,
|
|
2819
|
-
CreatePromptPromptsModelParameters
|
|
2820
|
-
> = z.object({
|
|
2821
|
-
temperature: z.number().optional(),
|
|
2822
|
-
maxTokens: z.number().optional(),
|
|
2823
|
-
topK: z.number().optional(),
|
|
2824
|
-
topP: z.number().optional(),
|
|
2825
|
-
frequencyPenalty: z.number().optional(),
|
|
2826
|
-
presencePenalty: z.number().optional(),
|
|
2827
|
-
numImages: z.number().optional(),
|
|
2828
|
-
seed: z.number().optional(),
|
|
2829
|
-
format: CreatePromptPromptsFormat$outboundSchema.optional(),
|
|
2830
|
-
dimensions: z.string().optional(),
|
|
2831
|
-
quality: CreatePromptPromptsQuality$outboundSchema.optional(),
|
|
2832
|
-
style: z.string().optional(),
|
|
2833
|
-
responseFormat: z.nullable(
|
|
2834
|
-
z.union([
|
|
2835
|
-
z.lazy(() => CreatePromptResponseFormatPrompts2$outboundSchema),
|
|
2836
|
-
z.lazy(() => CreatePromptResponseFormatPrompts1$outboundSchema),
|
|
2837
|
-
]),
|
|
2838
|
-
).optional(),
|
|
2839
|
-
photoRealVersion: CreatePromptPromptsPhotoRealVersion$outboundSchema
|
|
2840
|
-
.optional(),
|
|
2841
|
-
encodingFormat: CreatePromptPromptsEncodingFormat$outboundSchema.optional(),
|
|
2842
|
-
reasoningEffort: CreatePromptPromptsReasoningEffort$outboundSchema.optional(),
|
|
2843
|
-
budgetTokens: z.number().optional(),
|
|
2844
|
-
}).transform((v) => {
|
|
2845
|
-
return remap$(v, {
|
|
2846
|
-
encodingFormat: "encoding_format",
|
|
2847
|
-
});
|
|
2848
|
-
});
|
|
2849
|
-
|
|
2850
|
-
/**
|
|
2851
|
-
* @internal
|
|
2852
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2853
|
-
*/
|
|
2854
|
-
export namespace CreatePromptPromptsModelParameters$ {
|
|
2855
|
-
/** @deprecated use `CreatePromptPromptsModelParameters$inboundSchema` instead. */
|
|
2856
|
-
export const inboundSchema = CreatePromptPromptsModelParameters$inboundSchema;
|
|
2857
|
-
/** @deprecated use `CreatePromptPromptsModelParameters$outboundSchema` instead. */
|
|
2858
|
-
export const outboundSchema =
|
|
2859
|
-
CreatePromptPromptsModelParameters$outboundSchema;
|
|
2860
|
-
/** @deprecated use `CreatePromptPromptsModelParameters$Outbound` instead. */
|
|
2861
|
-
export type Outbound = CreatePromptPromptsModelParameters$Outbound;
|
|
2862
|
-
}
|
|
2863
|
-
|
|
2864
|
-
export function createPromptPromptsModelParametersToJSON(
|
|
2865
|
-
createPromptPromptsModelParameters: CreatePromptPromptsModelParameters,
|
|
2866
|
-
): string {
|
|
2867
|
-
return JSON.stringify(
|
|
2868
|
-
CreatePromptPromptsModelParameters$outboundSchema.parse(
|
|
2869
|
-
createPromptPromptsModelParameters,
|
|
2870
|
-
),
|
|
2871
|
-
);
|
|
2872
|
-
}
|
|
2873
|
-
|
|
2874
|
-
export function createPromptPromptsModelParametersFromJSON(
|
|
2875
|
-
jsonString: string,
|
|
2876
|
-
): SafeParseResult<CreatePromptPromptsModelParameters, SDKValidationError> {
|
|
2877
|
-
return safeParse(
|
|
2878
|
-
jsonString,
|
|
2879
|
-
(x) =>
|
|
2880
|
-
CreatePromptPromptsModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
2881
|
-
`Failed to parse 'CreatePromptPromptsModelParameters' from JSON`,
|
|
2882
|
-
);
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
|
-
/** @internal */
|
|
2886
|
-
export const CreatePromptPromptsProvider$inboundSchema: z.ZodNativeEnum<
|
|
2887
|
-
typeof CreatePromptPromptsProvider
|
|
2888
|
-
> = z.nativeEnum(CreatePromptPromptsProvider);
|
|
2889
|
-
|
|
2890
|
-
/** @internal */
|
|
2891
|
-
export const CreatePromptPromptsProvider$outboundSchema: z.ZodNativeEnum<
|
|
2892
|
-
typeof CreatePromptPromptsProvider
|
|
2893
|
-
> = CreatePromptPromptsProvider$inboundSchema;
|
|
2894
|
-
|
|
2895
|
-
/**
|
|
2896
|
-
* @internal
|
|
2897
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2898
|
-
*/
|
|
2899
|
-
export namespace CreatePromptPromptsProvider$ {
|
|
2900
|
-
/** @deprecated use `CreatePromptPromptsProvider$inboundSchema` instead. */
|
|
2901
|
-
export const inboundSchema = CreatePromptPromptsProvider$inboundSchema;
|
|
2902
|
-
/** @deprecated use `CreatePromptPromptsProvider$outboundSchema` instead. */
|
|
2903
|
-
export const outboundSchema = CreatePromptPromptsProvider$outboundSchema;
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
|
-
/** @internal */
|
|
2907
|
-
export const CreatePromptPromptsRole$inboundSchema: z.ZodNativeEnum<
|
|
2908
|
-
typeof CreatePromptPromptsRole
|
|
2909
|
-
> = z.nativeEnum(CreatePromptPromptsRole);
|
|
2910
|
-
|
|
2911
|
-
/** @internal */
|
|
2912
|
-
export const CreatePromptPromptsRole$outboundSchema: z.ZodNativeEnum<
|
|
2913
|
-
typeof CreatePromptPromptsRole
|
|
2914
|
-
> = CreatePromptPromptsRole$inboundSchema;
|
|
2915
|
-
|
|
2916
|
-
/**
|
|
2917
|
-
* @internal
|
|
2918
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2919
|
-
*/
|
|
2920
|
-
export namespace CreatePromptPromptsRole$ {
|
|
2921
|
-
/** @deprecated use `CreatePromptPromptsRole$inboundSchema` instead. */
|
|
2922
|
-
export const inboundSchema = CreatePromptPromptsRole$inboundSchema;
|
|
2923
|
-
/** @deprecated use `CreatePromptPromptsRole$outboundSchema` instead. */
|
|
2924
|
-
export const outboundSchema = CreatePromptPromptsRole$outboundSchema;
|
|
2925
|
-
}
|
|
2926
|
-
|
|
2927
|
-
/** @internal */
|
|
2928
|
-
export const CreatePrompt2PromptsResponse200Type$inboundSchema: z.ZodNativeEnum<
|
|
2929
|
-
typeof CreatePrompt2PromptsResponse200Type
|
|
2930
|
-
> = z.nativeEnum(CreatePrompt2PromptsResponse200Type);
|
|
2931
|
-
|
|
2932
|
-
/** @internal */
|
|
2933
|
-
export const CreatePrompt2PromptsResponse200Type$outboundSchema:
|
|
2934
|
-
z.ZodNativeEnum<typeof CreatePrompt2PromptsResponse200Type> =
|
|
2935
|
-
CreatePrompt2PromptsResponse200Type$inboundSchema;
|
|
2936
|
-
|
|
2937
|
-
/**
|
|
2938
|
-
* @internal
|
|
2939
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2940
|
-
*/
|
|
2941
|
-
export namespace CreatePrompt2PromptsResponse200Type$ {
|
|
2942
|
-
/** @deprecated use `CreatePrompt2PromptsResponse200Type$inboundSchema` instead. */
|
|
2943
|
-
export const inboundSchema =
|
|
2944
|
-
CreatePrompt2PromptsResponse200Type$inboundSchema;
|
|
2945
|
-
/** @deprecated use `CreatePrompt2PromptsResponse200Type$outboundSchema` instead. */
|
|
2946
|
-
export const outboundSchema =
|
|
2947
|
-
CreatePrompt2PromptsResponse200Type$outboundSchema;
|
|
2948
|
-
}
|
|
2949
|
-
|
|
2950
|
-
/** @internal */
|
|
2951
|
-
export const CreatePrompt2PromptsImageUrl$inboundSchema: z.ZodType<
|
|
2952
|
-
CreatePrompt2PromptsImageUrl,
|
|
2953
|
-
z.ZodTypeDef,
|
|
2954
|
-
unknown
|
|
2955
|
-
> = z.object({
|
|
2956
|
-
id: z.string().optional(),
|
|
2957
|
-
url: z.string(),
|
|
2958
|
-
detail: z.string().optional(),
|
|
2959
|
-
});
|
|
2960
|
-
|
|
2961
|
-
/** @internal */
|
|
2962
|
-
export type CreatePrompt2PromptsImageUrl$Outbound = {
|
|
2963
|
-
id?: string | undefined;
|
|
2964
|
-
url: string;
|
|
2965
|
-
detail?: string | undefined;
|
|
2966
|
-
};
|
|
2967
|
-
|
|
2968
|
-
/** @internal */
|
|
2969
|
-
export const CreatePrompt2PromptsImageUrl$outboundSchema: z.ZodType<
|
|
2970
|
-
CreatePrompt2PromptsImageUrl$Outbound,
|
|
2971
|
-
z.ZodTypeDef,
|
|
2972
|
-
CreatePrompt2PromptsImageUrl
|
|
2973
|
-
> = z.object({
|
|
2974
|
-
id: z.string().optional(),
|
|
2975
|
-
url: z.string(),
|
|
2976
|
-
detail: z.string().optional(),
|
|
2977
|
-
});
|
|
2978
|
-
|
|
2979
|
-
/**
|
|
2980
|
-
* @internal
|
|
2981
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2982
|
-
*/
|
|
2983
|
-
export namespace CreatePrompt2PromptsImageUrl$ {
|
|
2984
|
-
/** @deprecated use `CreatePrompt2PromptsImageUrl$inboundSchema` instead. */
|
|
2985
|
-
export const inboundSchema = CreatePrompt2PromptsImageUrl$inboundSchema;
|
|
2986
|
-
/** @deprecated use `CreatePrompt2PromptsImageUrl$outboundSchema` instead. */
|
|
2987
|
-
export const outboundSchema = CreatePrompt2PromptsImageUrl$outboundSchema;
|
|
2988
|
-
/** @deprecated use `CreatePrompt2PromptsImageUrl$Outbound` instead. */
|
|
2989
|
-
export type Outbound = CreatePrompt2PromptsImageUrl$Outbound;
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
export function createPrompt2PromptsImageUrlToJSON(
|
|
2993
|
-
createPrompt2PromptsImageUrl: CreatePrompt2PromptsImageUrl,
|
|
2994
|
-
): string {
|
|
2995
|
-
return JSON.stringify(
|
|
2996
|
-
CreatePrompt2PromptsImageUrl$outboundSchema.parse(
|
|
2997
|
-
createPrompt2PromptsImageUrl,
|
|
2998
|
-
),
|
|
2999
|
-
);
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
|
-
export function createPrompt2PromptsImageUrlFromJSON(
|
|
3003
|
-
jsonString: string,
|
|
3004
|
-
): SafeParseResult<CreatePrompt2PromptsImageUrl, SDKValidationError> {
|
|
3005
|
-
return safeParse(
|
|
3006
|
-
jsonString,
|
|
3007
|
-
(x) => CreatePrompt2PromptsImageUrl$inboundSchema.parse(JSON.parse(x)),
|
|
3008
|
-
`Failed to parse 'CreatePrompt2PromptsImageUrl' from JSON`,
|
|
3009
|
-
);
|
|
3010
|
-
}
|
|
3011
|
-
|
|
3012
|
-
/** @internal */
|
|
3013
|
-
export const CreatePrompt2Prompts2$inboundSchema: z.ZodType<
|
|
3014
|
-
CreatePrompt2Prompts2,
|
|
3015
|
-
z.ZodTypeDef,
|
|
3016
|
-
unknown
|
|
3017
|
-
> = z.object({
|
|
3018
|
-
type: CreatePrompt2PromptsResponse200Type$inboundSchema,
|
|
3019
|
-
image_url: z.lazy(() => CreatePrompt2PromptsImageUrl$inboundSchema),
|
|
3020
|
-
}).transform((v) => {
|
|
3021
|
-
return remap$(v, {
|
|
3022
|
-
"image_url": "imageUrl",
|
|
3023
|
-
});
|
|
3024
|
-
});
|
|
3025
|
-
|
|
3026
|
-
/** @internal */
|
|
3027
|
-
export type CreatePrompt2Prompts2$Outbound = {
|
|
3028
|
-
type: string;
|
|
3029
|
-
image_url: CreatePrompt2PromptsImageUrl$Outbound;
|
|
3030
|
-
};
|
|
3031
|
-
|
|
3032
|
-
/** @internal */
|
|
3033
|
-
export const CreatePrompt2Prompts2$outboundSchema: z.ZodType<
|
|
3034
|
-
CreatePrompt2Prompts2$Outbound,
|
|
3035
|
-
z.ZodTypeDef,
|
|
3036
|
-
CreatePrompt2Prompts2
|
|
3037
|
-
> = z.object({
|
|
3038
|
-
type: CreatePrompt2PromptsResponse200Type$outboundSchema,
|
|
3039
|
-
imageUrl: z.lazy(() => CreatePrompt2PromptsImageUrl$outboundSchema),
|
|
3040
|
-
}).transform((v) => {
|
|
3041
|
-
return remap$(v, {
|
|
3042
|
-
imageUrl: "image_url",
|
|
3043
|
-
});
|
|
3044
|
-
});
|
|
3045
|
-
|
|
3046
|
-
/**
|
|
3047
|
-
* @internal
|
|
3048
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3049
|
-
*/
|
|
3050
|
-
export namespace CreatePrompt2Prompts2$ {
|
|
3051
|
-
/** @deprecated use `CreatePrompt2Prompts2$inboundSchema` instead. */
|
|
3052
|
-
export const inboundSchema = CreatePrompt2Prompts2$inboundSchema;
|
|
3053
|
-
/** @deprecated use `CreatePrompt2Prompts2$outboundSchema` instead. */
|
|
3054
|
-
export const outboundSchema = CreatePrompt2Prompts2$outboundSchema;
|
|
3055
|
-
/** @deprecated use `CreatePrompt2Prompts2$Outbound` instead. */
|
|
3056
|
-
export type Outbound = CreatePrompt2Prompts2$Outbound;
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
|
-
export function createPrompt2Prompts2ToJSON(
|
|
3060
|
-
createPrompt2Prompts2: CreatePrompt2Prompts2,
|
|
3061
|
-
): string {
|
|
3062
|
-
return JSON.stringify(
|
|
3063
|
-
CreatePrompt2Prompts2$outboundSchema.parse(createPrompt2Prompts2),
|
|
3064
|
-
);
|
|
3065
|
-
}
|
|
3066
|
-
|
|
3067
|
-
export function createPrompt2Prompts2FromJSON(
|
|
3068
|
-
jsonString: string,
|
|
3069
|
-
): SafeParseResult<CreatePrompt2Prompts2, SDKValidationError> {
|
|
3070
|
-
return safeParse(
|
|
3071
|
-
jsonString,
|
|
3072
|
-
(x) => CreatePrompt2Prompts2$inboundSchema.parse(JSON.parse(x)),
|
|
3073
|
-
`Failed to parse 'CreatePrompt2Prompts2' from JSON`,
|
|
3074
|
-
);
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
|
-
/** @internal */
|
|
3078
|
-
export const CreatePrompt2PromptsResponseType$inboundSchema: z.ZodNativeEnum<
|
|
3079
|
-
typeof CreatePrompt2PromptsResponseType
|
|
3080
|
-
> = z.nativeEnum(CreatePrompt2PromptsResponseType);
|
|
3081
|
-
|
|
3082
|
-
/** @internal */
|
|
3083
|
-
export const CreatePrompt2PromptsResponseType$outboundSchema: z.ZodNativeEnum<
|
|
3084
|
-
typeof CreatePrompt2PromptsResponseType
|
|
3085
|
-
> = CreatePrompt2PromptsResponseType$inboundSchema;
|
|
3086
|
-
|
|
3087
|
-
/**
|
|
3088
|
-
* @internal
|
|
3089
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3090
|
-
*/
|
|
3091
|
-
export namespace CreatePrompt2PromptsResponseType$ {
|
|
3092
|
-
/** @deprecated use `CreatePrompt2PromptsResponseType$inboundSchema` instead. */
|
|
3093
|
-
export const inboundSchema = CreatePrompt2PromptsResponseType$inboundSchema;
|
|
3094
|
-
/** @deprecated use `CreatePrompt2PromptsResponseType$outboundSchema` instead. */
|
|
3095
|
-
export const outboundSchema = CreatePrompt2PromptsResponseType$outboundSchema;
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3098
|
-
/** @internal */
|
|
3099
|
-
export const CreatePrompt2Prompts1$inboundSchema: z.ZodType<
|
|
3100
|
-
CreatePrompt2Prompts1,
|
|
3101
|
-
z.ZodTypeDef,
|
|
3102
|
-
unknown
|
|
3103
|
-
> = z.object({
|
|
3104
|
-
type: CreatePrompt2PromptsResponseType$inboundSchema,
|
|
3105
|
-
text: z.string(),
|
|
3106
|
-
});
|
|
3107
|
-
|
|
3108
|
-
/** @internal */
|
|
3109
|
-
export type CreatePrompt2Prompts1$Outbound = {
|
|
3110
|
-
type: string;
|
|
3111
|
-
text: string;
|
|
3112
|
-
};
|
|
3113
|
-
|
|
3114
|
-
/** @internal */
|
|
3115
|
-
export const CreatePrompt2Prompts1$outboundSchema: z.ZodType<
|
|
3116
|
-
CreatePrompt2Prompts1$Outbound,
|
|
3117
|
-
z.ZodTypeDef,
|
|
3118
|
-
CreatePrompt2Prompts1
|
|
3119
|
-
> = z.object({
|
|
3120
|
-
type: CreatePrompt2PromptsResponseType$outboundSchema,
|
|
3121
|
-
text: z.string(),
|
|
3122
|
-
});
|
|
3123
|
-
|
|
3124
|
-
/**
|
|
3125
|
-
* @internal
|
|
3126
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3127
|
-
*/
|
|
3128
|
-
export namespace CreatePrompt2Prompts1$ {
|
|
3129
|
-
/** @deprecated use `CreatePrompt2Prompts1$inboundSchema` instead. */
|
|
3130
|
-
export const inboundSchema = CreatePrompt2Prompts1$inboundSchema;
|
|
3131
|
-
/** @deprecated use `CreatePrompt2Prompts1$outboundSchema` instead. */
|
|
3132
|
-
export const outboundSchema = CreatePrompt2Prompts1$outboundSchema;
|
|
3133
|
-
/** @deprecated use `CreatePrompt2Prompts1$Outbound` instead. */
|
|
3134
|
-
export type Outbound = CreatePrompt2Prompts1$Outbound;
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
export function createPrompt2Prompts1ToJSON(
|
|
3138
|
-
createPrompt2Prompts1: CreatePrompt2Prompts1,
|
|
3139
|
-
): string {
|
|
3140
|
-
return JSON.stringify(
|
|
3141
|
-
CreatePrompt2Prompts1$outboundSchema.parse(createPrompt2Prompts1),
|
|
3142
|
-
);
|
|
3143
|
-
}
|
|
3144
|
-
|
|
3145
|
-
export function createPrompt2Prompts1FromJSON(
|
|
3146
|
-
jsonString: string,
|
|
3147
|
-
): SafeParseResult<CreatePrompt2Prompts1, SDKValidationError> {
|
|
3148
|
-
return safeParse(
|
|
3149
|
-
jsonString,
|
|
3150
|
-
(x) => CreatePrompt2Prompts1$inboundSchema.parse(JSON.parse(x)),
|
|
3151
|
-
`Failed to parse 'CreatePrompt2Prompts1' from JSON`,
|
|
3152
|
-
);
|
|
3153
|
-
}
|
|
3154
|
-
|
|
3155
|
-
/** @internal */
|
|
3156
|
-
export const CreatePromptContentPrompts2$inboundSchema: z.ZodType<
|
|
3157
|
-
CreatePromptContentPrompts2,
|
|
3158
|
-
z.ZodTypeDef,
|
|
3159
|
-
unknown
|
|
3160
|
-
> = z.union([
|
|
3161
|
-
z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
|
|
3162
|
-
z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
|
|
3163
|
-
]);
|
|
3164
|
-
|
|
3165
|
-
/** @internal */
|
|
3166
|
-
export type CreatePromptContentPrompts2$Outbound =
|
|
3167
|
-
| CreatePrompt2Prompts1$Outbound
|
|
3168
|
-
| CreatePrompt2Prompts2$Outbound;
|
|
3169
|
-
|
|
3170
|
-
/** @internal */
|
|
3171
|
-
export const CreatePromptContentPrompts2$outboundSchema: z.ZodType<
|
|
3172
|
-
CreatePromptContentPrompts2$Outbound,
|
|
3173
|
-
z.ZodTypeDef,
|
|
3174
|
-
CreatePromptContentPrompts2
|
|
3175
|
-
> = z.union([
|
|
3176
|
-
z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
|
|
3177
|
-
z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
|
|
3178
|
-
]);
|
|
3179
|
-
|
|
3180
|
-
/**
|
|
3181
|
-
* @internal
|
|
3182
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3183
|
-
*/
|
|
3184
|
-
export namespace CreatePromptContentPrompts2$ {
|
|
3185
|
-
/** @deprecated use `CreatePromptContentPrompts2$inboundSchema` instead. */
|
|
3186
|
-
export const inboundSchema = CreatePromptContentPrompts2$inboundSchema;
|
|
3187
|
-
/** @deprecated use `CreatePromptContentPrompts2$outboundSchema` instead. */
|
|
3188
|
-
export const outboundSchema = CreatePromptContentPrompts2$outboundSchema;
|
|
3189
|
-
/** @deprecated use `CreatePromptContentPrompts2$Outbound` instead. */
|
|
3190
|
-
export type Outbound = CreatePromptContentPrompts2$Outbound;
|
|
3191
|
-
}
|
|
3192
|
-
|
|
3193
|
-
export function createPromptContentPrompts2ToJSON(
|
|
3194
|
-
createPromptContentPrompts2: CreatePromptContentPrompts2,
|
|
3195
|
-
): string {
|
|
3196
|
-
return JSON.stringify(
|
|
3197
|
-
CreatePromptContentPrompts2$outboundSchema.parse(
|
|
3198
|
-
createPromptContentPrompts2,
|
|
3199
|
-
),
|
|
3200
|
-
);
|
|
3201
|
-
}
|
|
3202
|
-
|
|
3203
|
-
export function createPromptContentPrompts2FromJSON(
|
|
3204
|
-
jsonString: string,
|
|
3205
|
-
): SafeParseResult<CreatePromptContentPrompts2, SDKValidationError> {
|
|
3206
|
-
return safeParse(
|
|
3207
|
-
jsonString,
|
|
3208
|
-
(x) => CreatePromptContentPrompts2$inboundSchema.parse(JSON.parse(x)),
|
|
3209
|
-
`Failed to parse 'CreatePromptContentPrompts2' from JSON`,
|
|
3210
|
-
);
|
|
3211
|
-
}
|
|
3212
|
-
|
|
3213
|
-
/** @internal */
|
|
3214
|
-
export const CreatePromptPromptsContent$inboundSchema: z.ZodType<
|
|
3215
|
-
CreatePromptPromptsContent,
|
|
3216
|
-
z.ZodTypeDef,
|
|
3217
|
-
unknown
|
|
3218
|
-
> = z.union([
|
|
3219
|
-
z.string(),
|
|
3220
|
-
z.array(z.union([
|
|
3221
|
-
z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
|
|
3222
|
-
z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
|
|
3223
|
-
])),
|
|
3224
|
-
]);
|
|
3225
|
-
|
|
3226
|
-
/** @internal */
|
|
3227
|
-
export type CreatePromptPromptsContent$Outbound =
|
|
3228
|
-
| string
|
|
3229
|
-
| Array<CreatePrompt2Prompts1$Outbound | CreatePrompt2Prompts2$Outbound>;
|
|
3230
|
-
|
|
3231
|
-
/** @internal */
|
|
3232
|
-
export const CreatePromptPromptsContent$outboundSchema: z.ZodType<
|
|
3233
|
-
CreatePromptPromptsContent$Outbound,
|
|
3234
|
-
z.ZodTypeDef,
|
|
3235
|
-
CreatePromptPromptsContent
|
|
3236
|
-
> = z.union([
|
|
3237
|
-
z.string(),
|
|
3238
|
-
z.array(z.union([
|
|
3239
|
-
z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
|
|
3240
|
-
z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
|
|
3241
|
-
])),
|
|
3242
|
-
]);
|
|
3243
|
-
|
|
3244
|
-
/**
|
|
3245
|
-
* @internal
|
|
3246
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3247
|
-
*/
|
|
3248
|
-
export namespace CreatePromptPromptsContent$ {
|
|
3249
|
-
/** @deprecated use `CreatePromptPromptsContent$inboundSchema` instead. */
|
|
3250
|
-
export const inboundSchema = CreatePromptPromptsContent$inboundSchema;
|
|
3251
|
-
/** @deprecated use `CreatePromptPromptsContent$outboundSchema` instead. */
|
|
3252
|
-
export const outboundSchema = CreatePromptPromptsContent$outboundSchema;
|
|
3253
|
-
/** @deprecated use `CreatePromptPromptsContent$Outbound` instead. */
|
|
3254
|
-
export type Outbound = CreatePromptPromptsContent$Outbound;
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
|
-
export function createPromptPromptsContentToJSON(
|
|
3258
|
-
createPromptPromptsContent: CreatePromptPromptsContent,
|
|
3259
|
-
): string {
|
|
3260
|
-
return JSON.stringify(
|
|
3261
|
-
CreatePromptPromptsContent$outboundSchema.parse(createPromptPromptsContent),
|
|
3262
|
-
);
|
|
3263
|
-
}
|
|
3264
|
-
|
|
3265
|
-
export function createPromptPromptsContentFromJSON(
|
|
3266
|
-
jsonString: string,
|
|
3267
|
-
): SafeParseResult<CreatePromptPromptsContent, SDKValidationError> {
|
|
3268
|
-
return safeParse(
|
|
3269
|
-
jsonString,
|
|
3270
|
-
(x) => CreatePromptPromptsContent$inboundSchema.parse(JSON.parse(x)),
|
|
3271
|
-
`Failed to parse 'CreatePromptPromptsContent' from JSON`,
|
|
3272
|
-
);
|
|
3273
|
-
}
|
|
3274
|
-
|
|
3275
|
-
/** @internal */
|
|
3276
|
-
export const CreatePromptPromptsResponseType$inboundSchema: z.ZodNativeEnum<
|
|
3277
|
-
typeof CreatePromptPromptsResponseType
|
|
3278
|
-
> = z.nativeEnum(CreatePromptPromptsResponseType);
|
|
3279
|
-
|
|
3280
|
-
/** @internal */
|
|
3281
|
-
export const CreatePromptPromptsResponseType$outboundSchema: z.ZodNativeEnum<
|
|
3282
|
-
typeof CreatePromptPromptsResponseType
|
|
3283
|
-
> = CreatePromptPromptsResponseType$inboundSchema;
|
|
3284
|
-
|
|
3285
|
-
/**
|
|
3286
|
-
* @internal
|
|
3287
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3288
|
-
*/
|
|
3289
|
-
export namespace CreatePromptPromptsResponseType$ {
|
|
3290
|
-
/** @deprecated use `CreatePromptPromptsResponseType$inboundSchema` instead. */
|
|
3291
|
-
export const inboundSchema = CreatePromptPromptsResponseType$inboundSchema;
|
|
3292
|
-
/** @deprecated use `CreatePromptPromptsResponseType$outboundSchema` instead. */
|
|
3293
|
-
export const outboundSchema = CreatePromptPromptsResponseType$outboundSchema;
|
|
3294
|
-
}
|
|
3295
|
-
|
|
3296
|
-
/** @internal */
|
|
3297
|
-
export const CreatePromptPromptsFunction$inboundSchema: z.ZodType<
|
|
3298
|
-
CreatePromptPromptsFunction,
|
|
3299
|
-
z.ZodTypeDef,
|
|
3300
|
-
unknown
|
|
3301
|
-
> = z.object({
|
|
3302
|
-
name: z.string(),
|
|
3303
|
-
arguments: z.string(),
|
|
3304
|
-
});
|
|
3305
|
-
|
|
3306
|
-
/** @internal */
|
|
3307
|
-
export type CreatePromptPromptsFunction$Outbound = {
|
|
3308
|
-
name: string;
|
|
3309
|
-
arguments: string;
|
|
3310
|
-
};
|
|
3311
|
-
|
|
3312
|
-
/** @internal */
|
|
3313
|
-
export const CreatePromptPromptsFunction$outboundSchema: z.ZodType<
|
|
3314
|
-
CreatePromptPromptsFunction$Outbound,
|
|
3315
|
-
z.ZodTypeDef,
|
|
3316
|
-
CreatePromptPromptsFunction
|
|
3317
|
-
> = z.object({
|
|
3318
|
-
name: z.string(),
|
|
3319
|
-
arguments: z.string(),
|
|
3320
|
-
});
|
|
3321
|
-
|
|
3322
|
-
/**
|
|
3323
|
-
* @internal
|
|
3324
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3325
|
-
*/
|
|
3326
|
-
export namespace CreatePromptPromptsFunction$ {
|
|
3327
|
-
/** @deprecated use `CreatePromptPromptsFunction$inboundSchema` instead. */
|
|
3328
|
-
export const inboundSchema = CreatePromptPromptsFunction$inboundSchema;
|
|
3329
|
-
/** @deprecated use `CreatePromptPromptsFunction$outboundSchema` instead. */
|
|
3330
|
-
export const outboundSchema = CreatePromptPromptsFunction$outboundSchema;
|
|
3331
|
-
/** @deprecated use `CreatePromptPromptsFunction$Outbound` instead. */
|
|
3332
|
-
export type Outbound = CreatePromptPromptsFunction$Outbound;
|
|
3333
|
-
}
|
|
3334
|
-
|
|
3335
|
-
export function createPromptPromptsFunctionToJSON(
|
|
3336
|
-
createPromptPromptsFunction: CreatePromptPromptsFunction,
|
|
3337
|
-
): string {
|
|
3338
|
-
return JSON.stringify(
|
|
3339
|
-
CreatePromptPromptsFunction$outboundSchema.parse(
|
|
3340
|
-
createPromptPromptsFunction,
|
|
3341
|
-
),
|
|
3342
|
-
);
|
|
3343
|
-
}
|
|
3344
|
-
|
|
3345
|
-
export function createPromptPromptsFunctionFromJSON(
|
|
3346
|
-
jsonString: string,
|
|
3347
|
-
): SafeParseResult<CreatePromptPromptsFunction, SDKValidationError> {
|
|
3348
|
-
return safeParse(
|
|
3349
|
-
jsonString,
|
|
3350
|
-
(x) => CreatePromptPromptsFunction$inboundSchema.parse(JSON.parse(x)),
|
|
3351
|
-
`Failed to parse 'CreatePromptPromptsFunction' from JSON`,
|
|
3352
|
-
);
|
|
3353
|
-
}
|
|
3354
|
-
|
|
3355
|
-
/** @internal */
|
|
3356
|
-
export const CreatePromptPromptsToolCalls$inboundSchema: z.ZodType<
|
|
3357
|
-
CreatePromptPromptsToolCalls,
|
|
3358
|
-
z.ZodTypeDef,
|
|
3359
|
-
unknown
|
|
3360
|
-
> = z.object({
|
|
3361
|
-
id: z.string().optional(),
|
|
3362
|
-
index: z.number().optional(),
|
|
3363
|
-
type: CreatePromptPromptsResponseType$inboundSchema,
|
|
3364
|
-
function: z.lazy(() => CreatePromptPromptsFunction$inboundSchema),
|
|
3365
|
-
});
|
|
3366
|
-
|
|
3367
|
-
/** @internal */
|
|
3368
|
-
export type CreatePromptPromptsToolCalls$Outbound = {
|
|
3369
|
-
id?: string | undefined;
|
|
3370
|
-
index?: number | undefined;
|
|
3371
|
-
type: string;
|
|
3372
|
-
function: CreatePromptPromptsFunction$Outbound;
|
|
3373
|
-
};
|
|
3374
|
-
|
|
3375
|
-
/** @internal */
|
|
3376
|
-
export const CreatePromptPromptsToolCalls$outboundSchema: z.ZodType<
|
|
3377
|
-
CreatePromptPromptsToolCalls$Outbound,
|
|
3378
|
-
z.ZodTypeDef,
|
|
3379
|
-
CreatePromptPromptsToolCalls
|
|
3380
|
-
> = z.object({
|
|
3381
|
-
id: z.string().optional(),
|
|
3382
|
-
index: z.number().optional(),
|
|
3383
|
-
type: CreatePromptPromptsResponseType$outboundSchema,
|
|
3384
|
-
function: z.lazy(() => CreatePromptPromptsFunction$outboundSchema),
|
|
3385
|
-
});
|
|
3386
|
-
|
|
3387
|
-
/**
|
|
3388
|
-
* @internal
|
|
3389
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3390
|
-
*/
|
|
3391
|
-
export namespace CreatePromptPromptsToolCalls$ {
|
|
3392
|
-
/** @deprecated use `CreatePromptPromptsToolCalls$inboundSchema` instead. */
|
|
3393
|
-
export const inboundSchema = CreatePromptPromptsToolCalls$inboundSchema;
|
|
3394
|
-
/** @deprecated use `CreatePromptPromptsToolCalls$outboundSchema` instead. */
|
|
3395
|
-
export const outboundSchema = CreatePromptPromptsToolCalls$outboundSchema;
|
|
3396
|
-
/** @deprecated use `CreatePromptPromptsToolCalls$Outbound` instead. */
|
|
3397
|
-
export type Outbound = CreatePromptPromptsToolCalls$Outbound;
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3400
|
-
export function createPromptPromptsToolCallsToJSON(
|
|
3401
|
-
createPromptPromptsToolCalls: CreatePromptPromptsToolCalls,
|
|
3402
|
-
): string {
|
|
3403
|
-
return JSON.stringify(
|
|
3404
|
-
CreatePromptPromptsToolCalls$outboundSchema.parse(
|
|
3405
|
-
createPromptPromptsToolCalls,
|
|
3406
|
-
),
|
|
3407
|
-
);
|
|
3408
|
-
}
|
|
3409
|
-
|
|
3410
|
-
export function createPromptPromptsToolCallsFromJSON(
|
|
3411
|
-
jsonString: string,
|
|
3412
|
-
): SafeParseResult<CreatePromptPromptsToolCalls, SDKValidationError> {
|
|
3413
|
-
return safeParse(
|
|
3414
|
-
jsonString,
|
|
3415
|
-
(x) => CreatePromptPromptsToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
3416
|
-
`Failed to parse 'CreatePromptPromptsToolCalls' from JSON`,
|
|
3417
|
-
);
|
|
3418
|
-
}
|
|
3419
|
-
|
|
3420
|
-
/** @internal */
|
|
3421
|
-
export const CreatePromptPromptsMessages$inboundSchema: z.ZodType<
|
|
3422
|
-
CreatePromptPromptsMessages,
|
|
3423
|
-
z.ZodTypeDef,
|
|
3424
|
-
unknown
|
|
3425
|
-
> = z.object({
|
|
3426
|
-
role: CreatePromptPromptsRole$inboundSchema,
|
|
3427
|
-
content: z.union([
|
|
3428
|
-
z.string(),
|
|
3429
|
-
z.array(z.union([
|
|
3430
|
-
z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
|
|
3431
|
-
z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
|
|
3432
|
-
])),
|
|
3433
|
-
]),
|
|
3434
|
-
tool_calls: z.array(z.lazy(() => CreatePromptPromptsToolCalls$inboundSchema))
|
|
3435
|
-
.optional(),
|
|
3436
|
-
}).transform((v) => {
|
|
3437
|
-
return remap$(v, {
|
|
3438
|
-
"tool_calls": "toolCalls",
|
|
3439
|
-
});
|
|
3440
|
-
});
|
|
3441
|
-
|
|
3442
|
-
/** @internal */
|
|
3443
|
-
export type CreatePromptPromptsMessages$Outbound = {
|
|
3444
|
-
role: string;
|
|
3445
|
-
content:
|
|
3446
|
-
| string
|
|
3447
|
-
| Array<CreatePrompt2Prompts1$Outbound | CreatePrompt2Prompts2$Outbound>;
|
|
3448
|
-
tool_calls?: Array<CreatePromptPromptsToolCalls$Outbound> | undefined;
|
|
3449
|
-
};
|
|
3450
|
-
|
|
3451
|
-
/** @internal */
|
|
3452
|
-
export const CreatePromptPromptsMessages$outboundSchema: z.ZodType<
|
|
3453
|
-
CreatePromptPromptsMessages$Outbound,
|
|
3454
|
-
z.ZodTypeDef,
|
|
3455
|
-
CreatePromptPromptsMessages
|
|
3456
|
-
> = z.object({
|
|
3457
|
-
role: CreatePromptPromptsRole$outboundSchema,
|
|
3458
|
-
content: z.union([
|
|
3459
|
-
z.string(),
|
|
3460
|
-
z.array(z.union([
|
|
3461
|
-
z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
|
|
3462
|
-
z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
|
|
3463
|
-
])),
|
|
3464
|
-
]),
|
|
3465
|
-
toolCalls: z.array(z.lazy(() => CreatePromptPromptsToolCalls$outboundSchema))
|
|
3466
|
-
.optional(),
|
|
3467
|
-
}).transform((v) => {
|
|
3468
|
-
return remap$(v, {
|
|
3469
|
-
toolCalls: "tool_calls",
|
|
3470
|
-
});
|
|
3471
|
-
});
|
|
3472
|
-
|
|
3473
|
-
/**
|
|
3474
|
-
* @internal
|
|
3475
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3476
|
-
*/
|
|
3477
|
-
export namespace CreatePromptPromptsMessages$ {
|
|
3478
|
-
/** @deprecated use `CreatePromptPromptsMessages$inboundSchema` instead. */
|
|
3479
|
-
export const inboundSchema = CreatePromptPromptsMessages$inboundSchema;
|
|
3480
|
-
/** @deprecated use `CreatePromptPromptsMessages$outboundSchema` instead. */
|
|
3481
|
-
export const outboundSchema = CreatePromptPromptsMessages$outboundSchema;
|
|
3482
|
-
/** @deprecated use `CreatePromptPromptsMessages$Outbound` instead. */
|
|
3483
|
-
export type Outbound = CreatePromptPromptsMessages$Outbound;
|
|
3484
|
-
}
|
|
3485
|
-
|
|
3486
|
-
export function createPromptPromptsMessagesToJSON(
|
|
3487
|
-
createPromptPromptsMessages: CreatePromptPromptsMessages,
|
|
3488
|
-
): string {
|
|
3489
|
-
return JSON.stringify(
|
|
3490
|
-
CreatePromptPromptsMessages$outboundSchema.parse(
|
|
3491
|
-
createPromptPromptsMessages,
|
|
3492
|
-
),
|
|
3493
|
-
);
|
|
3494
|
-
}
|
|
3495
|
-
|
|
3496
|
-
export function createPromptPromptsMessagesFromJSON(
|
|
3497
|
-
jsonString: string,
|
|
3498
|
-
): SafeParseResult<CreatePromptPromptsMessages, SDKValidationError> {
|
|
3499
|
-
return safeParse(
|
|
3500
|
-
jsonString,
|
|
3501
|
-
(x) => CreatePromptPromptsMessages$inboundSchema.parse(JSON.parse(x)),
|
|
3502
|
-
`Failed to parse 'CreatePromptPromptsMessages' from JSON`,
|
|
3503
|
-
);
|
|
3504
|
-
}
|
|
3505
|
-
|
|
3506
|
-
/** @internal */
|
|
3507
|
-
export const CreatePromptPromptsPromptConfig$inboundSchema: z.ZodType<
|
|
3508
|
-
CreatePromptPromptsPromptConfig,
|
|
3509
|
-
z.ZodTypeDef,
|
|
3510
|
-
unknown
|
|
3511
|
-
> = z.object({
|
|
3512
|
-
stream: z.boolean().optional(),
|
|
3513
|
-
model: z.string().optional(),
|
|
3514
|
-
model_db_id: z.string().optional(),
|
|
3515
|
-
model_type: CreatePromptPromptsModelType$inboundSchema.optional(),
|
|
3516
|
-
model_parameters: z.lazy(() =>
|
|
3517
|
-
CreatePromptPromptsModelParameters$inboundSchema
|
|
3518
|
-
).optional(),
|
|
3519
|
-
provider: CreatePromptPromptsProvider$inboundSchema.optional(),
|
|
3520
|
-
integration_id: z.nullable(z.string()).optional(),
|
|
3521
|
-
version: z.string().optional(),
|
|
3522
|
-
messages: z.array(z.lazy(() => CreatePromptPromptsMessages$inboundSchema)),
|
|
3523
|
-
}).transform((v) => {
|
|
3524
|
-
return remap$(v, {
|
|
3525
|
-
"model_db_id": "modelDbId",
|
|
3526
|
-
"model_type": "modelType",
|
|
3527
|
-
"model_parameters": "modelParameters",
|
|
3528
|
-
"integration_id": "integrationId",
|
|
3529
|
-
});
|
|
3530
|
-
});
|
|
3531
|
-
|
|
3532
|
-
/** @internal */
|
|
3533
|
-
export type CreatePromptPromptsPromptConfig$Outbound = {
|
|
3534
|
-
stream?: boolean | undefined;
|
|
3535
|
-
model?: string | undefined;
|
|
3536
|
-
model_db_id?: string | undefined;
|
|
3537
|
-
model_type?: string | undefined;
|
|
3538
|
-
model_parameters?: CreatePromptPromptsModelParameters$Outbound | undefined;
|
|
3539
|
-
provider?: string | undefined;
|
|
3540
|
-
integration_id?: string | null | undefined;
|
|
3541
|
-
version?: string | undefined;
|
|
3542
|
-
messages: Array<CreatePromptPromptsMessages$Outbound>;
|
|
3543
|
-
};
|
|
3544
|
-
|
|
3545
|
-
/** @internal */
|
|
3546
|
-
export const CreatePromptPromptsPromptConfig$outboundSchema: z.ZodType<
|
|
3547
|
-
CreatePromptPromptsPromptConfig$Outbound,
|
|
3548
|
-
z.ZodTypeDef,
|
|
3549
|
-
CreatePromptPromptsPromptConfig
|
|
3550
|
-
> = z.object({
|
|
3551
|
-
stream: z.boolean().optional(),
|
|
3552
|
-
model: z.string().optional(),
|
|
3553
|
-
modelDbId: z.string().optional(),
|
|
3554
|
-
modelType: CreatePromptPromptsModelType$outboundSchema.optional(),
|
|
3555
|
-
modelParameters: z.lazy(() =>
|
|
3556
|
-
CreatePromptPromptsModelParameters$outboundSchema
|
|
3557
|
-
).optional(),
|
|
3558
|
-
provider: CreatePromptPromptsProvider$outboundSchema.optional(),
|
|
3559
|
-
integrationId: z.nullable(z.string()).optional(),
|
|
3560
|
-
version: z.string().optional(),
|
|
3561
|
-
messages: z.array(z.lazy(() => CreatePromptPromptsMessages$outboundSchema)),
|
|
3562
|
-
}).transform((v) => {
|
|
3563
|
-
return remap$(v, {
|
|
3564
|
-
modelDbId: "model_db_id",
|
|
3565
|
-
modelType: "model_type",
|
|
3566
|
-
modelParameters: "model_parameters",
|
|
3567
|
-
integrationId: "integration_id",
|
|
3568
|
-
});
|
|
3569
|
-
});
|
|
3570
|
-
|
|
3571
|
-
/**
|
|
3572
|
-
* @internal
|
|
3573
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3574
|
-
*/
|
|
3575
|
-
export namespace CreatePromptPromptsPromptConfig$ {
|
|
3576
|
-
/** @deprecated use `CreatePromptPromptsPromptConfig$inboundSchema` instead. */
|
|
3577
|
-
export const inboundSchema = CreatePromptPromptsPromptConfig$inboundSchema;
|
|
3578
|
-
/** @deprecated use `CreatePromptPromptsPromptConfig$outboundSchema` instead. */
|
|
3579
|
-
export const outboundSchema = CreatePromptPromptsPromptConfig$outboundSchema;
|
|
3580
|
-
/** @deprecated use `CreatePromptPromptsPromptConfig$Outbound` instead. */
|
|
3581
|
-
export type Outbound = CreatePromptPromptsPromptConfig$Outbound;
|
|
3582
|
-
}
|
|
3583
|
-
|
|
3584
|
-
export function createPromptPromptsPromptConfigToJSON(
|
|
3585
|
-
createPromptPromptsPromptConfig: CreatePromptPromptsPromptConfig,
|
|
3586
|
-
): string {
|
|
3587
|
-
return JSON.stringify(
|
|
3588
|
-
CreatePromptPromptsPromptConfig$outboundSchema.parse(
|
|
3589
|
-
createPromptPromptsPromptConfig,
|
|
3590
|
-
),
|
|
3591
|
-
);
|
|
3592
|
-
}
|
|
3593
|
-
|
|
3594
|
-
export function createPromptPromptsPromptConfigFromJSON(
|
|
3595
|
-
jsonString: string,
|
|
3596
|
-
): SafeParseResult<CreatePromptPromptsPromptConfig, SDKValidationError> {
|
|
3597
|
-
return safeParse(
|
|
3598
|
-
jsonString,
|
|
3599
|
-
(x) => CreatePromptPromptsPromptConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3600
|
-
`Failed to parse 'CreatePromptPromptsPromptConfig' from JSON`,
|
|
3601
|
-
);
|
|
3602
|
-
}
|
|
3603
|
-
|
|
3604
|
-
/** @internal */
|
|
3605
|
-
export const CreatePromptPromptsUseCases$inboundSchema: z.ZodNativeEnum<
|
|
3606
|
-
typeof CreatePromptPromptsUseCases
|
|
3607
|
-
> = z.nativeEnum(CreatePromptPromptsUseCases);
|
|
3608
|
-
|
|
3609
|
-
/** @internal */
|
|
3610
|
-
export const CreatePromptPromptsUseCases$outboundSchema: z.ZodNativeEnum<
|
|
3611
|
-
typeof CreatePromptPromptsUseCases
|
|
3612
|
-
> = CreatePromptPromptsUseCases$inboundSchema;
|
|
3613
|
-
|
|
3614
|
-
/**
|
|
3615
|
-
* @internal
|
|
3616
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3617
|
-
*/
|
|
3618
|
-
export namespace CreatePromptPromptsUseCases$ {
|
|
3619
|
-
/** @deprecated use `CreatePromptPromptsUseCases$inboundSchema` instead. */
|
|
3620
|
-
export const inboundSchema = CreatePromptPromptsUseCases$inboundSchema;
|
|
3621
|
-
/** @deprecated use `CreatePromptPromptsUseCases$outboundSchema` instead. */
|
|
3622
|
-
export const outboundSchema = CreatePromptPromptsUseCases$outboundSchema;
|
|
3623
|
-
}
|
|
3624
|
-
|
|
3625
|
-
/** @internal */
|
|
3626
|
-
export const CreatePromptPromptsLanguage$inboundSchema: z.ZodNativeEnum<
|
|
3627
|
-
typeof CreatePromptPromptsLanguage
|
|
3628
|
-
> = z.nativeEnum(CreatePromptPromptsLanguage);
|
|
3629
|
-
|
|
3630
|
-
/** @internal */
|
|
3631
|
-
export const CreatePromptPromptsLanguage$outboundSchema: z.ZodNativeEnum<
|
|
3632
|
-
typeof CreatePromptPromptsLanguage
|
|
3633
|
-
> = CreatePromptPromptsLanguage$inboundSchema;
|
|
3634
|
-
|
|
3635
|
-
/**
|
|
3636
|
-
* @internal
|
|
3637
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3638
|
-
*/
|
|
3639
|
-
export namespace CreatePromptPromptsLanguage$ {
|
|
3640
|
-
/** @deprecated use `CreatePromptPromptsLanguage$inboundSchema` instead. */
|
|
3641
|
-
export const inboundSchema = CreatePromptPromptsLanguage$inboundSchema;
|
|
3642
|
-
/** @deprecated use `CreatePromptPromptsLanguage$outboundSchema` instead. */
|
|
3643
|
-
export const outboundSchema = CreatePromptPromptsLanguage$outboundSchema;
|
|
3644
|
-
}
|
|
3645
|
-
|
|
3646
|
-
/** @internal */
|
|
3647
|
-
export const CreatePromptPromptsMetadata$inboundSchema: z.ZodType<
|
|
3648
|
-
CreatePromptPromptsMetadata,
|
|
3649
|
-
z.ZodTypeDef,
|
|
3650
|
-
unknown
|
|
3651
|
-
> = z.object({
|
|
3652
|
-
use_cases: z.array(CreatePromptPromptsUseCases$inboundSchema).optional(),
|
|
3653
|
-
language: CreatePromptPromptsLanguage$inboundSchema.optional(),
|
|
3654
|
-
}).transform((v) => {
|
|
3655
|
-
return remap$(v, {
|
|
3656
|
-
"use_cases": "useCases",
|
|
3657
|
-
});
|
|
3658
|
-
});
|
|
3659
|
-
|
|
3660
|
-
/** @internal */
|
|
3661
|
-
export type CreatePromptPromptsMetadata$Outbound = {
|
|
3662
|
-
use_cases?: Array<string> | undefined;
|
|
3663
|
-
language?: string | undefined;
|
|
3664
|
-
};
|
|
3665
|
-
|
|
3666
|
-
/** @internal */
|
|
3667
|
-
export const CreatePromptPromptsMetadata$outboundSchema: z.ZodType<
|
|
3668
|
-
CreatePromptPromptsMetadata$Outbound,
|
|
3669
|
-
z.ZodTypeDef,
|
|
3670
|
-
CreatePromptPromptsMetadata
|
|
3671
|
-
> = z.object({
|
|
3672
|
-
useCases: z.array(CreatePromptPromptsUseCases$outboundSchema).optional(),
|
|
3673
|
-
language: CreatePromptPromptsLanguage$outboundSchema.optional(),
|
|
3674
|
-
}).transform((v) => {
|
|
3675
|
-
return remap$(v, {
|
|
3676
|
-
useCases: "use_cases",
|
|
3677
|
-
});
|
|
3678
|
-
});
|
|
3679
|
-
|
|
3680
|
-
/**
|
|
3681
|
-
* @internal
|
|
3682
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3683
|
-
*/
|
|
3684
|
-
export namespace CreatePromptPromptsMetadata$ {
|
|
3685
|
-
/** @deprecated use `CreatePromptPromptsMetadata$inboundSchema` instead. */
|
|
3686
|
-
export const inboundSchema = CreatePromptPromptsMetadata$inboundSchema;
|
|
3687
|
-
/** @deprecated use `CreatePromptPromptsMetadata$outboundSchema` instead. */
|
|
3688
|
-
export const outboundSchema = CreatePromptPromptsMetadata$outboundSchema;
|
|
3689
|
-
/** @deprecated use `CreatePromptPromptsMetadata$Outbound` instead. */
|
|
3690
|
-
export type Outbound = CreatePromptPromptsMetadata$Outbound;
|
|
3691
|
-
}
|
|
3692
|
-
|
|
3693
|
-
export function createPromptPromptsMetadataToJSON(
|
|
3694
|
-
createPromptPromptsMetadata: CreatePromptPromptsMetadata,
|
|
3695
|
-
): string {
|
|
3696
|
-
return JSON.stringify(
|
|
3697
|
-
CreatePromptPromptsMetadata$outboundSchema.parse(
|
|
3698
|
-
createPromptPromptsMetadata,
|
|
3699
|
-
),
|
|
3700
|
-
);
|
|
3701
|
-
}
|
|
3702
|
-
|
|
3703
|
-
export function createPromptPromptsMetadataFromJSON(
|
|
3704
|
-
jsonString: string,
|
|
3705
|
-
): SafeParseResult<CreatePromptPromptsMetadata, SDKValidationError> {
|
|
3706
|
-
return safeParse(
|
|
3707
|
-
jsonString,
|
|
3708
|
-
(x) => CreatePromptPromptsMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
3709
|
-
`Failed to parse 'CreatePromptPromptsMetadata' from JSON`,
|
|
3710
|
-
);
|
|
3711
|
-
}
|
|
3712
|
-
|
|
3713
|
-
/** @internal */
|
|
3714
|
-
export const CreatePromptResponseBody$inboundSchema: z.ZodType<
|
|
3715
|
-
CreatePromptResponseBody,
|
|
3716
|
-
z.ZodTypeDef,
|
|
3717
|
-
unknown
|
|
3718
|
-
> = z.object({
|
|
3719
|
-
_id: z.string(),
|
|
3720
|
-
type: CreatePromptPromptsType$inboundSchema,
|
|
3721
|
-
owner: z.string(),
|
|
3722
|
-
domain_id: z.string(),
|
|
3723
|
-
created: z.string(),
|
|
3724
|
-
updated: z.string(),
|
|
3725
|
-
created_by_id: z.nullable(z.string()).optional(),
|
|
3726
|
-
updated_by_id: z.nullable(z.string()).optional(),
|
|
3727
|
-
display_name: z.string(),
|
|
3728
|
-
description: z.nullable(z.string()).optional(),
|
|
3729
|
-
prompt_config: z.lazy(() => CreatePromptPromptsPromptConfig$inboundSchema),
|
|
3730
|
-
metadata: z.lazy(() => CreatePromptPromptsMetadata$inboundSchema).optional(),
|
|
3731
|
-
}).transform((v) => {
|
|
3732
|
-
return remap$(v, {
|
|
3733
|
-
"_id": "id",
|
|
3734
|
-
"domain_id": "domainId",
|
|
3735
|
-
"created_by_id": "createdById",
|
|
3736
|
-
"updated_by_id": "updatedById",
|
|
3737
|
-
"display_name": "displayName",
|
|
3738
|
-
"prompt_config": "promptConfig",
|
|
3739
|
-
});
|
|
3740
|
-
});
|
|
3741
|
-
|
|
3742
|
-
/** @internal */
|
|
3743
|
-
export type CreatePromptResponseBody$Outbound = {
|
|
3744
|
-
_id: string;
|
|
3745
|
-
type: string;
|
|
3746
|
-
owner: string;
|
|
3747
|
-
domain_id: string;
|
|
3748
|
-
created: string;
|
|
3749
|
-
updated: string;
|
|
3750
|
-
created_by_id?: string | null | undefined;
|
|
3751
|
-
updated_by_id?: string | null | undefined;
|
|
3752
|
-
display_name: string;
|
|
3753
|
-
description?: string | null | undefined;
|
|
3754
|
-
prompt_config: CreatePromptPromptsPromptConfig$Outbound;
|
|
3755
|
-
metadata?: CreatePromptPromptsMetadata$Outbound | undefined;
|
|
3756
|
-
};
|
|
3757
|
-
|
|
3758
|
-
/** @internal */
|
|
3759
|
-
export const CreatePromptResponseBody$outboundSchema: z.ZodType<
|
|
3760
|
-
CreatePromptResponseBody$Outbound,
|
|
3761
|
-
z.ZodTypeDef,
|
|
3762
|
-
CreatePromptResponseBody
|
|
3763
|
-
> = z.object({
|
|
3764
|
-
id: z.string(),
|
|
3765
|
-
type: CreatePromptPromptsType$outboundSchema,
|
|
3766
|
-
owner: z.string(),
|
|
3767
|
-
domainId: z.string(),
|
|
3768
|
-
created: z.string(),
|
|
3769
|
-
updated: z.string(),
|
|
3770
|
-
createdById: z.nullable(z.string()).optional(),
|
|
3771
|
-
updatedById: z.nullable(z.string()).optional(),
|
|
3772
|
-
displayName: z.string(),
|
|
3773
|
-
description: z.nullable(z.string()).optional(),
|
|
3774
|
-
promptConfig: z.lazy(() => CreatePromptPromptsPromptConfig$outboundSchema),
|
|
3775
|
-
metadata: z.lazy(() => CreatePromptPromptsMetadata$outboundSchema).optional(),
|
|
3776
|
-
}).transform((v) => {
|
|
3777
|
-
return remap$(v, {
|
|
3778
|
-
id: "_id",
|
|
3779
|
-
domainId: "domain_id",
|
|
3780
|
-
createdById: "created_by_id",
|
|
3781
|
-
updatedById: "updated_by_id",
|
|
3782
|
-
displayName: "display_name",
|
|
3783
|
-
promptConfig: "prompt_config",
|
|
3784
|
-
});
|
|
3785
|
-
});
|
|
3786
|
-
|
|
3787
|
-
/**
|
|
3788
|
-
* @internal
|
|
3789
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3790
|
-
*/
|
|
3791
|
-
export namespace CreatePromptResponseBody$ {
|
|
3792
|
-
/** @deprecated use `CreatePromptResponseBody$inboundSchema` instead. */
|
|
3793
|
-
export const inboundSchema = CreatePromptResponseBody$inboundSchema;
|
|
3794
|
-
/** @deprecated use `CreatePromptResponseBody$outboundSchema` instead. */
|
|
3795
|
-
export const outboundSchema = CreatePromptResponseBody$outboundSchema;
|
|
3796
|
-
/** @deprecated use `CreatePromptResponseBody$Outbound` instead. */
|
|
3797
|
-
export type Outbound = CreatePromptResponseBody$Outbound;
|
|
3798
|
-
}
|
|
3799
|
-
|
|
3800
|
-
export function createPromptResponseBodyToJSON(
|
|
3801
|
-
createPromptResponseBody: CreatePromptResponseBody,
|
|
3802
|
-
): string {
|
|
3803
|
-
return JSON.stringify(
|
|
3804
|
-
CreatePromptResponseBody$outboundSchema.parse(createPromptResponseBody),
|
|
3805
|
-
);
|
|
3806
|
-
}
|
|
3807
|
-
|
|
3808
|
-
export function createPromptResponseBodyFromJSON(
|
|
3809
|
-
jsonString: string,
|
|
3810
|
-
): SafeParseResult<CreatePromptResponseBody, SDKValidationError> {
|
|
3811
|
-
return safeParse(
|
|
3812
|
-
jsonString,
|
|
3813
|
-
(x) => CreatePromptResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
3814
|
-
`Failed to parse 'CreatePromptResponseBody' from JSON`,
|
|
3815
|
-
);
|
|
3816
|
-
}
|