@gpuai/sdk 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +22 -0
- package/README.md +13 -2
- package/dist/apis/InstancesApi.d.ts +2 -0
- package/dist/apis/InstancesApi.js +2 -0
- package/dist/esm/apis/InstancesApi.d.ts +2 -0
- package/dist/esm/apis/InstancesApi.js +2 -0
- package/dist/esm/models/ChatCompletionRequest.d.ts +27 -0
- package/dist/esm/models/ChatCompletionRequest.js +11 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.d.ts +22 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.js +50 -0
- package/dist/esm/models/ChatJSONSchemaFormat.d.ts +52 -0
- package/dist/esm/models/ChatJSONSchemaFormat.js +51 -0
- package/dist/esm/models/ChatMessage.d.ts +21 -1
- package/dist/esm/models/ChatMessage.js +10 -4
- package/dist/esm/models/ChatNamedToolChoice.d.ts +46 -0
- package/dist/esm/models/ChatNamedToolChoice.js +56 -0
- package/dist/esm/models/ChatNamedToolChoiceFunction.d.ts +32 -0
- package/dist/esm/models/ChatNamedToolChoiceFunction.js +43 -0
- package/dist/esm/models/ChatResponseFormat.d.ts +48 -0
- package/dist/esm/models/ChatResponseFormat.js +54 -0
- package/dist/esm/models/ChatTool.d.ts +46 -0
- package/dist/esm/models/ChatTool.js +56 -0
- package/dist/esm/models/ChatToolCall.d.ts +52 -0
- package/dist/esm/models/ChatToolCall.js +60 -0
- package/dist/esm/models/ChatToolCallFunction.d.ts +38 -0
- package/dist/esm/models/ChatToolCallFunction.js +47 -0
- package/dist/esm/models/ChatToolFunction.d.ts +52 -0
- package/dist/esm/models/ChatToolFunction.js +49 -0
- package/dist/esm/models/CreateFunctionVersionRequest.d.ts +6 -0
- package/dist/esm/models/CreateFunctionVersionRequest.js +2 -0
- package/dist/esm/models/CreateInstanceRequest.d.ts +13 -0
- package/dist/esm/models/CreateInstanceRequest.js +5 -0
- package/dist/esm/models/DedicatedIPRequest.d.ts +32 -0
- package/dist/esm/models/DedicatedIPRequest.js +41 -0
- package/dist/esm/models/FunctionVersion.d.ts +6 -0
- package/dist/esm/models/FunctionVersion.js +4 -0
- package/dist/esm/models/Instance.d.ts +22 -0
- package/dist/esm/models/Instance.js +13 -0
- package/dist/esm/models/InstanceDedicatedIP.d.ts +83 -0
- package/dist/esm/models/InstanceDedicatedIP.js +77 -0
- package/dist/esm/models/Model.d.ts +12 -0
- package/dist/esm/models/Model.js +4 -0
- package/dist/esm/models/Problem.d.ts +2 -0
- package/dist/esm/models/Problem.js +2 -0
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.js +11 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/ChatCompletionRequest.d.ts +27 -0
- package/dist/models/ChatCompletionRequest.js +11 -0
- package/dist/models/ChatCompletionRequestToolChoice.d.ts +22 -0
- package/dist/models/ChatCompletionRequestToolChoice.js +56 -0
- package/dist/models/ChatJSONSchemaFormat.d.ts +52 -0
- package/dist/models/ChatJSONSchemaFormat.js +58 -0
- package/dist/models/ChatMessage.d.ts +21 -1
- package/dist/models/ChatMessage.js +10 -4
- package/dist/models/ChatNamedToolChoice.d.ts +46 -0
- package/dist/models/ChatNamedToolChoice.js +64 -0
- package/dist/models/ChatNamedToolChoiceFunction.d.ts +32 -0
- package/dist/models/ChatNamedToolChoiceFunction.js +50 -0
- package/dist/models/ChatResponseFormat.d.ts +48 -0
- package/dist/models/ChatResponseFormat.js +62 -0
- package/dist/models/ChatTool.d.ts +46 -0
- package/dist/models/ChatTool.js +64 -0
- package/dist/models/ChatToolCall.d.ts +52 -0
- package/dist/models/ChatToolCall.js +68 -0
- package/dist/models/ChatToolCallFunction.d.ts +38 -0
- package/dist/models/ChatToolCallFunction.js +54 -0
- package/dist/models/ChatToolFunction.d.ts +52 -0
- package/dist/models/ChatToolFunction.js +56 -0
- package/dist/models/CreateFunctionVersionRequest.d.ts +6 -0
- package/dist/models/CreateFunctionVersionRequest.js +2 -0
- package/dist/models/CreateInstanceRequest.d.ts +13 -0
- package/dist/models/CreateInstanceRequest.js +5 -0
- package/dist/models/DedicatedIPRequest.d.ts +32 -0
- package/dist/models/DedicatedIPRequest.js +48 -0
- package/dist/models/FunctionVersion.d.ts +6 -0
- package/dist/models/FunctionVersion.js +4 -0
- package/dist/models/Instance.d.ts +22 -0
- package/dist/models/Instance.js +14 -1
- package/dist/models/InstanceDedicatedIP.d.ts +83 -0
- package/dist/models/InstanceDedicatedIP.js +85 -0
- package/dist/models/Model.d.ts +12 -0
- package/dist/models/Model.js +4 -0
- package/dist/models/Problem.d.ts +2 -0
- package/dist/models/Problem.js +2 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +11 -0
- package/dist/runtime.js +1 -1
- package/docs/ChatCompletionRequest.md +8 -0
- package/docs/ChatCompletionRequestToolChoice.md +37 -0
- package/docs/ChatJSONSchemaFormat.md +40 -0
- package/docs/ChatMessage.md +6 -0
- package/docs/ChatNamedToolChoice.md +36 -0
- package/docs/ChatNamedToolChoiceFunction.md +34 -0
- package/docs/ChatResponseFormat.md +37 -0
- package/docs/ChatTool.md +36 -0
- package/docs/ChatToolCall.md +38 -0
- package/docs/ChatToolCallFunction.md +36 -0
- package/docs/ChatToolFunction.md +40 -0
- package/docs/CreateFunctionVersionRequest.md +2 -0
- package/docs/CreateInstanceRequest.md +4 -0
- package/docs/DedicatedIPRequest.md +35 -0
- package/docs/FunctionVersion.md +2 -0
- package/docs/Instance.md +4 -0
- package/docs/InstanceDedicatedIP.md +49 -0
- package/docs/InstancesApi.md +3 -1
- package/docs/Model.md +4 -0
- package/package.json +1 -1
- package/src/apis/InstancesApi.ts +2 -0
- package/src/models/ChatCompletionRequest.ts +53 -0
- package/src/models/ChatCompletionRequestToolChoice.ts +69 -0
- package/src/models/ChatJSONSchemaFormat.ts +91 -0
- package/src/models/ChatMessage.ts +36 -4
- package/src/models/ChatNamedToolChoice.ts +95 -0
- package/src/models/ChatNamedToolChoiceFunction.ts +66 -0
- package/src/models/ChatResponseFormat.ts +94 -0
- package/src/models/ChatTool.ts +95 -0
- package/src/models/ChatToolCall.ts +104 -0
- package/src/models/ChatToolCallFunction.ts +75 -0
- package/src/models/ChatToolFunction.ts +90 -0
- package/src/models/CreateFunctionVersionRequest.ts +8 -0
- package/src/models/CreateInstanceRequest.ts +23 -0
- package/src/models/DedicatedIPRequest.ts +65 -0
- package/src/models/FunctionVersion.ts +9 -0
- package/src/models/Instance.ts +33 -0
- package/src/models/InstanceDedicatedIP.ts +140 -0
- package/src/models/Model.ts +16 -0
- package/src/models/Problem.ts +2 -0
- package/src/models/index.ts +11 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,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 ChatJSONSchemaFormat
|
|
16
|
+
*/
|
|
17
|
+
export interface ChatJSONSchemaFormat {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChatJSONSchemaFormat
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ChatJSONSchemaFormat
|
|
28
|
+
*/
|
|
29
|
+
description?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {{ [key: string]: any; }}
|
|
33
|
+
* @memberof ChatJSONSchemaFormat
|
|
34
|
+
*/
|
|
35
|
+
schema: {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof ChatJSONSchemaFormat
|
|
42
|
+
*/
|
|
43
|
+
strict?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the ChatJSONSchemaFormat interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfChatJSONSchemaFormat(value: object): value is ChatJSONSchemaFormat;
|
|
49
|
+
export declare function ChatJSONSchemaFormatFromJSON(json: any): ChatJSONSchemaFormat;
|
|
50
|
+
export declare function ChatJSONSchemaFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatJSONSchemaFormat;
|
|
51
|
+
export declare function ChatJSONSchemaFormatToJSON(json: any): ChatJSONSchemaFormat;
|
|
52
|
+
export declare function ChatJSONSchemaFormatToJSONTyped(value?: ChatJSONSchemaFormat | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.instanceOfChatJSONSchemaFormat = instanceOfChatJSONSchemaFormat;
|
|
17
|
+
exports.ChatJSONSchemaFormatFromJSON = ChatJSONSchemaFormatFromJSON;
|
|
18
|
+
exports.ChatJSONSchemaFormatFromJSONTyped = ChatJSONSchemaFormatFromJSONTyped;
|
|
19
|
+
exports.ChatJSONSchemaFormatToJSON = ChatJSONSchemaFormatToJSON;
|
|
20
|
+
exports.ChatJSONSchemaFormatToJSONTyped = ChatJSONSchemaFormatToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ChatJSONSchemaFormat interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfChatJSONSchemaFormat(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('schema' in value) || value['schema'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function ChatJSONSchemaFormatFromJSON(json) {
|
|
32
|
+
return ChatJSONSchemaFormatFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function ChatJSONSchemaFormatFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'name': json['name'],
|
|
40
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
41
|
+
'schema': json['schema'],
|
|
42
|
+
'strict': json['strict'] == null ? undefined : json['strict'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function ChatJSONSchemaFormatToJSON(json) {
|
|
46
|
+
return ChatJSONSchemaFormatToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function ChatJSONSchemaFormatToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'name': value['name'],
|
|
54
|
+
'description': value['description'],
|
|
55
|
+
'schema': value['schema'],
|
|
56
|
+
'strict': value['strict'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ChatToolCall } from './ChatToolCall';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -21,12 +22,30 @@ export interface ChatMessage {
|
|
|
21
22
|
* @memberof ChatMessage
|
|
22
23
|
*/
|
|
23
24
|
role: ChatMessageRoleEnum;
|
|
25
|
+
/**
|
|
26
|
+
* Message text. null on an assistant message that only calls tools. Requests may also send an array of content parts, passed through unchanged.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ChatMessage
|
|
29
|
+
*/
|
|
30
|
+
content?: string | null;
|
|
24
31
|
/**
|
|
25
32
|
*
|
|
26
33
|
* @type {string}
|
|
27
34
|
* @memberof ChatMessage
|
|
28
35
|
*/
|
|
29
|
-
|
|
36
|
+
name?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Tool calls made by the assistant (assistant messages only).
|
|
39
|
+
* @type {Array<ChatToolCall>}
|
|
40
|
+
* @memberof ChatMessage
|
|
41
|
+
*/
|
|
42
|
+
toolCalls?: Array<ChatToolCall>;
|
|
43
|
+
/**
|
|
44
|
+
* The tool call this message answers (required on role "tool").
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ChatMessage
|
|
47
|
+
*/
|
|
48
|
+
toolCallId?: string;
|
|
30
49
|
}
|
|
31
50
|
/**
|
|
32
51
|
* @export
|
|
@@ -35,6 +54,7 @@ export declare const ChatMessageRoleEnum: {
|
|
|
35
54
|
readonly System: "system";
|
|
36
55
|
readonly User: "user";
|
|
37
56
|
readonly Assistant: "assistant";
|
|
57
|
+
readonly Tool: "tool";
|
|
38
58
|
};
|
|
39
59
|
export type ChatMessageRoleEnum = typeof ChatMessageRoleEnum[keyof typeof ChatMessageRoleEnum];
|
|
40
60
|
/**
|
|
@@ -19,13 +19,15 @@ exports.ChatMessageFromJSON = ChatMessageFromJSON;
|
|
|
19
19
|
exports.ChatMessageFromJSONTyped = ChatMessageFromJSONTyped;
|
|
20
20
|
exports.ChatMessageToJSON = ChatMessageToJSON;
|
|
21
21
|
exports.ChatMessageToJSONTyped = ChatMessageToJSONTyped;
|
|
22
|
+
const ChatToolCall_1 = require("./ChatToolCall");
|
|
22
23
|
/**
|
|
23
24
|
* @export
|
|
24
25
|
*/
|
|
25
26
|
exports.ChatMessageRoleEnum = {
|
|
26
27
|
System: 'system',
|
|
27
28
|
User: 'user',
|
|
28
|
-
Assistant: 'assistant'
|
|
29
|
+
Assistant: 'assistant',
|
|
30
|
+
Tool: 'tool'
|
|
29
31
|
};
|
|
30
32
|
/**
|
|
31
33
|
* Check if a given object implements the ChatMessage interface.
|
|
@@ -33,8 +35,6 @@ exports.ChatMessageRoleEnum = {
|
|
|
33
35
|
function instanceOfChatMessage(value) {
|
|
34
36
|
if (!('role' in value) || value['role'] === undefined)
|
|
35
37
|
return false;
|
|
36
|
-
if (!('content' in value) || value['content'] === undefined)
|
|
37
|
-
return false;
|
|
38
38
|
return true;
|
|
39
39
|
}
|
|
40
40
|
function ChatMessageFromJSON(json) {
|
|
@@ -46,7 +46,10 @@ function ChatMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
46
|
}
|
|
47
47
|
return {
|
|
48
48
|
'role': json['role'],
|
|
49
|
-
'content': json['content'],
|
|
49
|
+
'content': json['content'] === undefined ? undefined : json['content'] === null ? null : json['content'],
|
|
50
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
51
|
+
'toolCalls': json['tool_calls'] == null ? undefined : (json['tool_calls'].map(ChatToolCall_1.ChatToolCallFromJSON)),
|
|
52
|
+
'toolCallId': json['tool_call_id'] == null ? undefined : json['tool_call_id'],
|
|
50
53
|
};
|
|
51
54
|
}
|
|
52
55
|
function ChatMessageToJSON(json) {
|
|
@@ -59,5 +62,8 @@ function ChatMessageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
59
62
|
return {
|
|
60
63
|
'role': value['role'],
|
|
61
64
|
'content': value['content'],
|
|
65
|
+
'name': value['name'],
|
|
66
|
+
'tool_calls': value['toolCalls'] == null ? undefined : (value['toolCalls'].map(ChatToolCall_1.ChatToolCallToJSON)),
|
|
67
|
+
'tool_call_id': value['toolCallId'],
|
|
62
68
|
};
|
|
63
69
|
}
|
|
@@ -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 { ChatNamedToolChoiceFunction } from './ChatNamedToolChoiceFunction';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChatNamedToolChoice
|
|
17
|
+
*/
|
|
18
|
+
export interface ChatNamedToolChoice {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {ChatNamedToolChoiceTypeEnum}
|
|
22
|
+
* @memberof ChatNamedToolChoice
|
|
23
|
+
*/
|
|
24
|
+
type: ChatNamedToolChoiceTypeEnum;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ChatNamedToolChoiceFunction}
|
|
28
|
+
* @memberof ChatNamedToolChoice
|
|
29
|
+
*/
|
|
30
|
+
_function: ChatNamedToolChoiceFunction;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export declare const ChatNamedToolChoiceTypeEnum: {
|
|
36
|
+
readonly Function: "function";
|
|
37
|
+
};
|
|
38
|
+
export type ChatNamedToolChoiceTypeEnum = typeof ChatNamedToolChoiceTypeEnum[keyof typeof ChatNamedToolChoiceTypeEnum];
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the ChatNamedToolChoice interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfChatNamedToolChoice(value: object): value is ChatNamedToolChoice;
|
|
43
|
+
export declare function ChatNamedToolChoiceFromJSON(json: any): ChatNamedToolChoice;
|
|
44
|
+
export declare function ChatNamedToolChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatNamedToolChoice;
|
|
45
|
+
export declare function ChatNamedToolChoiceToJSON(json: any): ChatNamedToolChoice;
|
|
46
|
+
export declare function ChatNamedToolChoiceToJSONTyped(value?: ChatNamedToolChoice | 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.ChatNamedToolChoiceTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfChatNamedToolChoice = instanceOfChatNamedToolChoice;
|
|
18
|
+
exports.ChatNamedToolChoiceFromJSON = ChatNamedToolChoiceFromJSON;
|
|
19
|
+
exports.ChatNamedToolChoiceFromJSONTyped = ChatNamedToolChoiceFromJSONTyped;
|
|
20
|
+
exports.ChatNamedToolChoiceToJSON = ChatNamedToolChoiceToJSON;
|
|
21
|
+
exports.ChatNamedToolChoiceToJSONTyped = ChatNamedToolChoiceToJSONTyped;
|
|
22
|
+
const ChatNamedToolChoiceFunction_1 = require("./ChatNamedToolChoiceFunction");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ChatNamedToolChoiceTypeEnum = {
|
|
27
|
+
Function: 'function'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the ChatNamedToolChoice interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfChatNamedToolChoice(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 ChatNamedToolChoiceFromJSON(json) {
|
|
42
|
+
return ChatNamedToolChoiceFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ChatNamedToolChoiceFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'type': json['type'],
|
|
50
|
+
'_function': (0, ChatNamedToolChoiceFunction_1.ChatNamedToolChoiceFunctionFromJSON)(json['function']),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function ChatNamedToolChoiceToJSON(json) {
|
|
54
|
+
return ChatNamedToolChoiceToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function ChatNamedToolChoiceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'type': value['type'],
|
|
62
|
+
'function': (0, ChatNamedToolChoiceFunction_1.ChatNamedToolChoiceFunctionToJSON)(value['_function']),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChatNamedToolChoiceFunction
|
|
16
|
+
*/
|
|
17
|
+
export interface ChatNamedToolChoiceFunction {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChatNamedToolChoiceFunction
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ChatNamedToolChoiceFunction interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfChatNamedToolChoiceFunction(value: object): value is ChatNamedToolChoiceFunction;
|
|
29
|
+
export declare function ChatNamedToolChoiceFunctionFromJSON(json: any): ChatNamedToolChoiceFunction;
|
|
30
|
+
export declare function ChatNamedToolChoiceFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatNamedToolChoiceFunction;
|
|
31
|
+
export declare function ChatNamedToolChoiceFunctionToJSON(json: any): ChatNamedToolChoiceFunction;
|
|
32
|
+
export declare function ChatNamedToolChoiceFunctionToJSONTyped(value?: ChatNamedToolChoiceFunction | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.instanceOfChatNamedToolChoiceFunction = instanceOfChatNamedToolChoiceFunction;
|
|
17
|
+
exports.ChatNamedToolChoiceFunctionFromJSON = ChatNamedToolChoiceFunctionFromJSON;
|
|
18
|
+
exports.ChatNamedToolChoiceFunctionFromJSONTyped = ChatNamedToolChoiceFunctionFromJSONTyped;
|
|
19
|
+
exports.ChatNamedToolChoiceFunctionToJSON = ChatNamedToolChoiceFunctionToJSON;
|
|
20
|
+
exports.ChatNamedToolChoiceFunctionToJSONTyped = ChatNamedToolChoiceFunctionToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ChatNamedToolChoiceFunction interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfChatNamedToolChoiceFunction(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ChatNamedToolChoiceFunctionFromJSON(json) {
|
|
30
|
+
return ChatNamedToolChoiceFunctionFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ChatNamedToolChoiceFunctionFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'name': json['name'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function ChatNamedToolChoiceFunctionToJSON(json) {
|
|
41
|
+
return ChatNamedToolChoiceFunctionToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ChatNamedToolChoiceFunctionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'name': value['name'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -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,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;
|