@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,40 @@
1
+
2
+ # ChatJSONSchemaFormat
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `description` | string
11
+ `schema` | { [key: string]: any; }
12
+ `strict` | boolean
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { ChatJSONSchemaFormat } from '@gpuai/sdk'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "name": null,
22
+ "description": null,
23
+ "schema": null,
24
+ "strict": null,
25
+ } satisfies ChatJSONSchemaFormat
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as ChatJSONSchemaFormat
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
@@ -8,6 +8,9 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `role` | string
10
10
  `content` | string
11
+ `name` | string
12
+ `toolCalls` | [Array<ChatToolCall>](ChatToolCall.md)
13
+ `toolCallId` | string
11
14
 
12
15
  ## Example
13
16
 
@@ -18,6 +21,9 @@ import type { ChatMessage } from '@gpuai/sdk'
18
21
  const example = {
19
22
  "role": null,
20
23
  "content": null,
24
+ "name": null,
25
+ "toolCalls": null,
26
+ "toolCallId": null,
21
27
  } satisfies ChatMessage
22
28
 
23
29
  console.log(example)
@@ -0,0 +1,36 @@
1
+
2
+ # ChatNamedToolChoice
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `type` | string
10
+ `_function` | [ChatNamedToolChoiceFunction](ChatNamedToolChoiceFunction.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { ChatNamedToolChoice } from '@gpuai/sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "type": null,
20
+ "_function": null,
21
+ } satisfies ChatNamedToolChoice
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as ChatNamedToolChoice
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,34 @@
1
+
2
+ # ChatNamedToolChoiceFunction
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { ChatNamedToolChoiceFunction } from '@gpuai/sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "name": null,
19
+ } satisfies ChatNamedToolChoiceFunction
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as ChatNamedToolChoiceFunction
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,37 @@
1
+
2
+ # ChatResponseFormat
3
+
4
+ Structured outputs. {\"type\":\"json_object\"} (JSON mode) or {\"type\":\"json_schema\",\"json_schema\":{...}}; \"text\" is the default. Only models whose /v1/models entry has supports_structured_outputs: true accept json_object / json_schema.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `jsonSchema` | [ChatJSONSchemaFormat](ChatJSONSchemaFormat.md)
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { ChatResponseFormat } from '@gpuai/sdk'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "type": null,
21
+ "jsonSchema": null,
22
+ } satisfies ChatResponseFormat
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as ChatResponseFormat
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -0,0 +1,36 @@
1
+
2
+ # ChatTool
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `type` | string
10
+ `_function` | [ChatToolFunction](ChatToolFunction.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { ChatTool } from '@gpuai/sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "type": null,
20
+ "_function": null,
21
+ } satisfies ChatTool
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as ChatTool
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,38 @@
1
+
2
+ # ChatToolCall
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `type` | string
11
+ `_function` | [ChatToolCallFunction](ChatToolCallFunction.md)
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { ChatToolCall } from '@gpuai/sdk'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "id": null,
21
+ "type": null,
22
+ "_function": null,
23
+ } satisfies ChatToolCall
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as ChatToolCall
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
@@ -0,0 +1,36 @@
1
+
2
+ # ChatToolCallFunction
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `arguments` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { ChatToolCallFunction } from '@gpuai/sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "name": null,
20
+ "arguments": null,
21
+ } satisfies ChatToolCallFunction
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as ChatToolCallFunction
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,40 @@
1
+
2
+ # ChatToolFunction
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `description` | string
11
+ `parameters` | { [key: string]: any; }
12
+ `strict` | boolean
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { ChatToolFunction } from '@gpuai/sdk'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "name": null,
22
+ "description": null,
23
+ "parameters": null,
24
+ "strict": null,
25
+ } satisfies ChatToolFunction
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as ChatToolFunction
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
@@ -20,6 +20,7 @@ Name | Type
20
20
  `timeout` | number
21
21
  `idleTimeout` | number
22
22
  `maxConcurrency` | number
23
+ `secrets` | Array<string>
23
24
 
24
25
  ## Example
25
26
 
@@ -42,6 +43,7 @@ const example = {
42
43
  "timeout": null,
43
44
  "idleTimeout": null,
44
45
  "maxConcurrency": null,
46
+ "secrets": null,
45
47
  } satisfies CreateFunctionVersionRequest
46
48
 
47
49
  console.log(example)
@@ -25,6 +25,8 @@ Name | Type
25
25
  `entrypoint` | Array<string>
