@stack-spot/portal-network 0.184.0 → 0.185.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.
Files changed (136) hide show
  1. package/CHANGELOG.md +2419 -2412
  2. package/dist/api/account.js +1 -1
  3. package/dist/api/agent-tools.js +1 -1
  4. package/dist/api/agent.js +1 -1
  5. package/dist/api/ai.js +1 -1
  6. package/dist/api/apiManagement.js +1 -1
  7. package/dist/api/apiRuntime.js +1 -1
  8. package/dist/api/cloudAccount.js +1 -1
  9. package/dist/api/cloudPlatform.js +1 -1
  10. package/dist/api/cloudPlatformHorizon.js +1 -1
  11. package/dist/api/cloudRuntimes.js +1 -1
  12. package/dist/api/cloudServices.js +1 -1
  13. package/dist/api/codeShift.d.ts +63 -4
  14. package/dist/api/codeShift.d.ts.map +1 -1
  15. package/dist/api/codeShift.js +14 -1
  16. package/dist/api/codeShift.js.map +1 -1
  17. package/dist/api/content.js +1 -1
  18. package/dist/api/dataIntegration.js +1 -1
  19. package/dist/api/discover.js +1 -1
  20. package/dist/api/genAiInference.js +1 -1
  21. package/dist/api/insights.js +1 -1
  22. package/dist/api/notification.js +1 -1
  23. package/dist/api/secrets.js +1 -1
  24. package/dist/api/serviceCatalog.js +1 -1
  25. package/dist/api/workspace-ai.js +1 -1
  26. package/dist/api/workspace.js +1 -1
  27. package/dist/api/workspaceManager.js +1 -1
  28. package/dist/api/workspaceSearchEngine.js +1 -1
  29. package/dist/client/code-shift.d.ts +22 -0
  30. package/dist/client/code-shift.d.ts.map +1 -1
  31. package/dist/client/code-shift.js +28 -1
  32. package/dist/client/code-shift.js.map +1 -1
  33. package/package.json +6 -6
  34. package/scripts/generate-apis.ts +134 -134
  35. package/src/api/account.ts +8367 -8367
  36. package/src/api/agent-tools.ts +2169 -2169
  37. package/src/api/agent.ts +1083 -1083
  38. package/src/api/ai.ts +3388 -3388
  39. package/src/api/apiManagement.ts +570 -570
  40. package/src/api/apiRuntime.ts +2103 -2103
  41. package/src/api/cloudAccount.ts +1239 -1239
  42. package/src/api/cloudPlatform.ts +927 -927
  43. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  44. package/src/api/cloudRuntimes.ts +2043 -2043
  45. package/src/api/cloudServices.ts +1445 -1445
  46. package/src/api/codeShift.ts +3567 -3481
  47. package/src/api/content.ts +9785 -9785
  48. package/src/api/dataIntegration.ts +1657 -1657
  49. package/src/api/discover.ts +435 -435
  50. package/src/api/eventBus.ts +171 -171
  51. package/src/api/genAiInference.ts +603 -603
  52. package/src/api/insights.ts +310 -310
  53. package/src/api/notification.ts +334 -334
  54. package/src/api/secrets.ts +342 -342
  55. package/src/api/serviceCatalog.ts +2908 -2908
  56. package/src/api/workflows.ts +1669 -1669
  57. package/src/api/workspace-ai.ts +677 -677
  58. package/src/api/workspace.ts +5889 -5889
  59. package/src/api/workspaceManager.ts +2951 -2951
  60. package/src/api/workspaceSearchEngine.ts +153 -153
  61. package/src/api-addresses.ts +120 -120
  62. package/src/apis-itau.json +225 -225
  63. package/src/apis.json +225 -225
  64. package/src/client/account.ts +902 -902
  65. package/src/client/agent-tools.ts +210 -210
  66. package/src/client/agent.ts +81 -81
  67. package/src/client/ai.ts +395 -395
  68. package/src/client/api-management.ts +40 -40
  69. package/src/client/cloud-account.ts +70 -70
  70. package/src/client/cloud-platform-horizon.ts +113 -113
  71. package/src/client/cloud-platform.ts +163 -163
  72. package/src/client/cloud-runtimes.ts +129 -129
  73. package/src/client/cloud-services.ts +94 -94
  74. package/src/client/code-shift.ts +364 -349
  75. package/src/client/content.ts +538 -538
  76. package/src/client/data-integration.ts +191 -191
  77. package/src/client/discover.ts +89 -89
  78. package/src/client/event-bus.ts +84 -84
  79. package/src/client/gen-ai-inference.ts +65 -65
  80. package/src/client/insights.ts +28 -28
  81. package/src/client/notification.ts +32 -32
  82. package/src/client/runtime-manager.ts +76 -76
  83. package/src/client/secrets.ts +60 -60
  84. package/src/client/types.ts +377 -377
  85. package/src/client/workflow.ts +83 -83
  86. package/src/client/workspace-ai.ts +191 -191
  87. package/src/client/workspace-manager.ts +564 -564
  88. package/src/client/workspace-search.ts +39 -39
  89. package/src/client/workspace.ts +480 -480
  90. package/src/error/DefaultAPIError.ts +151 -151
  91. package/src/error/FileUploadError.ts +18 -18
  92. package/src/error/IgnoredErrorCodes.ts +3 -3
  93. package/src/error/StackspotAPIError.ts +101 -101
  94. package/src/error/StreamCanceledError.ts +10 -10
  95. package/src/error/StreamError.ts +7 -7
  96. package/src/error/StreamJsonError.ts +10 -10
  97. package/src/error/dictionary/account.ts +58 -58
  98. package/src/error/dictionary/action-details.ts +20 -20
  99. package/src/error/dictionary/action.ts +211 -211
  100. package/src/error/dictionary/agent-tools.ts +75 -75
  101. package/src/error/dictionary/ai-inference.ts +28 -28
  102. package/src/error/dictionary/base.ts +22 -22
  103. package/src/error/dictionary/cloud-platform.ts +82 -82
  104. package/src/error/dictionary/cnt-fields.ts +14 -14
  105. package/src/error/dictionary/cnt.ts +103 -103
  106. package/src/error/dictionary/code-shift.ts +12 -12
  107. package/src/error/dictionary/rte.ts +24 -24
  108. package/src/error/dictionary/rtm.ts +10 -10
  109. package/src/error/dictionary/secrets.ts +14 -14
  110. package/src/error/dictionary/workspace-ai.ts +10 -10
  111. package/src/error/dictionary/workspace-details.ts +15 -15
  112. package/src/error/dictionary/workspace-fields.ts +10 -10
  113. package/src/error/dictionary/workspace.ts +209 -209
  114. package/src/error/types.ts +21 -21
  115. package/src/index.ts +43 -43
  116. package/src/network/AutoInfiniteQuery.ts +115 -115
  117. package/src/network/AutoMutation.ts +27 -27
  118. package/src/network/AutoOperation.ts +73 -73
  119. package/src/network/AutoQuery.ts +75 -75
  120. package/src/network/ManualInfiniteQuery.ts +95 -95
  121. package/src/network/ManualMutation.ts +40 -40
  122. package/src/network/ManualOperation.ts +52 -52
  123. package/src/network/ManualQuery.ts +82 -82
  124. package/src/network/NetworkClient.ts +167 -167
  125. package/src/network/ReactQueryNetworkClient.ts +312 -312
  126. package/src/network/react-query-client.ts +14 -14
  127. package/src/network/types.ts +294 -294
  128. package/src/types.ts +1 -1
  129. package/src/utils/StreamedArray.tsx +146 -146
  130. package/src/utils/StreamedJson.tsx +166 -166
  131. package/src/utils/remove-authorization-param.ts +6 -6
  132. package/src/utils/string.ts +19 -19
  133. package/src/utils/use-extended-list.ts +80 -80
  134. package/src/utils/use-streamed-array.ts +17 -17
  135. package/tsconfig.build.json +4 -4
  136. package/tsconfig.json +10 -10
