@stack-spot/portal-network 0.191.1 → 0.192.1

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.
@@ -134,6 +134,9 @@ export type UpdateLlmModelRequest = {
134
134
  };
135
135
  resources: LlmModelResourceRequest[];
136
136
  };
137
+ export type GetModelByIdsRequest = {
138
+ model_ids: string[];
139
+ };
137
140
  export type UpdateLlmModelResourceRequest = {
138
141
  name: string;
139
142
  is_default?: boolean;
@@ -239,6 +242,8 @@ export type ChatCompletion = {
239
242
  function_call?: string | {
240
243
  [key: string]: string;
241
244
  } | null;
245
+ /** ID of an alternative model for chat completion. It should be present on available_model_ids agent attr. */
246
+ selected_model_id?: string | null;
242
247
  };
243
248
  export type ChatRequest = {
244
249
  streaming: boolean;
@@ -246,6 +251,8 @@ export type ChatRequest = {
246
251
  stackspot_knowledge?: boolean;
247
252
  return_ks_in_response?: boolean;
248
253
  upload_ids?: string[];
254
+ execution_id?: string | null;
255
+ selected_model?: string | null;
249
256
  };
250
257
  /**
251
258
  * Health Check
@@ -469,6 +476,32 @@ export function deleteV1LlmModelsModelIdDelete({ modelId, xAccountId, authorizat
469
476
  })
470
477
  }));
471
478
  }
479
+ /**
480
+ * Get Models List
481
+ */
482
+ export function getModelsListV1LlmModelsListPost({ xAccountId, authorization, getModelByIdsRequest }: {
483
+ xAccountId?: string | null;
484
+ authorization: string;
485
+ getModelByIdsRequest: GetModelByIdsRequest;
486
+ }, opts?: Oazapfts.RequestOpts) {
487
+ return oazapfts.ok(oazapfts.fetchJson<{
488
+ status: 200;
489
+ data: LlmModelsResponse[];
490
+ } | {
491
+ status: 404;
492
+ } | {
493
+ status: 422;
494
+ data: HttpValidationError;
495
+ }>("/v1/llm/models-list", oazapfts.json({
496
+ ...opts,
497
+ method: "POST",
498
+ body: getModelByIdsRequest,
499
+ headers: oazapfts.mergeHeaders(opts?.headers, {
500
+ "x-account-id": xAccountId,
501
+ authorization
502
+ })
503
+ })));
504
+ }
472
505
  /**
473
506
  * Save Or Update Model Resources
474
507
  */
@@ -549,10 +582,15 @@ export function listLlmProvidersV1LlmProvidersGet({ acceptsSelfHosted, xAccountI
549
582
  /**
550
583
  * Handle completions requests
551
584
  */
552
- export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin, xAccountId, authorization, chatCompletion }: {
553
- xRequestOrigin?: string | null;
585
+ export function createCompletionsV1ChatCompletionsPost({ xAccountId, authorization, xRequestOrigin, xConversationId, xMessageId, xQcExecutionId, xQcSlug, xPlatformVersion, chatCompletion }: {
554
586
  xAccountId?: string | null;
555
587
  authorization: string;
588
+ xRequestOrigin?: string | null;
589
+ xConversationId?: string | null;
590
+ xMessageId?: string | null;
591
+ xQcExecutionId?: string | null;
592
+ xQcSlug?: string | null;
593
+ xPlatformVersion?: string | null;
556
594
  chatCompletion: ChatCompletion;
557
595
  }, opts?: Oazapfts.RequestOpts) {
558
596
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -568,9 +606,14 @@ export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin, xAccoun
568
606
  method: "POST",
569
607
  body: chatCompletion,
570
608
  headers: oazapfts.mergeHeaders(opts?.headers, {
571
- "x-request-origin": xRequestOrigin,
572
609
  "x-account-id": xAccountId,
573
- authorization
610
+ authorization,
611
+ "x-request-origin": xRequestOrigin,
612
+ "x-conversation-id": xConversationId,
613
+ "x-message-id": xMessageId,
614
+ "x-qc-execution-id": xQcExecutionId,
615
+ "x-qc-slug": xQcSlug,
616
+ "x-platform-version": xPlatformVersion
574
617
  })
575
618
  })));
576
619
  }
@@ -11,6 +11,7 @@ import {
11
11
  createNetwork,
12
12
  createNetworkConnection,
13
13
  createProject,
14
+ createRuntime,
14
15
  createTenant,
15
16
  createVpn,
16
17
  defaults,
@@ -18,7 +19,7 @@ import {
18
19
  getFolder,
19
20
  getFoundation,
20
21
  getNetwork,
21
- getProject1,
22
+ getProject,
22
23
  getVpnConfiguration,
23
24
  listCertificates,
24
25
  listCidr,
@@ -28,6 +29,7 @@ import {
28
29
  listInbound,
29
30
  listNetwork,
30
31
  listNetworkConnection,
32
+ listRuntime,
31
33
  listTenant,
32
34
  listVpns,
33
35
  providers,
@@ -106,7 +108,7 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
106
108
  /**
107
109
  * Get a project by id
108
110
  */
109
- getProjectById = this.query(removeAuthorizationParam(getProject1))
111
+ getProjectById = this.query(removeAuthorizationParam(getProject))
110
112
  /**
111
113
  * Get a list of dns records
112
114
  */
@@ -167,6 +169,14 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
167
169
  * Create a tenant
168
170
  */
169
171
  createTenant = this.mutation(removeAuthorizationParam(createTenant))
172
+ /**
173
+ * Get a list of runtimes
174
+ */
175
+ listRuntimes = this.query(removeAuthorizationParam(listRuntime))
176
+ /**
177
+ * Create a runtime
178
+ */
179
+ createRuntime = this.mutation(removeAuthorizationParam(createRuntime))
170
180
  }
171
181
 
172
182
  export const cloudPlatformClient = new CloudPlatformClient()
@@ -185,6 +185,7 @@ export interface FixedChatRequest extends ChatRequest {
185
185
  stackspot_ai_version?: string,
186
186
  os?: string,
187
187
  upload_ids?: string[],
188
+ selected_model_id?: string,
188
189
  },
189
190
  }
190
191