26
26
  `cmd` | Array<string>
27
27
  `ports` | [Array<CreateInstanceRequestPortsInner>](CreateInstanceRequestPortsInner.md)
28
+ `dedicatedIp` | [DedicatedIPRequest](DedicatedIPRequest.md)
29
+ `secrets` | Array<string>
28
30
 
29
31
  ## Example
30
32
 
@@ -52,6 +54,8 @@ const example = {
52
54
  "entrypoint": null,
53
55
  "cmd": null,
54
56
  "ports": null,
57
+ "dedicatedIp": null,
58
+ "secrets": null,
55
59
  } satisfies CreateInstanceRequest
56
60
 
57
61
  console.log(example)
@@ -0,0 +1,35 @@
1
+
2
+ # DedicatedIPRequest
3
+
4
+ Requests a dedicated public IPv4 address for the instance. Send an empty object for the default ports (80 and 443).
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `ports` | Array<number>
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { DedicatedIPRequest } from '@gpuai/sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "ports": [80, 443],
20
+ } satisfies DedicatedIPRequest
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as DedicatedIPRequest
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+
@@ -22,6 +22,7 @@ Name | Type
22
22
  `timeout` | number
23
23
  `idleTimeout` | number
24
24
  `maxConcurrency` | number
25
+ `secrets` | Array<string>
25
26
  `createdAt` | Date
26
27
 
27
28
  ## Example
@@ -47,6 +48,7 @@ const example = {
47
48
  "timeout": null,
48
49
  "idleTimeout": null,
49
50
  "maxConcurrency": null,
51
+ "secrets": null,
50
52
  "createdAt": null,
51
53
  } satisfies FunctionVersion
52
54
 
package/docs/Instance.md CHANGED
@@ -27,6 +27,7 @@ Name | Type
27
27
  `lastReachableAt` | Date
28
28
  `unreachableSince` | Date
29
29
  `bootPhase` | string
30
+ `dedicatedIp` | [InstanceDedicatedIP](InstanceDedicatedIP.md)
30
31
 
31
32
  ## Example
32
33
 
@@ -56,6 +57,7 @@ const example = {
56
57
  "lastReachableAt": null,
57
58
  "unreachableSince": null,
58
59
  "bootPhase": null,
60
+ "dedicatedIp": null,
59
61
  } satisfies Instance
60
62
 
61
63
  console.log(example)
@@ -0,0 +1,49 @@
1
+
2
+ # InstanceDedicatedIP
3
+
4
+ The instance\'s dedicated public IPv4 add-on. Present only on instances launched with `dedicated_ip`, and only on deployments where the add-on is enabled.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `address` | string
11
+ `ports` | Array<number>
12
+ `status` | string
13
+ `suspendReason` | string
14
+ `hourlyFee` | number
15
+ `transferPricePerGb` | number
16
+ `transferGb` | number
17
+ `chargedUsd` | number
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import type { InstanceDedicatedIP } from '@gpuai/sdk'
23
+
24
+ // TODO: Update the object below with actual values
25
+ const example = {
26
+ "address": 203.0.113.7,
27
+ "ports": [80, 443],
28
+ "status": null,
29
+ "suspendReason": null,
30
+ "hourlyFee": null,
31
+ "transferPricePerGb": null,
32
+ "transferGb": null,
33
+ "chargedUsd": null,
34
+ } satisfies InstanceDedicatedIP
35
+
36
+ console.log(example)
37
+
38
+ // Convert the instance to a JSON string
39
+ const exampleJSON: string = JSON.stringify(example)
40
+ console.log(exampleJSON)
41
+
42
+ // Parse the JSON string back to an object
43
+ const exampleParsed = JSON.parse(exampleJSON) as InstanceDedicatedIP
44
+ console.log(exampleParsed)
45
+ ```
46
+
47
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
48
+
49
+
@@ -19,6 +19,8 @@ All URIs are relative to *https://api.gpu.ai/v1*
19
19
 
20
20
  Create an instance (async — returns 202 + Operation-Id header)
21
21
 
22
+ Running a one-off script or batch work? Submit it as a job instead (POST /jobs): the machine is started for it and shut down a few minutes after it finishes, so nothing bills after the work is done.
23
+
22
24
  ### Example
23
25
 
24
26
  ```ts
@@ -80,7 +82,7 @@ example().catch(console.error);
80
82
  ### HTTP response details
81
83
  | Status code | Description | Response headers |