@@ -1,603 +1,603 @@
1
- /**
2
- * FastAPI
3
- * 0.1.0
4
- * DO NOT MODIFY - This file has been generated using oazapfts.
5
- * See https://www.npmjs.com/package/oazapfts
6
- */
7
- import * as Oazapfts from "@oazapfts/runtime";
8
- import * as QS from "@oazapfts/runtime/query";
9
- export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
- headers: {},
11
- baseUrl: "/",
12
- };
13
- const oazapfts = Oazapfts.runtime(defaults);
14
- export const servers = {};
15
- export type LlmRoles = "system" | "user" | "assistant" | "function" | "tool";
16
- export type SendMessage = {
17
- role: LlmRoles;
18
- content: string;
19
- };
20
- export type SendConversation = {
21
- model_name: string;
22
- messages: SendMessage[];
23
- temperature?: number | null;
24
- json_schema?: {
25
- [key: string]: any;
26
- } | null;
27
- is_azure?: boolean | null;
28
- max_tokens?: number | null;
29
- };
30
- export type MessageRepresentation = {
31
- /** The role of the sender of the message (e.g., 'user', 'assistant', 'system', 'tool'). */
32
- role: string;
33
- /** The content of the message. */
34
- content: string;
35
- /** The name of the sender, if applicable. */
36
- name?: string | null;
37
- /** A dictionary representing a function call, if applicable. */
38
- function_call?: {
39
- [key: string]: any;
40
- } | null;
41
- };
42
- export type ChoiceRepresentation = {
43
- message: MessageRepresentation;
44
- finish_reason: string;
45
- index: number;
46
- };
47
- export type UsageRepresentation = {
48
- prompt_tokens: number;
49
- completion_tokens: number;
50
- total_tokens: number;
51
- };
52
- export type MetricsRepresentation = {
53
- latency_ms: number;
54
- };
55
- export type ConversationRepresentation = {
56
- id: string;
57
- choices: ChoiceRepresentation[];
58
- created: string;
59
- model: string;
60
- "object"?: string;
61
- usage: UsageRepresentation;
62
- metrics?: MetricsRepresentation | null;
63
- };
64
- export type ValidationError = {
65
- loc: (string | number)[];
66
- msg: string;
67
- "type": string;
68
- };
69
- export type HttpValidationError = {
70
- detail?: ValidationError[];
71
- };
72
- export type ResourceName = "agents" | "deep_ks" | "autocomplete";
73
- export type LlmModelResourceRequest = {
74
- name: ResourceName;
75
- is_default?: boolean;
76
- };
77
- export type CreateLlmModelRequest = {
78
- display_name: string;
79
- provider_name: string;
80
- model_name: string;
81
- connection_params: {
82
- [key: string]: any;
83
- };
84
- resources: LlmModelResourceRequest[];
85
- };
86
- export type LlmProviderResponse = {
87
- name: string;
88
- provider_type: string;
89
- configuration_params?: {
90
- [key: string]: any;
91
- } | null;
92
- accepts_self_hosted?: boolean | null;
93
- };
94
- export type LlmModelConfigurationResponse = {
95
- provider: LlmProviderResponse;
96
- model_name: string;
97
- connection_params: {
98
- [key: string]: any;
99
- } | null;
100
- usage_params: {
101
- [key: string]: any;
102
- } | null;
103
- };
104
- export type LlmModelResourcesResponse = {
105
- id: string;
106
- name: string;
107
- is_default: boolean;
108
- };
109
- export type LlmModelsResponse = {
110
- id: string;
111
- active: boolean;
112
- display_name: string;
113
- self_hosted: boolean;
114
- model_configuration: LlmModelConfigurationResponse;
115
- resources: LlmModelResourcesResponse[];
116
- created_at: string;
117
- updated_at: string;
118
- updated_by: string;
119
- };
120
- export type OrderBy = "default" | "display_name" | "model_name" | "type" | "status";
121
- export type OrderDir = "asc" | "desc" | "stackspot_hosted" | "self_hosted" | "active" | "inactive";
122
- export type PaginatedResponseLlmModelsResponse = {
123
- total_pages: number;
124
- items: LlmModelsResponse[];
125
- };
126
- export type ToggleModelStatusRequest = {
127
- active: boolean;
128
- };
129
- export type UpdateLlmModelRequest = {
130
- display_name: string;
131
- model_name: string;
132
- connection_params: {
133
- [key: string]: any;
134
- };
135
- resources: LlmModelResourceRequest[];
136
- };
137
- export type UpdateLlmModelResourceRequest = {
138
- name: string;
139
- is_default?: boolean;
140
- };
141
- export type LlmSimpleProviderResponse = {
142
- name: string;
143
- provider_type: string;
144
- configuration_params: {
145
- [key: string]: any;
146
- };
147
- accepts_self_hosted: boolean;
148
- model_names: string[];
149
- };
150
- export type TextParam = {
151
- text: string;
152
- "type"?: "text";
153
- };
154
- export type UrlParam = {
155
- url: string;
156
- };
157
- export type ImageParam = {
158
- image_url: UrlParam;
159
- "type"?: "image_url";
160
- };
161
- export type FunctionCall = {
162
- /** The name of the function to call */
163
- name: string;
164
- /** A JSON string representing the function arguments */
165
- arguments: string;
166
- };
167
- export type Message = {
168
- /** The role of the message (system, user, assistant, or function) */
169
- role: LlmRoles;
170
- /** The content of the message, can be a string or a list of content blocks */
171
- content?: string | (TextParam | ImageParam)[];
172
- /** The name of the sender (optional) */
173
- name?: string | null;
174
- /** Details of a function call (optional) */
175
- function_call?: FunctionCall | null;
176
- /** Details of a function call (optional) */
177
- tool_calls?: {
178
- [key: string]: any;
179
- }[] | null;
180
- /** Tool id */
181
- tool_call_id?: string | null;
182
- };
183
- export type FunctionParameter = {
184
- /** The type of the parameter */
185
- "type": string;
186
- /** A description of the parameter (optional) */
187
- description?: string | null;
188
- /** A list of possible values for the parameter (optional) */
189
- "enum"?: string[] | null;
190
- /** A dictionary of properties for the parameter (optional) */
191
- properties?: {
192
- [key: string]: any;
193
- } | null;
194
- /** A list of required parameters (optional) */
195
- required?: string[] | null;
196
- /** Allow arbitrary data of specific typed */
197
- additionalProperties?: boolean;
198
- };
199
- export type Function = {
200
- /** The name of the function */
201
- name: string;
202
- /** A description of what the function does */
203
- description: string;
204
- /** The parameters required by the function */
205
- parameters: FunctionParameter;
206
- /** Strict specific schema response. Only `strict` function tools can be auto-parsed */
207
- strict: boolean;
208
- };
209
- export type ChatCompletion = {
210
- /** The model to be used for the chat completion */
211
- model: string;
212
- /** A list of messages that make up the conversation */
213
- messages: Message[];
214
- /** Sampling temperature; higher values make output more random */
215
- temperature?: number;
216
- /** Nucleus sampling probability; controls diversity */
217
- top_p?: number;
218
- /** Number of completions to generate */
219
- n?: number;
220
- /** Whether to stream the response */
221
- stream?: boolean;
222
- /** Stop sequences that will halt the generation */
223
- stop?: string | string[] | null;
224
- /** Maximum number of tokens to generate */
225
- max_tokens?: number | null;
226
- /** Penalty based on new tokens' presence in the text */
227
- presence_penalty?: number;
228
- /** Penalty based on new tokens' frequency in the text */
229
- frequency_penalty?: number;
230
- /** A dictionary to adjust the likelihood of specific tokens */
231
- logit_bias?: {
232
- [key: string]: number;
233
- } | null;
234
- /** An identifier for the user */
235
- user?: string | null;
236
- /** A list of functions that can be called during the chat */
237
- functions?: Function[] | null;
238
- /** Specifies function call behavior or parameters (for example, 'auto' or {'name': 'function_name'}) */
239
- function_call?: string | {
240
- [key: string]: string;
241
- } | null;
242
- };
243
- export type ChatRequest = {
244
- streaming: boolean;
245
- user_prompt: string;
246
- stackspot_knowledge?: boolean;
247
- return_ks_in_response?: boolean;
248
- upload_ids?: string[];
249
- };
250
- /**
251
- * Health Check
252
- */
253
- export function healthCheckHealthzGet(opts?: Oazapfts.RequestOpts) {
254
- return oazapfts.ok(oazapfts.fetchJson<{
255
- status: 200;
256
- data: any;
257
- } | {
258
- status: 404;
259
- }>("/healthz", {
260
- ...opts
261
- }));
262
- }
263
- /**
264
- * Readiness Check
265
- */
266
- export function readinessCheckReadyzGet(opts?: Oazapfts.RequestOpts) {
267
- return oazapfts.ok(oazapfts.fetchJson<{
268
- status: 200;
269
- data: any;
270
- } | {
271
- status: 404;
272
- }>("/readyz", {
273
- ...opts
274
- }));
275
- }
276
- /**
277
- * Handle conversation requests
278
- */
279
- export function converseV0ConversationPost({ xAccountId, authorization, sendConversation }: {
280
- xAccountId?: string | null;
281
- authorization: string;
282
- sendConversation: SendConversation;
283
- }, opts?: Oazapfts.RequestOpts) {
284
- return oazapfts.ok(oazapfts.fetchJson<{
285
- status: 200;
286
- data: ConversationRepresentation;
287
- } | {
288
- status: 404;
289
- } | {
290
- status: 422;
291
- data: HttpValidationError;
292
- }>("/v0/conversation", oazapfts.json({
293
- ...opts,
294
- method: "POST",
295
- body: sendConversation,
296
- headers: oazapfts.mergeHeaders(opts?.headers, {
297
- "x-account-id": xAccountId,
298
- authorization
299
- })
300
- })));
301
- }
302
- /**
303
- * Add Self Hosted Model
304
- */
305
- export function addSelfHostedModelV1LlmModelsPost({ xAccountId, authorization, createLlmModelRequest }: {
306
- xAccountId?: string | null;
307
- authorization: string;
308
- createLlmModelRequest: CreateLlmModelRequest;
309
- }, opts?: Oazapfts.RequestOpts) {
310
- return oazapfts.ok(oazapfts.fetchJson<{
311
- status: 200;
312
- data: LlmModelsResponse;
313
- } | {
314
- status: 404;
315
- } | {
316
- status: 422;
317
- data: HttpValidationError;
318
- }>("/v1/llm/models", oazapfts.json({
319
- ...opts,
320
- method: "POST",
321
- body: createLlmModelRequest,
322
- headers: oazapfts.mergeHeaders(opts?.headers, {
323
- "x-account-id": xAccountId,
324
- authorization
325
- })
326
- })));
327
- }
328
- /**
329
- * List Models
330
- */
331
- export function listModelsV1LlmModelsGet({ active, resource, $default, displayName, selfHosted, orderBy, orderDir, page, pageSize, xAccountId, authorization }: {
332
- active?: boolean | null;
333
- resource?: string | null;
334
- $default?: boolean | null;
335
- displayName?: string | null;
336
- selfHosted?: boolean | null;
337
- orderBy?: OrderBy;
338
- orderDir?: OrderDir;
339
- page?: number;
340
- pageSize?: number;
341
- xAccountId?: string | null;
342
- authorization: string;
343
- }, opts?: Oazapfts.RequestOpts) {
344
- return oazapfts.ok(oazapfts.fetchJson<{
345
- status: 200;
346
- data: PaginatedResponseLlmModelsResponse;
347
- } | {
348
- status: 404;
349
- } | {
350
- status: 422;
351
- data: HttpValidationError;
352
- }>(`/v1/llm/models${QS.query(QS.explode({
353
- active,
354
- resource,
355
- "default": $default,
356
- display_name: displayName,
357
- self_hosted: selfHosted,
358
- order_by: orderBy,
359
- order_dir: orderDir,
360
- page,
361
- page_size: pageSize
362
- }))}`, {
363
- ...opts,
364
- headers: oazapfts.mergeHeaders(opts?.headers, {
365
- "x-account-id": xAccountId,
366
- authorization
367
- })
368
- }));
369
- }
370
- /**
371
- * Get Model
372
- */
373
- export function getModelV1LlmModelsModelIdGet({ modelId, xAccountId, authorization }: {
374
- modelId: string;
375
- xAccountId?: string | null;
376
- authorization: string;
377
- }, opts?: Oazapfts.RequestOpts) {
378
- return oazapfts.ok(oazapfts.fetchJson<{
379
- status: 200;
380
- data: LlmModelsResponse;
381
- } | {
382
- status: 404;
383
- } | {
384
- status: 422;
385
- data: HttpValidationError;
386
- }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, {
387
- ...opts,
388
- headers: oazapfts.mergeHeaders(opts?.headers, {
389
- "x-account-id": xAccountId,
390
- authorization
391
- })
392
- }));
393
- }
394
- /**
395
- * Toggle Model Status
396
- */
397
- export function toggleModelStatusV1LlmModelsModelIdPatch({ modelId, xAccountId, authorization, toggleModelStatusRequest }: {
398
- modelId: string;
399
- xAccountId?: string | null;
400
- authorization: string;
401
- toggleModelStatusRequest: ToggleModelStatusRequest;
402
- }, opts?: Oazapfts.RequestOpts) {
403
- return oazapfts.ok(oazapfts.fetchJson<{
404
- status: 200;
405
- data: LlmModelsResponse;
406
- } | {
407
- status: 404;
408
- } | {
409
- status: 422;
410
- data: HttpValidationError;
411
- }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, oazapfts.json({
412
- ...opts,
413
- method: "PATCH",
414
- body: toggleModelStatusRequest,
415
- headers: oazapfts.mergeHeaders(opts?.headers, {
416
- "x-account-id": xAccountId,
417
- authorization
418
- })
419
- })));
420
- }
421
- /**
422
- * Update
423
- */
424
- export function updateV1LlmModelsModelIdPut({ modelId, xAccountId, authorization, updateLlmModelRequest }: {
425
- modelId: string;
426
- xAccountId?: string | null;
427
- authorization: string;
428
- updateLlmModelRequest: UpdateLlmModelRequest;
429
- }, opts?: Oazapfts.RequestOpts) {
430
- return oazapfts.ok(oazapfts.fetchJson<{
431
- status: 200;
432
- data: LlmModelsResponse;
433
- } | {
434
- status: 404;
435
- } | {
436
- status: 422;
437
- data: HttpValidationError;
438
- }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, oazapfts.json({
439
- ...opts,
440
- method: "PUT",
441
- body: updateLlmModelRequest,
442
- headers: oazapfts.mergeHeaders(opts?.headers, {
443
- "x-account-id": xAccountId,
444
- authorization
445
- })
446
- })));
447
- }
448
- /**
449
- * Delete
450
- */
451
- export function deleteV1LlmModelsModelIdDelete({ modelId, xAccountId, authorization }: {
452
- modelId: string;
453
- xAccountId?: string | null;
454
- authorization: string;
455
- }, opts?: Oazapfts.RequestOpts) {
456
- return oazapfts.ok(oazapfts.fetchJson<{
457
- status: 204;
458
- } | {
459
- status: 404;
460
- } | {
461
- status: 422;
462
- data: HttpValidationError;
463
- }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, {
464
- ...opts,
465
- method: "DELETE",
466
- headers: oazapfts.mergeHeaders(opts?.headers, {
467
- "x-account-id": xAccountId,
468
- authorization
469
- })
470
- }));
471
- }
472
- /**
473
- * Save Or Update Model Resources
474
- */
475
- export function saveOrUpdateModelResourcesV1LlmModelsModelIdResourcesPut({ modelId, xAccountId, authorization, body }: {
476
- modelId: string;
477
- xAccountId?: string | null;
478
- authorization: string;
479
- body: UpdateLlmModelResourceRequest[];
480
- }, opts?: Oazapfts.RequestOpts) {
481
- return oazapfts.ok(oazapfts.fetchJson<{
482
- status: 200;
483
- data: any;
484
- } | {
485
- status: 404;
486
- } | {
487
- status: 422;
488
- data: HttpValidationError;
489
- }>(`/v1/llm/models/${encodeURIComponent(modelId)}/resources`, oazapfts.json({
490
- ...opts,
491
- method: "PUT",
492
- body,
493
- headers: oazapfts.mergeHeaders(opts?.headers, {
494
- "x-account-id": xAccountId,
495
- authorization
496
- })
497
- })));
498
- }
499
- /**
500
- * Delete Model Resources
501
- */
502
- export function deleteModelResourcesV1LlmResourcesResourceIdDelete({ resourceId, xAccountId, authorization }: {
503
- resourceId: string;
504
- xAccountId?: string | null;
505
- authorization: string;
506
- }, opts?: Oazapfts.RequestOpts) {
507
- return oazapfts.ok(oazapfts.fetchJson<{
508
- status: 204;
509
- } | {
510
- status: 404;
511
- } | {
512
- status: 422;
513
- data: HttpValidationError;
514
- }>(`/v1/llm/resources/${encodeURIComponent(resourceId)}`, {
515
- ...opts,
516
- method: "DELETE",
517
- headers: oazapfts.mergeHeaders(opts?.headers, {
518
- "x-account-id": xAccountId,
519
- authorization
520
- })
521
- }));
522
- }
523
- /**
524
- * List Llm Providers
525
- */
526
- export function listLlmProvidersV1LlmProvidersGet({ acceptsSelfHosted, xAccountId, authorization }: {
527
- acceptsSelfHosted?: boolean;
528
- xAccountId?: string | null;
529
- authorization: string;
530
- }, opts?: Oazapfts.RequestOpts) {
531
- return oazapfts.ok(oazapfts.fetchJson<{
532
- status: 200;
533
- data: LlmSimpleProviderResponse[];
534
- } | {
535
- status: 404;
536
- } | {
537
- status: 422;
538
- data: HttpValidationError;
539
- }>(`/v1/llm/providers${QS.query(QS.explode({
540
- accepts_self_hosted: acceptsSelfHosted
541
- }))}`, {
542
- ...opts,
543
- headers: oazapfts.mergeHeaders(opts?.headers, {
544
- "x-account-id": xAccountId,
545
- authorization
546
- })
547
- }));
548
- }
549
- /**
550
- * Handle completions requests
551
- */
552
- export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin, xAccountId, authorization, chatCompletion }: {
553
- xRequestOrigin?: string | null;
554
- xAccountId?: string | null;
555
- authorization: string;
556
- chatCompletion: ChatCompletion;
557
- }, opts?: Oazapfts.RequestOpts) {
558
- return oazapfts.ok(oazapfts.fetchJson<{
559
- status: 200;
560
- data: any;
561
- } | {
562
- status: 404;
563
- } | {
564
- status: 422;
565
- data: HttpValidationError;
566
- }>("/v1/chat/completions", oazapfts.json({
567
- ...opts,
568
- method: "POST",
569
- body: chatCompletion,
570
- headers: oazapfts.mergeHeaders(opts?.headers, {
571
- "x-request-origin": xRequestOrigin,
572
- "x-account-id": xAccountId,
573
- authorization
574
- })
575
- })));
576
- }
577
- /**
578
- * Agent Chat
579
- */
580
- export function agentChatV1AgentAgentIdChatPost({ agentId, xAccountId, authorization, chatRequest }: {
581
- agentId: string;
582
- xAccountId?: string | null;
583
- authorization: string;
584
- chatRequest: ChatRequest;
585
- }, opts?: Oazapfts.RequestOpts) {
586
- return oazapfts.ok(oazapfts.fetchJson<{
587
- status: 200;
588
- data: any;
589
- } | {
590
- status: 404;
591
- } | {
592
- status: 422;
593
- data: HttpValidationError;
594
- }>(`/v1/agent/${encodeURIComponent(agentId)}/chat`, oazapfts.json({
595
- ...opts,
596
- method: "POST",
597
- body: chatRequest,
598
- headers: oazapfts.mergeHeaders(opts?.headers, {
599
- "x-account-id": xAccountId,
600
- authorization
601
- })
602
- })));
603
- }
1
+ /**
2
+ * FastAPI
3
+ * 0.1.0
4
+ * DO NOT MODIFY - This file has been generated using oazapfts.
5
+ * See https://www.npmjs.com/package/oazapfts
6
+ */
7
+ import * as Oazapfts from "@oazapfts/runtime";
8
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "/",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {};
15
+ export type LlmRoles = "system" | "user" | "assistant" | "function" | "tool";
16
+ export type SendMessage = {
17
+ role: LlmRoles;
18
+ content: string;
19
+ };
20
+ export type SendConversation = {
21
+ model_name: string;
22
+ messages: SendMessage[];
23
+ temperature?: number | null;
24
+ json_schema?: {
25
+ [key: string]: any;
26
+ } | null;
27
+ is_azure?: boolean | null;
28
+ max_tokens?: number | null;
29
+ };
30
+ export type MessageRepresentation = {
31
+ /** The role of the sender of the message (e.g., 'user', 'assistant', 'system', 'tool'). */
32
+ role: string;
33
+ /** The content of the message. */
34
+ content: string;
35
+ /** The name of the sender, if applicable. */
36
+ name?: string | null;
37
+ /** A dictionary representing a function call, if applicable. */
38
+ function_call?: {
39
+ [key: string]: any;
40
+ } | null;
41
+ };
42
+ export type ChoiceRepresentation = {
43
+ message: MessageRepresentation;
44
+ finish_reason: string;
45
+ index: number;
46
+ };
47
+ export type UsageRepresentation = {
48
+ prompt_tokens: number;
49
+ completion_tokens: number;
50
+ total_tokens: number;
51
+ };
52
+ export type MetricsRepresentation = {
53
+ latency_ms: number;
54
+ };
55
+ export type ConversationRepresentation = {
56
+ id: string;
57
+ choices: ChoiceRepresentation[];
58
+ created: string;
59
+ model: string;
60
+ "object"?: string;
61
+ usage: UsageRepresentation;
62
+ metrics?: MetricsRepresentation | null;
63
+ };
64
+ export type ValidationError = {
65
+ loc: (string | number)[];
66
+ msg: string;
67
+ "type": string;
68
+ };
69
+ export type HttpValidationError = {
70
+ detail?: ValidationError[];
71
+ };
72
+ export type ResourceName = "agents" | "deep_ks" | "autocomplete";
73
+ export type LlmModelResourceRequest = {
74
+ name: ResourceName;
75
+ is_default?: boolean;
76
+ };
77
+ export type CreateLlmModelRequest = {
78
+ display_name: string;
79
+ provider_name: string;
80
+ model_name: string;
81
+ connection_params: {
82
+ [key: string]: any;
83
+ };
84
+ resources: LlmModelResourceRequest[];
85
+ };
86
+ export type LlmProviderResponse = {
87
+ name: string;
88
+ provider_type: string;
89
+ configuration_params?: {
90
+ [key: string]: any;
91
+ } | null;
92
+ accepts_self_hosted?: boolean | null;
93
+ };
94
+ export type LlmModelConfigurationResponse = {
95
+ provider: LlmProviderResponse;
96
+ model_name: string;
97
+ connection_params: {
98
+ [key: string]: any;
99
+ } | null;
100
+ usage_params: {
101
+ [key: string]: any;
102
+ } | null;
103
+ };
104
+ export type LlmModelResourcesResponse = {
105
+ id: string;
106
+ name: string;
107
+ is_default: boolean;
108
+ };
109
+ export type LlmModelsResponse = {
110
+ id: string;
111
+ active: boolean;
112
+ display_name: string;
113
+ self_hosted: boolean;
114
+ model_configuration: LlmModelConfigurationResponse;
115
+ resources: LlmModelResourcesResponse[];
116
+ created_at: string;
117
+ updated_at: string;
118
+ updated_by: string;
119
+ };
120
+ export type OrderBy = "default" | "display_name" | "model_name" | "type" | "status";
121
+ export type OrderDir = "asc" | "desc" | "stackspot_hosted" | "self_hosted" | "active" | "inactive";
122
+ export type PaginatedResponseLlmModelsResponse = {
123
+ total_pages: number;
124
+ items: LlmModelsResponse[];
125
+ };
126
+ export type ToggleModelStatusRequest = {
127
+ active: boolean;
128
+ };
129
+ export type UpdateLlmModelRequest = {
130
+ display_name: string;
131
+ model_name: string;
132
+ connection_params: {
133
+ [key: string]: any;
134
+ };
135
+ resources: LlmModelResourceRequest[];
136
+ };
137
+ export type UpdateLlmModelResourceRequest = {
138
+ name: string;
139
+ is_default?: boolean;
140
+ };
141
+ export type LlmSimpleProviderResponse = {
142
+ name: string;
143
+ provider_type: string;
144
+ configuration_params: {
145
+ [key: string]: any;
146
+ };
147
+ accepts_self_hosted: boolean;
148
+ model_names: string[];
149
+ };
150
+ export type TextParam = {
151
+ text: string;
152
+ "type"?: "text";
153
+ };
154
+ export type UrlParam = {
155
+ url: string;
156
+ };
157
+ export type ImageParam = {
158
+ image_url: UrlParam;
159
+ "type"?: "image_url";
160
+ };
161
+ export type FunctionCall = {
162
+ /** The name of the function to call */
163
+ name: string;
164
+ /** A JSON string representing the function arguments */
165
+ arguments: string;
166
+ };
167
+ export type Message = {
168
+ /** The role of the message (system, user, assistant, or function) */
169
+ role: LlmRoles;
170
+ /** The content of the message, can be a string or a list of content blocks */
171
+ content?: string | (TextParam | ImageParam)[];
172
+ /** The name of the sender (optional) */
173
+ name?: string | null;
174
+ /** Details of a function call (optional) */
175
+ function_call?: FunctionCall | null;
176
+ /** Details of a function call (optional) */
177
+ tool_calls?: {
178
+ [key: string]: any;
179
+ }[] | null;
180
+ /** Tool id */
181
+ tool_call_id?: string | null;
182
+ };
183
+ export type FunctionParameter = {
184
+ /** The type of the parameter */
185
+ "type": string;
186
+ /** A description of the parameter (optional) */
187
+ description?: string | null;
188
+ /** A list of possible values for the parameter (optional) */
189
+ "enum"?: string[] | null;
190
+ /** A dictionary of properties for the parameter (optional) */
191
+ properties?: {
192
+ [key: string]: any;
193
+ } | null;
194
+ /** A list of required parameters (optional) */
195
+ required?: string[] | null;
196
+ /** Allow arbitrary data of specific typed */
197
+ additionalProperties?: boolean;
198
+ };
199
+ export type Function = {
200
+ /** The name of the function */
201
+ name: string;
202
+ /** A description of what the function does */
203
+ description: string;
204
+ /** The parameters required by the function */
205
+ parameters: FunctionParameter;
206
+ /** Strict specific schema response. Only `strict` function tools can be auto-parsed */
207
+ strict: boolean;
208
+ };
209
+ export type ChatCompletion = {
210
+ /** The model to be used for the chat completion */
211
+ model: string;
212
+ /** A list of messages that make up the conversation */
213
+ messages: Message[];
214
+ /** Sampling temperature; higher values make output more random */
215
+ temperature?: number;
216
+ /** Nucleus sampling probability; controls diversity */
217
+ top_p?: number;
218
+ /** Number of completions to generate */
219
+ n?: number;
220
+ /** Whether to stream the response */
221
+ stream?: boolean;
222
+ /** Stop sequences that will halt the generation */
223
+ stop?: string | string[] | null;
224
+ /** Maximum number of tokens to generate */
225
+ max_tokens?: number | null;
226
+ /** Penalty based on new tokens' presence in the text */
227
+ presence_penalty?: number;
228
+ /** Penalty based on new tokens' frequency in the text */
229
+ frequency_penalty?: number;
230
+ /** A dictionary to adjust the likelihood of specific tokens */
231
+ logit_bias?: {
232
+ [key: string]: number;
233
+ } | null;
234
+ /** An identifier for the user */
235
+ user?: string | null;
236
+ /** A list of functions that can be called during the chat */
237
+ functions?: Function[] | null;
238
+ /** Specifies function call behavior or parameters (for example, 'auto' or {'name': 'function_name'}) */
239
+ function_call?: string | {
240
+ [key: string]: string;
241
+ } | null;
242
+ };
243
+ export type ChatRequest = {
244
+ streaming: boolean;
245
+ user_prompt: string;
246
+ stackspot_knowledge?: boolean;
247
+ return_ks_in_response?: boolean;
248
+ upload_ids?: string[];
249
+ };
250
+ /**
251
+ * Health Check
252
+ */
253
+ export function healthCheckHealthzGet(opts?: Oazapfts.RequestOpts) {
254
+ return oazapfts.ok(oazapfts.fetchJson<{
255
+ status: 200;
256
+ data: any;
257
+ } | {
258
+ status: 404;
259
+ }>("/healthz", {
260
+ ...opts
261
+ }));
262
+ }
263
+ /**
264
+ * Readiness Check
265
+ */
266
+ export function readinessCheckReadyzGet(opts?: Oazapfts.RequestOpts) {
267
+ return oazapfts.ok(oazapfts.fetchJson<{
268
+ status: 200;
269
+ data: any;
270
+ } | {
271
+ status: 404;
272
+ }>("/readyz", {
273
+ ...opts
274
+ }));
275
+ }
276
+ /**
277
+ * Handle conversation requests
278
+ */
279
+ export function converseV0ConversationPost({ xAccountId, authorization, sendConversation }: {
280
+ xAccountId?: string | null;
281
+ authorization: string;
282
+ sendConversation: SendConversation;
283
+ }, opts?: Oazapfts.RequestOpts) {
284
+ return oazapfts.ok(oazapfts.fetchJson<{
285
+ status: 200;
286
+ data: ConversationRepresentation;
287
+ } | {
288
+ status: 404;
289
+ } | {
290
+ status: 422;
291
+ data: HttpValidationError;
292
+ }>("/v0/conversation", oazapfts.json({
293
+ ...opts,
294
+ method: "POST",
295
+ body: sendConversation,
296
+ headers: oazapfts.mergeHeaders(opts?.headers, {
297
+ "x-account-id": xAccountId,
298
+ authorization
299
+ })
300
+ })));
301
+ }
302
+ /**
303
+ * Add Self Hosted Model
304
+ */
305
+ export function addSelfHostedModelV1LlmModelsPost({ xAccountId, authorization, createLlmModelRequest }: {
306
+ xAccountId?: string | null;
307
+ authorization: string;
308
+ createLlmModelRequest: CreateLlmModelRequest;
309
+ }, opts?: Oazapfts.RequestOpts) {
310
+ return oazapfts.ok(oazapfts.fetchJson<{
311
+ status: 200;
312
+ data: LlmModelsResponse;
313
+ } | {
314
+ status: 404;
315
+ } | {
316
+ status: 422;
317
+ data: HttpValidationError;
318
+ }>("/v1/llm/models", oazapfts.json({
319
+ ...opts,
320
+ method: "POST",
321
+ body: createLlmModelRequest,
322
+ headers: oazapfts.mergeHeaders(opts?.headers, {
323
+ "x-account-id": xAccountId,
324
+ authorization
325
+ })
326
+ })));
327
+ }
328
+ /**
329
+ * List Models
330
+ */
331
+ export function listModelsV1LlmModelsGet({ active, resource, $default, displayName, selfHosted, orderBy, orderDir, page, pageSize, xAccountId, authorization }: {
332
+ active?: boolean | null;
333
+ resource?: string | null;
334
+ $default?: boolean | null;
335
+ displayName?: string | null;
336
+ selfHosted?: boolean | null;
337
+ orderBy?: OrderBy;
338
+ orderDir?: OrderDir;
339
+ page?: number;
340
+ pageSize?: number;
341
+ xAccountId?: string | null;
342
+ authorization: string;
343
+ }, opts?: Oazapfts.RequestOpts) {
344
+ return oazapfts.ok(oazapfts.fetchJson<{
345
+ status: 200;
346
+ data: PaginatedResponseLlmModelsResponse;
347
+ } | {
348
+ status: 404;
349
+ } | {
350
+ status: 422;
351
+ data: HttpValidationError;
352
+ }>(`/v1/llm/models${QS.query(QS.explode({
353
+ active,
354
+ resource,
355
+ "default": $default,
356
+ display_name: displayName,
357
+ self_hosted: selfHosted,
358
+ order_by: orderBy,
359
+ order_dir: orderDir,
360
+ page,
361
+ page_size: pageSize
362
+ }))}`, {
363
+ ...opts,
364
+ headers: oazapfts.mergeHeaders(opts?.headers, {
365
+ "x-account-id": xAccountId,
366
+ authorization
367
+ })
368
+ }));
369
+ }
370
+ /**
371
+ * Get Model
372
+ */
373
+ export function getModelV1LlmModelsModelIdGet({ modelId, xAccountId, authorization }: {
374
+ modelId: string;
375
+ xAccountId?: string | null;
376
+ authorization: string;
377
+ }, opts?: Oazapfts.RequestOpts) {
378
+ return oazapfts.ok(oazapfts.fetchJson<{
379
+ status: 200;
380
+ data: LlmModelsResponse;
381
+ } | {
382
+ status: 404;
383
+ } | {
384
+ status: 422;
385
+ data: HttpValidationError;
386
+ }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, {
387
+ ...opts,
388
+ headers: oazapfts.mergeHeaders(opts?.headers, {
389
+ "x-account-id": xAccountId,
390
+ authorization
391
+ })
392
+ }));
393
+ }
394
+ /**
395
+ * Toggle Model Status
396
+ */
397
+ export function toggleModelStatusV1LlmModelsModelIdPatch({ modelId, xAccountId, authorization, toggleModelStatusRequest }: {
398
+ modelId: string;
399
+ xAccountId?: string | null;
400
+ authorization: string;
401
+ toggleModelStatusRequest: ToggleModelStatusRequest;
402
+ }, opts?: Oazapfts.RequestOpts) {
403
+ return oazapfts.ok(oazapfts.fetchJson<{
404
+ status: 200;
405
+ data: LlmModelsResponse;
406
+ } | {
407
+ status: 404;
408
+ } | {
409
+ status: 422;
410
+ data: HttpValidationError;
411
+ }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, oazapfts.json({
412
+ ...opts,
413
+ method: "PATCH",
414
+ body: toggleModelStatusRequest,
415
+ headers: oazapfts.mergeHeaders(opts?.headers, {
416
+ "x-account-id": xAccountId,
417
+ authorization
418
+ })
419
+ })));
420
+ }
421
+ /**
422
+ * Update
423
+ */
424
+ export function updateV1LlmModelsModelIdPut({ modelId, xAccountId, authorization, updateLlmModelRequest }: {
425
+ modelId: string;
426
+ xAccountId?: string | null;
427
+ authorization: string;
428
+ updateLlmModelRequest: UpdateLlmModelRequest;
429
+ }, opts?: Oazapfts.RequestOpts) {
430
+ return oazapfts.ok(oazapfts.fetchJson<{
431
+ status: 200;
432
+ data: LlmModelsResponse;
433
+ } | {
434
+ status: 404;
435
+ } | {
436
+ status: 422;
437
+ data: HttpValidationError;
438
+ }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, oazapfts.json({
439
+ ...opts,
440
+ method: "PUT",
441
+ body: updateLlmModelRequest,
442
+ headers: oazapfts.mergeHeaders(opts?.headers, {
443
+ "x-account-id": xAccountId,
444
+ authorization
445
+ })
446
+ })));
447
+ }
448
+ /**
449
+ * Delete
450
+ */
451
+ export function deleteV1LlmModelsModelIdDelete({ modelId, xAccountId, authorization }: {
452
+ modelId: string;
453
+ xAccountId?: string | null;
454
+ authorization: string;
455
+ }, opts?: Oazapfts.RequestOpts) {
456
+ return oazapfts.ok(oazapfts.fetchJson<{
457
+ status: 204;
458
+ } | {
459
+ status: 404;
460
+ } | {
461
+ status: 422;
462
+ data: HttpValidationError;
463
+ }>(`/v1/llm/models/${encodeURIComponent(modelId)}`, {
464
+ ...opts,
465
+ method: "DELETE",
466
+ headers: oazapfts.mergeHeaders(opts?.headers, {
467
+ "x-account-id": xAccountId,
468
+ authorization
469
+ })
470
+ }));
471
+ }
472
+ /**
473
+ * Save Or Update Model Resources
474
+ */
475
+ export function saveOrUpdateModelResourcesV1LlmModelsModelIdResourcesPut({ modelId, xAccountId, authorization, body }: {
476
+ modelId: string;
477
+ xAccountId?: string | null;
478
+ authorization: string;
479
+ body: UpdateLlmModelResourceRequest[];
480
+ }, opts?: Oazapfts.RequestOpts) {
481
+ return oazapfts.ok(oazapfts.fetchJson<{
482
+ status: 200;
483
+ data: any;
484
+ } | {
485
+ status: 404;
486
+ } | {
487
+ status: 422;
488
+ data: HttpValidationError;
489
+ }>(`/v1/llm/models/${encodeURIComponent(modelId)}/resources`, oazapfts.json({
490
+ ...opts,
491
+ method: "PUT",
492
+ body,
493
+ headers: oazapfts.mergeHeaders(opts?.headers, {
494
+ "x-account-id": xAccountId,
495
+ authorization
496
+ })
497
+ })));
498
+ }
499
+ /**
500
+ * Delete Model Resources
501
+ */
502
+ export function deleteModelResourcesV1LlmResourcesResourceIdDelete({ resourceId, xAccountId, authorization }: {
503
+ resourceId: string;
504
+ xAccountId?: string | null;
505
+ authorization: string;
506
+ }, opts?: Oazapfts.RequestOpts) {
507
+ return oazapfts.ok(oazapfts.fetchJson<{
508
+ status: 204;
509
+ } | {
510
+ status: 404;
511
+ } | {
512
+ status: 422;
513
+ data: HttpValidationError;
514
+ }>(`/v1/llm/resources/${encodeURIComponent(resourceId)}`, {
515
+ ...opts,
516
+ method: "DELETE",
517
+ headers: oazapfts.mergeHeaders(opts?.headers, {
518
+ "x-account-id": xAccountId,
519
+ authorization
520
+ })
521
+ }));
522
+ }
523
+ /**
524
+ * List Llm Providers
525
+ */
526
+ export function listLlmProvidersV1LlmProvidersGet({ acceptsSelfHosted, xAccountId, authorization }: {
527
+ acceptsSelfHosted?: boolean;
528
+ xAccountId?: string | null;
529
+ authorization: string;
530
+ }, opts?: Oazapfts.RequestOpts) {
531
+ return oazapfts.ok(oazapfts.fetchJson<{
532
+ status: 200;
533
+ data: LlmSimpleProviderResponse[];
534
+ } | {
535
+ status: 404;
536
+ } | {
537
+ status: 422;
538
+ data: HttpValidationError;
539
+ }>(`/v1/llm/providers${QS.query(QS.explode({
540
+ accepts_self_hosted: acceptsSelfHosted
541
+ }))}`, {
542
+ ...opts,
543
+ headers: oazapfts.mergeHeaders(opts?.headers, {
544
+ "x-account-id": xAccountId,
545
+ authorization
546
+ })
547
+ }));
548
+ }
549
+ /**
550
+ * Handle completions requests
551
+ */
552
+ export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin, xAccountId, authorization, chatCompletion }: {
553
+ xRequestOrigin?: string | null;
554
+ xAccountId?: string | null;
555
+ authorization: string;
556
+ chatCompletion: ChatCompletion;
557
+ }, opts?: Oazapfts.RequestOpts) {
558
+ return oazapfts.ok(oazapfts.fetchJson<{
559
+ status: 200;
560
+ data: any;
561
+ } | {
562
+ status: 404;
563
+ } | {
564
+ status: 422;
565
+ data: HttpValidationError;
566
+ }>("/v1/chat/completions", oazapfts.json({
567
+ ...opts,
568
+ method: "POST",
569
+ body: chatCompletion,
570
+ headers: oazapfts.mergeHeaders(opts?.headers, {
571
+ "x-request-origin": xRequestOrigin,
572
+ "x-account-id": xAccountId,
573
+ authorization
574
+ })
575
+ })));
576
+ }
577
+ /**
578
+ * Agent Chat
579
+ */
580
+ export function agentChatV1AgentAgentIdChatPost({ agentId, xAccountId, authorization, chatRequest }: {
581
+ agentId: string;
582
+ xAccountId?: string | null;
583
+ authorization: string;
584
+ chatRequest: ChatRequest;
585
+ }, opts?: Oazapfts.RequestOpts) {
586
+ return oazapfts.ok(oazapfts.fetchJson<{
587
+ status: 200;
588
+ data: any;
589
+ } | {
590
+ status: 404;
591
+ } | {
592
+ status: 422;
593
+ data: HttpValidationError;
594
+ }>(`/v1/agent/${encodeURIComponent(agentId)}/chat`, oazapfts.json({
595
+ ...opts,
596
+ method: "POST",
597
+ body: chatRequest,
598
+ headers: oazapfts.mergeHeaders(opts?.headers, {
599
+ "x-account-id": xAccountId,
600
+ authorization
601
+ })
602
+ })));
603
+ }