@gpuai/sdk 0.4.2 → 0.5.1

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 (142) hide show
  1. package/.openapi-generator/FILES +24 -0
  2. package/README.md +14 -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 +7 -0
  38. package/dist/esm/models/Instance.js +3 -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/OfferingAlternative.d.ts +68 -0
  44. package/dist/esm/models/OfferingAlternative.js +67 -0
  45. package/dist/esm/models/OperationError.d.ts +20 -1
  46. package/dist/esm/models/OperationError.js +7 -0
  47. package/dist/esm/models/Problem.d.ts +3 -0
  48. package/dist/esm/models/Problem.js +3 -0
  49. package/dist/esm/models/index.d.ts +12 -0
  50. package/dist/esm/models/index.js +12 -0
  51. package/dist/esm/runtime.js +1 -1
  52. package/dist/models/ChatCompletionRequest.d.ts +27 -0
  53. package/dist/models/ChatCompletionRequest.js +11 -0
  54. package/dist/models/ChatCompletionRequestToolChoice.d.ts +22 -0
  55. package/dist/models/ChatCompletionRequestToolChoice.js +56 -0
  56. package/dist/models/ChatJSONSchemaFormat.d.ts +52 -0
  57. package/dist/models/ChatJSONSchemaFormat.js +58 -0
  58. package/dist/models/ChatMessage.d.ts +21 -1
  59. package/dist/models/ChatMessage.js +10 -4
  60. package/dist/models/ChatNamedToolChoice.d.ts +46 -0
  61. package/dist/models/ChatNamedToolChoice.js +64 -0
  62. package/dist/models/ChatNamedToolChoiceFunction.d.ts +32 -0
  63. package/dist/models/ChatNamedToolChoiceFunction.js +50 -0
  64. package/dist/models/ChatResponseFormat.d.ts +48 -0
  65. package/dist/models/ChatResponseFormat.js +62 -0
  66. package/dist/models/ChatTool.d.ts +46 -0
  67. package/dist/models/ChatTool.js +64 -0
  68. package/dist/models/ChatToolCall.d.ts +52 -0
  69. package/dist/models/ChatToolCall.js +68 -0
  70. package/dist/models/ChatToolCallFunction.d.ts +38 -0
  71. package/dist/models/ChatToolCallFunction.js +54 -0
  72. package/dist/models/ChatToolFunction.d.ts +52 -0
  73. package/dist/models/ChatToolFunction.js +56 -0
  74. package/dist/models/CreateFunctionVersionRequest.d.ts +6 -0
  75. package/dist/models/CreateFunctionVersionRequest.js +2 -0
  76. package/dist/models/CreateInstanceRequest.d.ts +13 -0
  77. package/dist/models/CreateInstanceRequest.js +5 -0
  78. package/dist/models/DedicatedIPRequest.d.ts +32 -0
  79. package/dist/models/DedicatedIPRequest.js +48 -0
  80. package/dist/models/FunctionVersion.d.ts +6 -0
  81. package/dist/models/FunctionVersion.js +4 -0
  82. package/dist/models/Instance.d.ts +7 -0
  83. package/dist/models/Instance.js +3 -0
  84. package/dist/models/InstanceDedicatedIP.d.ts +83 -0
  85. package/dist/models/InstanceDedicatedIP.js +85 -0
  86. package/dist/models/Model.d.ts +12 -0
  87. package/dist/models/Model.js +4 -0
  88. package/dist/models/OfferingAlternative.d.ts +68 -0
  89. package/dist/models/OfferingAlternative.js +74 -0
  90. package/dist/models/OperationError.d.ts +20 -1
  91. package/dist/models/OperationError.js +7 -0
  92. package/dist/models/Problem.d.ts +3 -0
  93. package/dist/models/Problem.js +3 -0
  94. package/dist/models/index.d.ts +12 -0
  95. package/dist/models/index.js +12 -0
  96. package/dist/runtime.js +1 -1
  97. package/docs/ChatCompletionRequest.md +8 -0
  98. package/docs/ChatCompletionRequestToolChoice.md +37 -0
  99. package/docs/ChatJSONSchemaFormat.md +40 -0
  100. package/docs/ChatMessage.md +6 -0
  101. package/docs/ChatNamedToolChoice.md +36 -0
  102. package/docs/ChatNamedToolChoiceFunction.md +34 -0
  103. package/docs/ChatResponseFormat.md +37 -0
  104. package/docs/ChatTool.md +36 -0
  105. package/docs/ChatToolCall.md +38 -0
  106. package/docs/ChatToolCallFunction.md +36 -0
  107. package/docs/ChatToolFunction.md +40 -0
  108. package/docs/CreateFunctionVersionRequest.md +2 -0
  109. package/docs/CreateInstanceRequest.md +4 -0
  110. package/docs/DedicatedIPRequest.md +35 -0
  111. package/docs/FunctionVersion.md +2 -0
  112. package/docs/Instance.md +2 -0
  113. package/docs/InstanceDedicatedIP.md +49 -0
  114. package/docs/InstancesApi.md +3 -1
  115. package/docs/Model.md +4 -0
  116. package/docs/OfferingAlternative.md +47 -0
  117. package/docs/OperationError.md +6 -0
  118. package/package.json +1 -1
  119. package/src/apis/InstancesApi.ts +2 -0
  120. package/src/models/ChatCompletionRequest.ts +53 -0
  121. package/src/models/ChatCompletionRequestToolChoice.ts +69 -0
  122. package/src/models/ChatJSONSchemaFormat.ts +91 -0
  123. package/src/models/ChatMessage.ts +36 -4
  124. package/src/models/ChatNamedToolChoice.ts +95 -0
  125. package/src/models/ChatNamedToolChoiceFunction.ts +66 -0
  126. package/src/models/ChatResponseFormat.ts +94 -0
  127. package/src/models/ChatTool.ts +95 -0
  128. package/src/models/ChatToolCall.ts +104 -0
  129. package/src/models/ChatToolCallFunction.ts +75 -0
  130. package/src/models/ChatToolFunction.ts +90 -0
  131. package/src/models/CreateFunctionVersionRequest.ts +8 -0
  132. package/src/models/CreateInstanceRequest.ts +23 -0
  133. package/src/models/DedicatedIPRequest.ts +65 -0
  134. package/src/models/FunctionVersion.ts +9 -0
  135. package/src/models/Instance.ts +15 -0
  136. package/src/models/InstanceDedicatedIP.ts +140 -0
  137. package/src/models/Model.ts +16 -0
  138. package/src/models/OfferingAlternative.ts +120 -0
  139. package/src/models/OperationError.ts +33 -1
  140. package/src/models/Problem.ts +3 -0
  141. package/src/models/index.ts +12 -0
  142. package/src/runtime.ts +1 -1
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ChatResponseFormatTypeEnum = void 0;
17
+ exports.instanceOfChatResponseFormat = instanceOfChatResponseFormat;
18
+ exports.ChatResponseFormatFromJSON = ChatResponseFormatFromJSON;
19
+ exports.ChatResponseFormatFromJSONTyped = ChatResponseFormatFromJSONTyped;
20
+ exports.ChatResponseFormatToJSON = ChatResponseFormatToJSON;
21
+ exports.ChatResponseFormatToJSONTyped = ChatResponseFormatToJSONTyped;
22
+ const ChatJSONSchemaFormat_1 = require("./ChatJSONSchemaFormat");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.ChatResponseFormatTypeEnum = {
27
+ Text: 'text',
28
+ JsonObject: 'json_object',
29
+ JsonSchema: 'json_schema'
30
+ };
31
+ /**
32
+ * Check if a given object implements the ChatResponseFormat interface.
33
+ */
34
+ function instanceOfChatResponseFormat(value) {
35
+ if (!('type' in value) || value['type'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ChatResponseFormatFromJSON(json) {
40
+ return ChatResponseFormatFromJSONTyped(json, false);
41
+ }
42
+ function ChatResponseFormatFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'type': json['type'],
48
+ 'jsonSchema': json['json_schema'] == null ? undefined : (0, ChatJSONSchemaFormat_1.ChatJSONSchemaFormatFromJSON)(json['json_schema']),
49
+ };
50
+ }
51
+ function ChatResponseFormatToJSON(json) {
52
+ return ChatResponseFormatToJSONTyped(json, false);
53
+ }
54
+ function ChatResponseFormatToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'type': value['type'],
60
+ 'json_schema': (0, ChatJSONSchemaFormat_1.ChatJSONSchemaFormatToJSON)(value['jsonSchema']),
61
+ };
62
+ }
@@ -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,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ChatToolTypeEnum = void 0;
17
+ exports.instanceOfChatTool = instanceOfChatTool;
18
+ exports.ChatToolFromJSON = ChatToolFromJSON;
19
+ exports.ChatToolFromJSONTyped = ChatToolFromJSONTyped;
20
+ exports.ChatToolToJSON = ChatToolToJSON;
21
+ exports.ChatToolToJSONTyped = ChatToolToJSONTyped;
22
+ const ChatToolFunction_1 = require("./ChatToolFunction");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.ChatToolTypeEnum = {
27
+ Function: 'function'
28
+ };
29
+ /**
30
+ * Check if a given object implements the ChatTool interface.
31
+ */
32
+ function instanceOfChatTool(value) {
33
+ if (!('type' in value) || value['type'] === undefined)
34
+ return false;
35
+ if (value['type'] !== 'function')
36
+ return false;
37
+ if ((!('_function' in value) && !('function' in value)) || (value['_function'] === undefined && value['function'] === undefined))
38
+ return false;
39
+ return true;
40
+ }
41
+ function ChatToolFromJSON(json) {
42
+ return ChatToolFromJSONTyped(json, false);
43
+ }
44
+ function ChatToolFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'type': json['type'],
50
+ '_function': (0, ChatToolFunction_1.ChatToolFunctionFromJSON)(json['function']),
51
+ };
52
+ }
53
+ function ChatToolToJSON(json) {
54
+ return ChatToolToJSONTyped(json, false);
55
+ }
56
+ function ChatToolToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'type': value['type'],
62
+ 'function': (0, ChatToolFunction_1.ChatToolFunctionToJSON)(value['_function']),
63
+ };
64
+ }
@@ -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,68 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ChatToolCallTypeEnum = void 0;
17
+ exports.instanceOfChatToolCall = instanceOfChatToolCall;
18
+ exports.ChatToolCallFromJSON = ChatToolCallFromJSON;
19
+ exports.ChatToolCallFromJSONTyped = ChatToolCallFromJSONTyped;
20
+ exports.ChatToolCallToJSON = ChatToolCallToJSON;
21
+ exports.ChatToolCallToJSONTyped = ChatToolCallToJSONTyped;
22
+ const ChatToolCallFunction_1 = require("./ChatToolCallFunction");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.ChatToolCallTypeEnum = {
27
+ Function: 'function'
28
+ };
29
+ /**
30
+ * Check if a given object implements the ChatToolCall interface.
31
+ */
32
+ function instanceOfChatToolCall(value) {
33
+ if (!('id' in value) || value['id'] === undefined)
34
+ return false;
35
+ if (!('type' in value) || value['type'] === undefined)
36
+ return false;
37
+ if (value['type'] !== 'function')
38
+ return false;
39
+ if ((!('_function' in value) && !('function' in value)) || (value['_function'] === undefined && value['function'] === undefined))
40
+ return false;
41
+ return true;
42
+ }
43
+ function ChatToolCallFromJSON(json) {
44
+ return ChatToolCallFromJSONTyped(json, false);
45
+ }
46
+ function ChatToolCallFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'id': json['id'],
52
+ 'type': json['type'],
53
+ '_function': (0, ChatToolCallFunction_1.ChatToolCallFunctionFromJSON)(json['function']),
54
+ };
55
+ }
56
+ function ChatToolCallToJSON(json) {
57
+ return ChatToolCallToJSONTyped(json, false);
58
+ }
59
+ function ChatToolCallToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'id': value['id'],
65
+ 'type': value['type'],
66
+ 'function': (0, ChatToolCallFunction_1.ChatToolCallFunctionToJSON)(value['_function']),
67
+ };
68
+ }
@@ -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,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfChatToolCallFunction = instanceOfChatToolCallFunction;
17
+ exports.ChatToolCallFunctionFromJSON = ChatToolCallFunctionFromJSON;
18
+ exports.ChatToolCallFunctionFromJSONTyped = ChatToolCallFunctionFromJSONTyped;
19
+ exports.ChatToolCallFunctionToJSON = ChatToolCallFunctionToJSON;
20
+ exports.ChatToolCallFunctionToJSONTyped = ChatToolCallFunctionToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ChatToolCallFunction interface.
23
+ */
24
+ function instanceOfChatToolCallFunction(value) {
25
+ if (!('name' in value) || value['name'] === undefined)
26
+ return false;
27
+ if (!('arguments' in value) || value['arguments'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function ChatToolCallFunctionFromJSON(json) {
32
+ return ChatToolCallFunctionFromJSONTyped(json, false);
33
+ }
34
+ function ChatToolCallFunctionFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'name': json['name'],
40
+ 'arguments': json['arguments'],
41
+ };
42
+ }
43
+ function ChatToolCallFunctionToJSON(json) {
44
+ return ChatToolCallFunctionToJSONTyped(json, false);
45
+ }
46
+ function ChatToolCallFunctionToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'name': value['name'],
52
+ 'arguments': value['arguments'],
53
+ };
54
+ }
@@ -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,56 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfChatToolFunction = instanceOfChatToolFunction;
17
+ exports.ChatToolFunctionFromJSON = ChatToolFunctionFromJSON;
18
+ exports.ChatToolFunctionFromJSONTyped = ChatToolFunctionFromJSONTyped;
19
+ exports.ChatToolFunctionToJSON = ChatToolFunctionToJSON;
20
+ exports.ChatToolFunctionToJSONTyped = ChatToolFunctionToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ChatToolFunction interface.
23
+ */
24
+ function instanceOfChatToolFunction(value) {
25
+ if (!('name' in value) || value['name'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function ChatToolFunctionFromJSON(json) {
30
+ return ChatToolFunctionFromJSONTyped(json, false);
31
+ }
32
+ function ChatToolFunctionFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'name': json['name'],
38
+ 'description': json['description'] == null ? undefined : json['description'],
39
+ 'parameters': json['parameters'] == null ? undefined : json['parameters'],
40
+ 'strict': json['strict'] == null ? undefined : json['strict'],
41
+ };
42
+ }
43
+ function ChatToolFunctionToJSON(json) {
44
+ return ChatToolFunctionToJSONTyped(json, false);
45
+ }
46
+ function ChatToolFunctionToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'name': value['name'],
52
+ 'description': value['description'],
53
+ 'parameters': value['parameters'],
54
+ 'strict': value['strict'],
55
+ };
56
+ }
@@ -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.
@@ -58,6 +58,7 @@ function CreateFunctionVersionRequestFromJSONTyped(json, ignoreDiscriminator) {
58
58
  'timeout': json['timeout'],
59
59
  'idleTimeout': json['idle_timeout'] == null ? undefined : json['idle_timeout'],
60
60
  'maxConcurrency': json['max_concurrency'] == null ? undefined : json['max_concurrency'],
61
+ 'secrets': json['secrets'] == null ? undefined : json['secrets'],
61
62
  };
