@breign/client 1.0.49 → 1.0.51

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.
@@ -38,6 +38,9 @@ export interface UpdateProviderRequest {
38
38
  export interface ValidateProviderRequest {
39
39
  providerValiationRequestUio: ProviderValiationRequestUio;
40
40
  }
41
+ export interface ValidateStoredProviderRequest {
42
+ providerId: string;
43
+ }
41
44
  /**
42
45
  *
43
46
  */
@@ -122,4 +125,14 @@ export declare class EngineApi extends runtime.BaseAPI {
122
125
  * Validate a provider
123
126
  */
124
127
  validateProvider(providerValiationRequestUio: ProviderValiationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelUio>>;
128
+ /**
129
+ * Validate a provider by id using the API key stored server-side and fetch available models
130
+ * Validate a stored provider
131
+ */
132
+ validateStoredProviderRaw(requestParameters: ValidateStoredProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelUio>>>;
133
+ /**
134
+ * Validate a provider by id using the API key stored server-side and fetch available models
135
+ * Validate a stored provider
136
+ */
137
+ validateStoredProvider(providerId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelUio>>;
125
138
  }
@@ -305,5 +305,34 @@ class EngineApi extends runtime.BaseAPI {
305
305
  const response = await this.validateProviderRaw({ providerValiationRequestUio: providerValiationRequestUio }, initOverrides);
306
306
  return await response.value();
307
307
  }
308
+ /**
309
+ * Validate a provider by id using the API key stored server-side and fetch available models
310
+ * Validate a stored provider
311
+ */
312
+ async validateStoredProviderRaw(requestParameters, initOverrides) {
313
+ if (requestParameters['providerId'] == null) {
314
+ throw new runtime.RequiredError('providerId', 'Required parameter "providerId" was null or undefined when calling validateStoredProvider().');
315
+ }
316
+ const queryParameters = {};
317
+ const headerParameters = {};
318
+ if (this.configuration && this.configuration.apiKey) {
319
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
320
+ }
321
+ const response = await this.request({
322
+ path: `/engines/providers/{providerId}/validate`.replace(`{${"providerId"}}`, encodeURIComponent(String(requestParameters['providerId']))),
323
+ method: 'POST',
324
+ headers: headerParameters,
325
+ query: queryParameters,
326
+ }, initOverrides);
327
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ModelUioFromJSON));
328
+ }
329
+ /**
330
+ * Validate a provider by id using the API key stored server-side and fetch available models
331
+ * Validate a stored provider
332
+ */
333
+ async validateStoredProvider(providerId, initOverrides) {
334
+ const response = await this.validateStoredProviderRaw({ providerId: providerId }, initOverrides);
335
+ return await response.value();
336
+ }
308
337
  }
309
338
  exports.EngineApi = EngineApi;
@@ -33,6 +33,12 @@ export interface PromptCreateRequestUio {
33
33
  * @memberof PromptCreateRequestUio
34
34
  */
35
35
  message: string;
36
+ /**
37
+ * Whether to activate incremental generation of the response
38
+ * @type {boolean}
39
+ * @memberof PromptCreateRequestUio
40
+ */
41
+ stream?: boolean;
36
42
  }
37
43
  /**
38
44
  * Check if a given object implements the PromptCreateRequestUio interface.
@@ -39,6 +39,7 @@ function PromptCreateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
39
39
  'lang': json['lang'],
40
40
  'customUserId': json['customUserId'] == null ? undefined : json['customUserId'],
41
41
  'message': json['message'],
42
+ 'stream': json['stream'] == null ? undefined : json['stream'],
42
43
  };
43
44
  }
44
45
  function PromptCreateRequestUioToJSON(json) {
@@ -52,5 +53,6 @@ function PromptCreateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
52
53
  'lang': value['lang'],
53
54
  'customUserId': value['customUserId'],
54
55
  'message': value['message'],
56
+ 'stream': value['stream'],
55
57
  };
56
58
  }
package/dist/openapi.json CHANGED
@@ -3462,6 +3462,88 @@
3462
3462
  "tags" : [ "engine" ]
3463
3463
  }
3464
3464
  },
3465
+ "/engines/providers/{providerId}/validate" : {
3466
+ "post" : {
3467
+ "description" : "Validate a provider by id using the API key stored server-side and fetch available models",
3468
+ "operationId" : "validateStoredProvider",
3469
+ "parameters" : [ {
3470
+ "description" : "ID of the provider",
3471
+ "in" : "path",
3472
+ "name" : "providerId",
3473
+ "required" : true,
3474
+ "schema" : {
3475
+ "type" : "string"
3476
+ }
3477
+ } ],
3478
+ "responses" : {
3479
+ "200" : {
3480
+ "content" : {
3481
+ "application/json" : {
3482
+ "schema" : {
3483
+ "items" : {
3484
+ "$ref" : "#/components/schemas/Model"
3485
+ },
3486
+ "type" : "array"
3487
+ }
3488
+ }
3489
+ },
3490
+ "description" : "Provider validated successfully"
3491
+ },
3492
+ "400" : {
3493
+ "content" : {
3494
+ "application/json" : {
3495
+ "schema" : {
3496
+ "$ref" : "#/components/schemas/BodyWithMessage"
3497
+ }
3498
+ }
3499
+ },
3500
+ "description" : "Provider has no stored API key or provider type not supported"
3501
+ },
3502
+ "401" : {
3503
+ "content" : {
3504
+ "application/json" : {
3505
+ "schema" : {
3506
+ "$ref" : "#/components/schemas/BodyWithMessage"
3507
+ }
3508
+ }
3509
+ },
3510
+ "description" : "Not authenticated"
3511
+ },
3512
+ "403" : {
3513
+ "content" : {
3514
+ "application/json" : {
3515
+ "schema" : {
3516
+ "$ref" : "#/components/schemas/BodyWithMessage"
3517
+ }
3518
+ }
3519
+ },
3520
+ "description" : "Forbidden"
3521
+ },
3522
+ "404" : {
3523
+ "content" : {
3524
+ "application/json" : {
3525
+ "schema" : {
3526
+ "$ref" : "#/components/schemas/BodyWithMessage"
3527
+ }
3528
+ }
3529
+ },
3530
+ "description" : "Provider not found"
3531
+ },
3532
+ "500" : {
3533
+ "content" : {
3534
+ "application/json" : {
3535
+ "schema" : {
3536
+ "$ref" : "#/components/schemas/BodyWithMessage"
3537
+ }
3538
+ }
3539
+ },
3540
+ "description" : "Error while fetching models"
3541
+ }
3542
+ },
3543
+ "summary" : "Validate a stored provider",
3544
+ "tags" : [ "engine" ]
3545
+ }
3546
+ },
3465
3547
  "/files" : {
3466
3548
  "get" : {
3467
3549
  "description" : "Retrieves a list of all files (admin only)",
@@ -9091,6 +9173,10 @@
9091
9173
  "properties" : {
9092
9174
  "message" : {
9093
9175
  "type" : "string"
9176
+ },
9177
+ "stream" : {
9178
+ "description" : "Whether to activate incremental generation of the response",
9179
+ "type" : "boolean"
9094
9180
  }
9095
9181
  },
9096
9182
  "required" : [ "message" ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",