@gpuai/sdk 0.4.1 → 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 +22 -0
- package/dist/esm/models/Instance.js +13 -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 +22 -0
- package/dist/models/Instance.js +14 -1
- 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 +4 -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 +33 -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,43 @@
|
|
|
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 ChatNamedToolChoiceFunction interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfChatNamedToolChoiceFunction(value) {
|
|
18
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function ChatNamedToolChoiceFunctionFromJSON(json) {
|
|
23
|
+
return ChatNamedToolChoiceFunctionFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function ChatNamedToolChoiceFunctionFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'name': json['name'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function ChatNamedToolChoiceFunctionToJSON(json) {
|
|
34
|
+
return ChatNamedToolChoiceFunctionToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function ChatNamedToolChoiceFunctionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'name': value['name'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { ChatJSONSchemaFormat } from './ChatJSONSchemaFormat';
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChatResponseFormat
|
|
17
|
+
*/
|
|
18
|
+
export interface ChatResponseFormat {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {ChatResponseFormatTypeEnum}
|
|
22
|
+
* @memberof ChatResponseFormat
|
|
23
|
+
*/
|
|
24
|
+
type: ChatResponseFormatTypeEnum;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ChatJSONSchemaFormat}
|
|
28
|
+
* @memberof ChatResponseFormat
|
|
29
|
+
*/
|
|
30
|
+
jsonSchema?: ChatJSONSchemaFormat;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export declare const ChatResponseFormatTypeEnum: {
|
|
36
|
+
readonly Text: "text";
|
|
37
|
+
readonly JsonObject: "json_object";
|
|
38
|
+
readonly JsonSchema: "json_schema";
|
|
39
|
+
};
|
|
40
|
+
export type ChatResponseFormatTypeEnum = typeof ChatResponseFormatTypeEnum[keyof typeof ChatResponseFormatTypeEnum];
|
|
41
|
+
/**
|
|
42
|
+
* Check if a given object implements the ChatResponseFormat interface.
|
|
43
|
+
*/
|
|
44
|
+
export declare function instanceOfChatResponseFormat(value: object): value is ChatResponseFormat;
|
|
45
|
+
export declare function ChatResponseFormatFromJSON(json: any): ChatResponseFormat;
|
|
46
|
+
export declare function ChatResponseFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatResponseFormat;
|
|
47
|
+
export declare function ChatResponseFormatToJSON(json: any): ChatResponseFormat;
|
|
48
|
+
export declare function ChatResponseFormatToJSONTyped(value?: ChatResponseFormat | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { ChatJSONSchemaFormatFromJSON, ChatJSONSchemaFormatToJSON, } from './ChatJSONSchemaFormat';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ChatResponseFormatTypeEnum = {
|
|
19
|
+
Text: 'text',
|
|
20
|
+
JsonObject: 'json_object',
|
|
21
|
+
JsonSchema: 'json_schema'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the ChatResponseFormat interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfChatResponseFormat(value) {
|
|
27
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function ChatResponseFormatFromJSON(json) {
|
|
32
|
+
return ChatResponseFormatFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function ChatResponseFormatFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'type': json['type'],
|
|
40
|
+
'jsonSchema': json['json_schema'] == null ? undefined : ChatJSONSchemaFormatFromJSON(json['json_schema']),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function ChatResponseFormatToJSON(json) {
|
|
44
|
+
return ChatResponseFormatToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function ChatResponseFormatToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'type': value['type'],
|
|
52
|
+
'json_schema': ChatJSONSchemaFormatToJSON(value['jsonSchema']),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { ChatToolFunction } from './ChatToolFunction';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChatTool
|
|
17
|
+
*/
|
|
18
|
+
export interface ChatTool {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {ChatToolTypeEnum}
|
|
22
|
+
* @memberof ChatTool
|
|
23
|
+
*/
|
|
24
|
+
type: ChatToolTypeEnum;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ChatToolFunction}
|
|
28
|
+
* @memberof ChatTool
|
|
29
|
+
*/
|
|
30
|
+
_function: ChatToolFunction;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export declare const ChatToolTypeEnum: {
|
|
36
|
+
readonly Function: "function";
|
|
37
|
+
};
|
|
38
|
+
export type ChatToolTypeEnum = typeof ChatToolTypeEnum[keyof typeof ChatToolTypeEnum];
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the ChatTool interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfChatTool(value: object): value is ChatTool;
|
|
43
|
+
export declare function ChatToolFromJSON(json: any): ChatTool;
|
|
44
|
+
export declare function ChatToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatTool;
|
|
45
|
+
export declare function ChatToolToJSON(json: any): ChatTool;
|
|
46
|
+
export declare function ChatToolToJSONTyped(value?: ChatTool | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { ChatToolFunctionFromJSON, ChatToolFunctionToJSON, } from './ChatToolFunction';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ChatToolTypeEnum = {
|
|
19
|
+
Function: 'function'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ChatTool interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfChatTool(value) {
|
|
25
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (value['type'] !== 'function')
|
|
28
|
+
return false;
|
|
29
|
+
if ((!('_function' in value) && !('function' in value)) || (value['_function'] === undefined && value['function'] === undefined))
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
export function ChatToolFromJSON(json) {
|
|
34
|
+
return ChatToolFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function ChatToolFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'type': json['type'],
|
|
42
|
+
'_function': ChatToolFunctionFromJSON(json['function']),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function ChatToolToJSON(json) {
|
|
46
|
+
return ChatToolToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function ChatToolToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'type': value['type'],
|
|
54
|
+
'function': ChatToolFunctionToJSON(value['_function']),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { ChatToolCallFunction } from './ChatToolCallFunction';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChatToolCall
|
|
17
|
+
*/
|
|
18
|
+
export interface ChatToolCall {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ChatToolCall
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ChatToolCallTypeEnum}
|
|
28
|
+
* @memberof ChatToolCall
|
|
29
|
+
*/
|
|
30
|
+
type: ChatToolCallTypeEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {ChatToolCallFunction}
|
|
34
|
+
* @memberof ChatToolCall
|
|
35
|
+
*/
|
|
36
|
+
_function: ChatToolCallFunction;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @export
|
|
40
|
+
*/
|
|
41
|
+
export declare const ChatToolCallTypeEnum: {
|
|
42
|
+
readonly Function: "function";
|
|
43
|
+
};
|
|
44
|
+
export type ChatToolCallTypeEnum = typeof ChatToolCallTypeEnum[keyof typeof ChatToolCallTypeEnum];
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the ChatToolCall interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfChatToolCall(value: object): value is ChatToolCall;
|
|
49
|
+
export declare function ChatToolCallFromJSON(json: any): ChatToolCall;
|
|
50
|
+
export declare function ChatToolCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatToolCall;
|
|
51
|
+
export declare function ChatToolCallToJSON(json: any): ChatToolCall;
|
|
52
|
+
export declare function ChatToolCallToJSONTyped(value?: ChatToolCall | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { ChatToolCallFunctionFromJSON, ChatToolCallFunctionToJSON, } from './ChatToolCallFunction';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ChatToolCallTypeEnum = {
|
|
19
|
+
Function: 'function'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ChatToolCall interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfChatToolCall(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (value['type'] !== 'function')
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('_function' in value) && !('function' in value)) || (value['_function'] === undefined && value['function'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export function ChatToolCallFromJSON(json) {
|
|
36
|
+
return ChatToolCallFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function ChatToolCallFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'type': json['type'],
|
|
45
|
+
'_function': ChatToolCallFunctionFromJSON(json['function']),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function ChatToolCallToJSON(json) {
|
|
49
|
+
return ChatToolCallToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
export function ChatToolCallToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'id': value['id'],
|
|
57
|
+
'type': value['type'],
|
|
58
|
+
'function': ChatToolCallFunctionToJSON(value['_function']),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChatToolCallFunction
|
|
16
|
+
*/
|
|
17
|
+
export interface ChatToolCallFunction {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChatToolCallFunction
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* JSON-encoded arguments object, as a string.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ChatToolCallFunction
|
|
28
|
+
*/
|
|
29
|
+
arguments: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the ChatToolCallFunction interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfChatToolCallFunction(value: object): value is ChatToolCallFunction;
|
|
35
|
+
export declare function ChatToolCallFunctionFromJSON(json: any): ChatToolCallFunction;
|
|
36
|
+
export declare function ChatToolCallFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatToolCallFunction;
|
|
37
|
+
export declare function ChatToolCallFunctionToJSON(json: any): ChatToolCallFunction;
|
|
38
|
+
export declare function ChatToolCallFunctionToJSONTyped(value?: ChatToolCallFunction | 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 ChatToolCallFunction interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfChatToolCallFunction(value) {
|
|
18
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('arguments' in value) || value['arguments'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function ChatToolCallFunctionFromJSON(json) {
|
|
25
|
+
return ChatToolCallFunctionFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function ChatToolCallFunctionFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'name': json['name'],
|
|
33
|
+
'arguments': json['arguments'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function ChatToolCallFunctionToJSON(json) {
|
|
37
|
+
return ChatToolCallFunctionToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function ChatToolCallFunctionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'name': value['name'],
|
|
45
|
+
'arguments': value['arguments'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 ChatToolFunction
|
|
16
|
+
*/
|
|
17
|
+
export interface ChatToolFunction {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChatToolFunction
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ChatToolFunction
|
|
28
|
+
*/
|
|
29
|
+
description?: string;
|
|
30
|
+
/**
|
|
31
|
+
* JSON Schema for the function arguments.
|
|
32
|
+
* @type {{ [key: string]: any; }}
|
|
33
|
+
* @memberof ChatToolFunction
|
|
34
|
+
*/
|
|
35
|
+
parameters?: {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof ChatToolFunction
|
|
42
|
+
*/
|
|
43
|
+
strict?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the ChatToolFunction interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfChatToolFunction(value: object): value is ChatToolFunction;
|
|
49
|
+
export declare function ChatToolFunctionFromJSON(json: any): ChatToolFunction;
|
|
50
|
+
export declare function ChatToolFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatToolFunction;
|
|
51
|
+
export declare function ChatToolFunctionToJSON(json: any): ChatToolFunction;
|
|
52
|
+
export declare function ChatToolFunctionToJSONTyped(value?: ChatToolFunction | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ChatToolFunction interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfChatToolFunction(value) {
|
|
18
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function ChatToolFunctionFromJSON(json) {
|
|
23
|
+
return ChatToolFunctionFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function ChatToolFunctionFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'name': json['name'],
|
|
31
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
32
|
+
'parameters': json['parameters'] == null ? undefined : json['parameters'],
|
|
33
|
+
'strict': json['strict'] == null ? undefined : json['strict'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function ChatToolFunctionToJSON(json) {
|
|
37
|
+
return ChatToolFunctionToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function ChatToolFunctionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'name': value['name'],
|
|
45
|
+
'description': value['description'],
|
|
46
|
+
'parameters': value['parameters'],
|
|
47
|
+
'strict': value['strict'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -99,6 +99,12 @@ export interface CreateFunctionVersionRequest {
|
|
|
99
99
|
* @memberof CreateFunctionVersionRequest
|
|
100
100
|
*/
|
|
101
101
|
maxConcurrency?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Names of organization secrets (POST /secrets) each run receives as environment variables of the same names, resolved per call so a rotated value reaches the next call. Values are never in a response or a log. Returns 422 `validation_failed` when a name does not exist or secrets are not enabled on this deployment.
|
|
104
|
+
* @type {Array<string>}
|
|
105
|
+
* @memberof CreateFunctionVersionRequest
|
|
106
|
+
*/
|
|
107
|
+
secrets?: Array<string>;
|
|
102
108
|
}
|
|
103
109
|
/**
|
|
104
110
|
* Check if a given object implements the CreateFunctionVersionRequest interface.
|
|
@@ -51,6 +51,7 @@ export function CreateFunctionVersionRequestFromJSONTyped(json, ignoreDiscrimina
|
|
|
51
51
|
'timeout': json['timeout'],
|
|
52
52
|
'idleTimeout': json['idle_timeout'] == null ? undefined : json['idle_timeout'],
|
|
53
53
|
'maxConcurrency': json['max_concurrency'] == null ? undefined : json['max_concurrency'],
|
|
54
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
57
|
export function CreateFunctionVersionRequestToJSON(json) {
|
|
@@ -75,5 +76,6 @@ export function CreateFunctionVersionRequestToJSONTyped(value, ignoreDiscriminat
|
|
|
75
76
|
'timeout': value['timeout'],
|
|
76
77
|
'idle_timeout': value['idleTimeout'],
|
|
77
78
|
'max_concurrency': value['maxConcurrency'],
|
|
79
|
+
'secrets': value['secrets'],
|
|
78
80
|
};
|
|
79
81
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { CreateInstanceRequestPortsInner } from './CreateInstanceRequestPortsInner';
|
|
13
|
+
import type { DedicatedIPRequest } from './DedicatedIPRequest';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -132,6 +133,18 @@ export interface CreateInstanceRequest {
|
|
|
132
133
|
* @memberof CreateInstanceRequest
|
|
133
134
|
*/
|
|
134
135
|
ports?: Array<CreateInstanceRequestPortsInner>;
|
|
136
|
+
/**
|
|
137
|
+
* Attach a dedicated public IPv4 address owned by GPU.ai. Its inbound TCP ports (80 and 443 unless `ports` says otherwise) forward, raw and without TLS termination, to the same ports on the instance's loopback, so your own certificates work. Billed hourly while attached plus per GB of transfer in both directions (see GET /dedicated-ip). on_demand tier only (422 `validation_failed` otherwise). Returns 409 `dedicated_ip_limit` when the organization already holds its limit, 503 `dedicated_ip_unavailable` when no address is free, 422 `validation_failed` for ports outside the allowed set, and 400 `validation_failed` on deployments where the add-on is not enabled. A launch whose address cannot be attached fails its operation with `dedicated_ip_unavailable`. The address is released when the instance terminates or fails.
|
|
138
|
+
* @type {DedicatedIPRequest}
|
|
139
|
+
* @memberof CreateInstanceRequest
|
|
140
|
+
*/
|
|
141
|
+
dedicatedIp?: DedicatedIPRequest;
|
|
142
|
+
/**
|
|
143
|
+
* Names of organization secrets (POST /secrets) to deliver to the machine at boot as environment variables of the same names. Values are never in a response or a log. Returns 422 `validation_failed` when a name does not exist or secrets are not enabled on this deployment.
|
|
144
|
+
* @type {Array<string>}
|
|
145
|
+
* @memberof CreateInstanceRequest
|
|
146
|
+
*/
|
|
147
|
+
secrets?: Array<string>;
|
|
135
148
|
}
|
|
136
149
|
/**
|
|
137
150
|
* @export
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { CreateInstanceRequestPortsInnerFromJSON, CreateInstanceRequestPortsInnerToJSON, } from './CreateInstanceRequestPortsInner';
|
|
15
|
+
import { DedicatedIPRequestFromJSON, DedicatedIPRequestToJSON, } from './DedicatedIPRequest';
|
|
15
16
|
/**
|
|
16
17
|
* @export
|
|
17
18
|
*/
|
|
@@ -58,6 +59,8 @@ export function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
58
59
|
'entrypoint': json['entrypoint'] == null ? undefined : json['entrypoint'],
|
|
59
60
|
'cmd': json['cmd'] == null ? undefined : json['cmd'],
|
|
60
61
|
'ports': json['ports'] == null ? undefined : (json['ports'].map(CreateInstanceRequestPortsInnerFromJSON)),
|
|
62
|
+
'dedicatedIp': json['dedicated_ip'] == null ? undefined : DedicatedIPRequestFromJSON(json['dedicated_ip']),
|
|
63
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
66
|
export function CreateInstanceRequestToJSON(json) {
|
|
@@ -87,5 +90,7 @@ export function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
87
90
|
'entrypoint': value['entrypoint'],
|
|
88
91
|
'cmd': value['cmd'],
|
|
89
92
|
'ports': value['ports'] == null ? undefined : (value['ports'].map(CreateInstanceRequestPortsInnerToJSON)),
|
|
93
|
+
'dedicated_ip': DedicatedIPRequestToJSON(value['dedicatedIp']),
|
|
94
|
+
'secrets': value['secrets'],
|
|
90
95
|
};
|
|
91
96
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* Requests a dedicated public IPv4 address for the instance. Send an empty object for the default ports (80 and 443).
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DedicatedIPRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface DedicatedIPRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Inbound TCP ports to forward. Each must be in the deployment's allowed set (see GET /dedicated-ip). Port 22 and the gateway's own ports are never allowed; SSH stays on the instance's SSH command. Omit for the defaults.
|
|
20
|
+
* @type {Array<number>}
|
|
21
|
+
* @memberof DedicatedIPRequest
|
|
22
|
+
*/
|
|
23
|
+
ports?: Array<number>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the DedicatedIPRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfDedicatedIPRequest(value: object): value is DedicatedIPRequest;
|
|
29
|
+
export declare function DedicatedIPRequestFromJSON(json: any): DedicatedIPRequest;
|
|
30
|
+
export declare function DedicatedIPRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DedicatedIPRequest;
|
|
31
|
+
export declare function DedicatedIPRequestToJSON(json: any): DedicatedIPRequest;
|
|
32
|
+
export declare function DedicatedIPRequestToJSONTyped(value?: DedicatedIPRequest | null, ignoreDiscriminator?: boolean): any;
|