@next-api-sdk/llm-sdk 1.3.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.
Files changed (40) hide show
  1. package/README.md +0 -1
  2. package/contracts.json +237 -0
  3. package/dist/cjs/api/llm/agent_flow/createTaskForAgentFlow.js.map +1 -1
  4. package/dist/cjs/api/llm/agent_flow/index.js +33 -0
  5. package/dist/cjs/api/llm/agent_flow/index.js.map +1 -1
  6. package/dist/cjs/api/llm/agent_flow/listAllMcpTools.js +14 -0
  7. package/dist/cjs/api/llm/agent_flow/listAllMcpTools.js.map +1 -0
  8. package/dist/cjs/api/llm/agent_flow/searchTaskForAgentFlow.js +14 -0
  9. package/dist/cjs/api/llm/agent_flow/searchTaskForAgentFlow.js.map +1 -0
  10. package/dist/cjs/api/llm/agent_flow/updateStateForAgentFlow.js +14 -0
  11. package/dist/cjs/api/llm/agent_flow/updateStateForAgentFlow.js.map +1 -0
  12. package/dist/cjs/api/llm/aiops_tools/templateLlmChatV2.js +1 -1
  13. package/dist/cjs/api/llm/aiops_tools/templateLlmChatV2.js.map +1 -1
  14. package/dist/cjs/model/aiops_service/ModelLlmChatAgentTaskRequest.js.map +1 -1
  15. package/dist/cjs/model/aiops_service/ModelLlmChatMessage.js.map +1 -1
  16. package/dist/cjs/model/aiops_service/ModelLlmChatResponse.js.map +1 -1
  17. package/dist/esm/api/llm/agent_flow/createTaskForAgentFlow.js.map +1 -1
  18. package/dist/esm/api/llm/agent_flow/index.js +3 -0
  19. package/dist/esm/api/llm/agent_flow/index.js.map +1 -1
  20. package/dist/esm/api/llm/agent_flow/listAllMcpTools.js +7 -0
  21. package/dist/esm/api/llm/agent_flow/listAllMcpTools.js.map +1 -0
  22. package/dist/esm/api/llm/agent_flow/searchTaskForAgentFlow.js +7 -0
  23. package/dist/esm/api/llm/agent_flow/searchTaskForAgentFlow.js.map +1 -0
  24. package/dist/esm/api/llm/agent_flow/updateStateForAgentFlow.js +7 -0
  25. package/dist/esm/api/llm/agent_flow/updateStateForAgentFlow.js.map +1 -0
  26. package/dist/esm/api/llm/aiops_tools/templateLlmChatV2.js +1 -1
  27. package/dist/esm/api/llm/aiops_tools/templateLlmChatV2.js.map +1 -1
  28. package/dist/esm/model/aiops_service/ModelLlmChatAgentTaskRequest.js.map +1 -1
  29. package/dist/esm/model/aiops_service/ModelLlmChatMessage.js.map +1 -1
  30. package/dist/esm/model/aiops_service/ModelLlmChatResponse.js.map +1 -1
  31. package/dist/types/api/llm/agent_flow/createTaskForAgentFlow.d.ts +2 -0
  32. package/dist/types/api/llm/agent_flow/index.d.ts +3 -0
  33. package/dist/types/api/llm/agent_flow/listAllMcpTools.d.ts +26 -0
  34. package/dist/types/api/llm/agent_flow/searchTaskForAgentFlow.d.ts +34 -0
  35. package/dist/types/api/llm/agent_flow/updateStateForAgentFlow.d.ts +10 -0
  36. package/dist/types/api/llm/aiops_tools/templateLlmChatV2.d.ts +2 -0
  37. package/dist/types/model/aiops_service/ModelLlmChatAgentTaskRequest.d.ts +2 -0
  38. package/dist/types/model/aiops_service/ModelLlmChatMessage.d.ts +2 -0
  39. package/dist/types/model/aiops_service/ModelLlmChatResponse.d.ts +2 -0
  40. package/package.json +2 -2
