@gpuai/sdk 0.3.11 → 0.3.13

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 (54) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +8 -2
  3. package/dist/apis/InferenceApi.d.ts +19 -0
  4. package/dist/apis/InferenceApi.js +51 -0
  5. package/dist/esm/apis/InferenceApi.d.ts +19 -0
  6. package/dist/esm/apis/InferenceApi.js +51 -0
  7. package/dist/esm/models/CreateInstanceRequest.d.ts +1 -1
  8. package/dist/esm/models/Embedding.d.ts +51 -0
  9. package/dist/esm/models/Embedding.js +59 -0
  10. package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
  11. package/dist/esm/models/EmbeddingsRequest.js +60 -0
  12. package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
  13. package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
  14. package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
  15. package/dist/esm/models/EmbeddingsResponse.js +65 -0
  16. package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
  17. package/dist/esm/models/EmbeddingsUsage.js +47 -0
  18. package/dist/esm/models/Instance.d.ts +1 -1
  19. package/dist/esm/models/Pricing.d.ts +1 -1
  20. package/dist/esm/models/index.d.ts +5 -0
  21. package/dist/esm/models/index.js +5 -0
  22. package/dist/models/CreateInstanceRequest.d.ts +1 -1
  23. package/dist/models/Embedding.d.ts +51 -0
  24. package/dist/models/Embedding.js +67 -0
  25. package/dist/models/EmbeddingsRequest.d.ts +64 -0
  26. package/dist/models/EmbeddingsRequest.js +68 -0
  27. package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
  28. package/dist/models/EmbeddingsRequestInput.js +53 -0
  29. package/dist/models/EmbeddingsResponse.d.ts +59 -0
  30. package/dist/models/EmbeddingsResponse.js +73 -0
  31. package/dist/models/EmbeddingsUsage.d.ts +38 -0
  32. package/dist/models/EmbeddingsUsage.js +54 -0
  33. package/dist/models/Instance.d.ts +1 -1
  34. package/dist/models/Pricing.d.ts +1 -1
  35. package/dist/models/index.d.ts +5 -0
  36. package/dist/models/index.js +5 -0
  37. package/docs/Embedding.md +38 -0
  38. package/docs/EmbeddingsRequest.md +42 -0
  39. package/docs/EmbeddingsRequestInput.md +33 -0
  40. package/docs/EmbeddingsResponse.md +40 -0
  41. package/docs/EmbeddingsUsage.md +37 -0
  42. package/docs/InferenceApi.md +83 -0
  43. package/docs/PricingApi.md +2 -2
  44. package/package.json +1 -1
  45. package/src/apis/InferenceApi.ts +71 -0
  46. package/src/models/CreateInstanceRequest.ts +1 -1
  47. package/src/models/Embedding.ts +96 -0
  48. package/src/models/EmbeddingsRequest.ts +117 -0
  49. package/src/models/EmbeddingsRequestInput.ts +59 -0
  50. package/src/models/EmbeddingsResponse.ts +120 -0
  51. package/src/models/EmbeddingsUsage.ts +75 -0
  52. package/src/models/Instance.ts +1 -1
  53. package/src/models/Pricing.ts +1 -1
  54. package/src/models/index.ts +5 -0
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { EmbeddingFromJSON, EmbeddingToJSON, } from './Embedding';
15
+ import { EmbeddingsUsageFromJSON, EmbeddingsUsageToJSON, } from './EmbeddingsUsage';
16
+ /**
17
+ * @export
18
+ */
19
+ export const EmbeddingsResponseObjectEnum = {
20
+ List: 'list'
21
+ };
22
+ /**
23
+ * Check if a given object implements the EmbeddingsResponse interface.
24
+ */
25
+ export function instanceOfEmbeddingsResponse(value) {
26
+ if (!('object' in value) || value['object'] === undefined)
27
+ return false;
28
+ if (value['object'] !== 'list')
29
+ return false;
30
+ if (!('data' in value) || value['data'] === undefined)
31
+ return false;
32
+ if (!('model' in value) || value['model'] === undefined)
33
+ return false;
34
+ if (!('usage' in value) || value['usage'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ export function EmbeddingsResponseFromJSON(json) {
39
+ return EmbeddingsResponseFromJSONTyped(json, false);
40
+ }
41
+ export function EmbeddingsResponseFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'object': json['object'],
47
+ 'data': (json['data'].map(EmbeddingFromJSON)),
48
+ 'model': json['model'],
49
+ 'usage': EmbeddingsUsageFromJSON(json['usage']),
50
+ };
51
+ }
52
+ export function EmbeddingsResponseToJSON(json) {
53
+ return EmbeddingsResponseToJSONTyped(json, false);
54
+ }
55
+ export function EmbeddingsResponseToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'object': value['object'],
61
+ 'data': (value['data'].map(EmbeddingToJSON)),
62
+ 'model': value['model'],
63
+ 'usage': EmbeddingsUsageToJSON(value['usage']),
64
+ };
65
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Embeddings are billed on input tokens only, so this block carries no completion_tokens field — an embeddings call emits none, and total_tokens always equals prompt_tokens.
14
+ * @export
15
+ * @interface EmbeddingsUsage
16
+ */
17
+ export interface EmbeddingsUsage {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof EmbeddingsUsage
22
+ */
23
+ promptTokens: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof EmbeddingsUsage
28
+ */
29
+ totalTokens: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the EmbeddingsUsage interface.
33
+ */
34
+ export declare function instanceOfEmbeddingsUsage(value: object): value is EmbeddingsUsage;
35
+ export declare function EmbeddingsUsageFromJSON(json: any): EmbeddingsUsage;
36
+ export declare function EmbeddingsUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsUsage;
37
+ export declare function EmbeddingsUsageToJSON(json: any): EmbeddingsUsage;
38
+ export declare function EmbeddingsUsageToJSONTyped(value?: EmbeddingsUsage | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,47 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the EmbeddingsUsage interface.
16
+ */
17
+ export function instanceOfEmbeddingsUsage(value) {
18
+ if ((!('promptTokens' in value) && !('prompt_tokens' in value)) || (value['promptTokens'] === undefined && value['prompt_tokens'] === undefined))
19
+ return false;
20
+ if ((!('totalTokens' in value) && !('total_tokens' in value)) || (value['totalTokens'] === undefined && value['total_tokens'] === undefined))
21
+ return false;
22
+ return true;
23
+ }
24
+ export function EmbeddingsUsageFromJSON(json) {
25
+ return EmbeddingsUsageFromJSONTyped(json, false);
26
+ }
27
+ export function EmbeddingsUsageFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'promptTokens': json['prompt_tokens'],
33
+ 'totalTokens': json['total_tokens'],
34
+ };
35
+ }
36
+ export function EmbeddingsUsageToJSON(json) {
37
+ return EmbeddingsUsageToJSONTyped(json, false);
38
+ }
39
+ export function EmbeddingsUsageToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'prompt_tokens': value['promptTokens'],
45
+ 'total_tokens': value['totalTokens'],
46
+ };
47
+ }
@@ -53,7 +53,7 @@ export interface Instance {
53
53
  */
54
54
  region: string;
55
55
  /**
56
- *
56
+ * `spot` is soft-deprecated: spot capacity is currently unavailable sitewide (requests with tier=spot return no offerings); use on_demand.
57
57
  * @type {InstanceTierEnum}
58
58
  * @memberof Instance
59
59
  */
@@ -52,7 +52,7 @@ export interface Pricing {
52
52
  */
53
53
  region: string;
54
54
  /**
55
- *
55
+ * `spot` is soft-deprecated: spot capacity is currently unavailable sitewide (requests with tier=spot return no offerings); use on_demand.
56
56
  * @type {PricingTierEnum}
57
57
  * @memberof Pricing
58
58
  */
@@ -17,6 +17,11 @@ export * from './CreateRegistryCredentialRequest';
17
17
  export * from './CreateSshKeyRequest';
18
18
  export * from './CreateWebhookEndpointRequest';
19
19
  export * from './CryptoDeposit';
20
+ export * from './Embedding';
21
+ export * from './EmbeddingsRequest';
22
+ export * from './EmbeddingsRequestInput';
23
+ export * from './EmbeddingsResponse';
24
+ export * from './EmbeddingsUsage';
20
25
  export * from './Environments';
21
26
  export * from './FileObject';
22
27
  export * from './FineTuningJob';
@@ -19,6 +19,11 @@ export * from './CreateRegistryCredentialRequest';
19
19
  export * from './CreateSshKeyRequest';
20
20
  export * from './CreateWebhookEndpointRequest';
21
21
  export * from './CryptoDeposit';
22
+ export * from './Embedding';
23
+ export * from './EmbeddingsRequest';
24
+ export * from './EmbeddingsRequestInput';
25
+ export * from './EmbeddingsResponse';
26
+ export * from './EmbeddingsUsage';
22
27
  export * from './Environments';
23
28
  export * from './FileObject';
24
29
  export * from './FineTuningJob';
@@ -35,7 +35,7 @@ export interface CreateInstanceRequest {
35
35
  */
36
36
  region?: string;
37
37
  /**
38
- *
38
+ * `spot` is soft-deprecated: spot capacity is currently unavailable sitewide (requests with tier=spot return no offerings); use on_demand.
39
39
  * @type {CreateInstanceRequestTierEnum}
40
40
  * @memberof CreateInstanceRequest
41
41
  */
@@ -0,0 +1,51 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface Embedding
16
+ */
17
+ export interface Embedding {
18
+ /**
19
+ *
20
+ * @type {EmbeddingObjectEnum}
21
+ * @memberof Embedding
22
+ */
23
+ object: EmbeddingObjectEnum;
24
+ /**
25
+ * The embedding vector as 32-bit floats.
26
+ * @type {Array<number>}
27
+ * @memberof Embedding
28
+ */
29
+ embedding: Array<number>;
30
+ /**
31
+ * Position of this vector's input in the request.
32
+ * @type {number}
33
+ * @memberof Embedding
34
+ */
35
+ index: number;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const EmbeddingObjectEnum: {
41
+ readonly Embedding: "embedding";
42
+ };
43
+ export type EmbeddingObjectEnum = typeof EmbeddingObjectEnum[keyof typeof EmbeddingObjectEnum];
44
+ /**
45
+ * Check if a given object implements the Embedding interface.
46
+ */
47
+ export declare function instanceOfEmbedding(value: object): value is Embedding;
48
+ export declare function EmbeddingFromJSON(json: any): Embedding;
49
+ export declare function EmbeddingFromJSONTyped(json: any, ignoreDiscriminator: boolean): Embedding;
50
+ export declare function EmbeddingToJSON(json: any): Embedding;
51
+ export declare function EmbeddingToJSONTyped(value?: Embedding | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.EmbeddingObjectEnum = void 0;
17
+ exports.instanceOfEmbedding = instanceOfEmbedding;
18
+ exports.EmbeddingFromJSON = EmbeddingFromJSON;
19
+ exports.EmbeddingFromJSONTyped = EmbeddingFromJSONTyped;
20
+ exports.EmbeddingToJSON = EmbeddingToJSON;
21
+ exports.EmbeddingToJSONTyped = EmbeddingToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.EmbeddingObjectEnum = {
26
+ Embedding: 'embedding'
27
+ };
28
+ /**
29
+ * Check if a given object implements the Embedding interface.
30
+ */
31
+ function instanceOfEmbedding(value) {
32
+ if (!('object' in value) || value['object'] === undefined)
33
+ return false;
34
+ if (value['object'] !== 'embedding')
35
+ return false;
36
+ if (!('embedding' in value) || value['embedding'] === undefined)
37
+ return false;
38
+ if (!('index' in value) || value['index'] === undefined)
39
+ return false;
40
+ return true;
41
+ }
42
+ function EmbeddingFromJSON(json) {
43
+ return EmbeddingFromJSONTyped(json, false);
44
+ }
45
+ function EmbeddingFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'object': json['object'],
51
+ 'embedding': json['embedding'],
52
+ 'index': json['index'],
53
+ };
54
+ }
55
+ function EmbeddingToJSON(json) {
56
+ return EmbeddingToJSONTyped(json, false);
57
+ }
58
+ function EmbeddingToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'object': value['object'],
64
+ 'embedding': value['embedding'],
65
+ 'index': value['index'],
66
+ };
67
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { EmbeddingsRequestInput } from './EmbeddingsRequestInput';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface EmbeddingsRequest
17
+ */
18
+ export interface EmbeddingsRequest {
19
+ /**
20
+ * Canonical embedding model id, e.g. "gpuai/qwen3-embedding-8b".
21
+ * @type {string}
22
+ * @memberof EmbeddingsRequest
23
+ */
24
+ model: string;
25
+ /**
26
+ *
27
+ * @type {EmbeddingsRequestInput}
28
+ * @memberof EmbeddingsRequest
29
+ */
30
+ input: EmbeddingsRequestInput;
31
+ /**
32
+ * Only "float" is supported. A value of "base64" is rejected with invalid_request_error / unsupported_parameter.
33
+ * @type {EmbeddingsRequestEncodingFormatEnum}
34
+ * @memberof EmbeddingsRequest
35
+ */
36
+ encodingFormat?: EmbeddingsRequestEncodingFormatEnum;
37
+ /**
38
+ * Requested output dimensionality, for models that support truncated (Matryoshka) embeddings. Passed through to the model when set.
39
+ * @type {number}
40
+ * @memberof EmbeddingsRequest
41
+ */
42
+ dimensions?: number;
43
+ /**
44
+ * Opaque end-user identifier for abuse tracing. Optional.
45
+ * @type {string}
46
+ * @memberof EmbeddingsRequest
47
+ */
48
+ user?: string;
49
+ }
50
+ /**
51
+ * @export
52
+ */
53
+ export declare const EmbeddingsRequestEncodingFormatEnum: {
54
+ readonly Float: "float";
55
+ };
56
+ export type EmbeddingsRequestEncodingFormatEnum = typeof EmbeddingsRequestEncodingFormatEnum[keyof typeof EmbeddingsRequestEncodingFormatEnum];
57
+ /**
58
+ * Check if a given object implements the EmbeddingsRequest interface.
59
+ */
60
+ export declare function instanceOfEmbeddingsRequest(value: object): value is EmbeddingsRequest;
61
+ export declare function EmbeddingsRequestFromJSON(json: any): EmbeddingsRequest;
62
+ export declare function EmbeddingsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsRequest;
63
+ export declare function EmbeddingsRequestToJSON(json: any): EmbeddingsRequest;
64
+ export declare function EmbeddingsRequestToJSONTyped(value?: EmbeddingsRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.EmbeddingsRequestEncodingFormatEnum = void 0;
17
+ exports.instanceOfEmbeddingsRequest = instanceOfEmbeddingsRequest;
18
+ exports.EmbeddingsRequestFromJSON = EmbeddingsRequestFromJSON;
19
+ exports.EmbeddingsRequestFromJSONTyped = EmbeddingsRequestFromJSONTyped;
20
+ exports.EmbeddingsRequestToJSON = EmbeddingsRequestToJSON;
21
+ exports.EmbeddingsRequestToJSONTyped = EmbeddingsRequestToJSONTyped;
22
+ const EmbeddingsRequestInput_1 = require("./EmbeddingsRequestInput");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.EmbeddingsRequestEncodingFormatEnum = {
27
+ Float: 'float'
28
+ };
29
+ /**
30
+ * Check if a given object implements the EmbeddingsRequest interface.
31
+ */
32
+ function instanceOfEmbeddingsRequest(value) {
33
+ if (!('model' in value) || value['model'] === undefined)
34
+ return false;
35
+ if (!('input' in value) || value['input'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function EmbeddingsRequestFromJSON(json) {
40
+ return EmbeddingsRequestFromJSONTyped(json, false);
41
+ }
42
+ function EmbeddingsRequestFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'model': json['model'],
48
+ 'input': (0, EmbeddingsRequestInput_1.EmbeddingsRequestInputFromJSON)(json['input']),
49
+ 'encodingFormat': json['encoding_format'] == null ? undefined : json['encoding_format'],
50
+ 'dimensions': json['dimensions'] == null ? undefined : json['dimensions'],
51
+ 'user': json['user'] == null ? undefined : json['user'],
52
+ };
53
+ }
54
+ function EmbeddingsRequestToJSON(json) {
55
+ return EmbeddingsRequestToJSONTyped(json, false);
56
+ }
57
+ function EmbeddingsRequestToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'model': value['model'],
63
+ 'input': (0, EmbeddingsRequestInput_1.EmbeddingsRequestInputToJSON)(value['input']),
64
+ 'encoding_format': value['encodingFormat'],
65
+ 'dimensions': value['dimensions'],
66
+ 'user': value['user'],
67
+ };
68
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * @type EmbeddingsRequestInput
14
+ * Text to embed: either a single string or an array of up to 2048 strings. Token-id arrays are not supported. The per-request ceiling is bounded so the response stays under 64 MiB — about 680 inputs at 4096 dimensions, fewer at a larger `dimensions` value; an over-limit batch is rejected with 400 invalid_request_error whose message states the limit, before any processing.
15
+ * @export
16
+ */
17
+ export type EmbeddingsRequestInput = Array<string> | string;
18
+ export declare function EmbeddingsRequestInputFromJSON(json: any): EmbeddingsRequestInput;
19
+ export declare function EmbeddingsRequestInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsRequestInput;
20
+ export declare function EmbeddingsRequestInputToJSON(json: any): any;
21
+ export declare function EmbeddingsRequestInputToJSONTyped(value?: EmbeddingsRequestInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.EmbeddingsRequestInputFromJSON = EmbeddingsRequestInputFromJSON;
17
+ exports.EmbeddingsRequestInputFromJSONTyped = EmbeddingsRequestInputFromJSONTyped;
18
+ exports.EmbeddingsRequestInputToJSON = EmbeddingsRequestInputToJSON;
19
+ exports.EmbeddingsRequestInputToJSONTyped = EmbeddingsRequestInputToJSONTyped;
20
+ function EmbeddingsRequestInputFromJSON(json) {
21
+ return EmbeddingsRequestInputFromJSONTyped(json, false);
22
+ }
23
+ function EmbeddingsRequestInputFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ if (Array.isArray(json)) {
28
+ if (json.every(item => typeof item === 'string')) {
29
+ return json;
30
+ }
31
+ }
32
+ if (typeof json === 'string') {
33
+ return json;
34
+ }
35
+ return {};
36
+ }
37
+ function EmbeddingsRequestInputToJSON(json) {
38
+ return EmbeddingsRequestInputToJSONTyped(json, false);
39
+ }
40
+ function EmbeddingsRequestInputToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ if (Array.isArray(value)) {
45
+ if (value.every(item => typeof item === 'string')) {
46
+ return value;
47
+ }
48
+ }
49
+ if (typeof value === 'string') {
50
+ return value;
51
+ }
52
+ return {};
53
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Embedding } from './Embedding';
13
+ import type { EmbeddingsUsage } from './EmbeddingsUsage';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface EmbeddingsResponse
18
+ */
19
+ export interface EmbeddingsResponse {
20
+ /**
21
+ *
22
+ * @type {EmbeddingsResponseObjectEnum}
23
+ * @memberof EmbeddingsResponse
24
+ */
25
+ object: EmbeddingsResponseObjectEnum;
26
+ /**
27
+ *
28
+ * @type {Array<Embedding>}
29
+ * @memberof EmbeddingsResponse
30
+ */
31
+ data: Array<Embedding>;
32
+ /**
33
+ * Canonical (gpuai/...) model id, NEVER the upstream identifier.
34
+ * @type {string}
35
+ * @memberof EmbeddingsResponse
36
+ */
37
+ model: string;
38
+ /**
39
+ *
40
+ * @type {EmbeddingsUsage}
41
+ * @memberof EmbeddingsResponse
42
+ */
43
+ usage: EmbeddingsUsage;
44
+ }
45
+ /**
46
+ * @export
47
+ */
48
+ export declare const EmbeddingsResponseObjectEnum: {
49
+ readonly List: "list";
50
+ };
51
+ export type EmbeddingsResponseObjectEnum = typeof EmbeddingsResponseObjectEnum[keyof typeof EmbeddingsResponseObjectEnum];
52
+ /**
53
+ * Check if a given object implements the EmbeddingsResponse interface.
54
+ */
55
+ export declare function instanceOfEmbeddingsResponse(value: object): value is EmbeddingsResponse;
56
+ export declare function EmbeddingsResponseFromJSON(json: any): EmbeddingsResponse;
57
+ export declare function EmbeddingsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsResponse;
58
+ export declare function EmbeddingsResponseToJSON(json: any): EmbeddingsResponse;
59
+ export declare function EmbeddingsResponseToJSONTyped(value?: EmbeddingsResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.EmbeddingsResponseObjectEnum = void 0;
17
+ exports.instanceOfEmbeddingsResponse = instanceOfEmbeddingsResponse;
18
+ exports.EmbeddingsResponseFromJSON = EmbeddingsResponseFromJSON;
19
+ exports.EmbeddingsResponseFromJSONTyped = EmbeddingsResponseFromJSONTyped;
20
+ exports.EmbeddingsResponseToJSON = EmbeddingsResponseToJSON;
21
+ exports.EmbeddingsResponseToJSONTyped = EmbeddingsResponseToJSONTyped;
22
+ const Embedding_1 = require("./Embedding");
23
+ const EmbeddingsUsage_1 = require("./EmbeddingsUsage");
24
+ /**
25
+ * @export
26
+ */
27
+ exports.EmbeddingsResponseObjectEnum = {
28
+ List: 'list'
29
+ };
30
+ /**
31
+ * Check if a given object implements the EmbeddingsResponse interface.
32
+ */
33
+ function instanceOfEmbeddingsResponse(value) {
34
+ if (!('object' in value) || value['object'] === undefined)
35
+ return false;
36
+ if (value['object'] !== 'list')
37
+ return false;
38
+ if (!('data' in value) || value['data'] === undefined)
39
+ return false;
40
+ if (!('model' in value) || value['model'] === undefined)
41
+ return false;
42
+ if (!('usage' in value) || value['usage'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ function EmbeddingsResponseFromJSON(json) {
47
+ return EmbeddingsResponseFromJSONTyped(json, false);
48
+ }
49
+ function EmbeddingsResponseFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'object': json['object'],
55
+ 'data': (json['data'].map(Embedding_1.EmbeddingFromJSON)),
56
+ 'model': json['model'],
57
+ 'usage': (0, EmbeddingsUsage_1.EmbeddingsUsageFromJSON)(json['usage']),
58
+ };
59
+ }
60
+ function EmbeddingsResponseToJSON(json) {
61
+ return EmbeddingsResponseToJSONTyped(json, false);
62
+ }
63
+ function EmbeddingsResponseToJSONTyped(value, ignoreDiscriminator = false) {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+ return {
68
+ 'object': value['object'],
69
+ 'data': (value['data'].map(Embedding_1.EmbeddingToJSON)),
70
+ 'model': value['model'],
71
+ 'usage': (0, EmbeddingsUsage_1.EmbeddingsUsageToJSON)(value['usage']),
72
+ };
73
+ }