@orq-ai/node 3.8.0-rc.3 → 3.8.0-rc.31

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.
Files changed (271) hide show
  1. package/FUNCTIONS.md +3 -5
  2. package/README.md +91 -95
  3. package/bin/mcp-server.js +2288 -883
  4. package/bin/mcp-server.js.map +71 -65
  5. package/docs/sdks/contacts/README.md +30 -2
  6. package/docs/sdks/knowledge/README.md +1 -1
  7. package/docs/sdks/orq/README.md +138 -0
  8. package/funcs/filesCreate.d.ts.map +1 -1
  9. package/funcs/filesCreate.js +7 -3
  10. package/funcs/filesCreate.js.map +1 -1
  11. package/funcs/getV2ModelsLitellmModels.d.ts +17 -0
  12. package/funcs/getV2ModelsLitellmModels.d.ts.map +1 -0
  13. package/funcs/getV2ModelsLitellmModels.js +105 -0
  14. package/funcs/getV2ModelsLitellmModels.js.map +1 -0
  15. package/funcs/knowledgeCreateChunks.d.ts +1 -1
  16. package/funcs/knowledgeCreateChunks.d.ts.map +1 -1
  17. package/funcs/knowledgeCreateChunks.js +1 -1
  18. package/funcs/knowledgeCreateChunks.js.map +1 -1
  19. package/funcs/postV2ModelsLitellmImport.d.ts +17 -0
  20. package/funcs/postV2ModelsLitellmImport.d.ts.map +1 -0
  21. package/funcs/postV2ModelsLitellmImport.js +117 -0
  22. package/funcs/postV2ModelsLitellmImport.js.map +1 -0
  23. package/jsr.json +1 -1
  24. package/lib/config.d.ts +3 -3
  25. package/lib/config.js +3 -3
  26. package/lib/config.js.map +1 -1
  27. package/lib/files.d.ts +5 -0
  28. package/lib/files.d.ts.map +1 -1
  29. package/lib/files.js +41 -0
  30. package/lib/files.js.map +1 -1
  31. package/lib/security.d.ts +2 -2
  32. package/lib/security.d.ts.map +1 -1
  33. package/mcp-server/mcp-server.js +1 -1
  34. package/mcp-server/mcp-server.js.map +1 -1
  35. package/mcp-server/server.d.ts.map +1 -1
  36. package/mcp-server/server.js +5 -1
  37. package/mcp-server/server.js.map +1 -1
  38. package/mcp-server/tools/getV2ModelsLitellmModels.d.ts +3 -0
  39. package/mcp-server/tools/getV2ModelsLitellmModels.d.ts.map +1 -0
  40. package/mcp-server/tools/getV2ModelsLitellmModels.js +26 -0
  41. package/mcp-server/tools/getV2ModelsLitellmModels.js.map +1 -0
  42. package/mcp-server/tools/postV2ModelsLitellmImport.d.ts +9 -0
  43. package/mcp-server/tools/postV2ModelsLitellmImport.d.ts.map +1 -0
  44. package/mcp-server/tools/postV2ModelsLitellmImport.js +65 -0
  45. package/mcp-server/tools/postV2ModelsLitellmImport.js.map +1 -0
  46. package/models/components/deployments.d.ts +8 -8
  47. package/models/components/deployments.d.ts.map +1 -1
  48. package/models/components/deployments.js +8 -8
  49. package/models/components/deployments.js.map +1 -1
  50. package/models/operations/createchunk.d.ts +28 -28
  51. package/models/operations/createchunk.d.ts.map +1 -1
  52. package/models/operations/createchunk.js +35 -33
  53. package/models/operations/createchunk.js.map +1 -1
  54. package/models/operations/createcontact.js +2 -2
  55. package/models/operations/createdataset.js +2 -2
  56. package/models/operations/createdatasetitem.d.ts +8 -8
  57. package/models/operations/createdatasetitem.d.ts.map +1 -1
  58. package/models/operations/createdatasetitem.js +10 -10
  59. package/models/operations/createdatasetitem.js.map +1 -1
  60. package/models/operations/createdatasource.js +2 -2
  61. package/models/operations/createeval.d.ts +36 -36
  62. package/models/operations/createeval.d.ts.map +1 -1
  63. package/models/operations/createeval.js +56 -56
  64. package/models/operations/createeval.js.map +1 -1
  65. package/models/operations/createfeedback.d.ts +8 -8
  66. package/models/operations/createfeedback.d.ts.map +1 -1
  67. package/models/operations/createfeedback.js +8 -8
  68. package/models/operations/createfeedback.js.map +1 -1
  69. package/models/operations/createprompt.d.ts +24 -18
  70. package/models/operations/createprompt.d.ts.map +1 -1
  71. package/models/operations/createprompt.js +20 -18
  72. package/models/operations/createprompt.js.map +1 -1
  73. package/models/operations/deploymentcreatemetric.d.ts +8 -8
  74. package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
  75. package/models/operations/deploymentcreatemetric.js +8 -8
  76. package/models/operations/deploymentcreatemetric.js.map +1 -1
  77. package/models/operations/deploymentgetconfig.d.ts +29 -29
  78. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  79. package/models/operations/deploymentgetconfig.js +32 -32
  80. package/models/operations/deploymentgetconfig.js.map +1 -1
  81. package/models/operations/deploymentinvoke.d.ts +7 -4
  82. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  83. package/models/operations/deploymentinvoke.js +9 -8
  84. package/models/operations/deploymentinvoke.js.map +1 -1
  85. package/models/operations/deployments.d.ts +9 -6
  86. package/models/operations/deployments.d.ts.map +1 -1
  87. package/models/operations/deployments.js +7 -6
  88. package/models/operations/deployments.js.map +1 -1
  89. package/models/operations/deploymentstream.d.ts +12 -12
  90. package/models/operations/deploymentstream.d.ts.map +1 -1
  91. package/models/operations/deploymentstream.js +12 -12
  92. package/models/operations/deploymentstream.js.map +1 -1
  93. package/models/operations/evalsageappropriate.d.ts +2 -2
  94. package/models/operations/evalsageappropriate.js +2 -2
  95. package/models/operations/evalsfactcheckingknowledgebase.d.ts +2 -2
  96. package/models/operations/evalsfactcheckingknowledgebase.js +2 -2
  97. package/models/operations/evalsgrammar.d.ts +2 -2
  98. package/models/operations/evalsgrammar.js +2 -2
  99. package/models/operations/evalslocalization.d.ts +2 -2
  100. package/models/operations/evalslocalization.js +2 -2
  101. package/models/operations/evalspii.d.ts +2 -2
  102. package/models/operations/evalspii.js +2 -2
  103. package/models/operations/evalsragascoherence.d.ts +2 -2
  104. package/models/operations/evalsragascoherence.js +2 -2
  105. package/models/operations/evalsragasconciseness.d.ts +2 -2
  106. package/models/operations/evalsragasconciseness.js +2 -2
  107. package/models/operations/evalsragascontextprecision.d.ts +2 -2
  108. package/models/operations/evalsragascontextprecision.js +2 -2
  109. package/models/operations/evalsragascorrectness.d.ts +2 -2
  110. package/models/operations/evalsragascorrectness.js +2 -2
  111. package/models/operations/evalsragasfaithfulness.d.ts +2 -2
  112. package/models/operations/evalsragasfaithfulness.js +2 -2
  113. package/models/operations/evalsragasharmfulness.d.ts +2 -2
  114. package/models/operations/evalsragasharmfulness.js +2 -2
  115. package/models/operations/evalsragasmaliciousness.d.ts +2 -2
  116. package/models/operations/evalsragasmaliciousness.js +2 -2
  117. package/models/operations/evalsragasresponserelevancy.d.ts +2 -2
  118. package/models/operations/evalsragasresponserelevancy.js +2 -2
  119. package/models/operations/evalssentimentclassification.d.ts +2 -2
  120. package/models/operations/evalssentimentclassification.js +2 -2
  121. package/models/operations/evalssummarization.d.ts +2 -2
  122. package/models/operations/evalssummarization.js +2 -2
  123. package/models/operations/evalstoneofvoice.d.ts +2 -2
  124. package/models/operations/evalstoneofvoice.js +2 -2
  125. package/models/operations/evalstranslation.d.ts +2 -2
  126. package/models/operations/evalstranslation.js +2 -2
  127. package/models/operations/fileget.js +2 -2
  128. package/models/operations/filelist.js +2 -2
  129. package/models/operations/fileupload.js +2 -2
  130. package/models/operations/getallprompts.d.ts +13 -10
  131. package/models/operations/getallprompts.d.ts.map +1 -1
  132. package/models/operations/getallprompts.js +11 -10
  133. package/models/operations/getallprompts.js.map +1 -1
  134. package/models/operations/getevals.d.ts +88 -88
  135. package/models/operations/getevals.d.ts.map +1 -1
  136. package/models/operations/getevals.js +187 -182
  137. package/models/operations/getevals.js.map +1 -1
  138. package/models/operations/getoneprompt.d.ts +13 -10
  139. package/models/operations/getoneprompt.d.ts.map +1 -1
  140. package/models/operations/getoneprompt.js +11 -10
  141. package/models/operations/getoneprompt.js.map +1 -1
  142. package/models/operations/getpromptversion.d.ts +13 -10
  143. package/models/operations/getpromptversion.d.ts.map +1 -1
  144. package/models/operations/getpromptversion.js +11 -10
  145. package/models/operations/getpromptversion.js.map +1 -1
  146. package/models/operations/getv2modelslitellmmodels.d.ts +185 -0
  147. package/models/operations/getv2modelslitellmmodels.d.ts.map +1 -0
  148. package/models/operations/getv2modelslitellmmodels.js +349 -0
  149. package/models/operations/getv2modelslitellmmodels.js.map +1 -0
  150. package/models/operations/index.d.ts +2 -0
  151. package/models/operations/index.d.ts.map +1 -1
  152. package/models/operations/index.js +2 -0
  153. package/models/operations/index.js.map +1 -1
  154. package/models/operations/invokeeval.d.ts +108 -108
  155. package/models/operations/invokeeval.d.ts.map +1 -1
  156. package/models/operations/invokeeval.js +141 -144
  157. package/models/operations/invokeeval.js.map +1 -1
  158. package/models/operations/listcontacts.js +2 -2
  159. package/models/operations/listdatasetdatapoints.d.ts +4 -4
  160. package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
  161. package/models/operations/listdatasetdatapoints.js +6 -6
  162. package/models/operations/listdatasetdatapoints.js.map +1 -1
  163. package/models/operations/listdatasets.js +2 -2
  164. package/models/operations/listdatasources.js +2 -2
  165. package/models/operations/listpromptversions.d.ts +13 -10
  166. package/models/operations/listpromptversions.d.ts.map +1 -1
  167. package/models/operations/listpromptversions.js +11 -10
  168. package/models/operations/listpromptversions.js.map +1 -1
  169. package/models/operations/postv2modelslitellmimport.d.ts +1333 -0
  170. package/models/operations/postv2modelslitellmimport.d.ts.map +1 -0
  171. package/models/operations/postv2modelslitellmimport.js +1400 -0
  172. package/models/operations/postv2modelslitellmimport.js.map +1 -0
  173. package/models/operations/retrievecontact.js +2 -2
  174. package/models/operations/retrievedatapoint.d.ts +4 -4
  175. package/models/operations/retrievedatapoint.d.ts.map +1 -1
  176. package/models/operations/retrievedatapoint.js +6 -6
  177. package/models/operations/retrievedatapoint.js.map +1 -1
  178. package/models/operations/retrievedataset.js +2 -2
  179. package/models/operations/retrievedatasource.js +2 -2
  180. package/models/operations/updatecontact.js +2 -2
  181. package/models/operations/updatedatapoint.d.ts +8 -8
  182. package/models/operations/updatedatapoint.d.ts.map +1 -1
  183. package/models/operations/updatedatapoint.js +10 -10
  184. package/models/operations/updatedatapoint.js.map +1 -1
  185. package/models/operations/updatedataset.js +2 -2
  186. package/models/operations/updatedatasource.js +2 -2
  187. package/models/operations/updateeval.d.ts +38 -38
  188. package/models/operations/updateeval.d.ts.map +1 -1
  189. package/models/operations/updateeval.js +60 -60
  190. package/models/operations/updateeval.js.map +1 -1
  191. package/models/operations/updateprompt.d.ts +33 -86
  192. package/models/operations/updateprompt.d.ts.map +1 -1
  193. package/models/operations/updateprompt.js +41 -64
  194. package/models/operations/updateprompt.js.map +1 -1
  195. package/package.json +1 -1
  196. package/sdk/knowledge.d.ts +1 -1
  197. package/sdk/knowledge.d.ts.map +1 -1
  198. package/sdk/sdk.d.ts +16 -1
  199. package/sdk/sdk.d.ts.map +1 -1
  200. package/sdk/sdk.js +21 -0
  201. package/sdk/sdk.js.map +1 -1
  202. package/src/funcs/filesCreate.ts +11 -4
  203. package/src/funcs/getV2ModelsLitellmModels.ts +143 -0
  204. package/src/funcs/knowledgeCreateChunks.ts +4 -4
  205. package/src/funcs/postV2ModelsLitellmImport.ts +167 -0
  206. package/src/lib/config.ts +3 -3
  207. package/src/lib/files.ts +42 -0
  208. package/src/lib/security.ts +2 -2
  209. package/src/mcp-server/mcp-server.ts +1 -1
  210. package/src/mcp-server/server.ts +5 -1
  211. package/src/mcp-server/tools/getV2ModelsLitellmModels.ts +30 -0
  212. package/src/mcp-server/tools/postV2ModelsLitellmImport.ts +38 -0
  213. package/src/models/components/deployments.ts +16 -16
  214. package/src/models/operations/createchunk.ts +54 -44
  215. package/src/models/operations/createcontact.ts +2 -2
  216. package/src/models/operations/createdataset.ts +2 -2
  217. package/src/models/operations/createdatasetitem.ts +18 -18
  218. package/src/models/operations/createdatasource.ts +2 -2
  219. package/src/models/operations/createeval.ts +121 -121
  220. package/src/models/operations/createfeedback.ts +16 -16
  221. package/src/models/operations/createprompt.ts +41 -39
  222. package/src/models/operations/deploymentcreatemetric.ts +22 -18
  223. package/src/models/operations/deploymentgetconfig.ts +60 -54
  224. package/src/models/operations/deploymentinvoke.ts +14 -13
  225. package/src/models/operations/deployments.ts +15 -14
  226. package/src/models/operations/deploymentstream.ts +26 -26
  227. package/src/models/operations/evalsageappropriate.ts +4 -4
  228. package/src/models/operations/evalsfactcheckingknowledgebase.ts +4 -4
  229. package/src/models/operations/evalsgrammar.ts +4 -4
  230. package/src/models/operations/evalslocalization.ts +4 -4
  231. package/src/models/operations/evalspii.ts +4 -4
  232. package/src/models/operations/evalsragascoherence.ts +4 -4
  233. package/src/models/operations/evalsragasconciseness.ts +4 -4
  234. package/src/models/operations/evalsragascontextprecision.ts +4 -4
  235. package/src/models/operations/evalsragascorrectness.ts +4 -4
  236. package/src/models/operations/evalsragasfaithfulness.ts +4 -4
  237. package/src/models/operations/evalsragasharmfulness.ts +4 -4
  238. package/src/models/operations/evalsragasmaliciousness.ts +4 -4
  239. package/src/models/operations/evalsragasresponserelevancy.ts +4 -4
  240. package/src/models/operations/evalssentimentclassification.ts +4 -4
  241. package/src/models/operations/evalssummarization.ts +4 -4
  242. package/src/models/operations/evalstoneofvoice.ts +4 -4
  243. package/src/models/operations/evalstranslation.ts +4 -4
  244. package/src/models/operations/fileget.ts +2 -2
  245. package/src/models/operations/filelist.ts +2 -2
  246. package/src/models/operations/fileupload.ts +2 -2
  247. package/src/models/operations/getallprompts.ts +23 -22
  248. package/src/models/operations/getevals.ts +339 -364
  249. package/src/models/operations/getoneprompt.ts +23 -22
  250. package/src/models/operations/getpromptversion.ts +23 -22
  251. package/src/models/operations/getv2modelslitellmmodels.ts +530 -0
  252. package/src/models/operations/index.ts +2 -0
  253. package/src/models/operations/invokeeval.ts +251 -223
  254. package/src/models/operations/listcontacts.ts +2 -2
  255. package/src/models/operations/listdatasetdatapoints.ts +16 -12
  256. package/src/models/operations/listdatasets.ts +2 -2
  257. package/src/models/operations/listdatasources.ts +2 -2
  258. package/src/models/operations/listpromptversions.ts +23 -22
  259. package/src/models/operations/postv2modelslitellmimport.ts +2408 -0
  260. package/src/models/operations/retrievecontact.ts +2 -2
  261. package/src/models/operations/retrievedatapoint.ts +10 -10
  262. package/src/models/operations/retrievedataset.ts +2 -2
  263. package/src/models/operations/retrievedatasource.ts +2 -2
  264. package/src/models/operations/updatecontact.ts +2 -2
  265. package/src/models/operations/updatedatapoint.ts +21 -19
  266. package/src/models/operations/updatedataset.ts +2 -2
  267. package/src/models/operations/updatedatasource.ts +2 -2
  268. package/src/models/operations/updateeval.ts +139 -139
  269. package/src/models/operations/updateprompt.ts +63 -106
  270. package/src/sdk/knowledge.ts +1 -1
  271. package/src/sdk/sdk.ts +37 -1
