@gpuai/sdk 0.4.2 → 0.5.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.
- package/.openapi-generator/FILES +22 -0
- package/README.md +13 -2
- package/dist/apis/InstancesApi.d.ts +2 -0
- package/dist/apis/InstancesApi.js +2 -0
- package/dist/esm/apis/InstancesApi.d.ts +2 -0
- package/dist/esm/apis/InstancesApi.js +2 -0
- package/dist/esm/models/ChatCompletionRequest.d.ts +27 -0
- package/dist/esm/models/ChatCompletionRequest.js +11 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.d.ts +22 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.js +50 -0
- package/dist/esm/models/ChatJSONSchemaFormat.d.ts +52 -0
- package/dist/esm/models/ChatJSONSchemaFormat.js +51 -0
- package/dist/esm/models/ChatMessage.d.ts +21 -1
- package/dist/esm/models/ChatMessage.js +10 -4
- package/dist/esm/models/ChatNamedToolChoice.d.ts +46 -0
- package/dist/esm/models/ChatNamedToolChoice.js +56 -0
- package/dist/esm/models/ChatNamedToolChoiceFunction.d.ts +32 -0
- package/dist/esm/models/ChatNamedToolChoiceFunction.js +43 -0
- package/dist/esm/models/ChatResponseFormat.d.ts +48 -0
- package/dist/esm/models/ChatResponseFormat.js +54 -0
- package/dist/esm/models/ChatTool.d.ts +46 -0
- package/dist/esm/models/ChatTool.js +56 -0
- package/dist/esm/models/ChatToolCall.d.ts +52 -0
- package/dist/esm/models/ChatToolCall.js +60 -0
- package/dist/esm/models/ChatToolCallFunction.d.ts +38 -0
- package/dist/esm/models/ChatToolCallFunction.js +47 -0
- package/dist/esm/models/ChatToolFunction.d.ts +52 -0
- package/dist/esm/models/ChatToolFunction.js +49 -0
- package/dist/esm/models/CreateFunctionVersionRequest.d.ts +6 -0
- package/dist/esm/models/CreateFunctionVersionRequest.js +2 -0
- package/dist/esm/models/CreateInstanceRequest.d.ts +13 -0
- package/dist/esm/models/CreateInstanceRequest.js +5 -0
- package/dist/esm/models/DedicatedIPRequest.d.ts +32 -0
- package/dist/esm/models/DedicatedIPRequest.js +41 -0
- package/dist/esm/models/FunctionVersion.d.ts +6 -0
- package/dist/esm/models/FunctionVersion.js +4 -0
- package/dist/esm/models/Instance.d.ts +7 -0
- package/dist/esm/models/Instance.js +3 -0
- package/dist/esm/models/InstanceDedicatedIP.d.ts +83 -0
- package/dist/esm/models/InstanceDedicatedIP.js +77 -0
- package/dist/esm/models/Model.d.ts +12 -0
- package/dist/esm/models/Model.js +4 -0
- package/dist/esm/models/Problem.d.ts +2 -0
- package/dist/esm/models/Problem.js +2 -0
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.js +11 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/ChatCompletionRequest.d.ts +27 -0
- package/dist/models/ChatCompletionRequest.js +11 -0
- package/dist/models/ChatCompletionRequestToolChoice.d.ts +22 -0
- package/dist/models/ChatCompletionRequestToolChoice.js +56 -0
- package/dist/models/ChatJSONSchemaFormat.d.ts +52 -0
- package/dist/models/ChatJSONSchemaFormat.js +58 -0
- package/dist/models/ChatMessage.d.ts +21 -1
- package/dist/models/ChatMessage.js +10 -4
- package/dist/models/ChatNamedToolChoice.d.ts +46 -0
- package/dist/models/ChatNamedToolChoice.js +64 -0
- package/dist/models/ChatNamedToolChoiceFunction.d.ts +32 -0
- package/dist/models/ChatNamedToolChoiceFunction.js +50 -0
- package/dist/models/ChatResponseFormat.d.ts +48 -0
- package/dist/models/ChatResponseFormat.js +62 -0
- package/dist/models/ChatTool.d.ts +46 -0
- package/dist/models/ChatTool.js +64 -0
- package/dist/models/ChatToolCall.d.ts +52 -0
- package/dist/models/ChatToolCall.js +68 -0
- package/dist/models/ChatToolCallFunction.d.ts +38 -0
- package/dist/models/ChatToolCallFunction.js +54 -0
- package/dist/models/ChatToolFunction.d.ts +52 -0
- package/dist/models/ChatToolFunction.js +56 -0
- package/dist/models/CreateFunctionVersionRequest.d.ts +6 -0
- package/dist/models/CreateFunctionVersionRequest.js +2 -0
- package/dist/models/CreateInstanceRequest.d.ts +13 -0
- package/dist/models/CreateInstanceRequest.js +5 -0
- package/dist/models/DedicatedIPRequest.d.ts +32 -0
- package/dist/models/DedicatedIPRequest.js +48 -0
- package/dist/models/FunctionVersion.d.ts +6 -0
- package/dist/models/FunctionVersion.js +4 -0
- package/dist/models/Instance.d.ts +7 -0
- package/dist/models/Instance.js +3 -0
- package/dist/models/InstanceDedicatedIP.d.ts +83 -0
- package/dist/models/InstanceDedicatedIP.js +85 -0
- package/dist/models/Model.d.ts +12 -0
- package/dist/models/Model.js +4 -0
- package/dist/models/Problem.d.ts +2 -0
- package/dist/models/Problem.js +2 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +11 -0
- package/dist/runtime.js +1 -1
- package/docs/ChatCompletionRequest.md +8 -0
- package/docs/ChatCompletionRequestToolChoice.md +37 -0
- package/docs/ChatJSONSchemaFormat.md +40 -0
- package/docs/ChatMessage.md +6 -0
- package/docs/ChatNamedToolChoice.md +36 -0
- package/docs/ChatNamedToolChoiceFunction.md +34 -0
- package/docs/ChatResponseFormat.md +37 -0
- package/docs/ChatTool.md +36 -0
- package/docs/ChatToolCall.md +38 -0
- package/docs/ChatToolCallFunction.md +36 -0
- package/docs/ChatToolFunction.md +40 -0
- package/docs/CreateFunctionVersionRequest.md +2 -0
- package/docs/CreateInstanceRequest.md +4 -0
- package/docs/DedicatedIPRequest.md +35 -0
- package/docs/FunctionVersion.md +2 -0
- package/docs/Instance.md +2 -0
- package/docs/InstanceDedicatedIP.md +49 -0
- package/docs/InstancesApi.md +3 -1
- package/docs/Model.md +4 -0
- package/package.json +1 -1
- package/src/apis/InstancesApi.ts +2 -0
- package/src/models/ChatCompletionRequest.ts +53 -0
- package/src/models/ChatCompletionRequestToolChoice.ts +69 -0
- package/src/models/ChatJSONSchemaFormat.ts +91 -0
- package/src/models/ChatMessage.ts +36 -4
- package/src/models/ChatNamedToolChoice.ts +95 -0
- package/src/models/ChatNamedToolChoiceFunction.ts +66 -0
- package/src/models/ChatResponseFormat.ts +94 -0
- package/src/models/ChatTool.ts +95 -0
- package/src/models/ChatToolCall.ts +104 -0
- package/src/models/ChatToolCallFunction.ts +75 -0
- package/src/models/ChatToolFunction.ts +90 -0
- package/src/models/CreateFunctionVersionRequest.ts +8 -0
- package/src/models/CreateInstanceRequest.ts +23 -0
- package/src/models/DedicatedIPRequest.ts +65 -0
- package/src/models/FunctionVersion.ts +9 -0
- package/src/models/Instance.ts +15 -0
- package/src/models/InstanceDedicatedIP.ts +140 -0
- package/src/models/Model.ts +16 -0
- package/src/models/Problem.ts +2 -0
- package/src/models/index.ts +11 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
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.InstanceDedicatedIPStatusEnum = void 0;
|
|
17
|
+
exports.instanceOfInstanceDedicatedIP = instanceOfInstanceDedicatedIP;
|
|
18
|
+
exports.InstanceDedicatedIPFromJSON = InstanceDedicatedIPFromJSON;
|
|
19
|
+
exports.InstanceDedicatedIPFromJSONTyped = InstanceDedicatedIPFromJSONTyped;
|
|
20
|
+
exports.InstanceDedicatedIPToJSON = InstanceDedicatedIPToJSON;
|
|
21
|
+
exports.InstanceDedicatedIPToJSONTyped = InstanceDedicatedIPToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.InstanceDedicatedIPStatusEnum = {
|
|
26
|
+
Active: 'active',
|
|
27
|
+
Suspended: 'suspended',
|
|
28
|
+
Released: 'released'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the InstanceDedicatedIP interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfInstanceDedicatedIP(value) {
|
|
34
|
+
if (!('address' in value) || value['address'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('ports' in value) || value['ports'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if ((!('hourlyFee' in value) && !('hourly_fee' in value)) || (value['hourlyFee'] === undefined && value['hourly_fee'] === undefined))
|
|
41
|
+
return false;
|
|
42
|
+
if ((!('transferPricePerGb' in value) && !('transfer_price_per_gb' in value)) || (value['transferPricePerGb'] === undefined && value['transfer_price_per_gb'] === undefined))
|
|
43
|
+
return false;
|
|
44
|
+
if ((!('transferGb' in value) && !('transfer_gb' in value)) || (value['transferGb'] === undefined && value['transfer_gb'] === undefined))
|
|
45
|
+
return false;
|
|
46
|
+
if ((!('chargedUsd' in value) && !('charged_usd' in value)) || (value['chargedUsd'] === undefined && value['charged_usd'] === undefined))
|
|
47
|
+
return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
function InstanceDedicatedIPFromJSON(json) {
|
|
51
|
+
return InstanceDedicatedIPFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function InstanceDedicatedIPFromJSONTyped(json, ignoreDiscriminator) {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'address': json['address'],
|
|
59
|
+
'ports': json['ports'],
|
|
60
|
+
'status': json['status'],
|
|
61
|
+
'suspendReason': json['suspend_reason'] == null ? undefined : json['suspend_reason'],
|
|
62
|
+
'hourlyFee': json['hourly_fee'],
|
|
63
|
+
'transferPricePerGb': json['transfer_price_per_gb'],
|
|
64
|
+
'transferGb': json['transfer_gb'],
|
|
65
|
+
'chargedUsd': json['charged_usd'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function InstanceDedicatedIPToJSON(json) {
|
|
69
|
+
return InstanceDedicatedIPToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
function InstanceDedicatedIPToJSONTyped(value, ignoreDiscriminator = false) {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
'address': value['address'],
|
|
77
|
+
'ports': value['ports'],
|
|
78
|
+
'status': value['status'],
|
|
79
|
+
'suspend_reason': value['suspendReason'],
|
|
80
|
+
'hourly_fee': value['hourlyFee'],
|
|
81
|
+
'transfer_price_per_gb': value['transferPricePerGb'],
|
|
82
|
+
'transfer_gb': value['transferGb'],
|
|
83
|
+
'charged_usd': value['chargedUsd'],
|
|
84
|
+
};
|
|
85
|
+
}
|
package/dist/models/Model.d.ts
CHANGED
|
@@ -71,6 +71,18 @@ export interface Model {
|
|
|
71
71
|
* @memberof Model
|
|
72
72
|
*/
|
|
73
73
|
supportedParameters?: Array<string>;
|
|
74
|
+
/**
|
|
75
|
+
* Chat models only. True when POST /v1/chat/completions accepts tools / tool_choice / parallel_tool_calls for this model and tier.
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
* @memberof Model
|
|
78
|
+
*/
|
|
79
|
+
supportsTools?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Chat models only. True when POST /v1/chat/completions accepts response_format json_object / json_schema for this model and tier.
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
* @memberof Model
|
|
84
|
+
*/
|
|
85
|
+
supportsStructuredOutputs?: boolean;
|
|
74
86
|
/**
|
|
75
87
|
* Typed parameter descriptors for media (image/video) models — name, type, enum/bounds/default. Playgrounds render input forms from these.
|
|
76
88
|
* @type {Array<ModelParametersInner>}
|
package/dist/models/Model.js
CHANGED
|
@@ -81,6 +81,8 @@ function ModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
81
|
'category': json['category'] == null ? undefined : json['category'],
|
|
82
82
|
'contextLength': json['context_length'] == null ? undefined : json['context_length'],
|
|
83
83
|
'supportedParameters': json['supported_parameters'] == null ? undefined : json['supported_parameters'],
|
|
84
|
+
'supportsTools': json['supports_tools'] == null ? undefined : json['supports_tools'],
|
|
85
|
+
'supportsStructuredOutputs': json['supports_structured_outputs'] == null ? undefined : json['supports_structured_outputs'],
|
|
84
86
|
'parameters': json['parameters'] == null ? undefined : (json['parameters'].map(ModelParametersInner_1.ModelParametersInnerFromJSON)),
|
|
85
87
|
'pricing': (0, ModelPricing_1.ModelPricingFromJSON)(json['pricing']),
|
|
86
88
|
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
@@ -106,6 +108,8 @@ function ModelToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
106
108
|
'category': value['category'],
|
|
107
109
|
'context_length': value['contextLength'],
|
|
108
110
|
'supported_parameters': value['supportedParameters'],
|
|
111
|
+
'supports_tools': value['supportsTools'],
|
|
112
|
+
'supports_structured_outputs': value['supportsStructuredOutputs'],
|
|
109
113
|
'parameters': value['parameters'] == null ? undefined : (value['parameters'].map(ModelParametersInner_1.ModelParametersInnerToJSON)),
|
|
110
114
|
'pricing': (0, ModelPricing_1.ModelPricingToJSON)(value['pricing']),
|
|
111
115
|
'aliases': value['aliases'],
|
package/dist/models/Problem.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ export declare const ProblemCodeEnum: {
|
|
|
69
69
|
readonly ModelTooLarge: "model_too_large";
|
|
70
70
|
readonly GpuVramTooSmall: "gpu_vram_too_small";
|
|
71
71
|
readonly PriceChanged: "price_changed";
|
|
72
|
+
readonly DedicatedIpLimit: "dedicated_ip_limit";
|
|
73
|
+
readonly DedicatedIpUnavailable: "dedicated_ip_unavailable";
|
|
72
74
|
readonly InsufficientBalance: "insufficient_balance";
|
|
73
75
|
readonly QuotaExceeded: "quota_exceeded";
|
|
74
76
|
readonly RateLimited: "rate_limited";
|
package/dist/models/Problem.js
CHANGED
|
@@ -36,6 +36,8 @@ exports.ProblemCodeEnum = {
|
|
|
36
36
|
ModelTooLarge: 'model_too_large',
|
|
37
37
|
GpuVramTooSmall: 'gpu_vram_too_small',
|
|
38
38
|
PriceChanged: 'price_changed',
|
|
39
|
+
DedicatedIpLimit: 'dedicated_ip_limit',
|
|
40
|
+
DedicatedIpUnavailable: 'dedicated_ip_unavailable',
|
|
39
41
|
InsufficientBalance: 'insufficient_balance',
|
|
40
42
|
QuotaExceeded: 'quota_exceeded',
|
|
41
43
|
RateLimited: 'rate_limited',
|
package/dist/models/index.d.ts
CHANGED
|
@@ -6,8 +6,17 @@ export * from './Balance';
|
|
|
6
6
|
export * from './BillingDetails';
|
|
7
7
|
export * from './ChatChoice';
|
|
8
8
|
export * from './ChatCompletionRequest';
|
|
9
|
+
export * from './ChatCompletionRequestToolChoice';
|
|
9
10
|
export * from './ChatCompletionResponse';
|
|
11
|
+
export * from './ChatJSONSchemaFormat';
|
|
10
12
|
export * from './ChatMessage';
|
|
13
|
+
export * from './ChatNamedToolChoice';
|
|
14
|
+
export * from './ChatNamedToolChoiceFunction';
|
|
15
|
+
export * from './ChatResponseFormat';
|
|
16
|
+
export * from './ChatTool';
|
|
17
|
+
export * from './ChatToolCall';
|
|
18
|
+
export * from './ChatToolCallFunction';
|
|
19
|
+
export * from './ChatToolFunction';
|
|
11
20
|
export * from './CommunityMachine';
|
|
12
21
|
export * from './CommunityMachineDelistResult';
|
|
13
22
|
export * from './CommunityMachineRegistration';
|
|
@@ -26,6 +35,7 @@ export * from './CreateRegistryCredentialRequest';
|
|
|
26
35
|
export * from './CreateSshKeyRequest';
|
|
27
36
|
export * from './CreateWebhookEndpointRequest';
|
|
28
37
|
export * from './CryptoDeposit';
|
|
38
|
+
export * from './DedicatedIPRequest';
|
|
29
39
|
export * from './Embedding';
|
|
30
40
|
export * from './EmbeddingsRequest';
|
|
31
41
|
export * from './EmbeddingsRequestInput';
|
|
@@ -63,6 +73,7 @@ export * from './ImagesResponseUsage';
|
|
|
63
73
|
export * from './IncludeItem';
|
|
64
74
|
export * from './Instance';
|
|
65
75
|
export * from './InstanceConnection';
|
|
76
|
+
export * from './InstanceDedicatedIP';
|
|
66
77
|
export * from './InstanceGpuMemory';
|
|
67
78
|
export * from './InstancePage';
|
|
68
79
|
export * from './Invoice';
|
package/dist/models/index.js
CHANGED
|
@@ -24,8 +24,17 @@ __exportStar(require("./Balance"), exports);
|
|
|
24
24
|
__exportStar(require("./BillingDetails"), exports);
|
|
25
25
|
__exportStar(require("./ChatChoice"), exports);
|
|
26
26
|
__exportStar(require("./ChatCompletionRequest"), exports);
|
|
27
|
+
__exportStar(require("./ChatCompletionRequestToolChoice"), exports);
|
|
27
28
|
__exportStar(require("./ChatCompletionResponse"), exports);
|
|
29
|
+
__exportStar(require("./ChatJSONSchemaFormat"), exports);
|
|
28
30
|
__exportStar(require("./ChatMessage"), exports);
|
|
31
|
+
__exportStar(require("./ChatNamedToolChoice"), exports);
|
|
32
|
+
__exportStar(require("./ChatNamedToolChoiceFunction"), exports);
|
|
33
|
+
__exportStar(require("./ChatResponseFormat"), exports);
|
|
34
|
+
__exportStar(require("./ChatTool"), exports);
|
|
35
|
+
__exportStar(require("./ChatToolCall"), exports);
|
|
36
|
+
__exportStar(require("./ChatToolCallFunction"), exports);
|
|
37
|
+
__exportStar(require("./ChatToolFunction"), exports);
|
|
29
38
|
__exportStar(require("./CommunityMachine"), exports);
|
|
30
39
|
__exportStar(require("./CommunityMachineDelistResult"), exports);
|
|
31
40
|
__exportStar(require("./CommunityMachineRegistration"), exports);
|
|
@@ -44,6 +53,7 @@ __exportStar(require("./CreateRegistryCredentialRequest"), exports);
|
|
|
44
53
|
__exportStar(require("./CreateSshKeyRequest"), exports);
|
|
45
54
|
__exportStar(require("./CreateWebhookEndpointRequest"), exports);
|
|
46
55
|
__exportStar(require("./CryptoDeposit"), exports);
|
|
56
|
+
__exportStar(require("./DedicatedIPRequest"), exports);
|
|
47
57
|
__exportStar(require("./Embedding"), exports);
|
|
48
58
|
__exportStar(require("./EmbeddingsRequest"), exports);
|
|
49
59
|
__exportStar(require("./EmbeddingsRequestInput"), exports);
|
|
@@ -81,6 +91,7 @@ __exportStar(require("./ImagesResponseUsage"), exports);
|
|
|
81
91
|
__exportStar(require("./IncludeItem"), exports);
|
|
82
92
|
__exportStar(require("./Instance"), exports);
|
|
83
93
|
__exportStar(require("./InstanceConnection"), exports);
|
|
94
|
+
__exportStar(require("./InstanceDedicatedIP"), exports);
|
|
84
95
|
__exportStar(require("./InstanceGpuMemory"), exports);
|
|
85
96
|
__exportStar(require("./InstancePage"), exports);
|
|
86
97
|
__exportStar(require("./Invoice"), exports);
|
package/dist/runtime.js
CHANGED
|
@@ -69,7 +69,7 @@ class Configuration {
|
|
|
69
69
|
return undefined;
|
|
70
70
|
}
|
|
71
71
|
get headers() {
|
|
72
|
-
return Object.assign({ 'User-Agent': 'gpuai-sdk-ts/0.
|
|
72
|
+
return Object.assign({ 'User-Agent': 'gpuai-sdk-ts/0.5.0' }, this.configuration.headers);
|
|
73
73
|
}
|
|
74
74
|
get credentials() {
|
|
75
75
|
return this.configuration.credentials;
|
|
@@ -12,6 +12,10 @@ Name | Type
|
|
|
12
12
|
`maxTokens` | number
|
|
13
13
|
`stream` | boolean
|
|
14
14
|
`streamOptions` | [StreamOptions](StreamOptions.md)
|
|
15
|
+
`tools` | [Array<ChatTool>](ChatTool.md)
|
|
16
|
+
`toolChoice` | [ChatCompletionRequestToolChoice](ChatCompletionRequestToolChoice.md)
|
|
17
|
+
`parallelToolCalls` | boolean
|
|
18
|
+
`responseFormat` | [ChatResponseFormat](ChatResponseFormat.md)
|
|
15
19
|
|
|
16
20
|
## Example
|
|
17
21
|
|
|
@@ -26,6 +30,10 @@ const example = {
|
|
|
26
30
|
"maxTokens": null,
|
|
27
31
|
"stream": null,
|
|
28
32
|
"streamOptions": null,
|
|
33
|
+
"tools": null,
|
|
34
|
+
"toolChoice": null,
|
|
35
|
+
"parallelToolCalls": null,
|
|
36
|
+
"responseFormat": null,
|
|
29
37
|
} satisfies ChatCompletionRequest
|
|
30
38
|
|
|
31
39
|
console.log(example)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatCompletionRequestToolChoice
|
|
3
|
+
|
|
4
|
+
\"auto\" (default), \"none\", \"required\", or a named function ({\"type\":\"function\",\"function\":{\"name\":\"...\"}}) that must be defined in tools.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`type` | string
|
|
11
|
+
`_function` | [ChatNamedToolChoiceFunction](ChatNamedToolChoiceFunction.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ChatCompletionRequestToolChoice } from '@gpuai/sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"type": null,
|
|
21
|
+
"_function": null,
|
|
22
|
+
} satisfies ChatCompletionRequestToolChoice
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatCompletionRequestToolChoice
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatJSONSchemaFormat
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`description` | string
|
|
11
|
+
`schema` | { [key: string]: any; }
|
|
12
|
+
`strict` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ChatJSONSchemaFormat } from '@gpuai/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"name": null,
|
|
22
|
+
"description": null,
|
|
23
|
+
"schema": null,
|
|
24
|
+
"strict": null,
|
|
25
|
+
} satisfies ChatJSONSchemaFormat
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatJSONSchemaFormat
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
package/docs/ChatMessage.md
CHANGED
|
@@ -8,6 +8,9 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`role` | string
|
|
10
10
|
`content` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`toolCalls` | [Array<ChatToolCall>](ChatToolCall.md)
|
|
13
|
+
`toolCallId` | string
|
|
11
14
|
|
|
12
15
|
## Example
|
|
13
16
|
|
|
@@ -18,6 +21,9 @@ import type { ChatMessage } from '@gpuai/sdk'
|
|
|
18
21
|
const example = {
|
|
19
22
|
"role": null,
|
|
20
23
|
"content": null,
|
|
24
|
+
"name": null,
|
|
25
|
+
"toolCalls": null,
|
|
26
|
+
"toolCallId": null,
|
|
21
27
|
} satisfies ChatMessage
|
|
22
28
|
|
|
23
29
|
console.log(example)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatNamedToolChoice
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`type` | string
|
|
10
|
+
`_function` | [ChatNamedToolChoiceFunction](ChatNamedToolChoiceFunction.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ChatNamedToolChoice } from '@gpuai/sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"type": null,
|
|
20
|
+
"_function": null,
|
|
21
|
+
} satisfies ChatNamedToolChoice
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatNamedToolChoice
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatNamedToolChoiceFunction
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ChatNamedToolChoiceFunction } from '@gpuai/sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"name": null,
|
|
19
|
+
} satisfies ChatNamedToolChoiceFunction
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatNamedToolChoiceFunction
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatResponseFormat
|
|
3
|
+
|
|
4
|
+
Structured outputs. {\"type\":\"json_object\"} (JSON mode) or {\"type\":\"json_schema\",\"json_schema\":{...}}; \"text\" is the default. Only models whose /v1/models entry has supports_structured_outputs: true accept json_object / json_schema.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`type` | string
|
|
11
|
+
`jsonSchema` | [ChatJSONSchemaFormat](ChatJSONSchemaFormat.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ChatResponseFormat } from '@gpuai/sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"type": null,
|
|
21
|
+
"jsonSchema": null,
|
|
22
|
+
} satisfies ChatResponseFormat
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatResponseFormat
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/docs/ChatTool.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatTool
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`type` | string
|
|
10
|
+
`_function` | [ChatToolFunction](ChatToolFunction.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ChatTool } from '@gpuai/sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"type": null,
|
|
20
|
+
"_function": null,
|
|
21
|
+
} satisfies ChatTool
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatTool
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatToolCall
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`type` | string
|
|
11
|
+
`_function` | [ChatToolCallFunction](ChatToolCallFunction.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ChatToolCall } from '@gpuai/sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"id": null,
|
|
21
|
+
"type": null,
|
|
22
|
+
"_function": null,
|
|
23
|
+
} satisfies ChatToolCall
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatToolCall
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatToolCallFunction
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`arguments` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ChatToolCallFunction } from '@gpuai/sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"name": null,
|
|
20
|
+
"arguments": null,
|
|
21
|
+
} satisfies ChatToolCallFunction
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatToolCallFunction
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# ChatToolFunction
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`description` | string
|
|
11
|
+
`parameters` | { [key: string]: any; }
|
|
12
|
+
`strict` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ChatToolFunction } from '@gpuai/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"name": null,
|
|
22
|
+
"description": null,
|
|
23
|
+
"parameters": null,
|
|
24
|
+
"strict": null,
|
|
25
|
+
} satisfies ChatToolFunction
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChatToolFunction
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -20,6 +20,7 @@ Name | Type
|
|
|
20
20
|
`timeout` | number
|
|
21
21
|
`idleTimeout` | number
|
|
22
22
|
`maxConcurrency` | number
|
|
23
|
+
`secrets` | Array<string>
|
|
23
24
|
|
|
24
25
|
## Example
|
|
25
26
|
|
|
@@ -42,6 +43,7 @@ const example = {
|
|
|
42
43
|
"timeout": null,
|
|
43
44
|
"idleTimeout": null,
|
|
44
45
|
"maxConcurrency": null,
|
|
46
|
+
"secrets": null,
|
|
45
47
|
} satisfies CreateFunctionVersionRequest
|
|
46
48
|
|
|
47
49
|
console.log(example)
|
|
@@ -25,6 +25,8 @@ Name | Type
|
|
|
25
25
|
`entrypoint` | Array<string>
|
|
26
26
|
`cmd` | Array<string>
|
|
27
27
|
`ports` | [Array<CreateInstanceRequestPortsInner>](CreateInstanceRequestPortsInner.md)
|
|
28
|
+
`dedicatedIp` | [DedicatedIPRequest](DedicatedIPRequest.md)
|
|
29
|
+
`secrets` | Array<string>
|
|
28
30
|
|
|
29
31
|
## Example
|
|
30
32
|
|
|
@@ -52,6 +54,8 @@ const example = {
|
|
|
52
54
|
"entrypoint": null,
|
|
53
55
|
"cmd": null,
|
|
54
56
|
"ports": null,
|
|
57
|
+
"dedicatedIp": null,
|
|
58
|
+
"secrets": null,
|
|
55
59
|
} satisfies CreateInstanceRequest
|
|
56
60
|
|
|
57
61
|
console.log(example)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# DedicatedIPRequest
|
|
3
|
+
|
|
4
|
+
Requests a dedicated public IPv4 address for the instance. Send an empty object for the default ports (80 and 443).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`ports` | Array<number>
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { DedicatedIPRequest } from '@gpuai/sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"ports": [80, 443],
|
|
20
|
+
} satisfies DedicatedIPRequest
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as DedicatedIPRequest
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|