82
84
  |-------------|-------------|------------------|
83
- | **202** | Accepted; long-running operation | * Operation-Id - Use GET /operations/{id} to poll <br> |
85
+ | **202** | Accepted; long-running operation | * Operation-Id - Use GET /operations/{id} to poll <br> * GPUAI-Hint - Advisory only, and absent on most launches. Sent when the request is a one-off batch run (a custom image with a command and auto_terminate_hours) to point at Jobs (POST /jobs), which start a machine for the work and shut it down a few minutes after it ends. It never changes the launch. <br> |
84
86
  | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
85
87
  | **0** | Error response (RFC 7807) | - |
86
88
 
package/docs/Model.md CHANGED
@@ -15,6 +15,8 @@ Name | Type
15
15
  `category` | string
16
16
  `contextLength` | number
17
17
  `supportedParameters` | Array&lt;string&gt;
18
+ `supportsTools` | boolean
19
+ `supportsStructuredOutputs` | boolean
18
20
  `parameters` | [Array&lt;ModelParametersInner&gt;](ModelParametersInner.md)
19
21
  `pricing` | [ModelPricing](ModelPricing.md)
20
22
  `aliases` | Array&lt;string&gt;
@@ -38,6 +40,8 @@ const example = {
38
40
  "category": null,
39
41
  "contextLength": null,
40
42
  "supportedParameters": null,
43
+ "supportsTools": null,
44
+ "supportsStructuredOutputs": null,
41
45
  "parameters": null,
42
46
  "pricing": null,
43
47
  "aliases": null,
@@ -0,0 +1,47 @@
1
+
2
+ # OfferingAlternative
3
+
4
+ A live catalog row a launch whose pinned offering was gone could take instead. Same fields and meaning as the matching GET /pricing row.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `offeringId` | string
11
+ `gpuType` | string
12
+ `gpuCount` | number
13
+ `region` | string
14
+ `tier` | string
15
+ `pricePerHour` | number
16
+ `available` | number
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { OfferingAlternative } from '@gpuai/sdk'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "offeringId": null,
26
+ "gpuType": null,
27
+ "gpuCount": null,
28
+ "region": null,
29
+ "tier": null,
30
+ "pricePerHour": null,
31
+ "available": null,
32
+ } satisfies OfferingAlternative
33
+
34
+ console.log(example)
35
+
36
+ // Convert the instance to a JSON string
37
+ const exampleJSON: string = JSON.stringify(example)
38
+ console.log(exampleJSON)
39
+
40
+ // Parse the JSON string back to an object
41
+ const exampleParsed = JSON.parse(exampleJSON) as OfferingAlternative
42
+ console.log(exampleParsed)
43
+ ```
44
+
45
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
46
+
47
+
@@ -8,6 +8,9 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `code` | string
10
10
  `detail` | string
11
+ `alternatives` | [Array&lt;OfferingAlternative&gt;](OfferingAlternative.md)
12
+ `currentPricePerHour` | number
13
+ `maxPricePerHour` | number
11
14
 
12
15
  ## Example
13
16
 
@@ -18,6 +21,9 @@ import type { OperationError } from '@gpuai/sdk'
18
21
  const example = {
19
22
  "code": null,
20
23
  "detail": null,
24
+ "alternatives": null,
25
+ "currentPricePerHour": null,
26
+ "maxPricePerHour": null,
21
27
  } satisfies OperationError
22
28
 
23
29
  console.log(example)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {
@@ -127,6 +127,7 @@ export class InstancesApi extends runtime.BaseAPI {
127
127
  }
128
128
 
129
129
  /**
130
+ * Running a one-off script or batch work? Submit it as a job instead (POST /jobs): the machine is started for it and shut down a few minutes after it finishes, so nothing bills after the work is done.
130
131
  * Create an instance (async — returns 202 + Operation-Id header)
131
132
  */
132
133
  async createInstanceRaw(requestParameters: CreateInstanceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Operation>> {
@@ -137,6 +138,7 @@ export class InstancesApi extends runtime.BaseAPI {
137
138
  }
138
139
 
139
140
  /**
141
+ * Running a one-off script or batch work? Submit it as a job instead (POST /jobs): the machine is started for it and shut down a few minutes after it finishes, so nothing bills after the work is done.
140
142
  * Create an instance (async — returns 202 + Operation-Id header)
141
143
  */
142
144
  async createInstance(requestParameters: CreateInstanceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Operation> {