@sap-ai-sdk/prompt-registry 1.16.1-20250728013330.0 → 1.17.1-20250729013403.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/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -0
- package/dist/internal.js.map +1 -1
- package/dist/zod/index.d.ts +2 -0
- package/dist/zod/index.d.ts.map +1 -0
- package/dist/zod/index.js +2 -0
- package/dist/zod/index.js.map +1 -0
- package/dist/zod/prompt-registry.zod.d.ts +2944 -0
- package/dist/zod/prompt-registry.zod.d.ts.map +1 -0
- package/dist/zod/prompt-registry.zod.js +836 -0
- package/dist/zod/prompt-registry.zod.js.map +1 -0
- package/package.json +4 -6
- package/dist/zod/chat-completion-tool.zod.d.ts +0 -40
- package/dist/zod/chat-completion-tool.zod.d.ts.map +0 -1
- package/dist/zod/chat-completion-tool.zod.js +0 -11
- package/dist/zod/chat-completion-tool.zod.js.map +0 -1
- package/dist/zod/function-object.zod.d.ts +0 -21
- package/dist/zod/function-object.zod.d.ts.map +0 -1
- package/dist/zod/function-object.zod.js +0 -13
- package/dist/zod/function-object.zod.js.map +0 -1
- package/dist/zod/function-parameters.zod.d.ts +0 -6
- package/dist/zod/function-parameters.zod.d.ts.map +0 -1
- package/dist/zod/function-parameters.zod.js +0 -7
- package/dist/zod/function-parameters.zod.js.map +0 -1
- package/dist/zod/image-content.zod.d.ts +0 -30
- package/dist/zod/image-content.zod.d.ts.map +0 -1
- package/dist/zod/image-content.zod.js +0 -15
- package/dist/zod/image-content.zod.js.map +0 -1
- package/dist/zod/multi-chat-content.zod.d.ts +0 -39
- package/dist/zod/multi-chat-content.zod.d.ts.map +0 -1
- package/dist/zod/multi-chat-content.zod.js +0 -12
- package/dist/zod/multi-chat-content.zod.js.map +0 -1
- package/dist/zod/multi-chat-template.zod.d.ts +0 -66
- package/dist/zod/multi-chat-template.zod.d.ts.map +0 -1
- package/dist/zod/multi-chat-template.zod.js +0 -11
- package/dist/zod/multi-chat-template.zod.js.map +0 -1
- package/dist/zod/prompt-template-post-request.zod.d.ts +0 -569
- package/dist/zod/prompt-template-post-request.zod.d.ts.map +0 -1
- package/dist/zod/prompt-template-post-request.zod.js +0 -12
- package/dist/zod/prompt-template-post-request.zod.js.map +0 -1
- package/dist/zod/prompt-template-spec.zod.d.ts +0 -471
- package/dist/zod/prompt-template-spec.zod.d.ts.map +0 -1
- package/dist/zod/prompt-template-spec.zod.js +0 -26
- package/dist/zod/prompt-template-spec.zod.js.map +0 -1
- package/dist/zod/response-format-json-object.zod.d.ts +0 -12
- package/dist/zod/response-format-json-object.zod.d.ts.map +0 -1
- package/dist/zod/response-format-json-object.zod.js +0 -9
- package/dist/zod/response-format-json-object.zod.js.map +0 -1
- package/dist/zod/response-format-json-schema-schema.zod.d.ts +0 -6
- package/dist/zod/response-format-json-schema-schema.zod.d.ts.map +0 -1
- package/dist/zod/response-format-json-schema-schema.zod.js +0 -7
- package/dist/zod/response-format-json-schema-schema.zod.js.map +0 -1
- package/dist/zod/response-format-json-schema.zod.d.ts +0 -40
- package/dist/zod/response-format-json-schema.zod.d.ts.map +0 -1
- package/dist/zod/response-format-json-schema.zod.js +0 -16
- package/dist/zod/response-format-json-schema.zod.js.map +0 -1
- package/dist/zod/response-format-text.zod.d.ts +0 -12
- package/dist/zod/response-format-text.zod.d.ts.map +0 -1
- package/dist/zod/response-format-text.zod.js +0 -9
- package/dist/zod/response-format-text.zod.js.map +0 -1
- package/dist/zod/single-chat-template.zod.d.ts +0 -15
- package/dist/zod/single-chat-template.zod.d.ts.map +0 -1
- package/dist/zod/single-chat-template.zod.js +0 -10
- package/dist/zod/single-chat-template.zod.js.map +0 -1
- package/dist/zod/template.zod.d.ts +0 -75
- package/dist/zod/template.zod.d.ts.map +0 -1
- package/dist/zod/template.zod.js +0 -12
- package/dist/zod/template.zod.js.map +0 -1
- package/dist/zod/text-content.zod.d.ts +0 -15
- package/dist/zod/text-content.zod.d.ts.map +0 -1
- package/dist/zod/text-content.zod.js +0 -10
- package/dist/zod/text-content.zod.js.map +0 -1
|
@@ -0,0 +1,836 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Prompt Registry API
|
|
5
|
+
* Prompt Storage service for Design time & Runtime prompt templates.
|
|
6
|
+
* OpenAPI spec version: 0.0.1.
|
|
7
|
+
*/
|
|
8
|
+
import { z as zod } from 'zod';
|
|
9
|
+
/**
|
|
10
|
+
* Create or update a prompt template.
|
|
11
|
+
*/
|
|
12
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodyNameMax = 120;
|
|
13
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodyVersionMax = 10;
|
|
14
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodyScenarioMax = 120;
|
|
15
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecTemplateItemContentItemImageUrlDetailDefault = 'auto';
|
|
16
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecResponseFormatJsonSchemaNameMax = 64;
|
|
17
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecResponseFormatJsonSchemaNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
18
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecResponseFormatJsonSchemaStrictDefault = false;
|
|
19
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecToolsItemFunctionNameMax = 64;
|
|
20
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecToolsItemFunctionNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
21
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecToolsItemFunctionStrictDefault = false;
|
|
22
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateBody = zod.object({
|
|
23
|
+
name: zod
|
|
24
|
+
.string()
|
|
25
|
+
.max(registryControllerPromptControllerCreateUpdatePromptTemplateBodyNameMax),
|
|
26
|
+
version: zod
|
|
27
|
+
.string()
|
|
28
|
+
.max(registryControllerPromptControllerCreateUpdatePromptTemplateBodyVersionMax),
|
|
29
|
+
scenario: zod
|
|
30
|
+
.string()
|
|
31
|
+
.max(registryControllerPromptControllerCreateUpdatePromptTemplateBodyScenarioMax),
|
|
32
|
+
spec: zod.object({
|
|
33
|
+
template: zod.array(zod
|
|
34
|
+
.object({
|
|
35
|
+
role: zod.string(),
|
|
36
|
+
content: zod.string()
|
|
37
|
+
})
|
|
38
|
+
.or(zod.object({
|
|
39
|
+
role: zod.string(),
|
|
40
|
+
content: zod.array(zod
|
|
41
|
+
.object({
|
|
42
|
+
type: zod.enum(['image_url']),
|
|
43
|
+
image_url: zod.object({
|
|
44
|
+
url: zod.string(),
|
|
45
|
+
detail: zod
|
|
46
|
+
.string()
|
|
47
|
+
.default(registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecTemplateItemContentItemImageUrlDetailDefault)
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
.or(zod.object({
|
|
51
|
+
type: zod.enum(['text']),
|
|
52
|
+
text: zod.string()
|
|
53
|
+
})))
|
|
54
|
+
}))),
|
|
55
|
+
defaults: zod.object({}).optional(),
|
|
56
|
+
additionalFields: zod
|
|
57
|
+
.object({})
|
|
58
|
+
.optional()
|
|
59
|
+
.describe('DEPRECATED. Please use additional_fields instead.\n'),
|
|
60
|
+
response_format: zod
|
|
61
|
+
.object({
|
|
62
|
+
type: zod
|
|
63
|
+
.enum(['text'])
|
|
64
|
+
.describe('The type of response format being defined: `text`')
|
|
65
|
+
})
|
|
66
|
+
.or(zod.object({
|
|
67
|
+
type: zod
|
|
68
|
+
.enum(['json_object'])
|
|
69
|
+
.describe('The type of response format being defined: `json_object`')
|
|
70
|
+
}))
|
|
71
|
+
.or(zod.object({
|
|
72
|
+
type: zod
|
|
73
|
+
.enum(['json_schema'])
|
|
74
|
+
.describe('The type of response format being defined: `json_schema`'),
|
|
75
|
+
json_schema: zod.object({
|
|
76
|
+
description: zod
|
|
77
|
+
.string()
|
|
78
|
+
.optional()
|
|
79
|
+
.describe('A description of what the response format is for, used by the model to determine how to respond in the format.'),
|
|
80
|
+
name: zod
|
|
81
|
+
.string()
|
|
82
|
+
.max(registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecResponseFormatJsonSchemaNameMax)
|
|
83
|
+
.regex(registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecResponseFormatJsonSchemaNameRegExp)
|
|
84
|
+
.describe('The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
85
|
+
schema: zod
|
|
86
|
+
.record(zod.string(), zod.any())
|
|
87
|
+
.optional()
|
|
88
|
+
.describe('The schema for the response format, described as a JSON Schema object.'),
|
|
89
|
+
strict: zod
|
|
90
|
+
.boolean()
|
|
91
|
+
.nullish()
|
|
92
|
+
.describe('Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).')
|
|
93
|
+
})
|
|
94
|
+
}))
|
|
95
|
+
.optional()
|
|
96
|
+
.describe('Response format that the model output should adhere to. This is the same as the OpenAI definition.\nCompatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.\n'),
|
|
97
|
+
tools: zod
|
|
98
|
+
.array(zod.object({
|
|
99
|
+
type: zod
|
|
100
|
+
.enum(['function'])
|
|
101
|
+
.describe('The type of the tool. Currently, only `function` is supported.'),
|
|
102
|
+
function: zod.object({
|
|
103
|
+
description: zod
|
|
104
|
+
.string()
|
|
105
|
+
.optional()
|
|
106
|
+
.describe('A description of what the function does, used by the model to choose when and how to call the function.'),
|
|
107
|
+
name: zod
|
|
108
|
+
.string()
|
|
109
|
+
.max(registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecToolsItemFunctionNameMax)
|
|
110
|
+
.regex(registryControllerPromptControllerCreateUpdatePromptTemplateBodySpecToolsItemFunctionNameRegExp)
|
|
111
|
+
.describe('The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
112
|
+
parameters: zod
|
|
113
|
+
.record(zod.string(), zod.any())
|
|
114
|
+
.optional()
|
|
115
|
+
.describe('The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'),
|
|
116
|
+
strict: zod
|
|
117
|
+
.boolean()
|
|
118
|
+
.nullish()
|
|
119
|
+
.describe('Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).')
|
|
120
|
+
})
|
|
121
|
+
}))
|
|
122
|
+
.optional()
|
|
123
|
+
.describe('A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.\n')
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
export const registryControllerPromptControllerCreateUpdatePromptTemplateResponse = zod.object({
|
|
127
|
+
message: zod.string(),
|
|
128
|
+
id: zod.string().uuid(),
|
|
129
|
+
scenario: zod.string(),
|
|
130
|
+
name: zod.string(),
|
|
131
|
+
version: zod.string()
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* List prompt templates.
|
|
135
|
+
*/
|
|
136
|
+
export const registryControllerPromptControllerListPromptTemplatesQueryRetrieveDefault = 'both';
|
|
137
|
+
export const registryControllerPromptControllerListPromptTemplatesQueryIncludeSpecDefault = false;
|
|
138
|
+
export const registryControllerPromptControllerListPromptTemplatesQueryParams = zod.object({
|
|
139
|
+
scenario: zod.string().optional(),
|
|
140
|
+
name: zod.string().optional(),
|
|
141
|
+
version: zod.string().optional(),
|
|
142
|
+
retrieve: zod
|
|
143
|
+
.string()
|
|
144
|
+
.default(registryControllerPromptControllerListPromptTemplatesQueryRetrieveDefault),
|
|
145
|
+
includeSpec: zod.boolean().optional()
|
|
146
|
+
});
|
|
147
|
+
export const registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecTemplateItemContentItemImageUrlDetailDefault = 'auto';
|
|
148
|
+
export const registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecResponseFormatJsonSchemaNameMax = 64;
|
|
149
|
+
export const registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecResponseFormatJsonSchemaNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
150
|
+
export const registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecResponseFormatJsonSchemaStrictDefault = false;
|
|
151
|
+
export const registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecToolsItemFunctionNameMax = 64;
|
|
152
|
+
export const registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecToolsItemFunctionNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
153
|
+
export const registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecToolsItemFunctionStrictDefault = false;
|
|
154
|
+
export const registryControllerPromptControllerListPromptTemplatesResponse = zod.object({
|
|
155
|
+
count: zod.number(),
|
|
156
|
+
resources: zod.array(zod.object({
|
|
157
|
+
id: zod.string().uuid().optional(),
|
|
158
|
+
name: zod.string().optional(),
|
|
159
|
+
version: zod.string().optional(),
|
|
160
|
+
scenario: zod.string().optional(),
|
|
161
|
+
creationTimestamp: zod.string().optional(),
|
|
162
|
+
managedBy: zod.string().optional(),
|
|
163
|
+
isVersionHead: zod.boolean().optional(),
|
|
164
|
+
spec: zod
|
|
165
|
+
.object({
|
|
166
|
+
template: zod.array(zod
|
|
167
|
+
.object({
|
|
168
|
+
role: zod.string(),
|
|
169
|
+
content: zod.string()
|
|
170
|
+
})
|
|
171
|
+
.or(zod.object({
|
|
172
|
+
role: zod.string(),
|
|
173
|
+
content: zod.array(zod
|
|
174
|
+
.object({
|
|
175
|
+
type: zod.enum(['image_url']),
|
|
176
|
+
image_url: zod.object({
|
|
177
|
+
url: zod.string(),
|
|
178
|
+
detail: zod
|
|
179
|
+
.string()
|
|
180
|
+
.default(registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecTemplateItemContentItemImageUrlDetailDefault)
|
|
181
|
+
})
|
|
182
|
+
})
|
|
183
|
+
.or(zod.object({
|
|
184
|
+
type: zod.enum(['text']),
|
|
185
|
+
text: zod.string()
|
|
186
|
+
})))
|
|
187
|
+
}))),
|
|
188
|
+
defaults: zod.object({}).optional(),
|
|
189
|
+
additionalFields: zod
|
|
190
|
+
.object({})
|
|
191
|
+
.optional()
|
|
192
|
+
.describe('DEPRECATED. Please use additional_fields instead.\n'),
|
|
193
|
+
response_format: zod
|
|
194
|
+
.object({
|
|
195
|
+
type: zod
|
|
196
|
+
.enum(['text'])
|
|
197
|
+
.describe('The type of response format being defined: `text`')
|
|
198
|
+
})
|
|
199
|
+
.or(zod.object({
|
|
200
|
+
type: zod
|
|
201
|
+
.enum(['json_object'])
|
|
202
|
+
.describe('The type of response format being defined: `json_object`')
|
|
203
|
+
}))
|
|
204
|
+
.or(zod.object({
|
|
205
|
+
type: zod
|
|
206
|
+
.enum(['json_schema'])
|
|
207
|
+
.describe('The type of response format being defined: `json_schema`'),
|
|
208
|
+
json_schema: zod.object({
|
|
209
|
+
description: zod
|
|
210
|
+
.string()
|
|
211
|
+
.optional()
|
|
212
|
+
.describe('A description of what the response format is for, used by the model to determine how to respond in the format.'),
|
|
213
|
+
name: zod
|
|
214
|
+
.string()
|
|
215
|
+
.max(registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecResponseFormatJsonSchemaNameMax)
|
|
216
|
+
.regex(registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecResponseFormatJsonSchemaNameRegExp)
|
|
217
|
+
.describe('The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
218
|
+
schema: zod
|
|
219
|
+
.record(zod.string(), zod.any())
|
|
220
|
+
.optional()
|
|
221
|
+
.describe('The schema for the response format, described as a JSON Schema object.'),
|
|
222
|
+
strict: zod
|
|
223
|
+
.boolean()
|
|
224
|
+
.nullish()
|
|
225
|
+
.describe('Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).')
|
|
226
|
+
})
|
|
227
|
+
}))
|
|
228
|
+
.optional()
|
|
229
|
+
.describe('Response format that the model output should adhere to. This is the same as the OpenAI definition.\nCompatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.\n'),
|
|
230
|
+
tools: zod
|
|
231
|
+
.array(zod.object({
|
|
232
|
+
type: zod
|
|
233
|
+
.enum(['function'])
|
|
234
|
+
.describe('The type of the tool. Currently, only `function` is supported.'),
|
|
235
|
+
function: zod.object({
|
|
236
|
+
description: zod
|
|
237
|
+
.string()
|
|
238
|
+
.optional()
|
|
239
|
+
.describe('A description of what the function does, used by the model to choose when and how to call the function.'),
|
|
240
|
+
name: zod
|
|
241
|
+
.string()
|
|
242
|
+
.max(registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecToolsItemFunctionNameMax)
|
|
243
|
+
.regex(registryControllerPromptControllerListPromptTemplatesResponseResourcesItemSpecToolsItemFunctionNameRegExp)
|
|
244
|
+
.describe('The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
245
|
+
parameters: zod
|
|
246
|
+
.record(zod.string(), zod.any())
|
|
247
|
+
.optional()
|
|
248
|
+
.describe('The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'),
|
|
249
|
+
strict: zod
|
|
250
|
+
.boolean()
|
|
251
|
+
.nullish()
|
|
252
|
+
.describe('Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).')
|
|
253
|
+
})
|
|
254
|
+
}))
|
|
255
|
+
.optional()
|
|
256
|
+
.describe('A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.\n')
|
|
257
|
+
})
|
|
258
|
+
.optional()
|
|
259
|
+
}))
|
|
260
|
+
});
|
|
261
|
+
/**
|
|
262
|
+
* List prompt template history.
|
|
263
|
+
*/
|
|
264
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryParams = zod.object({
|
|
265
|
+
scenario: zod.string(),
|
|
266
|
+
version: zod.string(),
|
|
267
|
+
name: zod.string()
|
|
268
|
+
});
|
|
269
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecTemplateItemContentItemImageUrlDetailDefault = 'auto';
|
|
270
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecResponseFormatJsonSchemaNameMax = 64;
|
|
271
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecResponseFormatJsonSchemaNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
272
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecResponseFormatJsonSchemaStrictDefault = false;
|
|
273
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecToolsItemFunctionNameMax = 64;
|
|
274
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecToolsItemFunctionNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
275
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecToolsItemFunctionStrictDefault = false;
|
|
276
|
+
export const registryControllerPromptControllerListPromptTemplateHistoryResponse = zod.object({
|
|
277
|
+
count: zod.number(),
|
|
278
|
+
resources: zod.array(zod.object({
|
|
279
|
+
id: zod.string().uuid().optional(),
|
|
280
|
+
name: zod.string().optional(),
|
|
281
|
+
version: zod.string().optional(),
|
|
282
|
+
scenario: zod.string().optional(),
|
|
283
|
+
creationTimestamp: zod.string().optional(),
|
|
284
|
+
managedBy: zod.string().optional(),
|
|
285
|
+
isVersionHead: zod.boolean().optional(),
|
|
286
|
+
spec: zod
|
|
287
|
+
.object({
|
|
288
|
+
template: zod.array(zod
|
|
289
|
+
.object({
|
|
290
|
+
role: zod.string(),
|
|
291
|
+
content: zod.string()
|
|
292
|
+
})
|
|
293
|
+
.or(zod.object({
|
|
294
|
+
role: zod.string(),
|
|
295
|
+
content: zod.array(zod
|
|
296
|
+
.object({
|
|
297
|
+
type: zod.enum(['image_url']),
|
|
298
|
+
image_url: zod.object({
|
|
299
|
+
url: zod.string(),
|
|
300
|
+
detail: zod
|
|
301
|
+
.string()
|
|
302
|
+
.default(registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecTemplateItemContentItemImageUrlDetailDefault)
|
|
303
|
+
})
|
|
304
|
+
})
|
|
305
|
+
.or(zod.object({
|
|
306
|
+
type: zod.enum(['text']),
|
|
307
|
+
text: zod.string()
|
|
308
|
+
})))
|
|
309
|
+
}))),
|
|
310
|
+
defaults: zod.object({}).optional(),
|
|
311
|
+
additionalFields: zod
|
|
312
|
+
.object({})
|
|
313
|
+
.optional()
|
|
314
|
+
.describe('DEPRECATED. Please use additional_fields instead.\n'),
|
|
315
|
+
response_format: zod
|
|
316
|
+
.object({
|
|
317
|
+
type: zod
|
|
318
|
+
.enum(['text'])
|
|
319
|
+
.describe('The type of response format being defined: `text`')
|
|
320
|
+
})
|
|
321
|
+
.or(zod.object({
|
|
322
|
+
type: zod
|
|
323
|
+
.enum(['json_object'])
|
|
324
|
+
.describe('The type of response format being defined: `json_object`')
|
|
325
|
+
}))
|
|
326
|
+
.or(zod.object({
|
|
327
|
+
type: zod
|
|
328
|
+
.enum(['json_schema'])
|
|
329
|
+
.describe('The type of response format being defined: `json_schema`'),
|
|
330
|
+
json_schema: zod.object({
|
|
331
|
+
description: zod
|
|
332
|
+
.string()
|
|
333
|
+
.optional()
|
|
334
|
+
.describe('A description of what the response format is for, used by the model to determine how to respond in the format.'),
|
|
335
|
+
name: zod
|
|
336
|
+
.string()
|
|
337
|
+
.max(registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecResponseFormatJsonSchemaNameMax)
|
|
338
|
+
.regex(registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecResponseFormatJsonSchemaNameRegExp)
|
|
339
|
+
.describe('The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
340
|
+
schema: zod
|
|
341
|
+
.record(zod.string(), zod.any())
|
|
342
|
+
.optional()
|
|
343
|
+
.describe('The schema for the response format, described as a JSON Schema object.'),
|
|
344
|
+
strict: zod
|
|
345
|
+
.boolean()
|
|
346
|
+
.nullish()
|
|
347
|
+
.describe('Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).')
|
|
348
|
+
})
|
|
349
|
+
}))
|
|
350
|
+
.optional()
|
|
351
|
+
.describe('Response format that the model output should adhere to. This is the same as the OpenAI definition.\nCompatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.\n'),
|
|
352
|
+
tools: zod
|
|
353
|
+
.array(zod.object({
|
|
354
|
+
type: zod
|
|
355
|
+
.enum(['function'])
|
|
356
|
+
.describe('The type of the tool. Currently, only `function` is supported.'),
|
|
357
|
+
function: zod.object({
|
|
358
|
+
description: zod
|
|
359
|
+
.string()
|
|
360
|
+
.optional()
|
|
361
|
+
.describe('A description of what the function does, used by the model to choose when and how to call the function.'),
|
|
362
|
+
name: zod
|
|
363
|
+
.string()
|
|
364
|
+
.max(registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecToolsItemFunctionNameMax)
|
|
365
|
+
.regex(registryControllerPromptControllerListPromptTemplateHistoryResponseResourcesItemSpecToolsItemFunctionNameRegExp)
|
|
366
|
+
.describe('The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
367
|
+
parameters: zod
|
|
368
|
+
.record(zod.string(), zod.any())
|
|
369
|
+
.optional()
|
|
370
|
+
.describe('The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'),
|
|
371
|
+
strict: zod
|
|
372
|
+
.boolean()
|
|
373
|
+
.nullish()
|
|
374
|
+
.describe('Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).')
|
|
375
|
+
})
|
|
376
|
+
}))
|
|
377
|
+
.optional()
|
|
378
|
+
.describe('A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.\n')
|
|
379
|
+
})
|
|
380
|
+
.optional()
|
|
381
|
+
}))
|
|
382
|
+
});
|
|
383
|
+
/**
|
|
384
|
+
* Get prompt template by UUID.
|
|
385
|
+
*/
|
|
386
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidParams = zod.object({
|
|
387
|
+
promptTemplateId: zod.string().uuid()
|
|
388
|
+
});
|
|
389
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecTemplateItemContentItemImageUrlDetailDefault = 'auto';
|
|
390
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecResponseFormatJsonSchemaNameMax = 64;
|
|
391
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecResponseFormatJsonSchemaNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
392
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecResponseFormatJsonSchemaStrictDefault = false;
|
|
393
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecToolsItemFunctionNameMax = 64;
|
|
394
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecToolsItemFunctionNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
395
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecToolsItemFunctionStrictDefault = false;
|
|
396
|
+
export const registryControllerPromptControllerGetPromptTemplateByUuidResponse = zod.object({
|
|
397
|
+
id: zod.string().uuid().optional(),
|
|
398
|
+
name: zod.string().optional(),
|
|
399
|
+
version: zod.string().optional(),
|
|
400
|
+
scenario: zod.string().optional(),
|
|
401
|
+
creationTimestamp: zod.string().optional(),
|
|
402
|
+
managedBy: zod.string().optional(),
|
|
403
|
+
isVersionHead: zod.boolean().optional(),
|
|
404
|
+
spec: zod
|
|
405
|
+
.object({
|
|
406
|
+
template: zod.array(zod
|
|
407
|
+
.object({
|
|
408
|
+
role: zod.string(),
|
|
409
|
+
content: zod.string()
|
|
410
|
+
})
|
|
411
|
+
.or(zod.object({
|
|
412
|
+
role: zod.string(),
|
|
413
|
+
content: zod.array(zod
|
|
414
|
+
.object({
|
|
415
|
+
type: zod.enum(['image_url']),
|
|
416
|
+
image_url: zod.object({
|
|
417
|
+
url: zod.string(),
|
|
418
|
+
detail: zod
|
|
419
|
+
.string()
|
|
420
|
+
.default(registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecTemplateItemContentItemImageUrlDetailDefault)
|
|
421
|
+
})
|
|
422
|
+
})
|
|
423
|
+
.or(zod.object({
|
|
424
|
+
type: zod.enum(['text']),
|
|
425
|
+
text: zod.string()
|
|
426
|
+
})))
|
|
427
|
+
}))),
|
|
428
|
+
defaults: zod.object({}).optional(),
|
|
429
|
+
additionalFields: zod
|
|
430
|
+
.object({})
|
|
431
|
+
.optional()
|
|
432
|
+
.describe('DEPRECATED. Please use additional_fields instead.\n'),
|
|
433
|
+
response_format: zod
|
|
434
|
+
.object({
|
|
435
|
+
type: zod
|
|
436
|
+
.enum(['text'])
|
|
437
|
+
.describe('The type of response format being defined: `text`')
|
|
438
|
+
})
|
|
439
|
+
.or(zod.object({
|
|
440
|
+
type: zod
|
|
441
|
+
.enum(['json_object'])
|
|
442
|
+
.describe('The type of response format being defined: `json_object`')
|
|
443
|
+
}))
|
|
444
|
+
.or(zod.object({
|
|
445
|
+
type: zod
|
|
446
|
+
.enum(['json_schema'])
|
|
447
|
+
.describe('The type of response format being defined: `json_schema`'),
|
|
448
|
+
json_schema: zod.object({
|
|
449
|
+
description: zod
|
|
450
|
+
.string()
|
|
451
|
+
.optional()
|
|
452
|
+
.describe('A description of what the response format is for, used by the model to determine how to respond in the format.'),
|
|
453
|
+
name: zod
|
|
454
|
+
.string()
|
|
455
|
+
.max(registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecResponseFormatJsonSchemaNameMax)
|
|
456
|
+
.regex(registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecResponseFormatJsonSchemaNameRegExp)
|
|
457
|
+
.describe('The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
458
|
+
schema: zod
|
|
459
|
+
.record(zod.string(), zod.any())
|
|
460
|
+
.optional()
|
|
461
|
+
.describe('The schema for the response format, described as a JSON Schema object.'),
|
|
462
|
+
strict: zod
|
|
463
|
+
.boolean()
|
|
464
|
+
.nullish()
|
|
465
|
+
.describe('Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).')
|
|
466
|
+
})
|
|
467
|
+
}))
|
|
468
|
+
.optional()
|
|
469
|
+
.describe('Response format that the model output should adhere to. This is the same as the OpenAI definition.\nCompatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.\n'),
|
|
470
|
+
tools: zod
|
|
471
|
+
.array(zod.object({
|
|
472
|
+
type: zod
|
|
473
|
+
.enum(['function'])
|
|
474
|
+
.describe('The type of the tool. Currently, only `function` is supported.'),
|
|
475
|
+
function: zod.object({
|
|
476
|
+
description: zod
|
|
477
|
+
.string()
|
|
478
|
+
.optional()
|
|
479
|
+
.describe('A description of what the function does, used by the model to choose when and how to call the function.'),
|
|
480
|
+
name: zod
|
|
481
|
+
.string()
|
|
482
|
+
.max(registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecToolsItemFunctionNameMax)
|
|
483
|
+
.regex(registryControllerPromptControllerGetPromptTemplateByUuidResponseSpecToolsItemFunctionNameRegExp)
|
|
484
|
+
.describe('The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
485
|
+
parameters: zod
|
|
486
|
+
.record(zod.string(), zod.any())
|
|
487
|
+
.optional()
|
|
488
|
+
.describe('The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'),
|
|
489
|
+
strict: zod
|
|
490
|
+
.boolean()
|
|
491
|
+
.nullish()
|
|
492
|
+
.describe('Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).')
|
|
493
|
+
})
|
|
494
|
+
}))
|
|
495
|
+
.optional()
|
|
496
|
+
.describe('A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.\n')
|
|
497
|
+
})
|
|
498
|
+
.optional()
|
|
499
|
+
});
|
|
500
|
+
/**
|
|
501
|
+
* Delete prompt template.
|
|
502
|
+
*/
|
|
503
|
+
export const registryControllerPromptControllerDeletePromptTemplateParams = zod.object({
|
|
504
|
+
promptTemplateId: zod.string().uuid()
|
|
505
|
+
});
|
|
506
|
+
export const registryControllerPromptControllerDeletePromptTemplateResponse = zod.object({
|
|
507
|
+
message: zod.string()
|
|
508
|
+
});
|
|
509
|
+
/**
|
|
510
|
+
* Import prompt template.
|
|
511
|
+
*/
|
|
512
|
+
export const registryControllerPromptControllerImportPromptTemplateBody = zod.object({
|
|
513
|
+
file: zod.instanceof(File).optional()
|
|
514
|
+
});
|
|
515
|
+
export const registryControllerPromptControllerImportPromptTemplateResponse = zod.object({
|
|
516
|
+
message: zod.string(),
|
|
517
|
+
id: zod.string().uuid(),
|
|
518
|
+
scenario: zod.string(),
|
|
519
|
+
name: zod.string(),
|
|
520
|
+
version: zod.string()
|
|
521
|
+
});
|
|
522
|
+
/**
|
|
523
|
+
* Export prompt template.
|
|
524
|
+
*/
|
|
525
|
+
export const registryControllerPromptControllerExportPromptTemplateParams = zod.object({
|
|
526
|
+
promptTemplateId: zod.string().uuid()
|
|
527
|
+
});
|
|
528
|
+
/**
|
|
529
|
+
* Parse prompt template by ID.
|
|
530
|
+
*/
|
|
531
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdParams = zod.object({
|
|
532
|
+
promptTemplateId: zod.string().uuid()
|
|
533
|
+
});
|
|
534
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdQueryMetadataDefault = false;
|
|
535
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdQueryParams = zod.object({
|
|
536
|
+
metadata: zod.boolean().optional()
|
|
537
|
+
});
|
|
538
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdBody = zod.object({
|
|
539
|
+
inputParams: zod.object({}).optional()
|
|
540
|
+
});
|
|
541
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseParsedPromptItemContentItemImageUrlDetailDefault = 'auto';
|
|
542
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecTemplateItemContentItemImageUrlDetailDefault = 'auto';
|
|
543
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecResponseFormatJsonSchemaNameMax = 64;
|
|
544
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecResponseFormatJsonSchemaNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
545
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecResponseFormatJsonSchemaStrictDefault = false;
|
|
546
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecToolsItemFunctionNameMax = 64;
|
|
547
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecToolsItemFunctionNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
548
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecToolsItemFunctionStrictDefault = false;
|
|
549
|
+
export const registryControllerPromptControllerParsePromptTemplateByIdResponse = zod.object({
|
|
550
|
+
parsedPrompt: zod
|
|
551
|
+
.array(zod
|
|
552
|
+
.object({
|
|
553
|
+
role: zod.string(),
|
|
554
|
+
content: zod.string()
|
|
555
|
+
})
|
|
556
|
+
.or(zod.object({
|
|
557
|
+
role: zod.string(),
|
|
558
|
+
content: zod.array(zod
|
|
559
|
+
.object({
|
|
560
|
+
type: zod.enum(['image_url']),
|
|
561
|
+
image_url: zod.object({
|
|
562
|
+
url: zod.string(),
|
|
563
|
+
detail: zod
|
|
564
|
+
.string()
|
|
565
|
+
.default(registryControllerPromptControllerParsePromptTemplateByIdResponseParsedPromptItemContentItemImageUrlDetailDefault)
|
|
566
|
+
})
|
|
567
|
+
})
|
|
568
|
+
.or(zod.object({
|
|
569
|
+
type: zod.enum(['text']),
|
|
570
|
+
text: zod.string()
|
|
571
|
+
})))
|
|
572
|
+
})))
|
|
573
|
+
.optional(),
|
|
574
|
+
resource: zod
|
|
575
|
+
.object({
|
|
576
|
+
id: zod.string().uuid().optional(),
|
|
577
|
+
name: zod.string().optional(),
|
|
578
|
+
version: zod.string().optional(),
|
|
579
|
+
scenario: zod.string().optional(),
|
|
580
|
+
creationTimestamp: zod.string().optional(),
|
|
581
|
+
managedBy: zod.string().optional(),
|
|
582
|
+
isVersionHead: zod.boolean().optional(),
|
|
583
|
+
spec: zod
|
|
584
|
+
.object({
|
|
585
|
+
template: zod.array(zod
|
|
586
|
+
.object({
|
|
587
|
+
role: zod.string(),
|
|
588
|
+
content: zod.string()
|
|
589
|
+
})
|
|
590
|
+
.or(zod.object({
|
|
591
|
+
role: zod.string(),
|
|
592
|
+
content: zod.array(zod
|
|
593
|
+
.object({
|
|
594
|
+
type: zod.enum(['image_url']),
|
|
595
|
+
image_url: zod.object({
|
|
596
|
+
url: zod.string(),
|
|
597
|
+
detail: zod
|
|
598
|
+
.string()
|
|
599
|
+
.default(registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecTemplateItemContentItemImageUrlDetailDefault)
|
|
600
|
+
})
|
|
601
|
+
})
|
|
602
|
+
.or(zod.object({
|
|
603
|
+
type: zod.enum(['text']),
|
|
604
|
+
text: zod.string()
|
|
605
|
+
})))
|
|
606
|
+
}))),
|
|
607
|
+
defaults: zod.object({}).optional(),
|
|
608
|
+
additionalFields: zod
|
|
609
|
+
.object({})
|
|
610
|
+
.optional()
|
|
611
|
+
.describe('DEPRECATED. Please use additional_fields instead.\n'),
|
|
612
|
+
response_format: zod
|
|
613
|
+
.object({
|
|
614
|
+
type: zod
|
|
615
|
+
.enum(['text'])
|
|
616
|
+
.describe('The type of response format being defined: `text`')
|
|
617
|
+
})
|
|
618
|
+
.or(zod.object({
|
|
619
|
+
type: zod
|
|
620
|
+
.enum(['json_object'])
|
|
621
|
+
.describe('The type of response format being defined: `json_object`')
|
|
622
|
+
}))
|
|
623
|
+
.or(zod.object({
|
|
624
|
+
type: zod
|
|
625
|
+
.enum(['json_schema'])
|
|
626
|
+
.describe('The type of response format being defined: `json_schema`'),
|
|
627
|
+
json_schema: zod.object({
|
|
628
|
+
description: zod
|
|
629
|
+
.string()
|
|
630
|
+
.optional()
|
|
631
|
+
.describe('A description of what the response format is for, used by the model to determine how to respond in the format.'),
|
|
632
|
+
name: zod
|
|
633
|
+
.string()
|
|
634
|
+
.max(registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecResponseFormatJsonSchemaNameMax)
|
|
635
|
+
.regex(registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecResponseFormatJsonSchemaNameRegExp)
|
|
636
|
+
.describe('The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
637
|
+
schema: zod
|
|
638
|
+
.record(zod.string(), zod.any())
|
|
639
|
+
.optional()
|
|
640
|
+
.describe('The schema for the response format, described as a JSON Schema object.'),
|
|
641
|
+
strict: zod
|
|
642
|
+
.boolean()
|
|
643
|
+
.nullish()
|
|
644
|
+
.describe('Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).')
|
|
645
|
+
})
|
|
646
|
+
}))
|
|
647
|
+
.optional()
|
|
648
|
+
.describe('Response format that the model output should adhere to. This is the same as the OpenAI definition.\nCompatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.\n'),
|
|
649
|
+
tools: zod
|
|
650
|
+
.array(zod.object({
|
|
651
|
+
type: zod
|
|
652
|
+
.enum(['function'])
|
|
653
|
+
.describe('The type of the tool. Currently, only `function` is supported.'),
|
|
654
|
+
function: zod.object({
|
|
655
|
+
description: zod
|
|
656
|
+
.string()
|
|
657
|
+
.optional()
|
|
658
|
+
.describe('A description of what the function does, used by the model to choose when and how to call the function.'),
|
|
659
|
+
name: zod
|
|
660
|
+
.string()
|
|
661
|
+
.max(registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecToolsItemFunctionNameMax)
|
|
662
|
+
.regex(registryControllerPromptControllerParsePromptTemplateByIdResponseResourceSpecToolsItemFunctionNameRegExp)
|
|
663
|
+
.describe('The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
664
|
+
parameters: zod
|
|
665
|
+
.record(zod.string(), zod.any())
|
|
666
|
+
.optional()
|
|
667
|
+
.describe('The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'),
|
|
668
|
+
strict: zod
|
|
669
|
+
.boolean()
|
|
670
|
+
.nullish()
|
|
671
|
+
.describe('Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).')
|
|
672
|
+
})
|
|
673
|
+
}))
|
|
674
|
+
.optional()
|
|
675
|
+
.describe('A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.\n')
|
|
676
|
+
})
|
|
677
|
+
.optional()
|
|
678
|
+
})
|
|
679
|
+
.optional()
|
|
680
|
+
});
|
|
681
|
+
/**
|
|
682
|
+
* Parse prompt template by name and version.
|
|
683
|
+
*/
|
|
684
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionParams = zod.object({
|
|
685
|
+
scenario: zod.string(),
|
|
686
|
+
version: zod.string(),
|
|
687
|
+
name: zod.string()
|
|
688
|
+
});
|
|
689
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionQueryMetadataDefault = false;
|
|
690
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionQueryParams = zod.object({
|
|
691
|
+
metadata: zod.boolean().optional()
|
|
692
|
+
});
|
|
693
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionBody = zod.object({
|
|
694
|
+
inputParams: zod.object({}).optional()
|
|
695
|
+
});
|
|
696
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseParsedPromptItemContentItemImageUrlDetailDefault = 'auto';
|
|
697
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecTemplateItemContentItemImageUrlDetailDefault = 'auto';
|
|
698
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecResponseFormatJsonSchemaNameMax = 64;
|
|
699
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecResponseFormatJsonSchemaNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
700
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecResponseFormatJsonSchemaStrictDefault = false;
|
|
701
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecToolsItemFunctionNameMax = 64;
|
|
702
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecToolsItemFunctionNameRegExp = new RegExp('^[a-zA-Z0-9-_]+$');
|
|
703
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecToolsItemFunctionStrictDefault = false;
|
|
704
|
+
export const registryControllerPromptControllerParsePromptTemplateByNameVersionResponse = zod.object({
|
|
705
|
+
parsedPrompt: zod
|
|
706
|
+
.array(zod
|
|
707
|
+
.object({
|
|
708
|
+
role: zod.string(),
|
|
709
|
+
content: zod.string()
|
|
710
|
+
})
|
|
711
|
+
.or(zod.object({
|
|
712
|
+
role: zod.string(),
|
|
713
|
+
content: zod.array(zod
|
|
714
|
+
.object({
|
|
715
|
+
type: zod.enum(['image_url']),
|
|
716
|
+
image_url: zod.object({
|
|
717
|
+
url: zod.string(),
|
|
718
|
+
detail: zod
|
|
719
|
+
.string()
|
|
720
|
+
.default(registryControllerPromptControllerParsePromptTemplateByNameVersionResponseParsedPromptItemContentItemImageUrlDetailDefault)
|
|
721
|
+
})
|
|
722
|
+
})
|
|
723
|
+
.or(zod.object({
|
|
724
|
+
type: zod.enum(['text']),
|
|
725
|
+
text: zod.string()
|
|
726
|
+
})))
|
|
727
|
+
})))
|
|
728
|
+
.optional(),
|
|
729
|
+
resource: zod
|
|
730
|
+
.object({
|
|
731
|
+
id: zod.string().uuid().optional(),
|
|
732
|
+
name: zod.string().optional(),
|
|
733
|
+
version: zod.string().optional(),
|
|
734
|
+
scenario: zod.string().optional(),
|
|
735
|
+
creationTimestamp: zod.string().optional(),
|
|
736
|
+
managedBy: zod.string().optional(),
|
|
737
|
+
isVersionHead: zod.boolean().optional(),
|
|
738
|
+
spec: zod
|
|
739
|
+
.object({
|
|
740
|
+
template: zod.array(zod
|
|
741
|
+
.object({
|
|
742
|
+
role: zod.string(),
|
|
743
|
+
content: zod.string()
|
|
744
|
+
})
|
|
745
|
+
.or(zod.object({
|
|
746
|
+
role: zod.string(),
|
|
747
|
+
content: zod.array(zod
|
|
748
|
+
.object({
|
|
749
|
+
type: zod.enum(['image_url']),
|
|
750
|
+
image_url: zod.object({
|
|
751
|
+
url: zod.string(),
|
|
752
|
+
detail: zod
|
|
753
|
+
.string()
|
|
754
|
+
.default(registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecTemplateItemContentItemImageUrlDetailDefault)
|
|
755
|
+
})
|
|
756
|
+
})
|
|
757
|
+
.or(zod.object({
|
|
758
|
+
type: zod.enum(['text']),
|
|
759
|
+
text: zod.string()
|
|
760
|
+
})))
|
|
761
|
+
}))),
|
|
762
|
+
defaults: zod.object({}).optional(),
|
|
763
|
+
additionalFields: zod
|
|
764
|
+
.object({})
|
|
765
|
+
.optional()
|
|
766
|
+
.describe('DEPRECATED. Please use additional_fields instead.\n'),
|
|
767
|
+
response_format: zod
|
|
768
|
+
.object({
|
|
769
|
+
type: zod
|
|
770
|
+
.enum(['text'])
|
|
771
|
+
.describe('The type of response format being defined: `text`')
|
|
772
|
+
})
|
|
773
|
+
.or(zod.object({
|
|
774
|
+
type: zod
|
|
775
|
+
.enum(['json_object'])
|
|
776
|
+
.describe('The type of response format being defined: `json_object`')
|
|
777
|
+
}))
|
|
778
|
+
.or(zod.object({
|
|
779
|
+
type: zod
|
|
780
|
+
.enum(['json_schema'])
|
|
781
|
+
.describe('The type of response format being defined: `json_schema`'),
|
|
782
|
+
json_schema: zod.object({
|
|
783
|
+
description: zod
|
|
784
|
+
.string()
|
|
785
|
+
.optional()
|
|
786
|
+
.describe('A description of what the response format is for, used by the model to determine how to respond in the format.'),
|
|
787
|
+
name: zod
|
|
788
|
+
.string()
|
|
789
|
+
.max(registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecResponseFormatJsonSchemaNameMax)
|
|
790
|
+
.regex(registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecResponseFormatJsonSchemaNameRegExp)
|
|
791
|
+
.describe('The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
792
|
+
schema: zod
|
|
793
|
+
.record(zod.string(), zod.any())
|
|
794
|
+
.optional()
|
|
795
|
+
.describe('The schema for the response format, described as a JSON Schema object.'),
|
|
796
|
+
strict: zod
|
|
797
|
+
.boolean()
|
|
798
|
+
.nullish()
|
|
799
|
+
.describe('Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).')
|
|
800
|
+
})
|
|
801
|
+
}))
|
|
802
|
+
.optional()
|
|
803
|
+
.describe('Response format that the model output should adhere to. This is the same as the OpenAI definition.\nCompatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.\n'),
|
|
804
|
+
tools: zod
|
|
805
|
+
.array(zod.object({
|
|
806
|
+
type: zod
|
|
807
|
+
.enum(['function'])
|
|
808
|
+
.describe('The type of the tool. Currently, only `function` is supported.'),
|
|
809
|
+
function: zod.object({
|
|
810
|
+
description: zod
|
|
811
|
+
.string()
|
|
812
|
+
.optional()
|
|
813
|
+
.describe('A description of what the function does, used by the model to choose when and how to call the function.'),
|
|
814
|
+
name: zod
|
|
815
|
+
.string()
|
|
816
|
+
.max(registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecToolsItemFunctionNameMax)
|
|
817
|
+
.regex(registryControllerPromptControllerParsePromptTemplateByNameVersionResponseResourceSpecToolsItemFunctionNameRegExp)
|
|
818
|
+
.describe('The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'),
|
|
819
|
+
parameters: zod
|
|
820
|
+
.record(zod.string(), zod.any())
|
|
821
|
+
.optional()
|
|
822
|
+
.describe('The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'),
|
|
823
|
+
strict: zod
|
|
824
|
+
.boolean()
|
|
825
|
+
.nullish()
|
|
826
|
+
.describe('Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).')
|
|
827
|
+
})
|
|
828
|
+
}))
|
|
829
|
+
.optional()
|
|
830
|
+
.describe('A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.\n')
|
|
831
|
+
})
|
|
832
|
+
.optional()
|
|
833
|
+
})
|
|
834
|
+
.optional()
|
|
835
|
+
});
|
|
836
|
+
//# sourceMappingURL=prompt-registry.zod.js.map
|