package/README.md CHANGED
@@ -16,4 +16,3 @@ import * as LlmSdk from "@next-api-sdk/llm-sdk";
16
16
  ```
17
17
 
18
18
  [@next-core/create-api-sdk]: https://github.com/easyops-cn/next-core/tree/master/packages/create-api-sdk
19
-
package/contracts.json CHANGED
@@ -209,6 +209,11 @@
209
209
  "name": "agentId",
210
210
  "type": "string",
211
211
  "description": "指定处理任务的agent"
212
+ },
213
+ {
214
+ "name": "engineVersion",
215
+ "type": "string",
216
+ "description": "执行任务引擎的版本号"
212
217
  }
213
218
  ]
214
219
  },
@@ -308,6 +313,232 @@
308
313
  }
309
314
  ]
310
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
+ },
393
+ {
394
+ "contract": "llm.agent_flow.SearchTaskForAgentFlow",
395
+ "name": "SearchTaskForAgentFlow",
396
+ "version": "1.0.0",
397
+ "description": "分页查询agent flow, 默认只查询最近三个页的数据",
398
+ "endpoint": {
399
+ "method": "POST",
400
+ "uri": "/api/v1/llm/agent/flow/search"
401
+ },
402
+ "request": {
403
+ "type": "object",
404
+ "fields": [
405
+ {
406
+ "name": "query",
407
+ "type": "string",
408
+ "description": "对标题进行关键字搜索"
409
+ },
410
+ {
411
+ "name": "limit",
412
+ "type": "int",
413
+ "description": "数据数量大小限制, 默认30"
414
+ },
415
+ {
416
+ "name": "next_token",
417
+ "type": "string",
418
+ "description": "分页token,字符串;向上翻页或向下翻页的token都在这个参数传入。"
419
+ }
420
+ ]
421
+ },
422
+ "response": {
423
+ "type": "object",
424
+ "fields": [
425
+ {
426
+ "name": "next_token",
427
+ "type": "string",
428
+ "description": "下一页,查询的token,为空时,没有下一页"
429
+ },
430
+ {
431
+ "name": "previous_token",
432
+ "type": "string",
433
+ "description": "上一页,查询的token,为空时,没有上一页"
434
+ },
435
+ {
436
+ "name": "data",
437
+ "type": "object[]",
438
+ "description": "任务列表",
439
+ "fields": [
440
+ {
441
+ "name": "id",
442
+ "type": "string",
443
+ "description": "任务id"
444
+ },
445
+ {
446
+ "name": "startTime",
447
+ "type": "int",
448
+ "description": "创建时间戳,单位秒"
449
+ },
450
+ {
451
+ "name": "endTime",
452
+ "type": "int",
453
+ "description": "结束时间戳,单位秒"
454
+ },
455
+ {
456
+ "name": "state",
457
+ "type": "string",
458
+ "description": "任务状态,\"submitted\", \"working\", \"input-required\",\"completed\",\"canceled\",\"failed\", \"unknown\""
459
+ },
460
+ {
461
+ "name": "title",
462
+ "type": "string",
463
+ "description": "标题"
464
+ }
465
+ ]
466
+ }
467
+ ]
468
+ },
469
+ "examples": [
470
+ {
471
+ "description": {
472
+ "en": "search task of flow agent",
473
+ "zh": "分页查询agent flow任务数据"
474
+ },
475
+ "request": {
476
+ "method": "POST",
477
+ "uri": "/api/v1/llm/agent/flow/search",
478
+ "headers": {
479
+ "Content-Type": "application/json"
480
+ },
481
+ "body": "{\n\t\"query\": \"测试标题\",\n \"limit\": 1\n}"
482
+ },
483
+ "response": {
484
+ "headers": {
485
+ "Content-Type": "application/json; charset=utf-8"
486
+ },
487
+ "body": "{\n \"code\": 0,\n \"codeExplain\": \"\",\n \"error\": \"\",\n \"data\": {\n \"next_token\": \"xxxxxxx\",\n \"previous_token\": \"\",\n \"data\": [\n {\n \"title\": \"录入应用系统\",\n \"startTime\": 1747106187.0,\n \"_row_id\": \"00000196c7a4c973af2e063afadd7f7b\",\n \"status\": \"completed\",\n \"endTime\": 1747106535.0\n }\n ]\n }\n}"
488
+ }
489
+ }
490
+ ]
491
+ },
492
+ {
493
+ "contract": "llm.agent_flow.UpdateStateForAgentFlow",
494
+ "name": "UpdateStateForAgentFlow",
495
+ "version": "1.0.0",
496
+ "description": "flow agent更新任务状态,支持暂停、停止和重启任务",
497
+ "endpoint": {
498
+ "method": "POST",
499
+ "uri": "/api/v1/llm/agent/flow/:taskId/updateState"
500
+ },
501
+ "request": {
502
+ "type": "object",
503
+ "fields": [
504
+ {
505
+ "name": "taskId",
506
+ "type": "string",
507
+ "description": "总任务id"
508
+ },
509
+ {
510
+ "name": "state",
511
+ "type": "string",
512
+ "description": "调整任务状态,可以设置为 stopped, paused, working(paused的任务状态时,可以继续)"
513
+ }
514
+ ]
515
+ },
516
+ "response": null,
517
+ "examples": [
518
+ {
519
+ "description": {
520
+ "zh": "flow agent更新任务状态,支持暂停、停止和重启任务"
521
+ },
522
+ "request": {
523
+ "method": "POST",
524
+ "uri": "http://ip:port/api/v1/llm/agent/8239375684858666781/updateState",
525
+ "headers": {
526
+ "Content-Type": "application/json",
527
+ "user": "linus",
528
+ "org": 1234
529
+ },
530
+ "body": "{\n \"state\": \"stopped\"\n}"
531
+ },
532
+ "response": {
533
+ "headers": {
534
+ "Content-Type": "application/json; charset=utf-8"
535
+ },
536
+ "status_code": 200,
537
+ "body": "{\n \"code\": 0,\n \"codeExplain\": \"\",\n \"error\": \"\"\n}"
538
+ }
539
+ }
540
+ ]
541
+ },
311
542
  {
312
543
  "contract": "llm.aiops_base.DeleteEmbedding",
313
544
  "name": "DeleteEmbedding",
@@ -3521,6 +3752,7 @@
3521
3752
  },
3522
3753
  "response": {
3523
3754
  "default": {},
3755
+ "wrapper": false,
3524
3756
  "fields": [
3525
3757
  {
3526
3758
  "ref": "LlmChatAgentTaskResponse.*"
@@ -3530,6 +3762,11 @@
3530
3762
  "name": "data",
3531
3763
  "type": "value"
3532
3764
  },
3765
+ {
3766
+ "description": "推理模型的推理内容",
3767
+ "name": "reasoning_content",
3768
+ "type": "string"
3769
+ },
3533
3770
  {
3534
3771
  "description": "调试时大模型返回值",
3535
3772
  "name": "debug_resp",
@@ -1 +1 @@
1
- {"version":3,"file":"createTaskForAgentFlow.js","names":["_http","require","AgentFlowApi_createTaskForAgentFlow","data","options","http","post","exports"],"sources":["../../../../../src/api/llm/agent_flow/createTaskForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowRequestBody {\n /** 用户输入 */\n input?: string;\n\n /** 指定处理任务的agent */\n agentId?: string;\n}\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowResponseBody {\n /** 任务id */\n taskId?: string;\n}\n\n/**\n * @description 创建agent flow的任务\n * @endpoint POST /api/v1/llm/agent/flow/create\n */\nexport const AgentFlowApi_createTaskForAgentFlow = async (\n data: AgentFlowApi_CreateTaskForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<AgentFlowApi_CreateTaskForAgentFlowResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.CreateTaskForAgentFlow@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_CreateTaskForAgentFlowResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/create\",\n data,\n options\n )\n ).data;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAgBA;AACA;AACA;AACA;AACO,MAAMC,mCAAmC,GAAG,MAAAA,CACjDC,IAAoD,EACpDC,OAAqB,KAErB,yEAA0E,CACxE,MAAMC,UAAI,CAACC,IAAI,CAGb,kEAAkE,EAClEH,IAAI,EACJC,OACF,CAAC,EACDD,IAAI;AAACI,OAAA,CAAAL,mCAAA,GAAAA,mCAAA","ignoreList":[]}
1
+ {"version":3,"file":"createTaskForAgentFlow.js","names":["_http","require","AgentFlowApi_createTaskForAgentFlow","data","options","http","post","exports"],"sources":["../../../../../src/api/llm/agent_flow/createTaskForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowRequestBody {\n /** 用户输入 */\n input?: string;\n\n /** 指定处理任务的agent */\n agentId?: string;\n\n /** 执行任务引擎的版本号 */\n engineVersion?: string;\n}\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowResponseBody {\n /** 任务id */\n taskId?: string;\n}\n\n/**\n * @description 创建agent flow的任务\n * @endpoint POST /api/v1/llm/agent/flow/create\n */\nexport const AgentFlowApi_createTaskForAgentFlow = async (\n data: AgentFlowApi_CreateTaskForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<AgentFlowApi_CreateTaskForAgentFlowResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.CreateTaskForAgentFlow@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_CreateTaskForAgentFlowResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/create\",\n data,\n options\n )\n ).data;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAmBA;AACA;AACA;AACA;AACO,MAAMC,mCAAmC,GAAG,MAAAA,CACjDC,IAAoD,EACpDC,OAAqB,KAErB,yEAA0E,CACxE,MAAMC,UAAI,CAACC,IAAI,CAGb,kEAAkE,EAClEH,IAAI,EACJC,OACF,CAAC,EACDD,IAAI;AAACI,OAAA,CAAAL,mCAAA,GAAAA,mCAAA","ignoreList":[]}
@@ -36,4 +36,37 @@ 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
+ });
50
+ var _searchTaskForAgentFlow = require("./searchTaskForAgentFlow.js");
51
+ Object.keys(_searchTaskForAgentFlow).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _searchTaskForAgentFlow[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _searchTaskForAgentFlow[key];
58
+ }
59
+ });
60
+ });
61
+ var _updateStateForAgentFlow = require("./updateStateForAgentFlow.js");
62
+ Object.keys(_updateStateForAgentFlow).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _updateStateForAgentFlow[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _updateStateForAgentFlow[key];
69
+ }
70
+ });
71
+ });
39
72
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_addJobMessageForAgentFlow","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_createTaskForAgentFlow","_getTaskDetailForAgentFlow"],"sources":["../../../../../src/api/llm/agent_flow/index.ts"],"sourcesContent":["export * from \"./addJobMessageForAgentFlow.js\";\nexport * from \"./createTaskForAgentFlow.js\";\nexport * from \"./getTaskDetailForAgentFlow.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","ignoreList":[]}
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":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AgentFlowApi_searchTaskForAgentFlow = void 0;
7
+ var _http = require("@next-core/http");
8
+ /**
9
+ * @description 分页查询agent flow, 默认只查询最近三个页的数据
10
+ * @endpoint POST /api/v1/llm/agent/flow/search
11
+ */
12
+ const AgentFlowApi_searchTaskForAgentFlow = async (data, options) => /**! @contract easyops.api.llm.agent_flow.SearchTaskForAgentFlow@1.0.0 */(await _http.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search", data, options)).data;
13
+ exports.AgentFlowApi_searchTaskForAgentFlow = AgentFlowApi_searchTaskForAgentFlow;
14
+ //# sourceMappingURL=searchTaskForAgentFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchTaskForAgentFlow.js","names":["_http","require","AgentFlowApi_searchTaskForAgentFlow","data","options","http","post","exports"],"sources":["../../../../../src/api/llm/agent_flow/searchTaskForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_SearchTaskForAgentFlowRequestBody {\n /** 对标题进行关键字搜索 */\n query?: string;\n\n /** 数据数量大小限制, 默认30 */\n limit?: number;\n\n /** 分页token,字符串;向上翻页或向下翻页的token都在这个参数传入。 */\n next_token?: string;\n}\n\nexport interface AgentFlowApi_SearchTaskForAgentFlowResponseBody {\n /** 下一页,查询的token,为空时,没有下一页 */\n next_token?: string;\n\n /** 上一页,查询的token,为空时,没有上一页 */\n previous_token?: string;\n\n /** 任务列表 */\n data?: AgentFlowApi_SearchTaskForAgentFlowResponseBody_data_item[];\n}\n\n/**\n * @description 分页查询agent flow, 默认只查询最近三个页的数据\n * @endpoint POST /api/v1/llm/agent/flow/search\n */\nexport const AgentFlowApi_searchTaskForAgentFlow = async (\n data: AgentFlowApi_SearchTaskForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<AgentFlowApi_SearchTaskForAgentFlowResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.SearchTaskForAgentFlow@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_SearchTaskForAgentFlowResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search\",\n data,\n options\n )\n ).data;\n\nexport interface AgentFlowApi_SearchTaskForAgentFlowResponseBody_data_item {\n /** 任务id */\n id?: string;\n\n /** 创建时间戳,单位秒 */\n startTime?: number;\n\n /** 结束时间戳,单位秒 */\n endTime?: number;\n\n /** 任务状态,\"submitted\", \"working\", \"input-required\",\"completed\",\"canceled\",\"failed\", \"unknown\" */\n state?: string;\n\n /** 标题 */\n title?: string;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAyBA;AACA;AACA;AACA;AACO,MAAMC,mCAAmC,GAAG,MAAAA,CACjDC,IAAoD,EACpDC,OAAqB,KAErB,yEAA0E,CACxE,MAAMC,UAAI,CAACC,IAAI,CAGb,kEAAkE,EAClEH,IAAI,EACJC,OACF,CAAC,EACDD,IAAI;AAACI,OAAA,CAAAL,mCAAA,GAAAA,mCAAA","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AgentFlowApi_updateStateForAgentFlow = void 0;
7
+ var _http = require("@next-core/http");
8
+ /**
9
+ * @description flow agent更新任务状态,支持暂停、停止和重启任务
10
+ * @endpoint POST /api/v1/llm/agent/flow/:taskId/updateState
11
+ */
12
+ const AgentFlowApi_updateStateForAgentFlow = (taskId, data, options) => /**! @contract easyops.api.llm.agent_flow.UpdateStateForAgentFlow@1.0.0 */_http.http.post(`api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/${taskId}/updateState`, data, options);
13
+ exports.AgentFlowApi_updateStateForAgentFlow = AgentFlowApi_updateStateForAgentFlow;
14
+ //# sourceMappingURL=updateStateForAgentFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateStateForAgentFlow.js","names":["_http","require","AgentFlowApi_updateStateForAgentFlow","taskId","data","options","http","post","exports"],"sources":["../../../../../src/api/llm/agent_flow/updateStateForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\n\nexport interface AgentFlowApi_UpdateStateForAgentFlowRequestBody {\n /** 调整任务状态,可以设置为 stopped, paused, working(paused的任务状态时,可以继续) */\n state?: string;\n}\n\n/**\n * @description flow agent更新任务状态,支持暂停、停止和重启任务\n * @endpoint POST /api/v1/llm/agent/flow/:taskId/updateState\n */\nexport const AgentFlowApi_updateStateForAgentFlow = (\n taskId: string | number,\n data: AgentFlowApi_UpdateStateForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<void> =>\n /**! @contract easyops.api.llm.agent_flow.UpdateStateForAgentFlow@1.0.0 */ http.post<void>(\n `api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/${taskId}/updateState`,\n data,\n options\n );\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAOA;AACA;AACA;AACA;AACO,MAAMC,oCAAoC,GAAGA,CAClDC,MAAuB,EACvBC,IAAqD,EACrDC,OAAqB,KAErB,0EAA2EC,UAAI,CAACC,IAAI,CAClF,6DAA6DJ,MAAM,cAAc,EACjFC,IAAI,EACJC,OACF,CAAC;AAACG,OAAA,CAAAN,oCAAA,GAAAA,oCAAA","ignoreList":[]}
@@ -9,6 +9,6 @@ var _http = require("@next-core/http");
9
9
  * @description 根据模板与大模型对话,返回json
10
10
  * @endpoint POST /api/v1/llm/tools/template_llm_chat_v2
11
11
  */
12
- const AiopsToolsApi_templateLlmChatV2 = async (data, options) => /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */(await _http.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2", data, options)).data;
12
+ const AiopsToolsApi_templateLlmChatV2 = (data, options) => /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */_http.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2", data, options);
13
13
  exports.AiopsToolsApi_templateLlmChatV2 = AiopsToolsApi_templateLlmChatV2;
14
14
  //# sourceMappingURL=templateLlmChatV2.js.map
@@ -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\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.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 = async (\n data: AiopsToolsApi_TemplateLlmChatV2RequestBody,\n options?: HttpOptions\n): Promise<AiopsToolsApi_TemplateLlmChatV2ResponseBody> =>\n /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AiopsToolsApi_TemplateLlmChatV2ResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2\",\n data,\n options\n )\n ).data;\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;AAoDA;AACA;AACA;AACA;AACO,MAAMC,+BAA+B,GAAG,MAAAA,CAC7CC,IAAgD,EAChDC,OAAqB,KAErB,qEAAsE,CACpE,MAAMC,UAAI,CAACC,IAAI,CAGb,2EAA2E,EAC3EH,IAAI,EACJC,OACF,CAAC,EACDD,IAAI;AAACI,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":"ModelLlmChatAgentTaskRequest.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatAgentTaskRequest.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,处理agent任务的请求 */\nexport interface ModelLlmChatAgentTaskRequest {\n /** 任务需求 */\n input: string;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n\n /** 任务配置 */\n config: Record<string, any>;\n\n /** 当前任务上下文的id */\n conversationId: string;\n\n /** 在多agent场景,指定使用哪个agent */\n agentId: string;\n\n /** 当前任务Id */\n taskId: string;\n\n /** 已经提取的表单数据 */\n formData: any;\n\n /** 助手id */\n robotId: string;\n\n /** 是否流式返回 */\n stream: boolean;\n\n /** 历史会话消息,适用支持多轮会话的agent */\n historyMessages: Partial<ModelLlmChatMessage>[];\n\n /** 流式数据列表(占位符,防止flow builder自动清理流式返回的数据) */\n sseDataList: any[];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ModelLlmChatAgentTaskRequest.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatAgentTaskRequest.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,处理agent任务的请求 */\nexport interface ModelLlmChatAgentTaskRequest {\n /** 任务需求 */\n input: string;\n\n /** 大模型的Temperature, 值范围0.0~1.0 */\n temperature: number;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n\n /** 任务配置 */\n config: Record<string, any>;\n\n /** 当前任务上下文的id */\n conversationId: string;\n\n /** 在多agent场景,指定使用哪个agent */\n agentId: string;\n\n /** 当前任务Id */\n taskId: string;\n\n /** 已经提取的表单数据 */\n formData: any;\n\n /** 助手id */\n robotId: string;\n\n /** 是否流式返回 */\n stream: boolean;\n\n /** 历史会话消息,适用支持多轮会话的agent */\n historyMessages: Partial<ModelLlmChatMessage>[];\n\n /** 流式数据列表(占位符,防止flow builder自动清理流式返回的数据) */\n sseDataList: any[];\n}\n"],"mappings":"","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 +1 @@
1
- {"version":3,"file":"createTaskForAgentFlow.js","names":["http","AgentFlowApi_createTaskForAgentFlow","data","options","post"],"sources":["../../../../../src/api/llm/agent_flow/createTaskForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowRequestBody {\n /** 用户输入 */\n input?: string;\n\n /** 指定处理任务的agent */\n agentId?: string;\n}\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowResponseBody {\n /** 任务id */\n taskId?: string;\n}\n\n/**\n * @description 创建agent flow的任务\n * @endpoint POST /api/v1/llm/agent/flow/create\n */\nexport const AgentFlowApi_createTaskForAgentFlow = async (\n data: AgentFlowApi_CreateTaskForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<AgentFlowApi_CreateTaskForAgentFlowResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.CreateTaskForAgentFlow@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_CreateTaskForAgentFlowResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/create\",\n data,\n options\n )\n ).data;\n"],"mappings":"AAAA,SAASA,IAAI,QAAqB,iBAAiB;AAgBnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,GAAG,MAAAA,CACjDC,IAAoD,EACpDC,OAAqB,KAErB,yEAA0E,CACxE,MAAMH,IAAI,CAACI,IAAI,CAGb,kEAAkE,EAClEF,IAAI,EACJC,OACF,CAAC,EACDD,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"createTaskForAgentFlow.js","names":["http","AgentFlowApi_createTaskForAgentFlow","data","options","post"],"sources":["../../../../../src/api/llm/agent_flow/createTaskForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowRequestBody {\n /** 用户输入 */\n input?: string;\n\n /** 指定处理任务的agent */\n agentId?: string;\n\n /** 执行任务引擎的版本号 */\n engineVersion?: string;\n}\n\nexport interface AgentFlowApi_CreateTaskForAgentFlowResponseBody {\n /** 任务id */\n taskId?: string;\n}\n\n/**\n * @description 创建agent flow的任务\n * @endpoint POST /api/v1/llm/agent/flow/create\n */\nexport const AgentFlowApi_createTaskForAgentFlow = async (\n data: AgentFlowApi_CreateTaskForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<AgentFlowApi_CreateTaskForAgentFlowResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.CreateTaskForAgentFlow@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_CreateTaskForAgentFlowResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/create\",\n data,\n options\n )\n ).data;\n"],"mappings":"AAAA,SAASA,IAAI,QAAqB,iBAAiB;AAmBnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,GAAG,MAAAA,CACjDC,IAAoD,EACpDC,OAAqB,KAErB,yEAA0E,CACxE,MAAMH,IAAI,CAACI,IAAI,CAGb,kEAAkE,EAClEF,IAAI,EACJC,OACF,CAAC,EACDD,IAAI","ignoreList":[]}
@@ -1,4 +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";
5
+ export * from "./searchTaskForAgentFlow.js";
6
+ export * from "./updateStateForAgentFlow.js";
4
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\";\n"],"mappings":"AAAA,cAAc,gCAAgC;AAC9C,cAAc,6BAA6B;AAC3C,cAAc,gCAAgC","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":[]}
@@ -0,0 +1,7 @@
1
+ import { http } from "@next-core/http";
2
+ /**
3
+ * @description 分页查询agent flow, 默认只查询最近三个页的数据
4
+ * @endpoint POST /api/v1/llm/agent/flow/search
5
+ */
6
+ export const AgentFlowApi_searchTaskForAgentFlow = async (data, options) => /**! @contract easyops.api.llm.agent_flow.SearchTaskForAgentFlow@1.0.0 */(await http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search", data, options)).data;
7
+ //# sourceMappingURL=searchTaskForAgentFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchTaskForAgentFlow.js","names":["http","AgentFlowApi_searchTaskForAgentFlow","data","options","post"],"sources":["../../../../../src/api/llm/agent_flow/searchTaskForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.js\";\n\nexport interface AgentFlowApi_SearchTaskForAgentFlowRequestBody {\n /** 对标题进行关键字搜索 */\n query?: string;\n\n /** 数据数量大小限制, 默认30 */\n limit?: number;\n\n /** 分页token,字符串;向上翻页或向下翻页的token都在这个参数传入。 */\n next_token?: string;\n}\n\nexport interface AgentFlowApi_SearchTaskForAgentFlowResponseBody {\n /** 下一页,查询的token,为空时,没有下一页 */\n next_token?: string;\n\n /** 上一页,查询的token,为空时,没有上一页 */\n previous_token?: string;\n\n /** 任务列表 */\n data?: AgentFlowApi_SearchTaskForAgentFlowResponseBody_data_item[];\n}\n\n/**\n * @description 分页查询agent flow, 默认只查询最近三个页的数据\n * @endpoint POST /api/v1/llm/agent/flow/search\n */\nexport const AgentFlowApi_searchTaskForAgentFlow = async (\n data: AgentFlowApi_SearchTaskForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<AgentFlowApi_SearchTaskForAgentFlowResponseBody> =>\n /**! @contract easyops.api.llm.agent_flow.SearchTaskForAgentFlow@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AgentFlowApi_SearchTaskForAgentFlowResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search\",\n data,\n options\n )\n ).data;\n\nexport interface AgentFlowApi_SearchTaskForAgentFlowResponseBody_data_item {\n /** 任务id */\n id?: string;\n\n /** 创建时间戳,单位秒 */\n startTime?: number;\n\n /** 结束时间戳,单位秒 */\n endTime?: number;\n\n /** 任务状态,\"submitted\", \"working\", \"input-required\",\"completed\",\"canceled\",\"failed\", \"unknown\" */\n state?: string;\n\n /** 标题 */\n title?: string;\n}\n"],"mappings":"AAAA,SAASA,IAAI,QAAqB,iBAAiB;AAyBnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,GAAG,MAAAA,CACjDC,IAAoD,EACpDC,OAAqB,KAErB,yEAA0E,CACxE,MAAMH,IAAI,CAACI,IAAI,CAGb,kEAAkE,EAClEF,IAAI,EACJC,OACF,CAAC,EACDD,IAAI","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import { http } from "@next-core/http";
2
+ /**
3
+ * @description flow agent更新任务状态,支持暂停、停止和重启任务
4
+ * @endpoint POST /api/v1/llm/agent/flow/:taskId/updateState
5
+ */
6
+ export const AgentFlowApi_updateStateForAgentFlow = (taskId, data, options) => /**! @contract easyops.api.llm.agent_flow.UpdateStateForAgentFlow@1.0.0 */http.post(`api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/${taskId}/updateState`, data, options);
7
+ //# sourceMappingURL=updateStateForAgentFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateStateForAgentFlow.js","names":["http","AgentFlowApi_updateStateForAgentFlow","taskId","data","options","post"],"sources":["../../../../../src/api/llm/agent_flow/updateStateForAgentFlow.ts"],"sourcesContent":["import { http, HttpOptions } from \"@next-core/http\";\n\nexport interface AgentFlowApi_UpdateStateForAgentFlowRequestBody {\n /** 调整任务状态,可以设置为 stopped, paused, working(paused的任务状态时,可以继续) */\n state?: string;\n}\n\n/**\n * @description flow agent更新任务状态,支持暂停、停止和重启任务\n * @endpoint POST /api/v1/llm/agent/flow/:taskId/updateState\n */\nexport const AgentFlowApi_updateStateForAgentFlow = (\n taskId: string | number,\n data: AgentFlowApi_UpdateStateForAgentFlowRequestBody,\n options?: HttpOptions\n): Promise<void> =>\n /**! @contract easyops.api.llm.agent_flow.UpdateStateForAgentFlow@1.0.0 */ http.post<void>(\n `api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/${taskId}/updateState`,\n data,\n options\n );\n"],"mappings":"AAAA,SAASA,IAAI,QAAqB,iBAAiB;AAOnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,oCAAoC,GAAGA,CAClDC,MAAuB,EACvBC,IAAqD,EACrDC,OAAqB,KAErB,0EAA2EJ,IAAI,CAACK,IAAI,CAClF,6DAA6DH,MAAM,cAAc,EACjFC,IAAI,EACJC,OACF,CAAC","ignoreList":[]}
@@ -3,5 +3,5 @@ import { http } from "@next-core/http";
3
3
  * @description 根据模板与大模型对话,返回json
4
4
  * @endpoint POST /api/v1/llm/tools/template_llm_chat_v2
5
5
  */
6
- export const AiopsToolsApi_templateLlmChatV2 = async (data, options) => /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */(await http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2", data, options)).data;
6
+ export const AiopsToolsApi_templateLlmChatV2 = (data, options) => /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2", data, options);
7
7
  //# sourceMappingURL=templateLlmChatV2.js.map
@@ -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\";\nimport { ResponseBodyWrapper } from \"../../../wrapper.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 = async (\n data: AiopsToolsApi_TemplateLlmChatV2RequestBody,\n options?: HttpOptions\n): Promise<AiopsToolsApi_TemplateLlmChatV2ResponseBody> =>\n /**! @contract easyops.api.llm.aiops_tools.TemplateLlmChatV2@1.0.0 */ (\n await http.post<\n ResponseBodyWrapper<AiopsToolsApi_TemplateLlmChatV2ResponseBody>\n >(\n \"api/gateway/logic.llm.aiops_service/api/v1/llm/tools/template_llm_chat_v2\",\n data,\n options\n )\n ).data;\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;AAoDnD;AACA;AACA;AACA;AACA,OAAO,MAAMC,+BAA+B,GAAG,MAAAA,CAC7CC,IAAgD,EAChDC,OAAqB,KAErB,qEAAsE,CACpE,MAAMH,IAAI,CAACI,IAAI,CAGb,2EAA2E,EAC3EF,IAAI,EACJC,OACF,CAAC,EACDD,IAAI","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":"ModelLlmChatAgentTaskRequest.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatAgentTaskRequest.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,处理agent任务的请求 */\nexport interface ModelLlmChatAgentTaskRequest {\n /** 任务需求 */\n input: string;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n\n /** 任务配置 */\n config: Record<string, any>;\n\n /** 当前任务上下文的id */\n conversationId: string;\n\n /** 在多agent场景,指定使用哪个agent */\n agentId: string;\n\n /** 当前任务Id */\n taskId: string;\n\n /** 已经提取的表单数据 */\n formData: any;\n\n /** 助手id */\n robotId: string;\n\n /** 是否流式返回 */\n stream: boolean;\n\n /** 历史会话消息,适用支持多轮会话的agent */\n historyMessages: Partial<ModelLlmChatMessage>[];\n\n /** 流式数据列表(占位符,防止flow builder自动清理流式返回的数据) */\n sseDataList: any[];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ModelLlmChatAgentTaskRequest.js","names":[],"sources":["../../../../src/model/aiops_service/ModelLlmChatAgentTaskRequest.ts"],"sourcesContent":["import { ModelLlmChatMessage } from \"./index.js\";\n\n/** 聊天机器人,处理agent任务的请求 */\nexport interface ModelLlmChatAgentTaskRequest {\n /** 任务需求 */\n input: string;\n\n /** 大模型的Temperature, 值范围0.0~1.0 */\n temperature: number;\n\n /** 图片的url,支持多个图片 */\n images: string[];\n\n /** 任务配置 */\n config: Record<string, any>;\n\n /** 当前任务上下文的id */\n conversationId: string;\n\n /** 在多agent场景,指定使用哪个agent */\n agentId: string;\n\n /** 当前任务Id */\n taskId: string;\n\n /** 已经提取的表单数据 */\n formData: any;\n\n /** 助手id */\n robotId: string;\n\n /** 是否流式返回 */\n stream: boolean;\n\n /** 历史会话消息,适用支持多轮会话的agent */\n historyMessages: Partial<ModelLlmChatMessage>[];\n\n /** 流式数据列表(占位符,防止flow builder自动清理流式返回的数据) */\n sseDataList: any[];\n}\n"],"mappings":"","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":[]}
@@ -4,6 +4,8 @@ export interface AgentFlowApi_CreateTaskForAgentFlowRequestBody {
4
4
  input?: string;
5
5
  /** 指定处理任务的agent */
6
6
  agentId?: string;
7
+ /** 执行任务引擎的版本号 */
8
+ engineVersion?: string;
7
9
  }
8
10
  export interface AgentFlowApi_CreateTaskForAgentFlowResponseBody {
9
11
  /** 任务id */
@@ -1,3 +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";
5
+ export * from "./searchTaskForAgentFlow.js";
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
+ }
@@ -0,0 +1,34 @@
1
+ import { HttpOptions } from "@next-core/http";
2
+ export interface AgentFlowApi_SearchTaskForAgentFlowRequestBody {
3
+ /** 对标题进行关键字搜索 */
4
+ query?: string;
5
+ /** 数据数量大小限制, 默认30 */
6
+ limit?: number;
7
+ /** 分页token,字符串;向上翻页或向下翻页的token都在这个参数传入。 */
8
+ next_token?: string;
9
+ }
10
+ export interface AgentFlowApi_SearchTaskForAgentFlowResponseBody {
11
+ /** 下一页,查询的token,为空时,没有下一页 */
12
+ next_token?: string;
13
+ /** 上一页,查询的token,为空时,没有上一页 */
14
+ previous_token?: string;
15
+ /** 任务列表 */
16
+ data?: AgentFlowApi_SearchTaskForAgentFlowResponseBody_data_item[];
17
+ }
18
+ /**
19
+ * @description 分页查询agent flow, 默认只查询最近三个页的数据
20
+ * @endpoint POST /api/v1/llm/agent/flow/search
21
+ */
22
+ export declare const AgentFlowApi_searchTaskForAgentFlow: (data: AgentFlowApi_SearchTaskForAgentFlowRequestBody, options?: HttpOptions) => Promise<AgentFlowApi_SearchTaskForAgentFlowResponseBody>;
23
+ export interface AgentFlowApi_SearchTaskForAgentFlowResponseBody_data_item {
24
+ /** 任务id */
25
+ id?: string;
26
+ /** 创建时间戳,单位秒 */
27
+ startTime?: number;
28
+ /** 结束时间戳,单位秒 */
29
+ endTime?: number;
30
+ /** 任务状态,"submitted", "working", "input-required","completed","canceled","failed", "unknown" */
31
+ state?: string;
32
+ /** 标题 */
33
+ title?: string;
34
+ }
@@ -0,0 +1,10 @@
1
+ import { HttpOptions } from "@next-core/http";
2
+ export interface AgentFlowApi_UpdateStateForAgentFlowRequestBody {
3
+ /** 调整任务状态,可以设置为 stopped, paused, working(paused的任务状态时,可以继续) */
4
+ state?: string;
5
+ }
6
+ /**
7
+ * @description flow agent更新任务状态,支持暂停、停止和重启任务
8
+ * @endpoint POST /api/v1/llm/agent/flow/:taskId/updateState
9
+ */
10
+ export declare const AgentFlowApi_updateStateForAgentFlow: (taskId: string | number, data: AgentFlowApi_UpdateStateForAgentFlowRequestBody, options?: HttpOptions) => Promise<void>;
@@ -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
  /** 如果解析不到正确的数据格式,则将大模型返回的数据塞到这里 */
@@ -3,6 +3,8 @@ import { ModelLlmChatMessage } from "./index.js";
3
3
  export interface ModelLlmChatAgentTaskRequest {
4
4
  /** 任务需求 */
5
5
  input: string;
6
+ /** 大模型的Temperature, 值范围0.0~1.0 */
7
+ temperature: number;
6
8
  /** 图片的url,支持多个图片 */
7
9
  images: string[];
8
10
  /** 任务配置 */
@@ -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
  /** 模型产生的工具调用消息 */
@@ -3,6 +3,8 @@ import { ModelLlmChatMessage } from "./index.js";
3
3
  export interface ModelLlmChatResponse {
4
4
  /** 模型名称,消息内容。目前先只返回这个 */
5
5
  content: string;
6
+ /** 推理模型的推理内容 */
7
+ reasoning_content: string;
6
8
  /** 任务ID */
7
9
  id: string;
8
10
  /** 请求创建时间,是以秒为单位的 Unix 时间戳 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-api-sdk/llm-sdk",
3
- "version": "1.3.0",
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": "e1bd40327515f49ba143480a71d4f55e4e54334d"
46
+ "gitHead": "2e6624405b57c679e4c063f2ad06175dc4f5efa3"
47
47
  }