@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,94 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ChatJSONSchemaFormat } from './ChatJSONSchemaFormat';
|
|
17
|
+
import {
|
|
18
|
+
ChatJSONSchemaFormatFromJSON,
|
|
19
|
+
ChatJSONSchemaFormatFromJSONTyped,
|
|
20
|
+
ChatJSONSchemaFormatToJSON,
|
|
21
|
+
ChatJSONSchemaFormatToJSONTyped,
|
|
22
|
+
} from './ChatJSONSchemaFormat';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 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.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ChatResponseFormat
|
|
28
|
+
*/
|
|
29
|
+
export interface ChatResponseFormat {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {ChatResponseFormatTypeEnum}
|
|
33
|
+
* @memberof ChatResponseFormat
|
|
34
|
+
*/
|
|
35
|
+
type: ChatResponseFormatTypeEnum;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {ChatJSONSchemaFormat}
|
|
39
|
+
* @memberof ChatResponseFormat
|
|
40
|
+
*/
|
|
41
|
+
jsonSchema?: ChatJSONSchemaFormat;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export const ChatResponseFormatTypeEnum = {
|
|
49
|
+
Text: 'text',
|
|
50
|
+
JsonObject: 'json_object',
|
|
51
|
+
JsonSchema: 'json_schema'
|
|
52
|
+
} as const;
|
|
53
|
+
export type ChatResponseFormatTypeEnum = typeof ChatResponseFormatTypeEnum[keyof typeof ChatResponseFormatTypeEnum];
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the ChatResponseFormat interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfChatResponseFormat(value: object): value is ChatResponseFormat {
|
|
60
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ChatResponseFormatFromJSON(json: any): ChatResponseFormat {
|
|
65
|
+
return ChatResponseFormatFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ChatResponseFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatResponseFormat {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'type': json['type'],
|
|
75
|
+
'jsonSchema': json['json_schema'] == null ? undefined : ChatJSONSchemaFormatFromJSON(json['json_schema']),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ChatResponseFormatToJSON(json: any): ChatResponseFormat {
|
|
80
|
+
return ChatResponseFormatToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function ChatResponseFormatToJSONTyped(value?: ChatResponseFormat | null, ignoreDiscriminator: boolean = false): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'type': value['type'],
|
|
91
|
+
'json_schema': ChatJSONSchemaFormatToJSON(value['jsonSchema']),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ChatToolFunction } from './ChatToolFunction';
|
|
17
|
+
import {
|
|
18
|
+
ChatToolFunctionFromJSON,
|
|
19
|
+
ChatToolFunctionFromJSONTyped,
|
|
20
|
+
ChatToolFunctionToJSON,
|
|
21
|
+
ChatToolFunctionToJSONTyped,
|
|
22
|
+
} from './ChatToolFunction';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ChatTool
|
|
28
|
+
*/
|
|
29
|
+
export interface ChatTool {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {ChatToolTypeEnum}
|
|
33
|
+
* @memberof ChatTool
|
|
34
|
+
*/
|
|
35
|
+
type: ChatToolTypeEnum;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {ChatToolFunction}
|
|
39
|
+
* @memberof ChatTool
|
|
40
|
+
*/
|
|
41
|
+
_function: ChatToolFunction;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export const ChatToolTypeEnum = {
|
|
49
|
+
Function: 'function'
|
|
50
|
+
} as const;
|
|
51
|
+
export type ChatToolTypeEnum = typeof ChatToolTypeEnum[keyof typeof ChatToolTypeEnum];
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the ChatTool interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfChatTool(value: object): value is ChatTool {
|
|
58
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
59
|
+
if (value['type'] !== 'function') return false;
|
|
60
|
+
|
|
61
|
+
if ((!('_function' in (value as Record<string, any>)) && !('function' in (value as Record<string, any>))) || ((value as Record<string, any>)['_function'] === undefined && (value as Record<string, any>)['function'] === undefined)) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ChatToolFromJSON(json: any): ChatTool {
|
|
66
|
+
return ChatToolFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ChatToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatTool {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'type': json['type'],
|
|
76
|
+
'_function': ChatToolFunctionFromJSON(json['function']),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ChatToolToJSON(json: any): ChatTool {
|
|
81
|
+
return ChatToolToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function ChatToolToJSONTyped(value?: ChatTool | null, ignoreDiscriminator: boolean = false): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'type': value['type'],
|
|
92
|
+
'function': ChatToolFunctionToJSON(value['_function']),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ChatToolCallFunction } from './ChatToolCallFunction';
|
|
17
|
+
import {
|
|
18
|
+
ChatToolCallFunctionFromJSON,
|
|
19
|
+
ChatToolCallFunctionFromJSONTyped,
|
|
20
|
+
ChatToolCallFunctionToJSON,
|
|
21
|
+
ChatToolCallFunctionToJSONTyped,
|
|
22
|
+
} from './ChatToolCallFunction';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ChatToolCall
|
|
28
|
+
*/
|
|
29
|
+
export interface ChatToolCall {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ChatToolCall
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {ChatToolCallTypeEnum}
|
|
39
|
+
* @memberof ChatToolCall
|
|
40
|
+
*/
|
|
41
|
+
type: ChatToolCallTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {ChatToolCallFunction}
|
|
45
|
+
* @memberof ChatToolCall
|
|
46
|
+
*/
|
|
47
|
+
_function: ChatToolCallFunction;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
export const ChatToolCallTypeEnum = {
|
|
55
|
+
Function: 'function'
|
|
56
|
+
} as const;
|
|
57
|
+
export type ChatToolCallTypeEnum = typeof ChatToolCallTypeEnum[keyof typeof ChatToolCallTypeEnum];
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ChatToolCall interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfChatToolCall(value: object): value is ChatToolCall {
|
|
64
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
65
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
66
|
+
if (value['type'] !== 'function') return false;
|
|
67
|
+
|
|
68
|
+
if ((!('_function' in (value as Record<string, any>)) && !('function' in (value as Record<string, any>))) || ((value as Record<string, any>)['_function'] === undefined && (value as Record<string, any>)['function'] === undefined)) return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ChatToolCallFromJSON(json: any): ChatToolCall {
|
|
73
|
+
return ChatToolCallFromJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function ChatToolCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatToolCall {
|
|
77
|
+
if (json == null) {
|
|
78
|
+
return json;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'id': json['id'],
|
|
83
|
+
'type': json['type'],
|
|
84
|
+
'_function': ChatToolCallFunctionFromJSON(json['function']),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function ChatToolCallToJSON(json: any): ChatToolCall {
|
|
89
|
+
return ChatToolCallToJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ChatToolCallToJSONTyped(value?: ChatToolCall | null, ignoreDiscriminator: boolean = false): any {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
'id': value['id'],
|
|
100
|
+
'type': value['type'],
|
|
101
|
+
'function': ChatToolCallFunctionToJSON(value['_function']),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ChatToolCallFunction
|
|
20
|
+
*/
|
|
21
|
+
export interface ChatToolCallFunction {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ChatToolCallFunction
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* JSON-encoded arguments object, as a string.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ChatToolCallFunction
|
|
32
|
+
*/
|
|
33
|
+
arguments: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ChatToolCallFunction interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfChatToolCallFunction(value: object): value is ChatToolCallFunction {
|
|
40
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
41
|
+
if (!('arguments' in value) || value['arguments'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ChatToolCallFunctionFromJSON(json: any): ChatToolCallFunction {
|
|
46
|
+
return ChatToolCallFunctionFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ChatToolCallFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatToolCallFunction {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'name': json['name'],
|
|
56
|
+
'arguments': json['arguments'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ChatToolCallFunctionToJSON(json: any): ChatToolCallFunction {
|
|
61
|
+
return ChatToolCallFunctionToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ChatToolCallFunctionToJSONTyped(value?: ChatToolCallFunction | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'name': value['name'],
|
|
72
|
+
'arguments': value['arguments'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ChatToolFunction
|
|
20
|
+
*/
|
|
21
|
+
export interface ChatToolFunction {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ChatToolFunction
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ChatToolFunction
|
|
32
|
+
*/
|
|
33
|
+
description?: string;
|
|
34
|
+
/**
|
|
35
|
+
* JSON Schema for the function arguments.
|
|
36
|
+
* @type {{ [key: string]: any; }}
|
|
37
|
+
* @memberof ChatToolFunction
|
|
38
|
+
*/
|
|
39
|
+
parameters?: { [key: string]: any; };
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof ChatToolFunction
|
|
44
|
+
*/
|
|
45
|
+
strict?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the ChatToolFunction interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfChatToolFunction(value: object): value is ChatToolFunction {
|
|
52
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ChatToolFunctionFromJSON(json: any): ChatToolFunction {
|
|
57
|
+
return ChatToolFunctionFromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ChatToolFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatToolFunction {
|
|
61
|
+
if (json == null) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'name': json['name'],
|
|
67
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
68
|
+
'parameters': json['parameters'] == null ? undefined : json['parameters'],
|
|
69
|
+
'strict': json['strict'] == null ? undefined : json['strict'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ChatToolFunctionToJSON(json: any): ChatToolFunction {
|
|
74
|
+
return ChatToolFunctionToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ChatToolFunctionToJSONTyped(value?: ChatToolFunction | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'name': value['name'],
|
|
85
|
+
'description': value['description'],
|
|
86
|
+
'parameters': value['parameters'],
|
|
87
|
+
'strict': value['strict'],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -103,6 +103,12 @@ export interface CreateFunctionVersionRequest {
|
|
|
103
103
|
* @memberof CreateFunctionVersionRequest
|
|
104
104
|
*/
|
|
105
105
|
maxConcurrency?: number;
|
|
106
|
+
/**
|
|
107
|
+
* 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.
|
|
108
|
+
* @type {Array<string>}
|
|
109
|
+
* @memberof CreateFunctionVersionRequest
|
|
110
|
+
*/
|
|
111
|
+
secrets?: Array<string>;
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
/**
|
|
@@ -142,6 +148,7 @@ export function CreateFunctionVersionRequestFromJSONTyped(json: any, ignoreDiscr
|
|
|
142
148
|
'timeout': json['timeout'],
|
|
143
149
|
'idleTimeout': json['idle_timeout'] == null ? undefined : json['idle_timeout'],
|
|
144
150
|
'maxConcurrency': json['max_concurrency'] == null ? undefined : json['max_concurrency'],
|
|
151
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
145
152
|
};
|
|
146
153
|
}
|
|
147
154
|
|
|
@@ -170,6 +177,7 @@ export function CreateFunctionVersionRequestToJSONTyped(value?: CreateFunctionVe
|
|
|
170
177
|
'timeout': value['timeout'],
|
|
171
178
|
'idle_timeout': value['idleTimeout'],
|
|
172
179
|
'max_concurrency': value['maxConcurrency'],
|
|
180
|
+
'secrets': value['secrets'],
|
|
173
181
|
};
|
|
174
182
|
}
|
|
175
183
|
|
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
CreateInstanceRequestPortsInnerToJSON,
|
|
21
21
|
CreateInstanceRequestPortsInnerToJSONTyped,
|
|
22
22
|
} from './CreateInstanceRequestPortsInner';
|
|
23
|
+
import type { DedicatedIPRequest } from './DedicatedIPRequest';
|
|
24
|
+
import {
|
|
25
|
+
DedicatedIPRequestFromJSON,
|
|
26
|
+
DedicatedIPRequestFromJSONTyped,
|
|
27
|
+
DedicatedIPRequestToJSON,
|
|
28
|
+
DedicatedIPRequestToJSONTyped,
|
|
29
|
+
} from './DedicatedIPRequest';
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
32
|
*
|
|
@@ -141,6 +148,18 @@ export interface CreateInstanceRequest {
|
|
|
141
148
|
* @memberof CreateInstanceRequest
|
|
142
149
|
*/
|
|
143
150
|
ports?: Array<CreateInstanceRequestPortsInner>;
|
|
151
|
+
/**
|
|
152
|
+
* 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.
|
|
153
|
+
* @type {DedicatedIPRequest}
|
|
154
|
+
* @memberof CreateInstanceRequest
|
|
155
|
+
*/
|
|
156
|
+
dedicatedIp?: DedicatedIPRequest;
|
|
157
|
+
/**
|
|
158
|
+
* 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.
|
|
159
|
+
* @type {Array<string>}
|
|
160
|
+
* @memberof CreateInstanceRequest
|
|
161
|
+
*/
|
|
162
|
+
secrets?: Array<string>;
|
|
144
163
|
}
|
|
145
164
|
|
|
146
165
|
|
|
@@ -193,6 +212,8 @@ export function CreateInstanceRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
193
212
|
'entrypoint': json['entrypoint'] == null ? undefined : json['entrypoint'],
|
|
194
213
|
'cmd': json['cmd'] == null ? undefined : json['cmd'],
|
|
195
214
|
'ports': json['ports'] == null ? undefined : ((json['ports'] as Array<any>).map(CreateInstanceRequestPortsInnerFromJSON)),
|
|
215
|
+
'dedicatedIp': json['dedicated_ip'] == null ? undefined : DedicatedIPRequestFromJSON(json['dedicated_ip']),
|
|
216
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
196
217
|
};
|
|
197
218
|
}
|
|
198
219
|
|
|
@@ -226,6 +247,8 @@ export function CreateInstanceRequestToJSONTyped(value?: CreateInstanceRequest |
|
|
|
226
247
|
'entrypoint': value['entrypoint'],
|
|
227
248
|
'cmd': value['cmd'],
|
|
228
249
|
'ports': value['ports'] == null ? undefined : ((value['ports'] as Array<any>).map(CreateInstanceRequestPortsInnerToJSON)),
|
|
250
|
+
'dedicated_ip': DedicatedIPRequestToJSON(value['dedicatedIp']),
|
|
251
|
+
'secrets': value['secrets'],
|
|
229
252
|
};
|
|
230
253
|
}
|
|
231
254
|
|
|
@@ -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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Requests a dedicated public IPv4 address for the instance. Send an empty object for the default ports (80 and 443).
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DedicatedIPRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface DedicatedIPRequest {
|
|
22
|
+
/**
|
|
23
|
+
* 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.
|
|
24
|
+
* @type {Array<number>}
|
|
25
|
+
* @memberof DedicatedIPRequest
|
|
26
|
+
*/
|
|
27
|
+
ports?: Array<number>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the DedicatedIPRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfDedicatedIPRequest(value: object): value is DedicatedIPRequest {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function DedicatedIPRequestFromJSON(json: any): DedicatedIPRequest {
|
|
38
|
+
return DedicatedIPRequestFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function DedicatedIPRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DedicatedIPRequest {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'ports': json['ports'] == null ? undefined : json['ports'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function DedicatedIPRequestToJSON(json: any): DedicatedIPRequest {
|
|
52
|
+
return DedicatedIPRequestToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function DedicatedIPRequestToJSONTyped(value?: DedicatedIPRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'ports': value['ports'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -123,6 +123,12 @@ export interface FunctionVersion {
|
|
|
123
123
|
* @memberof FunctionVersion
|
|
124
124
|
*/
|
|
125
125
|
maxConcurrency: number;
|
|
126
|
+
/**
|
|
127
|
+
* Names of the organization secrets each run receives. Empty when none.
|
|
128
|
+
* @type {Array<string>}
|
|
129
|
+
* @memberof FunctionVersion
|
|
130
|
+
*/
|
|
131
|
+
secrets: Array<string>;
|
|
126
132
|
/**
|
|
127
133
|
*
|
|
128
134
|
* @type {Date}
|
|
@@ -159,6 +165,7 @@ export function instanceOfFunctionVersion(value: object): value is FunctionVersi
|
|
|
159
165
|
if (!('timeout' in value) || value['timeout'] === undefined) return false;
|
|
160
166
|
if ((!('idleTimeout' in (value as Record<string, any>)) && !('idle_timeout' in (value as Record<string, any>))) || ((value as Record<string, any>)['idleTimeout'] === undefined && (value as Record<string, any>)['idle_timeout'] === undefined)) return false;
|
|
161
167
|
if ((!('maxConcurrency' in (value as Record<string, any>)) && !('max_concurrency' in (value as Record<string, any>))) || ((value as Record<string, any>)['maxConcurrency'] === undefined && (value as Record<string, any>)['max_concurrency'] === undefined)) return false;
|
|
168
|
+
if (!('secrets' in value) || value['secrets'] === undefined) return false;
|
|
162
169
|
if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
|
|
163
170
|
return true;
|
|
164
171
|
}
|
|
@@ -189,6 +196,7 @@ export function FunctionVersionFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
189
196
|
'timeout': json['timeout'],
|
|
190
197
|
'idleTimeout': json['idle_timeout'],
|
|
191
198
|
'maxConcurrency': json['max_concurrency'],
|
|
199
|
+
'secrets': json['secrets'],
|
|
192
200
|
'createdAt': (new Date(json['created_at'])),
|
|
193
201
|
};
|
|
194
202
|
}
|
|
@@ -220,6 +228,7 @@ export function FunctionVersionToJSONTyped(value?: FunctionVersion | null, ignor
|
|
|
220
228
|
'timeout': value['timeout'],
|
|
221
229
|
'idle_timeout': value['idleTimeout'],
|
|
222
230
|
'max_concurrency': value['maxConcurrency'],
|
|
231
|
+
'secrets': value['secrets'],
|
|
223
232
|
'created_at': value['createdAt'].toISOString(),
|
|
224
233
|
};
|
|
225
234
|
}
|