@@ -9,25 +9,6 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- /**
13
- * The modality of the model
14
- */
15
- export const UpdatePromptModelType = {
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 modality of the model
28
- */
29
- export type UpdatePromptModelType = ClosedEnum<typeof UpdatePromptModelType>;
30
-
31
12
  /**
32
13
  * Only supported on `image` models.
33
14
  */
@@ -62,7 +43,7 @@ export type UpdatePromptResponseFormatType = ClosedEnum<
62
43
 
63
44
  export type ResponseFormatJsonSchema = {
64
45
  name: string;
65
- strict: boolean;
46
+ strict?: boolean | undefined;
66
47
  schema: { [k: string]: any };
67
48
  };
68
49
 
@@ -83,8 +64,8 @@ export type UpdatePromptResponseFormat1 = {
83
64
  * 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.
84
65
  */
85
66
  export type UpdatePromptResponseFormat =
86
- | UpdatePromptResponseFormat2
87
- | UpdatePromptResponseFormat1;
67
+ | UpdatePromptResponseFormat1
68
+ | UpdatePromptResponseFormat2;
88
69
 
89
70
  /**
90
71
  * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
@@ -193,8 +174,8 @@ export type UpdatePromptModelParameters = {
193
174
  * 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.
194
175
  */
195
176
  responseFormat?:
196
- | UpdatePromptResponseFormat2
197
177
  | UpdatePromptResponseFormat1
178
+ | UpdatePromptResponseFormat2
198
179
  | null
199
180
  | undefined;
200
181
  /**
@@ -234,6 +215,7 @@ export const UpdatePromptProvider = {
234
215
  Jina: "jina",
235
216
  Togetherai: "togetherai",
236
217
  Elevenlabs: "elevenlabs",
218
+ Litellm: "litellm",
237
219
  } as const;
238
220
  export type UpdatePromptProvider = ClosedEnum<typeof UpdatePromptProvider>;
239
221
 
@@ -371,16 +353,9 @@ export type UpdatePromptMessages = {
371
353
  toolCallId?: string | undefined;
372
354
  };
373
355
 
374
- /**
375
- * A list of messages compatible with the openAI schema
376
- */
377
356
  export type UpdatePromptPromptConfig = {
378
357
  stream?: boolean | undefined;
379
358
  model?: string | undefined;
380
- /**
381
- * The modality of the model
382
- */
383
- modelType?: UpdatePromptModelType | undefined;
384
359
  /**
385
360
  * Model Parameters: Not all parameters apply to every model
386
361
  */
@@ -388,6 +363,8 @@ export type UpdatePromptPromptConfig = {
388
363
  provider?: UpdatePromptProvider | undefined;
389
364
  version?: string | undefined;
390
365
  messages: Array<UpdatePromptMessages>;
366
+ modelDbId?: string | null | undefined;
367
+ modelType?: string | null | undefined;
391
368
  };
392
369
 
393
370
  export const UpdatePromptUseCases = {
@@ -457,9 +434,6 @@ export type UpdatePromptRequestBody = {
457
434
  * 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
458
435
  */
459
436
  description?: string | null | undefined;
460
- /**
461
- * A list of messages compatible with the openAI schema
462
- */
463
437
  promptConfig?: UpdatePromptPromptConfig | undefined;
464
438
  metadata?: UpdatePromptMetadata | undefined;
465
439
  /**
@@ -486,7 +460,7 @@ export type UpdatePromptPromptsType = ClosedEnum<
486
460
  /**
487
461
  * The modality of the model
488
462
  */
489
- export const UpdatePromptPromptsModelType = {
463
+ export const UpdatePromptModelType = {
490
464
  Chat: "chat",
491
465
  Completion: "completion",
492
466
  Embedding: "embedding",
@@ -500,9 +474,7 @@ export const UpdatePromptPromptsModelType = {
500
474
  /**
501
475
  * The modality of the model
502
476
  */
503
- export type UpdatePromptPromptsModelType = ClosedEnum<
504
- typeof UpdatePromptPromptsModelType
505
- >;
477
+ export type UpdatePromptModelType = ClosedEnum<typeof UpdatePromptModelType>;
506
478
 
507
479
  /**
508
480
  * Only supported on `image` models.
@@ -540,7 +512,7 @@ export type UpdatePromptResponseFormatPromptsResponseType = ClosedEnum<
540
512
 
541
513
  export type UpdatePromptResponseFormatJsonSchema = {
542
514
  name: string;
543
- strict: boolean;
515
+ strict?: boolean | undefined;
544
516
  schema: { [k: string]: any };
545
517
  };
546
518
 
@@ -561,8 +533,8 @@ export type UpdatePromptResponseFormatPrompts1 = {
561
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.
562
534
  */
563
535
  export type UpdatePromptPromptsResponseFormat =
564
- | UpdatePromptResponseFormatPrompts2
565
- | UpdatePromptResponseFormatPrompts1;
536
+ | UpdatePromptResponseFormatPrompts1
537
+ | UpdatePromptResponseFormatPrompts2;
566
538
 
567
539
  /**
568
540
  * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
@@ -671,8 +643,8 @@ export type UpdatePromptPromptsModelParameters = {
671
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.
672
644
  */
673
645
  responseFormat?:
674
- | UpdatePromptResponseFormatPrompts2
675
646
  | UpdatePromptResponseFormatPrompts1
647
+ | UpdatePromptResponseFormatPrompts2
676
648
  | null
677
649
  | undefined;
678
650
  /**
@@ -712,6 +684,7 @@ export const UpdatePromptPromptsProvider = {
712
684
  Jina: "jina",
713
685
  Togetherai: "togetherai",
714
686
  Elevenlabs: "elevenlabs",
687
+ Litellm: "litellm",
715
688
  } as const;
716
689
  export type UpdatePromptPromptsProvider = ClosedEnum<
717
690
  typeof UpdatePromptPromptsProvider
@@ -876,11 +849,11 @@ export type UpdatePromptPromptsPromptConfig = {
876
849
  /**
877
850
  * The id of the resource
878
851
  */
879
- modelDbId?: string | undefined;
852
+ modelDbId?: string | null | undefined;
880
853
  /**
881
854
  * The modality of the model
882
855
  */
883
- modelType?: UpdatePromptPromptsModelType | undefined;
856
+ modelType?: UpdatePromptModelType | null | undefined;
884
857
  /**
885
858
  * Model Parameters: Not all parameters apply to every model
886
859
  */
@@ -977,27 +950,6 @@ export type UpdatePromptResponseBody = {
977
950
  metadata?: UpdatePromptPromptsMetadata | undefined;
978
951
  };
979
952
 
980
- /** @internal */
981
- export const UpdatePromptModelType$inboundSchema: z.ZodNativeEnum<
982
- typeof UpdatePromptModelType
983
- > = z.nativeEnum(UpdatePromptModelType);
984
-
985
- /** @internal */
986
- export const UpdatePromptModelType$outboundSchema: z.ZodNativeEnum<
987
- typeof UpdatePromptModelType
988
- > = UpdatePromptModelType$inboundSchema;
989
-
990
- /**
991
- * @internal
992
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
993
- */
994
- export namespace UpdatePromptModelType$ {
995
- /** @deprecated use `UpdatePromptModelType$inboundSchema` instead. */
996
- export const inboundSchema = UpdatePromptModelType$inboundSchema;
997
- /** @deprecated use `UpdatePromptModelType$outboundSchema` instead. */
998
- export const outboundSchema = UpdatePromptModelType$outboundSchema;
999
- }
1000
-
1001
953
  /** @internal */
1002
954
  export const UpdatePromptFormat$inboundSchema: z.ZodNativeEnum<
1003
955
  typeof UpdatePromptFormat
@@ -1127,14 +1079,14 @@ export const ResponseFormatJsonSchema$inboundSchema: z.ZodType<
1127
1079
  unknown
1128
1080
  > = z.object({
1129
1081
  name: z.string(),
1130
- strict: z.boolean(),
1082
+ strict: z.boolean().optional(),
1131
1083
  schema: z.record(z.any()),
1132
1084
  });
1133
1085
 
1134
1086
  /** @internal */
1135
1087
  export type ResponseFormatJsonSchema$Outbound = {
1136
1088
  name: string;
1137
- strict: boolean;
1089
+ strict?: boolean | undefined;
1138
1090
  schema: { [k: string]: any };
1139
1091
  };
1140
1092
 
@@ -1145,7 +1097,7 @@ export const ResponseFormatJsonSchema$outboundSchema: z.ZodType<
1145
1097
  ResponseFormatJsonSchema
1146
1098
  > = z.object({
1147
1099
  name: z.string(),
1148
- strict: z.boolean(),
1100
+ strict: z.boolean().optional(),
1149
1101
  schema: z.record(z.any()),
1150
1102
  });
1151
1103
 
@@ -1253,14 +1205,14 @@ export const UpdatePromptResponseFormat$inboundSchema: z.ZodType<
1253
1205
  z.ZodTypeDef,
1254
1206
  unknown
1255
1207
  > = z.union([
1256
- z.lazy(() => UpdatePromptResponseFormat2$inboundSchema),
1257
1208
  z.lazy(() => UpdatePromptResponseFormat1$inboundSchema),
1209
+ z.lazy(() => UpdatePromptResponseFormat2$inboundSchema),
1258
1210
  ]);
1259
1211
 
1260
1212
  /** @internal */
1261
1213
  export type UpdatePromptResponseFormat$Outbound =
1262
- | UpdatePromptResponseFormat2$Outbound
1263
- | UpdatePromptResponseFormat1$Outbound;
1214
+ | UpdatePromptResponseFormat1$Outbound
1215
+ | UpdatePromptResponseFormat2$Outbound;
1264
1216
 
1265
1217
  /** @internal */
1266
1218
  export const UpdatePromptResponseFormat$outboundSchema: z.ZodType<
@@ -1268,8 +1220,8 @@ export const UpdatePromptResponseFormat$outboundSchema: z.ZodType<
1268
1220
  z.ZodTypeDef,
1269
1221
  UpdatePromptResponseFormat
1270
1222
  > = z.union([
1271
- z.lazy(() => UpdatePromptResponseFormat2$outboundSchema),
1272
1223
  z.lazy(() => UpdatePromptResponseFormat1$outboundSchema),
1224
+ z.lazy(() => UpdatePromptResponseFormat2$outboundSchema),
1273
1225
  ]);
1274
1226
 
1275
1227
  /**
@@ -1386,8 +1338,8 @@ export const UpdatePromptModelParameters$inboundSchema: z.ZodType<
1386
1338
  style: z.string().optional(),
1387
1339
  responseFormat: z.nullable(
1388
1340
  z.union([
1389
- z.lazy(() => UpdatePromptResponseFormat2$inboundSchema),
1390
1341
  z.lazy(() => UpdatePromptResponseFormat1$inboundSchema),
1342
+ z.lazy(() => UpdatePromptResponseFormat2$inboundSchema),
1391
1343
  ]),
1392
1344
  ).optional(),
1393
1345
  photoRealVersion: UpdatePromptPhotoRealVersion$inboundSchema.optional(),
@@ -1415,8 +1367,8 @@ export type UpdatePromptModelParameters$Outbound = {
1415
1367
  quality?: string | undefined;
1416
1368
  style?: string | undefined;
1417
1369
  responseFormat?:
1418
- | UpdatePromptResponseFormat2$Outbound
1419
1370
  | UpdatePromptResponseFormat1$Outbound
1371
+ | UpdatePromptResponseFormat2$Outbound
1420
1372
  | null
1421
1373
  | undefined;
1422
1374
  photoRealVersion?: string | undefined;
@@ -1445,8 +1397,8 @@ export const UpdatePromptModelParameters$outboundSchema: z.ZodType<
1445
1397
  style: z.string().optional(),
1446
1398
  responseFormat: z.nullable(
1447
1399
  z.union([
1448
- z.lazy(() => UpdatePromptResponseFormat2$outboundSchema),
1449
1400
  z.lazy(() => UpdatePromptResponseFormat1$outboundSchema),
1401
+ z.lazy(() => UpdatePromptResponseFormat2$outboundSchema),
1450
1402
  ]),
1451
1403
  ).optional(),
1452
1404
  photoRealVersion: UpdatePromptPhotoRealVersion$outboundSchema.optional(),
@@ -2255,16 +2207,18 @@ export const UpdatePromptPromptConfig$inboundSchema: z.ZodType<
2255
2207
  > = z.object({
2256
2208
  stream: z.boolean().optional(),
2257
2209
  model: z.string().optional(),
2258
- model_type: UpdatePromptModelType$inboundSchema.optional(),
2259
2210
  model_parameters: z.lazy(() => UpdatePromptModelParameters$inboundSchema)
2260
2211
  .optional(),
2261
2212
  provider: UpdatePromptProvider$inboundSchema.optional(),
2262
2213
  version: z.string().optional(),
2263
2214
  messages: z.array(z.lazy(() => UpdatePromptMessages$inboundSchema)),
2215
+ model_db_id: z.nullable(z.string()).optional(),
2216
+ model_type: z.nullable(z.string()).optional(),
2264
2217
  }).transform((v) => {
2265
2218
  return remap$(v, {
2266
- "model_type": "modelType",
2267
2219
  "model_parameters": "modelParameters",
2220
+ "model_db_id": "modelDbId",
2221
+ "model_type": "modelType",
2268
2222
  });
2269
2223
  });
2270
2224
 
@@ -2272,11 +2226,12 @@ export const UpdatePromptPromptConfig$inboundSchema: z.ZodType<
2272
2226
  export type UpdatePromptPromptConfig$Outbound = {
2273
2227
  stream?: boolean | undefined;
2274
2228
  model?: string | undefined;
2275
- model_type?: string | undefined;
2276
2229
  model_parameters?: UpdatePromptModelParameters$Outbound | undefined;
2277
2230
  provider?: string | undefined;
2278
2231
  version?: string | undefined;
2279
2232
  messages: Array<UpdatePromptMessages$Outbound>;
2233
+ model_db_id?: string | null | undefined;
2234
+ model_type?: string | null | undefined;
2280
2235
  };
2281
2236
 
2282
2237
  /** @internal */
@@ -2287,16 +2242,18 @@ export const UpdatePromptPromptConfig$outboundSchema: z.ZodType<
2287
2242
  > = z.object({
2288
2243
  stream: z.boolean().optional(),
2289
2244
  model: z.string().optional(),
2290
- modelType: UpdatePromptModelType$outboundSchema.optional(),
2291
2245
  modelParameters: z.lazy(() => UpdatePromptModelParameters$outboundSchema)
2292
2246
  .optional(),
2293
2247
  provider: UpdatePromptProvider$outboundSchema.optional(),
2294
2248
  version: z.string().optional(),
2295
2249
  messages: z.array(z.lazy(() => UpdatePromptMessages$outboundSchema)),
2250
+ modelDbId: z.nullable(z.string()).optional(),
2251
+ modelType: z.nullable(z.string()).optional(),
2296
2252
  }).transform((v) => {
2297
2253
  return remap$(v, {
2298
- modelType: "model_type",
2299
2254
  modelParameters: "model_parameters",
2255
+ modelDbId: "model_db_id",
2256
+ modelType: "model_type",
2300
2257
  });
2301
2258
  });
2302
2259
 
@@ -2627,24 +2584,24 @@ export namespace UpdatePromptPromptsType$ {
2627
2584
  }
2628
2585
 
2629
2586
  /** @internal */
2630
- export const UpdatePromptPromptsModelType$inboundSchema: z.ZodNativeEnum<
2631
- typeof UpdatePromptPromptsModelType
2632
- > = z.nativeEnum(UpdatePromptPromptsModelType);
2587
+ export const UpdatePromptModelType$inboundSchema: z.ZodNativeEnum<
2588
+ typeof UpdatePromptModelType
2589
+ > = z.nativeEnum(UpdatePromptModelType);
2633
2590
 
2634
2591
  /** @internal */
2635
- export const UpdatePromptPromptsModelType$outboundSchema: z.ZodNativeEnum<
2636
- typeof UpdatePromptPromptsModelType
2637
- > = UpdatePromptPromptsModelType$inboundSchema;
2592
+ export const UpdatePromptModelType$outboundSchema: z.ZodNativeEnum<
2593
+ typeof UpdatePromptModelType
2594
+ > = UpdatePromptModelType$inboundSchema;
2638
2595
 
2639
2596
  /**
2640
2597
  * @internal
2641
2598
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2642
2599
  */
2643
- export namespace UpdatePromptPromptsModelType$ {
2644
- /** @deprecated use `UpdatePromptPromptsModelType$inboundSchema` instead. */
2645
- export const inboundSchema = UpdatePromptPromptsModelType$inboundSchema;
2646
- /** @deprecated use `UpdatePromptPromptsModelType$outboundSchema` instead. */
2647
- export const outboundSchema = UpdatePromptPromptsModelType$outboundSchema;
2600
+ export namespace UpdatePromptModelType$ {
2601
+ /** @deprecated use `UpdatePromptModelType$inboundSchema` instead. */
2602
+ export const inboundSchema = UpdatePromptModelType$inboundSchema;
2603
+ /** @deprecated use `UpdatePromptModelType$outboundSchema` instead. */
2604
+ export const outboundSchema = UpdatePromptModelType$outboundSchema;
2648
2605
  }
2649
2606
 
2650
2607
  /** @internal */
@@ -2779,14 +2736,14 @@ export const UpdatePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
2779
2736
  unknown
2780
2737
  > = z.object({
2781
2738
  name: z.string(),
2782
- strict: z.boolean(),
2739
+ strict: z.boolean().optional(),
2783
2740
  schema: z.record(z.any()),
2784
2741
  });
2785
2742
 
2786
2743
  /** @internal */
2787
2744
  export type UpdatePromptResponseFormatJsonSchema$Outbound = {
2788
2745
  name: string;
2789
- strict: boolean;
2746
+ strict?: boolean | undefined;
2790
2747
  schema: { [k: string]: any };
2791
2748
  };
2792
2749
 
@@ -2797,7 +2754,7 @@ export const UpdatePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
2797
2754
  UpdatePromptResponseFormatJsonSchema
2798
2755
  > = z.object({
2799
2756
  name: z.string(),
2800
- strict: z.boolean(),
2757
+ strict: z.boolean().optional(),
2801
2758
  schema: z.record(z.any()),
2802
2759
  });
2803
2760
 
@@ -2912,14 +2869,14 @@ export const UpdatePromptPromptsResponseFormat$inboundSchema: z.ZodType<
2912
2869
  z.ZodTypeDef,
2913
2870
  unknown
2914
2871
  > = z.union([
2915
- z.lazy(() => UpdatePromptResponseFormatPrompts2$inboundSchema),
2916
2872
  z.lazy(() => UpdatePromptResponseFormatPrompts1$inboundSchema),
2873
+ z.lazy(() => UpdatePromptResponseFormatPrompts2$inboundSchema),
2917
2874
  ]);
2918
2875
 
2919
2876
  /** @internal */
2920
2877
  export type UpdatePromptPromptsResponseFormat$Outbound =
2921
- | UpdatePromptResponseFormatPrompts2$Outbound
2922
- | UpdatePromptResponseFormatPrompts1$Outbound;
2878
+ | UpdatePromptResponseFormatPrompts1$Outbound
2879
+ | UpdatePromptResponseFormatPrompts2$Outbound;
2923
2880
 
2924
2881
  /** @internal */
2925
2882
  export const UpdatePromptPromptsResponseFormat$outboundSchema: z.ZodType<
@@ -2927,8 +2884,8 @@ export const UpdatePromptPromptsResponseFormat$outboundSchema: z.ZodType<
2927
2884
  z.ZodTypeDef,
2928
2885
  UpdatePromptPromptsResponseFormat
2929
2886
  > = z.union([
2930
- z.lazy(() => UpdatePromptResponseFormatPrompts2$outboundSchema),
2931
2887
  z.lazy(() => UpdatePromptResponseFormatPrompts1$outboundSchema),
2888
+ z.lazy(() => UpdatePromptResponseFormatPrompts2$outboundSchema),
2932
2889
  ]);
2933
2890
 
2934
2891
  /**
@@ -3052,8 +3009,8 @@ export const UpdatePromptPromptsModelParameters$inboundSchema: z.ZodType<
3052
3009
  style: z.string().optional(),
3053
3010
  responseFormat: z.nullable(
3054
3011
  z.union([
3055
- z.lazy(() => UpdatePromptResponseFormatPrompts2$inboundSchema),
3056
3012
  z.lazy(() => UpdatePromptResponseFormatPrompts1$inboundSchema),
3013
+ z.lazy(() => UpdatePromptResponseFormatPrompts2$inboundSchema),
3057
3014
  ]),
3058
3015
  ).optional(),
3059
3016
  photoRealVersion: UpdatePromptPromptsPhotoRealVersion$inboundSchema
@@ -3082,8 +3039,8 @@ export type UpdatePromptPromptsModelParameters$Outbound = {
3082
3039
  quality?: string | undefined;
3083
3040
  style?: string | undefined;
3084
3041
  responseFormat?:
3085
- | UpdatePromptResponseFormatPrompts2$Outbound
3086
3042
  | UpdatePromptResponseFormatPrompts1$Outbound
3043
+ | UpdatePromptResponseFormatPrompts2$Outbound
3087
3044
  | null
3088
3045
  | undefined;
3089
3046
  photoRealVersion?: string | undefined;
@@ -3112,8 +3069,8 @@ export const UpdatePromptPromptsModelParameters$outboundSchema: z.ZodType<
3112
3069
  style: z.string().optional(),
3113
3070
  responseFormat: z.nullable(
3114
3071
  z.union([
3115
- z.lazy(() => UpdatePromptResponseFormatPrompts2$outboundSchema),
3116
3072
  z.lazy(() => UpdatePromptResponseFormatPrompts1$outboundSchema),
3073
+ z.lazy(() => UpdatePromptResponseFormatPrompts2$outboundSchema),
3117
3074
  ]),
3118
3075
  ).optional(),
3119
3076
  photoRealVersion: UpdatePromptPromptsPhotoRealVersion$outboundSchema
@@ -3956,8 +3913,8 @@ export const UpdatePromptPromptsPromptConfig$inboundSchema: z.ZodType<
3956
3913
  > = z.object({
3957
3914
  stream: z.boolean().optional(),
3958
3915
  model: z.string().optional(),
3959
- model_db_id: z.string().optional(),
3960
- model_type: UpdatePromptPromptsModelType$inboundSchema.optional(),
3916
+ model_db_id: z.nullable(z.string()).optional(),
3917
+ model_type: z.nullable(UpdatePromptModelType$inboundSchema).optional(),
3961
3918
  model_parameters: z.lazy(() =>
3962
3919
  UpdatePromptPromptsModelParameters$inboundSchema
3963
3920
  ).optional(),
@@ -3978,8 +3935,8 @@ export const UpdatePromptPromptsPromptConfig$inboundSchema: z.ZodType<
3978
3935
  export type UpdatePromptPromptsPromptConfig$Outbound = {
3979
3936
  stream?: boolean | undefined;
3980
3937
  model?: string | undefined;
3981
- model_db_id?: string | undefined;
3982
- model_type?: string | undefined;
3938
+ model_db_id?: string | null | undefined;
3939
+ model_type?: string | null | undefined;
3983
3940
  model_parameters?: UpdatePromptPromptsModelParameters$Outbound | undefined;
3984
3941
  provider?: string | undefined;
3985
3942
  integration_id?: string | null | undefined;
@@ -3995,8 +3952,8 @@ export const UpdatePromptPromptsPromptConfig$outboundSchema: z.ZodType<
3995
3952
  > = z.object({
3996
3953
  stream: z.boolean().optional(),
3997
3954
  model: z.string().optional(),
3998
- modelDbId: z.string().optional(),
3999
- modelType: UpdatePromptPromptsModelType$outboundSchema.optional(),
3955
+ modelDbId: z.nullable(z.string()).optional(),
3956
+ modelType: z.nullable(UpdatePromptModelType$outboundSchema).optional(),
4000
3957
  modelParameters: z.lazy(() =>
4001
3958
  UpdatePromptPromptsModelParameters$outboundSchema
4002
3959
  ).optional(),
@@ -198,7 +198,7 @@ export class Knowledge extends ClientSDK {
198
198
  async createChunks(
199
199
  request: operations.CreateChunkRequest,
200
200
  options?: RequestOptions,
201
- ): Promise<Array<operations.ResponseBody>> {
201
+ ): Promise<Array<operations.CreateChunkResponseBody>> {
202
202
  return unwrapAsync(knowledgeCreateChunks(
203
203
  this,
204
204
  request,
package/src/sdk/sdk.ts CHANGED
@@ -2,7 +2,11 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { ClientSDK } from "../lib/sdks.js";
5
+ import { getV2ModelsLitellmModels } from "../funcs/getV2ModelsLitellmModels.js";
6
+ import { postV2ModelsLitellmImport } from "../funcs/postV2ModelsLitellmImport.js";
7
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { unwrapAsync } from "../types/fp.js";
6
10
  import { Contacts } from "./contacts.js";
7
11
  import { Datasets } from "./datasets.js";
8
12
  import { Deployments } from "./deployments.js";
@@ -64,4 +68,36 @@ export class Orq extends ClientSDK {
64
68
  get evals(): Evals {
65
69
  return (this._evals ??= new Evals(this._options));
66
70
  }
71
+
72
+ /**
73
+ * Get available models from LiteLLM
74
+ *
75
+ * @remarks
76
+ * Fetches all available models from the configured LiteLLM instance
77
+ */
78
+ async getV2ModelsLitellmModels(
79
+ options?: RequestOptions,
80
+ ): Promise<Array<operations.ResponseBody>> {
81
+ return unwrapAsync(getV2ModelsLitellmModels(
82
+ this,
83
+ options,
84
+ ));
85
+ }
86
+
87
+ /**
88
+ * Import models from LiteLLM
89
+ *
90
+ * @remarks
91
+ * Imports selected models from LiteLLM instance into the model garden
92
+ */
93
+ async postV2ModelsLitellmImport(
94
+ request?: Array<operations.RequestBody> | undefined,
95
+ options?: RequestOptions,
96
+ ): Promise<Array<operations.PostV2ModelsLitellmImportResponseBody>> {
97
+ return unwrapAsync(postV2ModelsLitellmImport(
98
+ this,
99
+ request,
100
+ options,
101
+ ));
102
+ }
67
103
  }