@next-api-sdk/llm-sdk 1.4.0 → 1.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/contracts.json +82 -0
- package/dist/cjs/api/llm/agent_flow/index.js +11 -0
- package/dist/cjs/api/llm/agent_flow/index.js.map +1 -1
- package/dist/cjs/api/llm/agent_flow/listAllMcpTools.js +14 -0
- package/dist/cjs/api/llm/agent_flow/listAllMcpTools.js.map +1 -0
- package/dist/cjs/api/llm/aiops_tools/templateLlmChatV2.js.map +1 -1
- package/dist/cjs/model/aiops_service/ModelLlmChatMessage.js.map +1 -1
- package/dist/cjs/model/aiops_service/ModelLlmChatResponse.js.map +1 -1
- package/dist/esm/api/llm/agent_flow/index.js +1 -0
- package/dist/esm/api/llm/agent_flow/index.js.map +1 -1
- package/dist/esm/api/llm/agent_flow/listAllMcpTools.js +7 -0
- package/dist/esm/api/llm/agent_flow/listAllMcpTools.js.map +1 -0
- package/dist/esm/api/llm/aiops_tools/templateLlmChatV2.js.map +1 -1
- package/dist/esm/model/aiops_service/ModelLlmChatMessage.js.map +1 -1
- package/dist/esm/model/aiops_service/ModelLlmChatResponse.js.map +1 -1
- package/dist/types/api/llm/agent_flow/index.d.ts +1 -0
- package/dist/types/api/llm/agent_flow/listAllMcpTools.d.ts +26 -0
- package/dist/types/api/llm/aiops_tools/templateLlmChatV2.d.ts +2 -0
- package/dist/types/model/aiops_service/ModelLlmChatMessage.d.ts +2 -0
- package/dist/types/model/aiops_service/ModelLlmChatResponse.d.ts +2 -0
- package/package.json +2 -2
package/contracts.json
CHANGED
|
@@ -313,6 +313,83 @@
|
|
|
313
313
|
}
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
|
+
{
|
|
317
|
+
"contract": "llm.agent_flow.ListAllMcpTools",
|
|
318
|
+
"name": "ListAllMcpTools",
|
|
319
|
+
"version": "1.0.0",
|
|
320
|
+
"description": "列出所有mcp工具",
|
|
321
|
+
"endpoint": {
|
|
322
|
+
"method": "POST",
|
|
323
|
+
"uri": "/api/v1/llm/agent/flow/mcp_tools/list_all"
|
|
324
|
+
},
|
|
325
|
+
"request": null,
|
|
326
|
+
"response": {
|
|
327
|
+
"type": "object",
|
|
328
|
+
"fields": [
|
|
329
|
+
{
|
|
330
|
+
"name": "data",
|
|
331
|
+
"type": "object[]",
|
|
332
|
+
"description": "mcp工具列表",
|
|
333
|
+
"fields": [
|
|
334
|
+
{
|
|
335
|
+
"name": "name",
|
|
336
|
+
"type": "string",
|
|
337
|
+
"description": "mcp工具名称"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "description",
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "mcp工具描述"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "title",
|
|
346
|
+
"type": "string",
|
|
347
|
+
"description": "mcp工具标题"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "server",
|
|
351
|
+
"type": "object",
|
|
352
|
+
"description": "mcp工具server",
|
|
353
|
+
"fields": [
|
|
354
|
+
{
|
|
355
|
+
"name": "id",
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "mcp工具server id"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "name",
|
|
361
|
+
"type": "string",
|
|
362
|
+
"description": "mcp工具server name"
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
"examples": [
|
|
371
|
+
{
|
|
372
|
+
"description": {
|
|
373
|
+
"en": "list all mcp tools",
|
|
374
|
+
"zh": "列出所有mcp工具"
|
|
375
|
+
},
|
|
376
|
+
"request": {
|
|
377
|
+
"method": "POST",
|
|
378
|
+
"uri": "/api/v1/llm/agent/flow/mcp_tools/list_all",
|
|
379
|
+
"headers": {
|
|
380
|
+
"Content-Type": "application/json"
|
|
381
|
+
},
|
|
382
|
+
"body": "{ }"
|
|
383
|
+
},
|
|
384
|
+
"response": {
|
|
385
|
+
"headers": {
|
|
386
|
+
"Content-Type": "application/json; charset=utf-8"
|
|
387
|
+
},
|
|
388
|
+
"body": "{\n \"code\": 0,\n \"codeExplain\": \"\",\n \"error\": \"\",\n \"data\": [\n {\n \"name\": \"mcp_tools_name\",\n \"description\": \"mcp_tools_description\",\n \"title\": \"mcp_tools_title\",\n \"server\": {\n \"id\": \"mcp_tools_server_id\",\n \"name\": \"mcp_tools_server_name\"\n }\n }\n ]\n}"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
},
|
|
316
393
|
{
|
|
317
394
|
"contract": "llm.agent_flow.SearchTaskForAgentFlow",
|
|
318
395
|
"name": "SearchTaskForAgentFlow",
|
|
@@ -3685,6 +3762,11 @@
|
|
|
3685
3762
|
"name": "data",
|
|
3686
3763
|
"type": "value"
|
|
3687
3764
|
},
|
|
3765
|
+
{
|
|
3766
|
+
"description": "推理模型的推理内容",
|
|
3767
|
+
"name": "reasoning_content",
|
|
3768
|
+
"type": "string"
|
|
3769
|
+
},
|
|
3688
3770
|
{
|
|
3689
3771
|
"description": "调试时大模型返回值",
|
|
3690
3772
|
"name": "debug_resp",
|
|
@@ -36,6 +36,17 @@ Object.keys(_getTaskDetailForAgentFlow).forEach(function (key) {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
+
var _listAllMcpTools = require("./listAllMcpTools.js");
|
|
40
|
+
Object.keys(_listAllMcpTools).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _listAllMcpTools[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _listAllMcpTools[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
39
50
|
var _searchTaskForAgentFlow = require("./searchTaskForAgentFlow.js");
|
|
40
51
|
Object.keys(_searchTaskForAgentFlow).forEach(function (key) {
|
|
41
52
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_addJobMessageForAgentFlow","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_createTaskForAgentFlow","_getTaskDetailForAgentFlow","_searchTaskForAgentFlow","_updateStateForAgentFlow"],"sources":["../../../../../src/api/llm/agent_flow/index.ts"],"sourcesContent":["export * from \"./addJobMessageForAgentFlow.js\";\nexport * from \"./createTaskForAgentFlow.js\";\nexport * from \"./getTaskDetailForAgentFlow.js\";\nexport * from \"./searchTaskForAgentFlow.js\";\nexport * from \"./updateStateForAgentFlow.js\";\n"],"mappings":";;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,0BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,0BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,0BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,uBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,uBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,uBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,uBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,0BAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,0BAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,0BAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,0BAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_addJobMessageForAgentFlow","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_createTaskForAgentFlow","_getTaskDetailForAgentFlow","_listAllMcpTools","_searchTaskForAgentFlow","_updateStateForAgentFlow"],"sources":["../../../../../src/api/llm/agent_flow/index.ts"],"sourcesContent":["export * from \"./addJobMessageForAgentFlow.js\";\nexport * from \"./createTaskForAgentFlow.js\";\nexport * from \"./getTaskDetailForAgentFlow.js\";\nexport * from \"./listAllMcpTools.js\";\nexport * from \"./searchTaskForAgentFlow.js\";\nexport * from \"./updateStateForAgentFlow.js\";\n"],"mappings":";;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,0BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,0BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,0BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,uBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,uBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,uBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,uBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,0BAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,0BAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,0BAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,0BAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,gBAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,gBAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,gBAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,gBAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,uBAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,uBAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,uBAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,uBAAA,CAAAR,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,wBAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,wBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,wBAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,wBAAA,CAAAT,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AgentFlowApi_listAllMcpTools = void 0;
|
|
7
|
+
var _http = require("@next-core/http");
|
|
8
|
+
/**
|
|
9
|
+
* @description 列出所有mcp工具
|
|
10
|
+
* @endpoint POST /api/v1/llm/agent/flow/mcp_tools/list_all
|
|
11
|
+
*/
|
|
12
|
+
const AgentFlowApi_listAllMcpTools = async options => /**! @contract easyops.api.llm.agent_flow.ListAllMcpTools@1.0.0 */(await _http.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/mcp_tools/list_all", undefined, options)).data;
|
|
13
|
+
exports.AgentFlowApi_listAllMcpTools = AgentFlowApi_listAllMcpTools;
|
|
14
|
+
//# sourceMappingURL=listAllMcpTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listAllMcpTools.js","names":["_http","require","AgentFlowApi_listAllMcpTools","options","http","post","undefined","data","exports"],"sources":["../../../../../src/api/llm/agent_flow/listAllMcpTools.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_ListAllMcpToolsResponseBody {\n /** mcp工具列表 */\n data?: AgentFlowApi_ListAllMcpToolsResponseBody_data_item[];\n}\n\n/**\n * @description 列出所有mcp工具\n * @endpoint POST /api/v1/llm/agent/flow/mcp_tools/list_all\n */\nexport const AgentFlowApi_listAllMcpTools = async (\n options?: HttpOptions\n): Promise<AgentFlowApi_ListAllMcpToolsResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.ListAllMcpTools@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_ListAllMcpToolsResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/mcp_tools/list_all\",\n undefined,\n options\n )\n ).data;\n\nexport interface AgentFlowApi_ListAllMcpToolsResponseBody_data_item {\n /** mcp工具名称 */\n name?: string;\n\n /** mcp工具描述 */\n description?: string;\n\n /** mcp工具标题 */\n title?: string;\n\n /** mcp工具server */\n server?: AgentFlowApi_ListAllMcpToolsResponseBody_data_item_server;\n}\n\nexport interface AgentFlowApi_ListAllMcpToolsResponseBody_data_item_server {\n /** mcp工具server id */\n id?: string;\n\n /** mcp工具server name */\n name?: string;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAQA;AACA;AACA;AACA;AACO,MAAMC,4BAA4B,GAAG,MAC1CC,OAAqB,IAErB,kEAAmE,CACjE,MAAMC,UAAI,CAACC,IAAI,CAGb,8EAA8E,EAC9EC,SAAS,EACTH,OACF,CAAC,EACDI,IAAI;AAACC,OAAA,CAAAN,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateLlmChatV2.js","names":["_http","require","AiopsToolsApi_templateLlmChatV2","data","options","http","post","exports"],"sources":["../../../../../src/api/llm/aiops_tools/templateLlmChatV2.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport {\n ModelLlmChatAgentTaskResponse,\n ModelLlmChatMessage,\n} from \"../../../model/aiops_service/index.js\";\n\nexport interface AiopsToolsApi_TemplateLlmChatV2RequestBody {\n /** 模板,为空时,不使用默认引擎 */\n template?: string;\n\n /** 模板引擎的数据 */\n variables?: Record<string, any>;\n\n /** 大模型id */\n model?: string;\n\n /** 历史对话消息 */\n historyMessages?: Partial<ModelLlmChatMessage>[];\n\n /** 输入对话,模板为空时才生效 */\n input?: string;\n\n /** 输出格式,默认json */\n outputType?: string;\n\n /** 取值范围是:(0.0, 1.0],不能等于 0,默认值为 0.1,值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定 */\n temperature?: number;\n\n /** 是否是调试模式,为true时,返回debug_resp */\n debug?: boolean;\n\n /** 是否是流式 */\n stream?: boolean;\n\n /** system角色的提示词模板 */\n systemTemplate?: string;\n\n /** system模板所需要的数据 */\n systemVariables?: Record<string, any>;\n\n /** 任务id */\n taskId?: string;\n\n /** 输入的图片url */\n images?: string[];\n}\n\nexport type AiopsToolsApi_TemplateLlmChatV2ResponseBody =\n Partial<ModelLlmChatAgentTaskResponse> &\n AiopsToolsApi_TemplateLlmChatV2ResponseBody_2;\n\n/**\n * @description 根据模板与大模型对话,返回json\n * @endpoint POST /api/v1/llm/tools/template_llm_chat_v2\n */\nexport const AiopsToolsApi_templateLlmChatV2 = (\n data: AiopsToolsApi_TemplateLlmChatV2RequestBody,\n options?: HttpOptions\n): Promise<AiopsToolsApi_TemplateLlmChatV2ResponseBody> =>\n /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */ http.post<AiopsToolsApi_TemplateLlmChatV2ResponseBody>(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2\",\n data,\n options\n );\n\nexport interface AiopsToolsApi_TemplateLlmChatV2ResponseBody_2 {\n /** 提取返回的数据 */\n data?: any;\n\n /** 调试时大模型返回值 */\n debug_resp?: string;\n\n /** 如果解析不到正确的数据格式,则将大模型返回的数据塞到这里 */\n errorOutput?: string;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAmDA;AACA;AACA;AACA;AACO,MAAMC,+BAA+B,GAAGA,CAC7CC,IAAgD,EAChDC,OAAqB,KAErB,qEAAsEC,UAAI,CAACC,IAAI,CAC7E,2EAA2E,EAC3EH,IAAI,EACJC,OACF,CAAC;AAACG,OAAA,CAAAL,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"templateLlmChatV2.js","names":["_http","require","AiopsToolsApi_templateLlmChatV2","data","options","http","post","exports"],"sources":["../../../../../src/api/llm/aiops_tools/templateLlmChatV2.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport {\n ModelLlmChatAgentTaskResponse,\n ModelLlmChatMessage,\n} from \"../../../model/aiops_service/index.js\";\n\nexport interface AiopsToolsApi_TemplateLlmChatV2RequestBody {\n /** 模板,为空时,不使用默认引擎 */\n template?: string;\n\n /** 模板引擎的数据 */\n variables?: Record<string, any>;\n\n /** 大模型id */\n model?: string;\n\n /** 历史对话消息 */\n historyMessages?: Partial<ModelLlmChatMessage>[];\n\n /** 输入对话,模板为空时才生效 */\n input?: string;\n\n /** 输出格式,默认json */\n outputType?: string;\n\n /** 取值范围是:(0.0, 1.0],不能等于 0,默认值为 0.1,值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定 */\n temperature?: number;\n\n /** 是否是调试模式,为true时,返回debug_resp */\n debug?: boolean;\n\n /** 是否是流式 */\n stream?: boolean;\n\n /** system角色的提示词模板 */\n systemTemplate?: string;\n\n /** system模板所需要的数据 */\n systemVariables?: Record<string, any>;\n\n /** 任务id */\n taskId?: string;\n\n /** 输入的图片url */\n images?: string[];\n}\n\nexport type AiopsToolsApi_TemplateLlmChatV2ResponseBody =\n Partial<ModelLlmChatAgentTaskResponse> &\n AiopsToolsApi_TemplateLlmChatV2ResponseBody_2;\n\n/**\n * @description 根据模板与大模型对话,返回json\n * @endpoint POST /api/v1/llm/tools/template_llm_chat_v2\n */\nexport const AiopsToolsApi_templateLlmChatV2 = (\n data: AiopsToolsApi_TemplateLlmChatV2RequestBody,\n options?: HttpOptions\n): Promise<AiopsToolsApi_TemplateLlmChatV2ResponseBody> =>\n /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */ http.post<AiopsToolsApi_TemplateLlmChatV2ResponseBody>(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2\",\n data,\n options\n );\n\nexport interface AiopsToolsApi_TemplateLlmChatV2ResponseBody_2 {\n /** 提取返回的数据 */\n data?: any;\n\n /** 推理模型的推理内容 */\n reasoning_content?: string;\n\n /** 调试时大模型返回值 */\n debug_resp?: string;\n\n /** 如果解析不到正确的数据格式,则将大模型返回的数据塞到这里 */\n errorOutput?: string;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAmDA;AACA;AACA;AACA;AACO,MAAMC,+BAA+B,GAAGA,CAC7CC,IAAgD,EAChDC,OAAqB,KAErB,qEAAsEC,UAAI,CAACC,IAAI,CAC7E,2EAA2E,EAC3EH,IAAI,EACJC,OACF,CAAC;AAACG,OAAA,CAAAL,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelLlmChatMessage.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatMessage.ts"],"sourcesContent":["/** 调用语言模型时,将当前对话信息列表作为提示输入给模型, 按照 {\"role\": \"user\", \"content\": \"你好\"} 的json 数组形式进行传参; 可能的消息类型包括 System message、User message、Assistant message 和 Tool message。 */\nexport interface ModelLlmChatMessage {\n /** 消息的角色信息, system, user, assistant, tool */\n role: string;\n\n /** 消息内容。其中包括了tool_calls字段,content字段为空。角色为tool时,tool_message消息内容,为工具被调用后返回的结果 */\n content: string;\n\n /** 模型产生的工具调用消息 */\n tool_calls: ModelLlmChatMessage_tool_calls_item[];\n\n /** tool的调用记录 */\n tool_call_id: string;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item {\n /** 工具id */\n id?: string;\n\n /** 工具类型,支持web_search、retrieval、function */\n type?: string;\n\n /** type为\"function\"时不为空 */\n function?: ModelLlmChatMessage_tool_calls_item_function;\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item_function {\n /** 函数名称 */\n name?: string;\n\n /** 模型生成的调用函数的参数列表,json 格式。请注意,模型可能会生成无效的JSON,也可能会虚构一些不在您的函数规范中的参数。在调用函数之前,请在代码中验证这些参数是否有效。 */\n arguments?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ModelLlmChatMessage.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatMessage.ts"],"sourcesContent":["/** 调用语言模型时,将当前对话信息列表作为提示输入给模型, 按照 {\"role\": \"user\", \"content\": \"你好\"} 的json 数组形式进行传参; 可能的消息类型包括 System message、User message、Assistant message 和 Tool message。 */\nexport interface ModelLlmChatMessage {\n /** 消息的角色信息, system, user, assistant, tool */\n role: string;\n\n /** 推理模型的推理内容 */\n reasoning_content: string;\n\n /** 消息内容。其中包括了tool_calls字段,content字段为空。角色为tool时,tool_message消息内容,为工具被调用后返回的结果 */\n content: string;\n\n /** 模型产生的工具调用消息 */\n tool_calls: ModelLlmChatMessage_tool_calls_item[];\n\n /** tool的调用记录 */\n tool_call_id: string;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item {\n /** 工具id */\n id?: string;\n\n /** 工具类型,支持web_search、retrieval、function */\n type?: string;\n\n /** type为\"function\"时不为空 */\n function?: ModelLlmChatMessage_tool_calls_item_function;\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item_function {\n /** 函数名称 */\n name?: string;\n\n /** 模型生成的调用函数的参数列表,json 格式。请注意,模型可能会生成无效的JSON,也可能会虚构一些不在您的函数规范中的参数。在调用函数之前,请在代码中验证这些参数是否有效。 */\n arguments?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelLlmChatResponse.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatResponse.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,聊天请求 */\nexport interface ModelLlmChatResponse {\n /** 模型名称,消息内容。目前先只返回这个 */\n content: string;\n\n /** 任务ID */\n id: string;\n\n /** 请求创建时间,是以秒为单位的 Unix 时间戳 */\n created: number;\n\n /** 模型名称 */\n model: string;\n\n /** 当前对话的模型输出内容 */\n choices: ModelLlmChatResponse_choices_item[];\n\n /** 结束时返回本次模型调用的 tokens 数量统计。 */\n usage: ModelLlmChatResponse_usage;\n}\n\nexport interface ModelLlmChatResponse_choices_item {\n /** 结果下标 */\n index?: number;\n\n /** 模型推理终止的原因。stop代表推理自然结束或触发停止词。tool_calls 代表模型命中函数。length代表到达,tokens长度上限。 */\n finish_reason?: string;\n\n /** 模型返回的文本信息 */\n message?: Partial<ModelLlmChatMessage>;\n}\n\nexport interface ModelLlmChatResponse_usage {\n /** 用户输入的 tokens 数量 */\n prompt_tokens?: number;\n\n /** 模型输入的 tokens 数量 */\n completion_tokens?: number;\n\n /** 总 tokens 数量 */\n total_tokens?: number;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ModelLlmChatResponse.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatResponse.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,聊天请求 */\nexport interface ModelLlmChatResponse {\n /** 模型名称,消息内容。目前先只返回这个 */\n content: string;\n\n /** 推理模型的推理内容 */\n reasoning_content: string;\n\n /** 任务ID */\n id: string;\n\n /** 请求创建时间,是以秒为单位的 Unix 时间戳 */\n created: number;\n\n /** 模型名称 */\n model: string;\n\n /** 当前对话的模型输出内容 */\n choices: ModelLlmChatResponse_choices_item[];\n\n /** 结束时返回本次模型调用的 tokens 数量统计。 */\n usage: ModelLlmChatResponse_usage;\n}\n\nexport interface ModelLlmChatResponse_choices_item {\n /** 结果下标 */\n index?: number;\n\n /** 模型推理终止的原因。stop代表推理自然结束或触发停止词。tool_calls 代表模型命中函数。length代表到达,tokens长度上限。 */\n finish_reason?: string;\n\n /** 模型返回的文本信息 */\n message?: Partial<ModelLlmChatMessage>;\n}\n\nexport interface ModelLlmChatResponse_usage {\n /** 用户输入的 tokens 数量 */\n prompt_tokens?: number;\n\n /** 模型输入的 tokens 数量 */\n completion_tokens?: number;\n\n /** 总 tokens 数量 */\n total_tokens?: number;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./addJobMessageForAgentFlow.js";
|
|
2
2
|
export * from "./createTaskForAgentFlow.js";
|
|
3
3
|
export * from "./getTaskDetailForAgentFlow.js";
|
|
4
|
+
export * from "./listAllMcpTools.js";
|
|
4
5
|
export * from "./searchTaskForAgentFlow.js";
|
|
5
6
|
export * from "./updateStateForAgentFlow.js";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/api/llm/agent_flow/index.ts"],"sourcesContent":["export * from \"./addJobMessageForAgentFlow.js\";\nexport * from \"./createTaskForAgentFlow.js\";\nexport * from \"./getTaskDetailForAgentFlow.js\";\nexport * from \"./searchTaskForAgentFlow.js\";\nexport * from \"./updateStateForAgentFlow.js\";\n"],"mappings":"AAAA,cAAc,gCAAgC;AAC9C,cAAc,6BAA6B;AAC3C,cAAc,gCAAgC;AAC9C,cAAc,6BAA6B;AAC3C,cAAc,8BAA8B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/api/llm/agent_flow/index.ts"],"sourcesContent":["export * from \"./addJobMessageForAgentFlow.js\";\nexport * from \"./createTaskForAgentFlow.js\";\nexport * from \"./getTaskDetailForAgentFlow.js\";\nexport * from \"./listAllMcpTools.js\";\nexport * from \"./searchTaskForAgentFlow.js\";\nexport * from \"./updateStateForAgentFlow.js\";\n"],"mappings":"AAAA,cAAc,gCAAgC;AAC9C,cAAc,6BAA6B;AAC3C,cAAc,gCAAgC;AAC9C,cAAc,sBAAsB;AACpC,cAAc,6BAA6B;AAC3C,cAAc,8BAA8B","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { http } from "@next-core/http";
|
|
2
|
+
/**
|
|
3
|
+
* @description 列出所有mcp工具
|
|
4
|
+
* @endpoint POST /api/v1/llm/agent/flow/mcp_tools/list_all
|
|
5
|
+
*/
|
|
6
|
+
export const AgentFlowApi_listAllMcpTools = async options => /**! @contract easyops.api.llm.agent_flow.ListAllMcpTools@1.0.0 */(await http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/mcp_tools/list_all", undefined, options)).data;
|
|
7
|
+
//# sourceMappingURL=listAllMcpTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listAllMcpTools.js","names":["http","AgentFlowApi_listAllMcpTools","options","post","undefined","data"],"sources":["../../../../../src/api/llm/agent_flow/listAllMcpTools.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_ListAllMcpToolsResponseBody {\n /** mcp工具列表 */\n data?: AgentFlowApi_ListAllMcpToolsResponseBody_data_item[];\n}\n\n/**\n * @description 列出所有mcp工具\n * @endpoint POST /api/v1/llm/agent/flow/mcp_tools/list_all\n */\nexport const AgentFlowApi_listAllMcpTools = async (\n options?: HttpOptions\n): Promise<AgentFlowApi_ListAllMcpToolsResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.ListAllMcpTools@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_ListAllMcpToolsResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/mcp_tools/list_all\",\n undefined,\n options\n )\n ).data;\n\nexport interface AgentFlowApi_ListAllMcpToolsResponseBody_data_item {\n /** mcp工具名称 */\n name?: string;\n\n /** mcp工具描述 */\n description?: string;\n\n /** mcp工具标题 */\n title?: string;\n\n /** mcp工具server */\n server?: AgentFlowApi_ListAllMcpToolsResponseBody_data_item_server;\n}\n\nexport interface AgentFlowApi_ListAllMcpToolsResponseBody_data_item_server {\n /** mcp工具server id */\n id?: string;\n\n /** mcp工具server name */\n name?: string;\n}\n"],"mappings":"AAAA,SAASA,IAAI,QAAqB,iBAAiB;AAQnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,MAC1CC,OAAqB,IAErB,kEAAmE,CACjE,MAAMF,IAAI,CAACG,IAAI,CAGb,8EAA8E,EAC9EC,SAAS,EACTF,OACF,CAAC,EACDG,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateLlmChatV2.js","names":["http","AiopsToolsApi_templateLlmChatV2","data","options","post"],"sources":["../../../../../src/api/llm/aiops_tools/templateLlmChatV2.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport {\n ModelLlmChatAgentTaskResponse,\n ModelLlmChatMessage,\n} from \"../../../model/aiops_service/index.js\";\n\nexport interface AiopsToolsApi_TemplateLlmChatV2RequestBody {\n /** 模板,为空时,不使用默认引擎 */\n template?: string;\n\n /** 模板引擎的数据 */\n variables?: Record<string, any>;\n\n /** 大模型id */\n model?: string;\n\n /** 历史对话消息 */\n historyMessages?: Partial<ModelLlmChatMessage>[];\n\n /** 输入对话,模板为空时才生效 */\n input?: string;\n\n /** 输出格式,默认json */\n outputType?: string;\n\n /** 取值范围是:(0.0, 1.0],不能等于 0,默认值为 0.1,值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定 */\n temperature?: number;\n\n /** 是否是调试模式,为true时,返回debug_resp */\n debug?: boolean;\n\n /** 是否是流式 */\n stream?: boolean;\n\n /** system角色的提示词模板 */\n systemTemplate?: string;\n\n /** system模板所需要的数据 */\n systemVariables?: Record<string, any>;\n\n /** 任务id */\n taskId?: string;\n\n /** 输入的图片url */\n images?: string[];\n}\n\nexport type AiopsToolsApi_TemplateLlmChatV2ResponseBody =\n Partial<ModelLlmChatAgentTaskResponse> &\n AiopsToolsApi_TemplateLlmChatV2ResponseBody_2;\n\n/**\n * @description 根据模板与大模型对话,返回json\n * @endpoint POST /api/v1/llm/tools/template_llm_chat_v2\n */\nexport const AiopsToolsApi_templateLlmChatV2 = (\n data: AiopsToolsApi_TemplateLlmChatV2RequestBody,\n options?: HttpOptions\n): Promise<AiopsToolsApi_TemplateLlmChatV2ResponseBody> =>\n /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */ http.post<AiopsToolsApi_TemplateLlmChatV2ResponseBody>(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2\",\n data,\n options\n );\n\nexport interface AiopsToolsApi_TemplateLlmChatV2ResponseBody_2 {\n /** 提取返回的数据 */\n data?: any;\n\n /** 调试时大模型返回值 */\n debug_resp?: string;\n\n /** 如果解析不到正确的数据格式,则将大模型返回的数据塞到这里 */\n errorOutput?: string;\n}\n"],"mappings":"AAAA,SAASA,IAAI,QAAqB,iBAAiB;AAmDnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,+BAA+B,GAAGA,CAC7CC,IAAgD,EAChDC,OAAqB,KAErB,qEAAsEH,IAAI,CAACI,IAAI,CAC7E,2EAA2E,EAC3EF,IAAI,EACJC,OACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"templateLlmChatV2.js","names":["http","AiopsToolsApi_templateLlmChatV2","data","options","post"],"sources":["../../../../../src/api/llm/aiops_tools/templateLlmChatV2.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport {\n ModelLlmChatAgentTaskResponse,\n ModelLlmChatMessage,\n} from \"../../../model/aiops_service/index.js\";\n\nexport interface AiopsToolsApi_TemplateLlmChatV2RequestBody {\n /** 模板,为空时,不使用默认引擎 */\n template?: string;\n\n /** 模板引擎的数据 */\n variables?: Record<string, any>;\n\n /** 大模型id */\n model?: string;\n\n /** 历史对话消息 */\n historyMessages?: Partial<ModelLlmChatMessage>[];\n\n /** 输入对话,模板为空时才生效 */\n input?: string;\n\n /** 输出格式,默认json */\n outputType?: string;\n\n /** 取值范围是:(0.0, 1.0],不能等于 0,默认值为 0.1,值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定 */\n temperature?: number;\n\n /** 是否是调试模式,为true时,返回debug_resp */\n debug?: boolean;\n\n /** 是否是流式 */\n stream?: boolean;\n\n /** system角色的提示词模板 */\n systemTemplate?: string;\n\n /** system模板所需要的数据 */\n systemVariables?: Record<string, any>;\n\n /** 任务id */\n taskId?: string;\n\n /** 输入的图片url */\n images?: string[];\n}\n\nexport type AiopsToolsApi_TemplateLlmChatV2ResponseBody =\n Partial<ModelLlmChatAgentTaskResponse> &\n AiopsToolsApi_TemplateLlmChatV2ResponseBody_2;\n\n/**\n * @description 根据模板与大模型对话,返回json\n * @endpoint POST /api/v1/llm/tools/template_llm_chat_v2\n */\nexport const AiopsToolsApi_templateLlmChatV2 = (\n data: AiopsToolsApi_TemplateLlmChatV2RequestBody,\n options?: HttpOptions\n): Promise<AiopsToolsApi_TemplateLlmChatV2ResponseBody> =>\n /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */ http.post<AiopsToolsApi_TemplateLlmChatV2ResponseBody>(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2\",\n data,\n options\n );\n\nexport interface AiopsToolsApi_TemplateLlmChatV2ResponseBody_2 {\n /** 提取返回的数据 */\n data?: any;\n\n /** 推理模型的推理内容 */\n reasoning_content?: string;\n\n /** 调试时大模型返回值 */\n debug_resp?: string;\n\n /** 如果解析不到正确的数据格式,则将大模型返回的数据塞到这里 */\n errorOutput?: string;\n}\n"],"mappings":"AAAA,SAASA,IAAI,QAAqB,iBAAiB;AAmDnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,+BAA+B,GAAGA,CAC7CC,IAAgD,EAChDC,OAAqB,KAErB,qEAAsEH,IAAI,CAACI,IAAI,CAC7E,2EAA2E,EAC3EF,IAAI,EACJC,OACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelLlmChatMessage.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatMessage.ts"],"sourcesContent":["/** 调用语言模型时,将当前对话信息列表作为提示输入给模型, 按照 {\"role\": \"user\", \"content\": \"你好\"} 的json 数组形式进行传参; 可能的消息类型包括 System message、User message、Assistant message 和 Tool message。 */\nexport interface ModelLlmChatMessage {\n /** 消息的角色信息, system, user, assistant, tool */\n role: string;\n\n /** 消息内容。其中包括了tool_calls字段,content字段为空。角色为tool时,tool_message消息内容,为工具被调用后返回的结果 */\n content: string;\n\n /** 模型产生的工具调用消息 */\n tool_calls: ModelLlmChatMessage_tool_calls_item[];\n\n /** tool的调用记录 */\n tool_call_id: string;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item {\n /** 工具id */\n id?: string;\n\n /** 工具类型,支持web_search、retrieval、function */\n type?: string;\n\n /** type为\"function\"时不为空 */\n function?: ModelLlmChatMessage_tool_calls_item_function;\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item_function {\n /** 函数名称 */\n name?: string;\n\n /** 模型生成的调用函数的参数列表,json 格式。请注意,模型可能会生成无效的JSON,也可能会虚构一些不在您的函数规范中的参数。在调用函数之前,请在代码中验证这些参数是否有效。 */\n arguments?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ModelLlmChatMessage.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatMessage.ts"],"sourcesContent":["/** 调用语言模型时,将当前对话信息列表作为提示输入给模型, 按照 {\"role\": \"user\", \"content\": \"你好\"} 的json 数组形式进行传参; 可能的消息类型包括 System message、User message、Assistant message 和 Tool message。 */\nexport interface ModelLlmChatMessage {\n /** 消息的角色信息, system, user, assistant, tool */\n role: string;\n\n /** 推理模型的推理内容 */\n reasoning_content: string;\n\n /** 消息内容。其中包括了tool_calls字段,content字段为空。角色为tool时,tool_message消息内容,为工具被调用后返回的结果 */\n content: string;\n\n /** 模型产生的工具调用消息 */\n tool_calls: ModelLlmChatMessage_tool_calls_item[];\n\n /** tool的调用记录 */\n tool_call_id: string;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item {\n /** 工具id */\n id?: string;\n\n /** 工具类型,支持web_search、retrieval、function */\n type?: string;\n\n /** type为\"function\"时不为空 */\n function?: ModelLlmChatMessage_tool_calls_item_function;\n}\n\nexport interface ModelLlmChatMessage_tool_calls_item_function {\n /** 函数名称 */\n name?: string;\n\n /** 模型生成的调用函数的参数列表,json 格式。请注意,模型可能会生成无效的JSON,也可能会虚构一些不在您的函数规范中的参数。在调用函数之前,请在代码中验证这些参数是否有效。 */\n arguments?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelLlmChatResponse.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatResponse.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,聊天请求 */\nexport interface ModelLlmChatResponse {\n /** 模型名称,消息内容。目前先只返回这个 */\n content: string;\n\n /** 任务ID */\n id: string;\n\n /** 请求创建时间,是以秒为单位的 Unix 时间戳 */\n created: number;\n\n /** 模型名称 */\n model: string;\n\n /** 当前对话的模型输出内容 */\n choices: ModelLlmChatResponse_choices_item[];\n\n /** 结束时返回本次模型调用的 tokens 数量统计。 */\n usage: ModelLlmChatResponse_usage;\n}\n\nexport interface ModelLlmChatResponse_choices_item {\n /** 结果下标 */\n index?: number;\n\n /** 模型推理终止的原因。stop代表推理自然结束或触发停止词。tool_calls 代表模型命中函数。length代表到达,tokens长度上限。 */\n finish_reason?: string;\n\n /** 模型返回的文本信息 */\n message?: Partial<ModelLlmChatMessage>;\n}\n\nexport interface ModelLlmChatResponse_usage {\n /** 用户输入的 tokens 数量 */\n prompt_tokens?: number;\n\n /** 模型输入的 tokens 数量 */\n completion_tokens?: number;\n\n /** 总 tokens 数量 */\n total_tokens?: number;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ModelLlmChatResponse.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatResponse.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,聊天请求 */\nexport interface ModelLlmChatResponse {\n /** 模型名称,消息内容。目前先只返回这个 */\n content: string;\n\n /** 推理模型的推理内容 */\n reasoning_content: string;\n\n /** 任务ID */\n id: string;\n\n /** 请求创建时间,是以秒为单位的 Unix 时间戳 */\n created: number;\n\n /** 模型名称 */\n model: string;\n\n /** 当前对话的模型输出内容 */\n choices: ModelLlmChatResponse_choices_item[];\n\n /** 结束时返回本次模型调用的 tokens 数量统计。 */\n usage: ModelLlmChatResponse_usage;\n}\n\nexport interface ModelLlmChatResponse_choices_item {\n /** 结果下标 */\n index?: number;\n\n /** 模型推理终止的原因。stop代表推理自然结束或触发停止词。tool_calls 代表模型命中函数。length代表到达,tokens长度上限。 */\n finish_reason?: string;\n\n /** 模型返回的文本信息 */\n message?: Partial<ModelLlmChatMessage>;\n}\n\nexport interface ModelLlmChatResponse_usage {\n /** 用户输入的 tokens 数量 */\n prompt_tokens?: number;\n\n /** 模型输入的 tokens 数量 */\n completion_tokens?: number;\n\n /** 总 tokens 数量 */\n total_tokens?: number;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./addJobMessageForAgentFlow.js";
|
|
2
2
|
export * from "./createTaskForAgentFlow.js";
|
|
3
3
|
export * from "./getTaskDetailForAgentFlow.js";
|
|
4
|
+
export * from "./listAllMcpTools.js";
|
|
4
5
|
export * from "./searchTaskForAgentFlow.js";
|
|
5
6
|
export * from "./updateStateForAgentFlow.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HttpOptions } from "@next-core/http";
|
|
2
|
+
export interface AgentFlowApi_ListAllMcpToolsResponseBody {
|
|
3
|
+
/** mcp工具列表 */
|
|
4
|
+
data?: AgentFlowApi_ListAllMcpToolsResponseBody_data_item[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @description 列出所有mcp工具
|
|
8
|
+
* @endpoint POST /api/v1/llm/agent/flow/mcp_tools/list_all
|
|
9
|
+
*/
|
|
10
|
+
export declare const AgentFlowApi_listAllMcpTools: (options?: HttpOptions) => Promise<AgentFlowApi_ListAllMcpToolsResponseBody>;
|
|
11
|
+
export interface AgentFlowApi_ListAllMcpToolsResponseBody_data_item {
|
|
12
|
+
/** mcp工具名称 */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** mcp工具描述 */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** mcp工具标题 */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** mcp工具server */
|
|
19
|
+
server?: AgentFlowApi_ListAllMcpToolsResponseBody_data_item_server;
|
|
20
|
+
}
|
|
21
|
+
export interface AgentFlowApi_ListAllMcpToolsResponseBody_data_item_server {
|
|
22
|
+
/** mcp工具server id */
|
|
23
|
+
id?: string;
|
|
24
|
+
/** mcp工具server name */
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
@@ -37,6 +37,8 @@ export declare const AiopsToolsApi_templateLlmChatV2: (data: AiopsToolsApi_Templ
|
|
|
37
37
|
export interface AiopsToolsApi_TemplateLlmChatV2ResponseBody_2 {
|
|
38
38
|
/** 提取返回的数据 */
|
|
39
39
|
data?: any;
|
|
40
|
+
/** 推理模型的推理内容 */
|
|
41
|
+
reasoning_content?: string;
|
|
40
42
|
/** 调试时大模型返回值 */
|
|
41
43
|
debug_resp?: string;
|
|
42
44
|
/** 如果解析不到正确的数据格式,则将大模型返回的数据塞到这里 */
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export interface ModelLlmChatMessage {
|
|
3
3
|
/** 消息的角色信息, system, user, assistant, tool */
|
|
4
4
|
role: string;
|
|
5
|
+
/** 推理模型的推理内容 */
|
|
6
|
+
reasoning_content: string;
|
|
5
7
|
/** 消息内容。其中包括了tool_calls字段,content字段为空。角色为tool时,tool_message消息内容,为工具被调用后返回的结果 */
|
|
6
8
|
content: string;
|
|
7
9
|
/** 模型产生的工具调用消息 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-api-sdk/llm-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "API SDK for Llm",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-api-sdk/tree/master/sdk/llm-sdk",
|
|
6
6
|
"repository": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@next-core/build-next-libs": "^1.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "2e6624405b57c679e4c063f2ad06175dc4f5efa3"
|
|
47
47
|
}
|