matvenus-cli 0.1.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/CHANGELOG.md +22 -0
- package/LICENSE +201 -0
- package/README.md +408 -0
- package/bin/cli.js +3 -0
- package/dist/client.d.ts +13 -0
- package/dist/client.js +62 -0
- package/dist/commands/alphafold_protein_folding.d.ts +2 -0
- package/dist/commands/alphafold_protein_folding.js +262 -0
- package/dist/commands/cancel_tool_result.d.ts +2 -0
- package/dist/commands/cancel_tool_result.js +388 -0
- package/dist/commands/diffdock_protein_ligand_docking.d.ts +2 -0
- package/dist/commands/diffdock_protein_ligand_docking.js +252 -0
- package/dist/commands/esmfold_protein_folding.d.ts +2 -0
- package/dist/commands/esmfold_protein_folding.js +219 -0
- package/dist/commands/get_tool_result.d.ts +2 -0
- package/dist/commands/get_tool_result.js +388 -0
- package/dist/commands/gromacs_analysis.d.ts +2 -0
- package/dist/commands/gromacs_analysis.js +212 -0
- package/dist/commands/gromacs_md.d.ts +2 -0
- package/dist/commands/gromacs_md.js +236 -0
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/index.js +39 -0
- package/dist/commands/predict_functional_residue.d.ts +2 -0
- package/dist/commands/predict_functional_residue.js +234 -0
- package/dist/commands/predict_protein_properties.d.ts +2 -0
- package/dist/commands/predict_protein_properties.js +228 -0
- package/dist/commands/proteinmpnn_sequence_design.d.ts +2 -0
- package/dist/commands/proteinmpnn_sequence_design.js +271 -0
- package/dist/commands/rfdiffusion_protein_design.d.ts +2 -0
- package/dist/commands/rfdiffusion_protein_design.js +333 -0
- package/dist/commands/upload_file_base_64.d.ts +2 -0
- package/dist/commands/upload_file_base_64.js +212 -0
- package/dist/commands/venusg_protein_function_prediction.d.ts +2 -0
- package/dist/commands/venusg_protein_function_prediction.js +234 -0
- package/dist/commands/venusmine_protein_mining.d.ts +2 -0
- package/dist/commands/venusmine_protein_mining.js +212 -0
- package/dist/commands/venusprime_multipoint_prediction.d.ts +2 -0
- package/dist/commands/venusprime_multipoint_prediction.js +322 -0
- package/dist/commands/venusrem_mutation_prediction.d.ts +2 -0
- package/dist/commands/venusrem_mutation_prediction.js +260 -0
- package/dist/commands/venusx_functional_residue_prediction.d.ts +2 -0
- package/dist/commands/venusx_functional_residue_prediction.js +234 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +125 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.js +6 -0
- package/package.json +41 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.register = register;
|
|
4
|
+
const client_1 = require("../client");
|
|
5
|
+
function register(program, baseUrl) {
|
|
6
|
+
program
|
|
7
|
+
.command('esmfold-protein-folding')
|
|
8
|
+
.description('Esmfold Folding')
|
|
9
|
+
.option('--body <json>', 'Request body as JSON string', (value) => value)
|
|
10
|
+
.option('--base-url <url>', 'Override base URL')
|
|
11
|
+
.option('--output <format>', 'Output format: json, table', 'json')
|
|
12
|
+
.option('--schema', 'Show API schema and exit')
|
|
13
|
+
.action(async (options) => {
|
|
14
|
+
if (options.schema) {
|
|
15
|
+
console.log(JSON.stringify({
|
|
16
|
+
"method": "post",
|
|
17
|
+
"operationId": "esmfold_protein_folding",
|
|
18
|
+
"summary": "Esmfold Folding",
|
|
19
|
+
"tags": [
|
|
20
|
+
"tools-predict"
|
|
21
|
+
],
|
|
22
|
+
"parameters": [],
|
|
23
|
+
"requestBody": {
|
|
24
|
+
"required": true,
|
|
25
|
+
"contentType": "application/json",
|
|
26
|
+
"schema": {
|
|
27
|
+
"properties": {
|
|
28
|
+
"sequence": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"title": "Sequence",
|
|
31
|
+
"description": "Protein sequence in single letter amino acid code"
|
|
32
|
+
},
|
|
33
|
+
"verbose": {
|
|
34
|
+
"anyOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "null"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"title": "Verbose",
|
|
43
|
+
"description": "Whether to print detailed information",
|
|
44
|
+
"default": true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": [
|
|
49
|
+
"sequence"
|
|
50
|
+
],
|
|
51
|
+
"title": "ProteinStructurePredictionInput",
|
|
52
|
+
"description": "Input for protein structure prediction based on ESMFold"
|
|
53
|
+
},
|
|
54
|
+
"isBinary": false
|
|
55
|
+
},
|
|
56
|
+
"responses": [
|
|
57
|
+
{
|
|
58
|
+
"statusCode": "200",
|
|
59
|
+
"description": "Successful Response",
|
|
60
|
+
"contentType": "application/json",
|
|
61
|
+
"schema": {
|
|
62
|
+
"properties": {
|
|
63
|
+
"tool_call_id": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"title": "Tool Call Id",
|
|
66
|
+
"description": "系统生成的调用唯一ID"
|
|
67
|
+
},
|
|
68
|
+
"status": {
|
|
69
|
+
"description": "调用状态: running, success, error 等",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": [
|
|
72
|
+
"pending",
|
|
73
|
+
"running",
|
|
74
|
+
"success",
|
|
75
|
+
"error"
|
|
76
|
+
],
|
|
77
|
+
"title": "ToolResultStatus"
|
|
78
|
+
},
|
|
79
|
+
"result": {
|
|
80
|
+
"anyOf": [
|
|
81
|
+
{},
|
|
82
|
+
{
|
|
83
|
+
"type": "null"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"title": "Result",
|
|
87
|
+
"description": "如果即时成功,这里是工具的返回结果字典"
|
|
88
|
+
},
|
|
89
|
+
"error_message": {
|
|
90
|
+
"anyOf": [
|
|
91
|
+
{
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "null"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"title": "Error Message",
|
|
99
|
+
"description": "如果有错误,提供错误信息"
|
|
100
|
+
},
|
|
101
|
+
"credits_cost": {
|
|
102
|
+
"anyOf": [
|
|
103
|
+
{
|
|
104
|
+
"type": "number"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "null"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"title": "Credits Cost",
|
|
111
|
+
"description": "消费积分"
|
|
112
|
+
},
|
|
113
|
+
"tool_name": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"title": "Tool Name",
|
|
116
|
+
"description": "执行的工具名"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"type": "object",
|
|
120
|
+
"required": [
|
|
121
|
+
"tool_call_id",
|
|
122
|
+
"status",
|
|
123
|
+
"tool_name"
|
|
124
|
+
],
|
|
125
|
+
"title": "ToolInvokeResponse"
|
|
126
|
+
},
|
|
127
|
+
"isBinary": false
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"statusCode": "422",
|
|
131
|
+
"description": "Validation Error",
|
|
132
|
+
"contentType": "application/json",
|
|
133
|
+
"schema": {
|
|
134
|
+
"properties": {
|
|
135
|
+
"detail": {
|
|
136
|
+
"items": {
|
|
137
|
+
"properties": {
|
|
138
|
+
"loc": {
|
|
139
|
+
"items": {
|
|
140
|
+
"anyOf": [
|
|
141
|
+
{
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"type": "integer"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"type": "array",
|
|
150
|
+
"title": "Location"
|
|
151
|
+
},
|
|
152
|
+
"msg": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"title": "Message"
|
|
155
|
+
},
|
|
156
|
+
"type": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"title": "Error Type"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"type": "object",
|
|
162
|
+
"required": [
|
|
163
|
+
"loc",
|
|
164
|
+
"msg",
|
|
165
|
+
"type"
|
|
166
|
+
],
|
|
167
|
+
"title": "ValidationError"
|
|
168
|
+
},
|
|
169
|
+
"type": "array",
|
|
170
|
+
"title": "Detail"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"type": "object",
|
|
174
|
+
"title": "HTTPValidationError"
|
|
175
|
+
},
|
|
176
|
+
"isBinary": false
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"security": [
|
|
180
|
+
"HTTPBearer"
|
|
181
|
+
]
|
|
182
|
+
}, null, 2));
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
try {
|
|
186
|
+
const currentBaseUrl = options.baseUrl || baseUrl;
|
|
187
|
+
const config = { baseUrl: currentBaseUrl };
|
|
188
|
+
const path = '/api/tools/predict/esmfold';
|
|
189
|
+
const url = path;
|
|
190
|
+
const body = options.body ? JSON.parse(options.body) : undefined;
|
|
191
|
+
const response = await (0, client_1.request)(config, {
|
|
192
|
+
method: 'post',
|
|
193
|
+
path: url,
|
|
194
|
+
headers: undefined,
|
|
195
|
+
body: body,
|
|
196
|
+
isBinary: false,
|
|
197
|
+
});
|
|
198
|
+
const data = response;
|
|
199
|
+
if (options.output === 'json') {
|
|
200
|
+
console.log(JSON.stringify(data, null, 2));
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
console.log(data);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch (error) {
|
|
207
|
+
if (error.status) {
|
|
208
|
+
console.error('API Error:', error.status, error.message);
|
|
209
|
+
if (error.data) {
|
|
210
|
+
console.error(JSON.stringify(error.data, null, 2));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
console.error('Error:', error.message);
|
|
215
|
+
}
|
|
216
|
+
process.exit(1);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.register = register;
|
|
4
|
+
const client_1 = require("../client");
|
|
5
|
+
function register(program, baseUrl) {
|
|
6
|
+
program
|
|
7
|
+
.command('get-tool-result')
|
|
8
|
+
.description('Get Tool Result')
|
|
9
|
+
.requiredOption('--tool-call-id <value>', 'tool_call_id')
|
|
10
|
+
.option('--base-url <url>', 'Override base URL')
|
|
11
|
+
.option('--output <format>', 'Output format: json, table', 'json')
|
|
12
|
+
.option('--schema', 'Show API schema and exit')
|
|
13
|
+
.action(async (options) => {
|
|
14
|
+
if (options.schema) {
|
|
15
|
+
console.log(JSON.stringify({
|
|
16
|
+
"method": "get",
|
|
17
|
+
"operationId": "get_tool_result",
|
|
18
|
+
"summary": "Get Tool Result",
|
|
19
|
+
"description": "获取工具的异步执行结果。\n通过 API Key 鉴权。",
|
|
20
|
+
"tags": [
|
|
21
|
+
"tools-results"
|
|
22
|
+
],
|
|
23
|
+
"parameters": [
|
|
24
|
+
{
|
|
25
|
+
"name": "tool_call_id",
|
|
26
|
+
"in": "path",
|
|
27
|
+
"required": true,
|
|
28
|
+
"schema": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"title": "Tool Call Id"
|
|
31
|
+
},
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"responses": [
|
|
36
|
+
{
|
|
37
|
+
"statusCode": "200",
|
|
38
|
+
"description": "Successful Response",
|
|
39
|
+
"contentType": "application/json",
|
|
40
|
+
"schema": {
|
|
41
|
+
"properties": {
|
|
42
|
+
"id": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"title": "Id",
|
|
45
|
+
"description": "工具结果ID"
|
|
46
|
+
},
|
|
47
|
+
"session_id": {
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "null"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"title": "Session Id",
|
|
57
|
+
"description": "会话ID"
|
|
58
|
+
},
|
|
59
|
+
"tool_call_id": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"title": "Tool Call Id",
|
|
62
|
+
"description": "工具调用ID"
|
|
63
|
+
},
|
|
64
|
+
"tool_result": {
|
|
65
|
+
"anyOf": [
|
|
66
|
+
{},
|
|
67
|
+
{
|
|
68
|
+
"type": "null"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"title": "Tool Result",
|
|
72
|
+
"description": "工具执行结果"
|
|
73
|
+
},
|
|
74
|
+
"tool_name": {
|
|
75
|
+
"anyOf": [
|
|
76
|
+
{
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "null"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"title": "Tool Name",
|
|
84
|
+
"description": "工具名称"
|
|
85
|
+
},
|
|
86
|
+
"tool_name_desc": {
|
|
87
|
+
"anyOf": [
|
|
88
|
+
{
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "null"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"title": "Tool Name Desc",
|
|
96
|
+
"description": "显示工具名称"
|
|
97
|
+
},
|
|
98
|
+
"tool_type": {
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "null"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"title": "Tool Type",
|
|
108
|
+
"description": "工具类型"
|
|
109
|
+
},
|
|
110
|
+
"tool_args": {
|
|
111
|
+
"anyOf": [
|
|
112
|
+
{
|
|
113
|
+
"additionalProperties": true,
|
|
114
|
+
"type": "object"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "null"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"title": "Tool Args",
|
|
121
|
+
"description": "工具参数"
|
|
122
|
+
},
|
|
123
|
+
"status": {
|
|
124
|
+
"description": "执行状态:pending(排队中), running(运行中), success(成功), error(错误)",
|
|
125
|
+
"type": "string",
|
|
126
|
+
"enum": [
|
|
127
|
+
"pending",
|
|
128
|
+
"running",
|
|
129
|
+
"success",
|
|
130
|
+
"error"
|
|
131
|
+
],
|
|
132
|
+
"title": "ToolResultStatus"
|
|
133
|
+
},
|
|
134
|
+
"error_message": {
|
|
135
|
+
"anyOf": [
|
|
136
|
+
{
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "null"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Error Message",
|
|
144
|
+
"description": "错误信息"
|
|
145
|
+
},
|
|
146
|
+
"started_at": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"format": "date-time",
|
|
149
|
+
"title": "Started At",
|
|
150
|
+
"description": "开始时间"
|
|
151
|
+
},
|
|
152
|
+
"completed_at": {
|
|
153
|
+
"anyOf": [
|
|
154
|
+
{
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "date-time"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"type": "null"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"title": "Completed At",
|
|
163
|
+
"description": "完成时间"
|
|
164
|
+
},
|
|
165
|
+
"slurm_tasks": {
|
|
166
|
+
"items": {
|
|
167
|
+
"properties": {
|
|
168
|
+
"id": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"title": "Id",
|
|
171
|
+
"description": "任务ID"
|
|
172
|
+
},
|
|
173
|
+
"slurm_job_id": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"title": "Slurm Job Id",
|
|
176
|
+
"description": "Slurm作业ID"
|
|
177
|
+
},
|
|
178
|
+
"status": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"title": "Status",
|
|
181
|
+
"description": "任务状态"
|
|
182
|
+
},
|
|
183
|
+
"task_type": {
|
|
184
|
+
"anyOf": [
|
|
185
|
+
{
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "null"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"title": "Task Type",
|
|
193
|
+
"description": "任务类型"
|
|
194
|
+
},
|
|
195
|
+
"resource_type": {
|
|
196
|
+
"anyOf": [
|
|
197
|
+
{
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"type": "null"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"title": "Resource Type",
|
|
205
|
+
"description": "资源类型: GPU/CPU"
|
|
206
|
+
},
|
|
207
|
+
"run_time": {
|
|
208
|
+
"anyOf": [
|
|
209
|
+
{
|
|
210
|
+
"type": "integer"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "null"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"title": "Run Time",
|
|
217
|
+
"description": "运行时长(秒)"
|
|
218
|
+
},
|
|
219
|
+
"credits_cost": {
|
|
220
|
+
"anyOf": [
|
|
221
|
+
{
|
|
222
|
+
"type": "number"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"type": "null"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"title": "Credits Cost",
|
|
229
|
+
"description": "该任务积分消耗"
|
|
230
|
+
},
|
|
231
|
+
"started_at": {
|
|
232
|
+
"anyOf": [
|
|
233
|
+
{
|
|
234
|
+
"type": "string",
|
|
235
|
+
"format": "date-time"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"type": "null"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"title": "Started At",
|
|
242
|
+
"description": "开始时间"
|
|
243
|
+
},
|
|
244
|
+
"completed_at": {
|
|
245
|
+
"anyOf": [
|
|
246
|
+
{
|
|
247
|
+
"type": "string",
|
|
248
|
+
"format": "date-time"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"type": "null"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"title": "Completed At",
|
|
255
|
+
"description": "完成时间"
|
|
256
|
+
},
|
|
257
|
+
"error_message": {
|
|
258
|
+
"anyOf": [
|
|
259
|
+
{
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"type": "null"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"title": "Error Message",
|
|
267
|
+
"description": "错误信息"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"type": "object",
|
|
271
|
+
"required": [
|
|
272
|
+
"id",
|
|
273
|
+
"slurm_job_id",
|
|
274
|
+
"status"
|
|
275
|
+
],
|
|
276
|
+
"title": "SlurmTaskInfo",
|
|
277
|
+
"description": "Slurm任务信息(嵌入ToolResult响应)"
|
|
278
|
+
},
|
|
279
|
+
"type": "array",
|
|
280
|
+
"title": "Slurm Tasks",
|
|
281
|
+
"description": "关联的Slurm任务列表"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"type": "object",
|
|
285
|
+
"required": [
|
|
286
|
+
"id",
|
|
287
|
+
"tool_call_id",
|
|
288
|
+
"status",
|
|
289
|
+
"started_at"
|
|
290
|
+
],
|
|
291
|
+
"title": "ToolResultResponse",
|
|
292
|
+
"description": "工具结果响应模型"
|
|
293
|
+
},
|
|
294
|
+
"isBinary": false
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"statusCode": "422",
|
|
298
|
+
"description": "Validation Error",
|
|
299
|
+
"contentType": "application/json",
|
|
300
|
+
"schema": {
|
|
301
|
+
"properties": {
|
|
302
|
+
"detail": {
|
|
303
|
+
"items": {
|
|
304
|
+
"properties": {
|
|
305
|
+
"loc": {
|
|
306
|
+
"items": {
|
|
307
|
+
"anyOf": [
|
|
308
|
+
{
|
|
309
|
+
"type": "string"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"type": "integer"
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"type": "array",
|
|
317
|
+
"title": "Location"
|
|
318
|
+
},
|
|
319
|
+
"msg": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"title": "Message"
|
|
322
|
+
},
|
|
323
|
+
"type": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"title": "Error Type"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"type": "object",
|
|
329
|
+
"required": [
|
|
330
|
+
"loc",
|
|
331
|
+
"msg",
|
|
332
|
+
"type"
|
|
333
|
+
],
|
|
334
|
+
"title": "ValidationError"
|
|
335
|
+
},
|
|
336
|
+
"type": "array",
|
|
337
|
+
"title": "Detail"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"type": "object",
|
|
341
|
+
"title": "HTTPValidationError"
|
|
342
|
+
},
|
|
343
|
+
"isBinary": false
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
"security": [
|
|
347
|
+
"HTTPBearer"
|
|
348
|
+
]
|
|
349
|
+
}, null, 2));
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
try {
|
|
353
|
+
const currentBaseUrl = options.baseUrl || baseUrl;
|
|
354
|
+
const config = { baseUrl: currentBaseUrl };
|
|
355
|
+
const pathParams = {
|
|
356
|
+
['tool_call_id']: options.toolCallId,
|
|
357
|
+
};
|
|
358
|
+
const path = (0, client_1.buildPath)('/api/tools/results/{tool_call_id}', pathParams);
|
|
359
|
+
const url = path;
|
|
360
|
+
const response = await (0, client_1.request)(config, {
|
|
361
|
+
method: 'get',
|
|
362
|
+
path: url,
|
|
363
|
+
headers: undefined,
|
|
364
|
+
body: undefined,
|
|
365
|
+
isBinary: false,
|
|
366
|
+
});
|
|
367
|
+
const data = response;
|
|
368
|
+
if (options.output === 'json') {
|
|
369
|
+
console.log(JSON.stringify(data, null, 2));
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
console.log(data);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
catch (error) {
|
|
376
|
+
if (error.status) {
|
|
377
|
+
console.error('API Error:', error.status, error.message);
|
|
378
|
+
if (error.data) {
|
|
379
|
+
console.error(JSON.stringify(error.data, null, 2));
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
console.error('Error:', error.message);
|
|
384
|
+
}
|
|
385
|
+
process.exit(1);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}
|