62
63
  }
63
64
  function CreateFunctionVersionRequestToJSON(json) {
@@ -82,5 +83,6 @@ function CreateFunctionVersionRequestToJSONTyped(value, ignoreDiscriminator = fa
82
83
  'timeout': value['timeout'],
83
84
  'idle_timeout': value['idleTimeout'],
84
85
  'max_concurrency': value['maxConcurrency'],
86
+ 'secrets': value['secrets'],
85
87
  };
86
88
  }
@@ -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
@@ -20,6 +20,7 @@ exports.CreateInstanceRequestFromJSONTyped = CreateInstanceRequestFromJSONTyped;
20
20
  exports.CreateInstanceRequestToJSON = CreateInstanceRequestToJSON;
21
21
  exports.CreateInstanceRequestToJSONTyped = CreateInstanceRequestToJSONTyped;
22
22
  const CreateInstanceRequestPortsInner_1 = require("./CreateInstanceRequestPortsInner");
23
+ const DedicatedIPRequest_1 = require("./DedicatedIPRequest");
23
24
  /**
24
25
  * @export
25
26
  */
@@ -66,6 +67,8 @@ function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
66
67
  'entrypoint': json['entrypoint'] == null ? undefined : json['entrypoint'],
67
68
  'cmd': json['cmd'] == null ? undefined : json['cmd'],
