@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.
Files changed (130) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +13 -2
  3. package/dist/apis/InstancesApi.d.ts +2 -0
  4. package/dist/apis/InstancesApi.js +2 -0
  5. package/dist/esm/apis/InstancesApi.d.ts +2 -0
  6. package/dist/esm/apis/InstancesApi.js +2 -0
  7. package/dist/esm/models/ChatCompletionRequest.d.ts +27 -0
  8. package/dist/esm/models/ChatCompletionRequest.js +11 -0
  9. package/dist/esm/models/ChatCompletionRequestToolChoice.d.ts +22 -0
  10. package/dist/esm/models/ChatCompletionRequestToolChoice.js +50 -0
  11. package/dist/esm/models/ChatJSONSchemaFormat.d.ts +52 -0
  12. package/dist/esm/models/ChatJSONSchemaFormat.js +51 -0
  13. package/dist/esm/models/ChatMessage.d.ts +21 -1
  14. package/dist/esm/models/ChatMessage.js +10 -4
  15. package/dist/esm/models/ChatNamedToolChoice.d.ts +46 -0
  16. package/dist/esm/models/ChatNamedToolChoice.js +56 -0
  17. package/dist/esm/models/ChatNamedToolChoiceFunction.d.ts +32 -0
  18. package/dist/esm/models/ChatNamedToolChoiceFunction.js +43 -0
  19. package/dist/esm/models/ChatResponseFormat.d.ts +48 -0
  20. package/dist/esm/models/ChatResponseFormat.js +54 -0
  21. package/dist/esm/models/ChatTool.d.ts +46 -0
  22. package/dist/esm/models/ChatTool.js +56 -0
  23. package/dist/esm/models/ChatToolCall.d.ts +52 -0
  24. package/dist/esm/models/ChatToolCall.js +60 -0
  25. package/dist/esm/models/ChatToolCallFunction.d.ts +38 -0
  26. package/dist/esm/models/ChatToolCallFunction.js +47 -0
  27. package/dist/esm/models/ChatToolFunction.d.ts +52 -0
  28. package/dist/esm/models/ChatToolFunction.js +49 -0
  29. package/dist/esm/models/CreateFunctionVersionRequest.d.ts +6 -0
  30. package/dist/esm/models/CreateFunctionVersionRequest.js +2 -0
  31. package/dist/esm/models/CreateInstanceRequest.d.ts +13 -0
  32. package/dist/esm/models/CreateInstanceRequest.js +5 -0
  33. package/dist/esm/models/DedicatedIPRequest.d.ts +32 -0
  34. package/dist/esm/models/DedicatedIPRequest.js +41 -0
  35. package/dist/esm/models/FunctionVersion.d.ts +6 -0
  36. package/dist/esm/models/FunctionVersion.js +4 -0
  37. package/dist/esm/models/Instance.d.ts +22 -0
  38. package/dist/esm/models/Instance.js +13 -0
  39. package/dist/esm/models/InstanceDedicatedIP.d.ts +83 -0
  40. package/dist/esm/models/InstanceDedicatedIP.js +77 -0
  41. package/dist/esm/models/Model.d.ts +12 -0
  42. package/dist/esm/models/Model.js +4 -0
  43. package/dist/esm/models/Problem.d.ts +2 -0
  44. package/dist/esm/models/Problem.js +2 -0
  45. package/dist/esm/models/index.d.ts +11 -0
  46. package/dist/esm/models/index.js +11 -0
  47. package/dist/esm/runtime.js +1 -1
  48. package/dist/models/ChatCompletionRequest.d.ts +27 -0
  49. package/dist/models/ChatCompletionRequest.js +11 -0
  50. package/dist/models/ChatCompletionRequestToolChoice.d.ts +22 -0
  51. package/dist/models/ChatCompletionRequestToolChoice.js +56 -0
  52. package/dist/models/ChatJSONSchemaFormat.d.ts +52 -0
  53. package/dist/models/ChatJSONSchemaFormat.js +58 -0
  54. package/dist/models/ChatMessage.d.ts +21 -1
  55. package/dist/models/ChatMessage.js +10 -4
  56. package/dist/models/ChatNamedToolChoice.d.ts +46 -0
  57. package/dist/models/ChatNamedToolChoice.js +64 -0
  58. package/dist/models/ChatNamedToolChoiceFunction.d.ts +32 -0
  59. package/dist/models/ChatNamedToolChoiceFunction.js +50 -0
  60. package/dist/models/ChatResponseFormat.d.ts +48 -0
  61. package/dist/models/ChatResponseFormat.js +62 -0
  62. package/dist/models/ChatTool.d.ts +46 -0
  63. package/dist/models/ChatTool.js +64 -0
  64. package/dist/models/ChatToolCall.d.ts +52 -0
  65. package/dist/models/ChatToolCall.js +68 -0
  66. package/dist/models/ChatToolCallFunction.d.ts +38 -0
  67. package/dist/models/ChatToolCallFunction.js +54 -0
  68. package/dist/models/ChatToolFunction.d.ts +52 -0
  69. package/dist/models/ChatToolFunction.js +56 -0
  70. package/dist/models/CreateFunctionVersionRequest.d.ts +6 -0
  71. package/dist/models/CreateFunctionVersionRequest.js +2 -0
  72. package/dist/models/CreateInstanceRequest.d.ts +13 -0
  73. package/dist/models/CreateInstanceRequest.js +5 -0
  74. package/dist/models/DedicatedIPRequest.d.ts +32 -0
  75. package/dist/models/DedicatedIPRequest.js +48 -0
  76. package/dist/models/FunctionVersion.d.ts +6 -0
  77. package/dist/models/FunctionVersion.js +4 -0
  78. package/dist/models/Instance.d.ts +22 -0
  79. package/dist/models/Instance.js +14 -1
  80. package/dist/models/InstanceDedicatedIP.d.ts +83 -0
  81. package/dist/models/InstanceDedicatedIP.js +85 -0
  82. package/dist/models/Model.d.ts +12 -0
  83. package/dist/models/Model.js +4 -0
  84. package/dist/models/Problem.d.ts +2 -0
  85. package/dist/models/Problem.js +2 -0
  86. package/dist/models/index.d.ts +11 -0
  87. package/dist/models/index.js +11 -0
  88. package/dist/runtime.js +1 -1
  89. package/docs/ChatCompletionRequest.md +8 -0
  90. package/docs/ChatCompletionRequestToolChoice.md +37 -0
  91. package/docs/ChatJSONSchemaFormat.md +40 -0
  92. package/docs/ChatMessage.md +6 -0
  93. package/docs/ChatNamedToolChoice.md +36 -0
  94. package/docs/ChatNamedToolChoiceFunction.md +34 -0
  95. package/docs/ChatResponseFormat.md +37 -0
  96. package/docs/ChatTool.md +36 -0
  97. package/docs/ChatToolCall.md +38 -0
  98. package/docs/ChatToolCallFunction.md +36 -0
  99. package/docs/ChatToolFunction.md +40 -0
  100. package/docs/CreateFunctionVersionRequest.md +2 -0
  101. package/docs/CreateInstanceRequest.md +4 -0
  102. package/docs/DedicatedIPRequest.md +35 -0
  103. package/docs/FunctionVersion.md +2 -0
  104. package/docs/Instance.md +4 -0
  105. package/docs/InstanceDedicatedIP.md +49 -0
  106. package/docs/InstancesApi.md +3 -1
  107. package/docs/Model.md +4 -0
  108. package/package.json +1 -1
  109. package/src/apis/InstancesApi.ts +2 -0
  110. package/src/models/ChatCompletionRequest.ts +53 -0
  111. package/src/models/ChatCompletionRequestToolChoice.ts +69 -0
  112. package/src/models/ChatJSONSchemaFormat.ts +91 -0
  113. package/src/models/ChatMessage.ts +36 -4
  114. package/src/models/ChatNamedToolChoice.ts +95 -0
  115. package/src/models/ChatNamedToolChoiceFunction.ts +66 -0
  116. package/src/models/ChatResponseFormat.ts +94 -0
  117. package/src/models/ChatTool.ts +95 -0
  118. package/src/models/ChatToolCall.ts +104 -0
  119. package/src/models/ChatToolCallFunction.ts +75 -0
  120. package/src/models/ChatToolFunction.ts +90 -0
  121. package/src/models/CreateFunctionVersionRequest.ts +8 -0
  122. package/src/models/CreateInstanceRequest.ts +23 -0
  123. package/src/models/DedicatedIPRequest.ts +65 -0
  124. package/src/models/FunctionVersion.ts +9 -0
  125. package/src/models/Instance.ts +33 -0
  126. package/src/models/InstanceDedicatedIP.ts +140 -0
  127. package/src/models/Model.ts +16 -0
  128. package/src/models/Problem.ts +2 -0
  129. package/src/models/index.ts +11 -0
  130. 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;