68
69
  'ports': json['ports'] == null ? undefined : (json['ports'].map(CreateInstanceRequestPortsInner_1.CreateInstanceRequestPortsInnerFromJSON)),
70
+ 'dedicatedIp': json['dedicated_ip'] == null ? undefined : (0, DedicatedIPRequest_1.DedicatedIPRequestFromJSON)(json['dedicated_ip']),
71
+ 'secrets': json['secrets'] == null ? undefined : json['secrets'],
69
72
  };
70
73
  }
71
74
  function CreateInstanceRequestToJSON(json) {
@@ -95,5 +98,7 @@ function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = false) {
95
98
  'entrypoint': value['entrypoint'],
96
99
  'cmd': value['cmd'],
97
100
  'ports': value['ports'] == null ? undefined : (value['ports'].map(CreateInstanceRequestPortsInner_1.CreateInstanceRequestPortsInnerToJSON)),
101
+ 'dedicated_ip': (0, DedicatedIPRequest_1.DedicatedIPRequestToJSON)(value['dedicatedIp']),
102
+ 'secrets': value['secrets'],
98
103
  };
99
104
  }
@@ -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;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfDedicatedIPRequest = instanceOfDedicatedIPRequest;
17
+ exports.DedicatedIPRequestFromJSON = DedicatedIPRequestFromJSON;
18
+ exports.DedicatedIPRequestFromJSONTyped = DedicatedIPRequestFromJSONTyped;
19
+ exports.DedicatedIPRequestToJSON = DedicatedIPRequestToJSON;
20
+ exports.DedicatedIPRequestToJSONTyped = DedicatedIPRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the DedicatedIPRequest interface.
23
+ */
24
+ function instanceOfDedicatedIPRequest(value) {
25
+ return true;
26
+ }
27
+ function DedicatedIPRequestFromJSON(json) {
28
+ return DedicatedIPRequestFromJSONTyped(json, false);
29
+ }
30
+ function DedicatedIPRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'ports': json['ports'] == null ? undefined : json['ports'],
36
+ };
37
+ }
38
+ function DedicatedIPRequestToJSON(json) {
39
+ return DedicatedIPRequestToJSONTyped(json, false);
40
+ }
41
+ function DedicatedIPRequestToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'ports': value['ports'],
47
+ };
48
+ }
@@ -112,6 +112,12 @@ export interface FunctionVersion {
112
112
  * @memberof FunctionVersion
113
113
  */
114
114
  maxConcurrency: number;
115
+ /**
116
+ * Names of the organization secrets each run receives. Empty when none.
117
+ * @type {Array<string>}
118
+ * @memberof FunctionVersion
119
+ */
120
+ secrets: Array<string>;
115
121
  /**
116
122
  *
117
123
  * @type {Date}