@next-api-sdk/llm-sdk 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/README.md +18 -0
  2. package/contracts.json +3486 -0
  3. package/dist/cjs/api/llm/agent/baseGeneralAgent.js +17 -0
  4. package/dist/cjs/api/llm/agent/baseGeneralAgent.js.map +1 -0
  5. package/dist/cjs/api/llm/agent/index.js +28 -0
  6. package/dist/cjs/api/llm/agent/index.js.map +1 -0
  7. package/dist/cjs/api/llm/agent/webSearchAgent.js +17 -0
  8. package/dist/cjs/api/llm/agent/webSearchAgent.js.map +1 -0
  9. package/dist/cjs/api/llm/aiops_base/deleteEmbedding.js +14 -0
  10. package/dist/cjs/api/llm/aiops_base/deleteEmbedding.js.map +1 -0
  11. package/dist/cjs/api/llm/aiops_base/deleteKnowledge.js +14 -0
  12. package/dist/cjs/api/llm/aiops_base/deleteKnowledge.js.map +1 -0
  13. package/dist/cjs/api/llm/aiops_base/importDocumentEmbeddings.js +14 -0
  14. package/dist/cjs/api/llm/aiops_base/importDocumentEmbeddings.js.map +1 -0
  15. package/dist/cjs/api/llm/aiops_base/index.js +94 -0
  16. package/dist/cjs/api/llm/aiops_base/index.js.map +1 -0
  17. package/dist/cjs/api/llm/aiops_base/llmChatServiceV1.js +16 -0
  18. package/dist/cjs/api/llm/aiops_base/llmChatServiceV1.js.map +1 -0
  19. package/dist/cjs/api/llm/aiops_base/openaiChat.js +16 -0
  20. package/dist/cjs/api/llm/aiops_base/openaiChat.js.map +1 -0
  21. package/dist/cjs/api/llm/aiops_base/searchEmbedding.js +14 -0
  22. package/dist/cjs/api/llm/aiops_base/searchEmbedding.js.map +1 -0
  23. package/dist/cjs/api/llm/aiops_base/upsertDocument.js +14 -0
  24. package/dist/cjs/api/llm/aiops_base/upsertDocument.js.map +1 -0
  25. package/dist/cjs/api/llm/aiops_base/upsertWithDocId.js +14 -0
  26. package/dist/cjs/api/llm/aiops_base/upsertWithDocId.js.map +1 -0
  27. package/dist/cjs/api/llm/aiops_memory/createMemoryEnv.js +14 -0
  28. package/dist/cjs/api/llm/aiops_memory/createMemoryEnv.js.map +1 -0
  29. package/dist/cjs/api/llm/aiops_memory/deleteLlmMemoryWithConversationId.js +14 -0
  30. package/dist/cjs/api/llm/aiops_memory/deleteLlmMemoryWithConversationId.js.map +1 -0
  31. package/dist/cjs/api/llm/aiops_memory/deleteLlmMemoryWithConversationIdAndKey.js +14 -0
  32. package/dist/cjs/api/llm/aiops_memory/deleteLlmMemoryWithConversationIdAndKey.js.map +1 -0
  33. package/dist/cjs/api/llm/aiops_memory/deleteMemoryEnv.js +14 -0
  34. package/dist/cjs/api/llm/aiops_memory/deleteMemoryEnv.js.map +1 -0
  35. package/dist/cjs/api/llm/aiops_memory/getLlmMemoryWithConversationId.js +14 -0
  36. package/dist/cjs/api/llm/aiops_memory/getLlmMemoryWithConversationId.js.map +1 -0
  37. package/dist/cjs/api/llm/aiops_memory/getLlmMemoryWithConversationIdAndKey.js +14 -0
  38. package/dist/cjs/api/llm/aiops_memory/getLlmMemoryWithConversationIdAndKey.js.map +1 -0
  39. package/dist/cjs/api/llm/aiops_memory/index.js +105 -0
  40. package/dist/cjs/api/llm/aiops_memory/index.js.map +1 -0
  41. package/dist/cjs/api/llm/aiops_memory/searchMemoryEnv.js +14 -0
  42. package/dist/cjs/api/llm/aiops_memory/searchMemoryEnv.js.map +1 -0
  43. package/dist/cjs/api/llm/aiops_memory/updateMemoryEnv.js +14 -0
  44. package/dist/cjs/api/llm/aiops_memory/updateMemoryEnv.js.map +1 -0
  45. package/dist/cjs/api/llm/aiops_memory/upsertLlmMemoryWithConversationIdAndKey.js +14 -0
  46. package/dist/cjs/api/llm/aiops_memory/upsertLlmMemoryWithConversationIdAndKey.js.map +1 -0
  47. package/dist/cjs/api/llm/aiops_prompt/index.js +39 -0
  48. package/dist/cjs/api/llm/aiops_prompt/index.js.map +1 -0
  49. package/dist/cjs/api/llm/aiops_prompt/llmDeletePrompt.js +14 -0
  50. package/dist/cjs/api/llm/aiops_prompt/llmDeletePrompt.js.map +1 -0
  51. package/dist/cjs/api/llm/aiops_prompt/llmGetPrompt.js +14 -0
  52. package/dist/cjs/api/llm/aiops_prompt/llmGetPrompt.js.map +1 -0
  53. package/dist/cjs/api/llm/aiops_prompt/llmUpsertPrompt.js +14 -0
  54. package/dist/cjs/api/llm/aiops_prompt/llmUpsertPrompt.js.map +1 -0
  55. package/dist/cjs/api/llm/aiops_rag/addSynonymsWords.js +14 -0
  56. package/dist/cjs/api/llm/aiops_rag/addSynonymsWords.js.map +1 -0
  57. package/dist/cjs/api/llm/aiops_rag/importConfluenceEmbedding.js +14 -0
  58. package/dist/cjs/api/llm/aiops_rag/importConfluenceEmbedding.js.map +1 -0
  59. package/dist/cjs/api/llm/aiops_rag/importUrlEmbedding.js +14 -0
  60. package/dist/cjs/api/llm/aiops_rag/importUrlEmbedding.js.map +1 -0
  61. package/dist/cjs/api/llm/aiops_rag/index.js +50 -0
  62. package/dist/cjs/api/llm/aiops_rag/index.js.map +1 -0
  63. package/dist/cjs/api/llm/aiops_rag/upsertKnowledgeDocument.js +14 -0
  64. package/dist/cjs/api/llm/aiops_rag/upsertKnowledgeDocument.js.map +1 -0
  65. package/dist/cjs/api/llm/aiops_service/exportAgents.js +17 -0
  66. package/dist/cjs/api/llm/aiops_service/exportAgents.js.map +1 -0
  67. package/dist/cjs/api/llm/aiops_service/exportConversation.js +17 -0
  68. package/dist/cjs/api/llm/aiops_service/exportConversation.js.map +1 -0
  69. package/dist/cjs/api/llm/aiops_service/exportRobots.js +17 -0
  70. package/dist/cjs/api/llm/aiops_service/exportRobots.js.map +1 -0
  71. package/dist/cjs/api/llm/aiops_service/exportTools.js +17 -0
  72. package/dist/cjs/api/llm/aiops_service/exportTools.js.map +1 -0
  73. package/dist/cjs/api/llm/aiops_service/importAgents.js +27 -0
  74. package/dist/cjs/api/llm/aiops_service/importAgents.js.map +1 -0
  75. package/dist/cjs/api/llm/aiops_service/importConfluenceEmbedding.js +14 -0
  76. package/dist/cjs/api/llm/aiops_service/importConfluenceEmbedding.js.map +1 -0
  77. package/dist/cjs/api/llm/aiops_service/importDocumentEmbedding.js +14 -0
  78. package/dist/cjs/api/llm/aiops_service/importDocumentEmbedding.js.map +1 -0
  79. package/dist/cjs/api/llm/aiops_service/importRobots.js +27 -0
  80. package/dist/cjs/api/llm/aiops_service/importRobots.js.map +1 -0
  81. package/dist/cjs/api/llm/aiops_service/importTools.js +27 -0
  82. package/dist/cjs/api/llm/aiops_service/importTools.js.map +1 -0
  83. package/dist/cjs/api/llm/aiops_service/index.js +215 -0
  84. package/dist/cjs/api/llm/aiops_service/index.js.map +1 -0
  85. package/dist/cjs/api/llm/aiops_service/llmAgentChat.js +17 -0
  86. package/dist/cjs/api/llm/aiops_service/llmAgentChat.js.map +1 -0
  87. package/dist/cjs/api/llm/aiops_service/llmChatSelectAgent.js +16 -0
  88. package/dist/cjs/api/llm/aiops_service/llmChatSelectAgent.js.map +1 -0
  89. package/dist/cjs/api/llm/aiops_service/llmChatService.js +16 -0
  90. package/dist/cjs/api/llm/aiops_service/llmChatService.js.map +1 -0
  91. package/dist/cjs/api/llm/aiops_service/llmCreateConversation.js +14 -0
  92. package/dist/cjs/api/llm/aiops_service/llmCreateConversation.js.map +1 -0
  93. package/dist/cjs/api/llm/aiops_service/llmEmbeddingDeleteDocs.js +14 -0
  94. package/dist/cjs/api/llm/aiops_service/llmEmbeddingDeleteDocs.js.map +1 -0
  95. package/dist/cjs/api/llm/aiops_service/llmEmbeddingImportUrl.js +14 -0
  96. package/dist/cjs/api/llm/aiops_service/llmEmbeddingImportUrl.js.map +1 -0
  97. package/dist/cjs/api/llm/aiops_service/llmEmbeddingSearch.js +14 -0
  98. package/dist/cjs/api/llm/aiops_service/llmEmbeddingSearch.js.map +1 -0
  99. package/dist/cjs/api/llm/aiops_service/llmExecTools.js +14 -0
  100. package/dist/cjs/api/llm/aiops_service/llmExecTools.js.map +1 -0
  101. package/dist/cjs/api/llm/aiops_service/llmRobotChat.js +17 -0
  102. package/dist/cjs/api/llm/aiops_service/llmRobotChat.js.map +1 -0
  103. package/dist/cjs/api/llm/aiops_service/llmStreamChatService.js +14 -0
  104. package/dist/cjs/api/llm/aiops_service/llmStreamChatService.js.map +1 -0
  105. package/dist/cjs/api/llm/aiops_tools/index.js +28 -0
  106. package/dist/cjs/api/llm/aiops_tools/index.js.map +1 -0
  107. package/dist/cjs/api/llm/aiops_tools/summaryQuestionV2.js +14 -0
  108. package/dist/cjs/api/llm/aiops_tools/summaryQuestionV2.js.map +1 -0
  109. package/dist/cjs/api/llm/aiops_tools/templateLlmChatV2.js +14 -0
  110. package/dist/cjs/api/llm/aiops_tools/templateLlmChatV2.js.map +1 -0
  111. package/dist/cjs/api/llm/virtual_builder/generateStoryboard.js +14 -0
  112. package/dist/cjs/api/llm/virtual_builder/generateStoryboard.js.map +1 -0
  113. package/dist/cjs/api/llm/virtual_builder/generateStoryboardStream.js +14 -0
  114. package/dist/cjs/api/llm/virtual_builder/generateStoryboardStream.js.map +1 -0
  115. package/dist/cjs/api/llm/virtual_builder/index.js +28 -0
  116. package/dist/cjs/api/llm/virtual_builder/index.js.map +1 -0
  117. package/dist/cjs/index.js +112 -0
  118. package/dist/cjs/index.js.map +1 -0
  119. package/dist/cjs/model/aiops_service/ModelLlmChatAgentTaskRequest.js +6 -0
  120. package/dist/cjs/model/aiops_service/ModelLlmChatAgentTaskRequest.js.map +1 -0
  121. package/dist/cjs/model/aiops_service/ModelLlmChatAgentTaskResponse.js +6 -0
  122. package/dist/cjs/model/aiops_service/ModelLlmChatAgentTaskResponse.js.map +1 -0
  123. package/dist/cjs/model/aiops_service/ModelLlmChatMessage.js +6 -0
  124. package/dist/cjs/model/aiops_service/ModelLlmChatMessage.js.map +1 -0
  125. package/dist/cjs/model/aiops_service/ModelLlmChatRequest.js +6 -0
  126. package/dist/cjs/model/aiops_service/ModelLlmChatRequest.js.map +1 -0
  127. package/dist/cjs/model/aiops_service/ModelLlmChatResponse.js +6 -0
  128. package/dist/cjs/model/aiops_service/ModelLlmChatResponse.js.map +1 -0
  129. package/dist/cjs/model/aiops_service/ModelLlmChatSelectAgentRequest.js +6 -0
  130. package/dist/cjs/model/aiops_service/ModelLlmChatSelectAgentRequest.js.map +1 -0
  131. package/dist/cjs/model/aiops_service/ModelLlmChatSelectAgentResponse.js +6 -0
  132. package/dist/cjs/model/aiops_service/ModelLlmChatSelectAgentResponse.js.map +1 -0
  133. package/dist/cjs/model/aiops_service/ModelLlmChatTools.js +6 -0
  134. package/dist/cjs/model/aiops_service/ModelLlmChatTools.js.map +1 -0
  135. package/dist/cjs/model/aiops_service/index.js +94 -0
  136. package/dist/cjs/model/aiops_service/index.js.map +1 -0
  137. package/dist/cjs/model/llm/ModelLlmDocument.js +6 -0
  138. package/dist/cjs/model/llm/ModelLlmDocument.js.map +1 -0
  139. package/dist/cjs/model/llm/ModelLlmMemory.js +6 -0
  140. package/dist/cjs/model/llm/ModelLlmMemory.js.map +1 -0
  141. package/dist/cjs/model/llm/ModelLlmMemoryEnv.js +6 -0
  142. package/dist/cjs/model/llm/ModelLlmMemoryEnv.js.map +1 -0
  143. package/dist/cjs/model/llm/index.js +39 -0
  144. package/dist/cjs/model/llm/index.js.map +1 -0
  145. package/dist/cjs/wrapper.js +6 -0
  146. package/dist/cjs/wrapper.js.map +1 -0
  147. package/dist/esm/api/llm/agent/baseGeneralAgent.js +11 -0
  148. package/dist/esm/api/llm/agent/baseGeneralAgent.js.map +1 -0
  149. package/dist/esm/api/llm/agent/index.js +3 -0
  150. package/dist/esm/api/llm/agent/index.js.map +1 -0
  151. package/dist/esm/api/llm/agent/webSearchAgent.js +11 -0
  152. package/dist/esm/api/llm/agent/webSearchAgent.js.map +1 -0
  153. package/dist/esm/api/llm/aiops_base/deleteEmbedding.js +7 -0
  154. package/dist/esm/api/llm/aiops_base/deleteEmbedding.js.map +1 -0
  155. package/dist/esm/api/llm/aiops_base/deleteKnowledge.js +7 -0
  156. package/dist/esm/api/llm/aiops_base/deleteKnowledge.js.map +1 -0
  157. package/dist/esm/api/llm/aiops_base/importDocumentEmbeddings.js +7 -0
  158. package/dist/esm/api/llm/aiops_base/importDocumentEmbeddings.js.map +1 -0
  159. package/dist/esm/api/llm/aiops_base/index.js +9 -0
  160. package/dist/esm/api/llm/aiops_base/index.js.map +1 -0
  161. package/dist/esm/api/llm/aiops_base/llmChatServiceV1.js +10 -0
  162. package/dist/esm/api/llm/aiops_base/llmChatServiceV1.js.map +1 -0
  163. package/dist/esm/api/llm/aiops_base/openaiChat.js +10 -0
  164. package/dist/esm/api/llm/aiops_base/openaiChat.js.map +1 -0
  165. package/dist/esm/api/llm/aiops_base/searchEmbedding.js +7 -0
  166. package/dist/esm/api/llm/aiops_base/searchEmbedding.js.map +1 -0
  167. package/dist/esm/api/llm/aiops_base/upsertDocument.js +7 -0
  168. package/dist/esm/api/llm/aiops_base/upsertDocument.js.map +1 -0
  169. package/dist/esm/api/llm/aiops_base/upsertWithDocId.js +7 -0
  170. package/dist/esm/api/llm/aiops_base/upsertWithDocId.js.map +1 -0
  171. package/dist/esm/api/llm/aiops_memory/createMemoryEnv.js +7 -0
  172. package/dist/esm/api/llm/aiops_memory/createMemoryEnv.js.map +1 -0
  173. package/dist/esm/api/llm/aiops_memory/deleteLlmMemoryWithConversationId.js +8 -0
  174. package/dist/esm/api/llm/aiops_memory/deleteLlmMemoryWithConversationId.js.map +1 -0
  175. package/dist/esm/api/llm/aiops_memory/deleteLlmMemoryWithConversationIdAndKey.js +7 -0
  176. package/dist/esm/api/llm/aiops_memory/deleteLlmMemoryWithConversationIdAndKey.js.map +1 -0
  177. package/dist/esm/api/llm/aiops_memory/deleteMemoryEnv.js +8 -0
  178. package/dist/esm/api/llm/aiops_memory/deleteMemoryEnv.js.map +1 -0
  179. package/dist/esm/api/llm/aiops_memory/getLlmMemoryWithConversationId.js +7 -0
  180. package/dist/esm/api/llm/aiops_memory/getLlmMemoryWithConversationId.js.map +1 -0
  181. package/dist/esm/api/llm/aiops_memory/getLlmMemoryWithConversationIdAndKey.js +7 -0
  182. package/dist/esm/api/llm/aiops_memory/getLlmMemoryWithConversationIdAndKey.js.map +1 -0
  183. package/dist/esm/api/llm/aiops_memory/index.js +10 -0
  184. package/dist/esm/api/llm/aiops_memory/index.js.map +1 -0
  185. package/dist/esm/api/llm/aiops_memory/searchMemoryEnv.js +7 -0
  186. package/dist/esm/api/llm/aiops_memory/searchMemoryEnv.js.map +1 -0
  187. package/dist/esm/api/llm/aiops_memory/updateMemoryEnv.js +7 -0
  188. package/dist/esm/api/llm/aiops_memory/updateMemoryEnv.js.map +1 -0
  189. package/dist/esm/api/llm/aiops_memory/upsertLlmMemoryWithConversationIdAndKey.js +7 -0
  190. package/dist/esm/api/llm/aiops_memory/upsertLlmMemoryWithConversationIdAndKey.js.map +1 -0
  191. package/dist/esm/api/llm/aiops_prompt/index.js +4 -0
  192. package/dist/esm/api/llm/aiops_prompt/index.js.map +1 -0
  193. package/dist/esm/api/llm/aiops_prompt/llmDeletePrompt.js +7 -0
  194. package/dist/esm/api/llm/aiops_prompt/llmDeletePrompt.js.map +1 -0
  195. package/dist/esm/api/llm/aiops_prompt/llmGetPrompt.js +7 -0
  196. package/dist/esm/api/llm/aiops_prompt/llmGetPrompt.js.map +1 -0
  197. package/dist/esm/api/llm/aiops_prompt/llmUpsertPrompt.js +7 -0
  198. package/dist/esm/api/llm/aiops_prompt/llmUpsertPrompt.js.map +1 -0
  199. package/dist/esm/api/llm/aiops_rag/addSynonymsWords.js +7 -0
  200. package/dist/esm/api/llm/aiops_rag/addSynonymsWords.js.map +1 -0
  201. package/dist/esm/api/llm/aiops_rag/importConfluenceEmbedding.js +7 -0
  202. package/dist/esm/api/llm/aiops_rag/importConfluenceEmbedding.js.map +1 -0
  203. package/dist/esm/api/llm/aiops_rag/importUrlEmbedding.js +7 -0
  204. package/dist/esm/api/llm/aiops_rag/importUrlEmbedding.js.map +1 -0
  205. package/dist/esm/api/llm/aiops_rag/index.js +5 -0
  206. package/dist/esm/api/llm/aiops_rag/index.js.map +1 -0
  207. package/dist/esm/api/llm/aiops_rag/upsertKnowledgeDocument.js +7 -0
  208. package/dist/esm/api/llm/aiops_rag/upsertKnowledgeDocument.js.map +1 -0
  209. package/dist/esm/api/llm/aiops_service/exportAgents.js +10 -0
  210. package/dist/esm/api/llm/aiops_service/exportAgents.js.map +1 -0
  211. package/dist/esm/api/llm/aiops_service/exportConversation.js +10 -0
  212. package/dist/esm/api/llm/aiops_service/exportConversation.js.map +1 -0
  213. package/dist/esm/api/llm/aiops_service/exportRobots.js +10 -0
  214. package/dist/esm/api/llm/aiops_service/exportRobots.js.map +1 -0
  215. package/dist/esm/api/llm/aiops_service/exportTools.js +10 -0
  216. package/dist/esm/api/llm/aiops_service/exportTools.js.map +1 -0
  217. package/dist/esm/api/llm/aiops_service/importAgents.js +20 -0
  218. package/dist/esm/api/llm/aiops_service/importAgents.js.map +1 -0
  219. package/dist/esm/api/llm/aiops_service/importConfluenceEmbedding.js +7 -0
  220. package/dist/esm/api/llm/aiops_service/importConfluenceEmbedding.js.map +1 -0
  221. package/dist/esm/api/llm/aiops_service/importDocumentEmbedding.js +7 -0
  222. package/dist/esm/api/llm/aiops_service/importDocumentEmbedding.js.map +1 -0
  223. package/dist/esm/api/llm/aiops_service/importRobots.js +20 -0
  224. package/dist/esm/api/llm/aiops_service/importRobots.js.map +1 -0
  225. package/dist/esm/api/llm/aiops_service/importTools.js +20 -0
  226. package/dist/esm/api/llm/aiops_service/importTools.js.map +1 -0
  227. package/dist/esm/api/llm/aiops_service/index.js +20 -0
  228. package/dist/esm/api/llm/aiops_service/index.js.map +1 -0
  229. package/dist/esm/api/llm/aiops_service/llmAgentChat.js +11 -0
  230. package/dist/esm/api/llm/aiops_service/llmAgentChat.js.map +1 -0
  231. package/dist/esm/api/llm/aiops_service/llmChatSelectAgent.js +10 -0
  232. package/dist/esm/api/llm/aiops_service/llmChatSelectAgent.js.map +1 -0
  233. package/dist/esm/api/llm/aiops_service/llmChatService.js +10 -0
  234. package/dist/esm/api/llm/aiops_service/llmChatService.js.map +1 -0
  235. package/dist/esm/api/llm/aiops_service/llmCreateConversation.js +7 -0
  236. package/dist/esm/api/llm/aiops_service/llmCreateConversation.js.map +1 -0
  237. package/dist/esm/api/llm/aiops_service/llmEmbeddingDeleteDocs.js +7 -0
  238. package/dist/esm/api/llm/aiops_service/llmEmbeddingDeleteDocs.js.map +1 -0
  239. package/dist/esm/api/llm/aiops_service/llmEmbeddingImportUrl.js +7 -0
  240. package/dist/esm/api/llm/aiops_service/llmEmbeddingImportUrl.js.map +1 -0
  241. package/dist/esm/api/llm/aiops_service/llmEmbeddingSearch.js +7 -0
  242. package/dist/esm/api/llm/aiops_service/llmEmbeddingSearch.js.map +1 -0
  243. package/dist/esm/api/llm/aiops_service/llmExecTools.js +7 -0
  244. package/dist/esm/api/llm/aiops_service/llmExecTools.js.map +1 -0
  245. package/dist/esm/api/llm/aiops_service/llmRobotChat.js +11 -0
  246. package/dist/esm/api/llm/aiops_service/llmRobotChat.js.map +1 -0
  247. package/dist/esm/api/llm/aiops_service/llmStreamChatService.js +7 -0
  248. package/dist/esm/api/llm/aiops_service/llmStreamChatService.js.map +1 -0
  249. package/dist/esm/api/llm/aiops_tools/index.js +3 -0
  250. package/dist/esm/api/llm/aiops_tools/index.js.map +1 -0
  251. package/dist/esm/api/llm/aiops_tools/summaryQuestionV2.js +7 -0
  252. package/dist/esm/api/llm/aiops_tools/summaryQuestionV2.js.map +1 -0
  253. package/dist/esm/api/llm/aiops_tools/templateLlmChatV2.js +7 -0
  254. package/dist/esm/api/llm/aiops_tools/templateLlmChatV2.js.map +1 -0
  255. package/dist/esm/api/llm/virtual_builder/generateStoryboard.js +7 -0
  256. package/dist/esm/api/llm/virtual_builder/generateStoryboard.js.map +1 -0
  257. package/dist/esm/api/llm/virtual_builder/generateStoryboardStream.js +7 -0
  258. package/dist/esm/api/llm/virtual_builder/generateStoryboardStream.js.map +1 -0
  259. package/dist/esm/api/llm/virtual_builder/index.js +3 -0
  260. package/dist/esm/api/llm/virtual_builder/index.js.map +1 -0
  261. package/dist/esm/index.js +13 -0
  262. package/dist/esm/index.js.map +1 -0
  263. package/dist/esm/model/aiops_service/ModelLlmChatAgentTaskRequest.js +2 -0
  264. package/dist/esm/model/aiops_service/ModelLlmChatAgentTaskRequest.js.map +1 -0
  265. package/dist/esm/model/aiops_service/ModelLlmChatAgentTaskResponse.js +2 -0
  266. package/dist/esm/model/aiops_service/ModelLlmChatAgentTaskResponse.js.map +1 -0
  267. package/dist/esm/model/aiops_service/ModelLlmChatMessage.js +2 -0
  268. package/dist/esm/model/aiops_service/ModelLlmChatMessage.js.map +1 -0
  269. package/dist/esm/model/aiops_service/ModelLlmChatRequest.js +2 -0
  270. package/dist/esm/model/aiops_service/ModelLlmChatRequest.js.map +1 -0
  271. package/dist/esm/model/aiops_service/ModelLlmChatResponse.js +2 -0
  272. package/dist/esm/model/aiops_service/ModelLlmChatResponse.js.map +1 -0
  273. package/dist/esm/model/aiops_service/ModelLlmChatSelectAgentRequest.js +2 -0
  274. package/dist/esm/model/aiops_service/ModelLlmChatSelectAgentRequest.js.map +1 -0
  275. package/dist/esm/model/aiops_service/ModelLlmChatSelectAgentResponse.js +2 -0
  276. package/dist/esm/model/aiops_service/ModelLlmChatSelectAgentResponse.js.map +1 -0
  277. package/dist/esm/model/aiops_service/ModelLlmChatTools.js +2 -0
  278. package/dist/esm/model/aiops_service/ModelLlmChatTools.js.map +1 -0
  279. package/dist/esm/model/aiops_service/index.js +9 -0
  280. package/dist/esm/model/aiops_service/index.js.map +1 -0
  281. package/dist/esm/model/llm/ModelLlmDocument.js +2 -0
  282. package/dist/esm/model/llm/ModelLlmDocument.js.map +1 -0
  283. package/dist/esm/model/llm/ModelLlmMemory.js +2 -0
  284. package/dist/esm/model/llm/ModelLlmMemory.js.map +1 -0
  285. package/dist/esm/model/llm/ModelLlmMemoryEnv.js +2 -0
  286. package/dist/esm/model/llm/ModelLlmMemoryEnv.js.map +1 -0
  287. package/dist/esm/model/llm/index.js +4 -0
  288. package/dist/esm/model/llm/index.js.map +1 -0
  289. package/dist/esm/wrapper.js +2 -0
  290. package/dist/esm/wrapper.js.map +1 -0
  291. package/dist/types/api/llm/agent/baseGeneralAgent.d.ts +11 -0
  292. package/dist/types/api/llm/agent/index.d.ts +2 -0
  293. package/dist/types/api/llm/agent/webSearchAgent.d.ts +11 -0
  294. package/dist/types/api/llm/aiops_base/deleteEmbedding.d.ts +16 -0
  295. package/dist/types/api/llm/aiops_base/deleteKnowledge.d.ts +10 -0
  296. package/dist/types/api/llm/aiops_base/importDocumentEmbeddings.d.ts +27 -0
  297. package/dist/types/api/llm/aiops_base/index.d.ts +8 -0
  298. package/dist/types/api/llm/aiops_base/llmChatServiceV1.d.ts +14 -0
  299. package/dist/types/api/llm/aiops_base/openaiChat.d.ts +14 -0
  300. package/dist/types/api/llm/aiops_base/searchEmbedding.d.ts +23 -0
  301. package/dist/types/api/llm/aiops_base/upsertDocument.d.ts +25 -0
  302. package/dist/types/api/llm/aiops_base/upsertWithDocId.d.ts +25 -0
  303. package/dist/types/api/llm/aiops_memory/createMemoryEnv.d.ts +9 -0
  304. package/dist/types/api/llm/aiops_memory/deleteLlmMemoryWithConversationId.d.ts +6 -0
  305. package/dist/types/api/llm/aiops_memory/deleteLlmMemoryWithConversationIdAndKey.d.ts +10 -0
  306. package/dist/types/api/llm/aiops_memory/deleteMemoryEnv.d.ts +6 -0
  307. package/dist/types/api/llm/aiops_memory/getLlmMemoryWithConversationId.d.ts +15 -0
  308. package/dist/types/api/llm/aiops_memory/getLlmMemoryWithConversationIdAndKey.d.ts +17 -0
  309. package/dist/types/api/llm/aiops_memory/index.d.ts +9 -0
  310. package/dist/types/api/llm/aiops_memory/searchMemoryEnv.d.ts +23 -0
  311. package/dist/types/api/llm/aiops_memory/updateMemoryEnv.d.ts +8 -0
  312. package/dist/types/api/llm/aiops_memory/upsertLlmMemoryWithConversationIdAndKey.d.ts +11 -0
  313. package/dist/types/api/llm/aiops_prompt/index.d.ts +3 -0
  314. package/dist/types/api/llm/aiops_prompt/llmDeletePrompt.d.ts +20 -0
  315. package/dist/types/api/llm/aiops_prompt/llmGetPrompt.d.ts +18 -0
  316. package/dist/types/api/llm/aiops_prompt/llmUpsertPrompt.d.ts +22 -0
  317. package/dist/types/api/llm/aiops_rag/addSynonymsWords.d.ts +20 -0
  318. package/dist/types/api/llm/aiops_rag/importConfluenceEmbedding.d.ts +37 -0
  319. package/dist/types/api/llm/aiops_rag/importUrlEmbedding.d.ts +27 -0
  320. package/dist/types/api/llm/aiops_rag/index.d.ts +4 -0
  321. package/dist/types/api/llm/aiops_rag/upsertKnowledgeDocument.d.ts +14 -0
  322. package/dist/types/api/llm/aiops_service/exportAgents.d.ts +10 -0
  323. package/dist/types/api/llm/aiops_service/exportConversation.d.ts +22 -0
  324. package/dist/types/api/llm/aiops_service/exportRobots.d.ts +10 -0
  325. package/dist/types/api/llm/aiops_service/exportTools.d.ts +10 -0
  326. package/dist/types/api/llm/aiops_service/importAgents.d.ts +16 -0
  327. package/dist/types/api/llm/aiops_service/importConfluenceEmbedding.d.ts +37 -0
  328. package/dist/types/api/llm/aiops_service/importDocumentEmbedding.d.ts +27 -0
  329. package/dist/types/api/llm/aiops_service/importRobots.d.ts +16 -0
  330. package/dist/types/api/llm/aiops_service/importTools.d.ts +16 -0
  331. package/dist/types/api/llm/aiops_service/index.d.ts +19 -0
  332. package/dist/types/api/llm/aiops_service/llmAgentChat.d.ts +46 -0
  333. package/dist/types/api/llm/aiops_service/llmChatSelectAgent.d.ts +10 -0
  334. package/dist/types/api/llm/aiops_service/llmChatService.d.ts +14 -0
  335. package/dist/types/api/llm/aiops_service/llmCreateConversation.d.ts +18 -0
  336. package/dist/types/api/llm/aiops_service/llmEmbeddingDeleteDocs.d.ts +15 -0
  337. package/dist/types/api/llm/aiops_service/llmEmbeddingImportUrl.d.ts +25 -0
  338. package/dist/types/api/llm/aiops_service/llmEmbeddingSearch.d.ts +21 -0
  339. package/dist/types/api/llm/aiops_service/llmExecTools.d.ts +24 -0
  340. package/dist/types/api/llm/aiops_service/llmRobotChat.d.ts +11 -0
  341. package/dist/types/api/llm/aiops_service/llmStreamChatService.d.ts +12 -0
  342. package/dist/types/api/llm/aiops_tools/index.d.ts +2 -0
  343. package/dist/types/api/llm/aiops_tools/summaryQuestionV2.d.ts +29 -0
  344. package/dist/types/api/llm/aiops_tools/templateLlmChatV2.d.ts +44 -0
  345. package/dist/types/api/llm/virtual_builder/generateStoryboard.d.ts +24 -0
  346. package/dist/types/api/llm/virtual_builder/generateStoryboardStream.d.ts +24 -0
  347. package/dist/types/api/llm/virtual_builder/index.d.ts +2 -0
  348. package/dist/types/index.d.ts +10 -0
  349. package/dist/types/model/aiops_service/ModelLlmChatAgentTaskRequest.d.ts +26 -0
  350. package/dist/types/model/aiops_service/ModelLlmChatAgentTaskResponse.d.ts +26 -0
  351. package/dist/types/model/aiops_service/ModelLlmChatMessage.d.ts +27 -0
  352. package/dist/types/model/aiops_service/ModelLlmChatRequest.d.ts +28 -0
  353. package/dist/types/model/aiops_service/ModelLlmChatResponse.d.ts +32 -0
  354. package/dist/types/model/aiops_service/ModelLlmChatSelectAgentRequest.d.ts +19 -0
  355. package/dist/types/model/aiops_service/ModelLlmChatSelectAgentResponse.d.ts +12 -0
  356. package/dist/types/model/aiops_service/ModelLlmChatTools.d.ts +31 -0
  357. package/dist/types/model/aiops_service/index.d.ts +8 -0
  358. package/dist/types/model/llm/ModelLlmDocument.d.ts +13 -0
  359. package/dist/types/model/llm/ModelLlmMemory.d.ts +15 -0
  360. package/dist/types/model/llm/ModelLlmMemoryEnv.d.ts +11 -0
  361. package/dist/types/model/llm/index.d.ts +3 -0
  362. package/dist/types/wrapper.d.ts +12 -0
  363. package/package.json +47 -0
package/contracts.json ADDED
@@ -0,0 +1,3486 @@
1
+ {
2
+ "name": "llm",
3
+ "contracts": [
4
+ {
5
+ "contract": "llm.agent.BaseGeneralAgent",
6
+ "name": "BaseGeneralAgent",
7
+ "version": "1.0.0",
8
+ "description": "基础agent,支持知识库、执行工具",
9
+ "endpoint": {
10
+ "method": "POST",
11
+ "uri": "/api/v1/llm/agent/base"
12
+ },
13
+ "import": [
14
+ "easyops/model/aiops_service/llm_chat_agent_task_request",
15
+ "easyops/model/aiops_service/llm_chat_agent_task_response"
16
+ ],
17
+ "request": {
18
+ "type": "LlmChatAgentTaskRequest"
19
+ },
20
+ "response": {
21
+ "type": "LlmChatAgentTaskResponse",
22
+ "description": "接口返回,有两种格式,流式返回为delta, 非流式返回为message\n"
23
+ },
24
+ "examples": [
25
+ {
26
+ "description": {
27
+ "zh": "大模型聊天接口"
28
+ },
29
+ "request": {
30
+ "method": "POST",
31
+ "uri": "http://ip:port/api/v1/llm/agent/base",
32
+ "headers": {
33
+ "Content-Type": "application/json",
34
+ "user": "linus",
35
+ "org": 1234
36
+ },
37
+ "body": "{\n \"input\": \"你好啊\",\n \"agentId\": \"general-helper\"\n}"
38
+ },
39
+ "response": {
40
+ "headers": {
41
+ "Content-Type": "application/json; charset=utf-8"
42
+ },
43
+ "status_code": 200,
44
+ "body": "{\n \"created\": 1703487403,\n \"type\": \"TEXT\",\n \"taskId\": \"8239375684858666781\",\n \"message\": {\n \"role\":\"assistant\",\n \"content\":\"有什么可以帮到你\"\n }\n}"
45
+ }
46
+ },
47
+ {
48
+ "description": {
49
+ "zh": "流式返回"
50
+ },
51
+ "request": {
52
+ "method": "POST",
53
+ "uri": "http://ip:port/api/v1/llm/agent/base",
54
+ "headers": {
55
+ "Content-Type": "application/json",
56
+ "Org": 8888,
57
+ "User": "easyops"
58
+ },
59
+ "body": "{\n \"input\": \"你好啊\",\n \"agentId\": \"general-helper\",\n \"stream\": true\n}"
60
+ },
61
+ "response": {
62
+ "headers": {
63
+ "Content-Type": "text/event-stream"
64
+ },
65
+ "body": "data: {\"created\":1703487403,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"有什么可以\"}}\\n\\n data: {\"created\":1703487404,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"帮到你\"}}\\n\\n data: [DONE]"
66
+ }
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "contract": "llm.agent.WebSearchAgent",
72
+ "name": "WebSearchAgent",
73
+ "version": "1.0.0",
74
+ "description": "网络搜索的agent",
75
+ "endpoint": {
76
+ "method": "POST",
77
+ "uri": "/api/v1/llm/agent/web_search"
78
+ },
79
+ "import": [
80
+ "easyops/model/aiops_service/llm_chat_agent_task_request",
81
+ "easyops/model/aiops_service/llm_chat_agent_task_response"
82
+ ],
83
+ "request": {
84
+ "type": "LlmChatAgentTaskRequest"
85
+ },
86
+ "response": {
87
+ "type": "LlmChatAgentTaskResponse",
88
+ "description": "接口返回,有两种格式,流式返回为delta, 非流式返回为message\n"
89
+ },
90
+ "examples": [
91
+ {
92
+ "description": {
93
+ "zh": "大模型聊天接口"
94
+ },
95
+ "request": {
96
+ "method": "POST",
97
+ "uri": "http://ip:port/api/v1/llm/agent/web_search",
98
+ "headers": {
99
+ "Content-Type": "application/json",
100
+ "user": "linus",
101
+ "org": 1234
102
+ },
103
+ "body": "{\n \"input\": \"你好啊\",\n \"agentId\": \"general-helper\"\n}"
104
+ },
105
+ "response": {
106
+ "headers": {
107
+ "Content-Type": "application/json; charset=utf-8"
108
+ },
109
+ "status_code": 200,
110
+ "body": "{\n \"created\": 1703487403,\n \"type\": \"TEXT\",\n \"taskId\": \"8239375684858666781\",\n \"message\": {\n \"role\":\"assistant\",\n \"content\":\"有什么可以帮到你\"\n }\n}"
111
+ }
112
+ },
113
+ {
114
+ "description": {
115
+ "zh": "流式返回"
116
+ },
117
+ "request": {
118
+ "method": "POST",
119
+ "uri": "http://ip:port/api/v1/llm/agent/web_search",
120
+ "headers": {
121
+ "Content-Type": "application/json",
122
+ "Org": 8888,
123
+ "User": "easyops"
124
+ },
125
+ "body": "{\n \"input\": \"你好啊\",\n \"agentId\": \"general-helper\",\n \"stream\": true\n}"
126
+ },
127
+ "response": {
128
+ "headers": {
129
+ "Content-Type": "text/event-stream"
130
+ },
131
+ "body": "data: {\"created\":1703487403,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"有什么可以\"}}\\n\\n data: {\"created\":1703487404,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"帮到你\"}}\\n\\n data: [DONE]"
132
+ }
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "contract": "llm.aiops_base.DeleteEmbedding",
138
+ "name": "DeleteEmbedding",
139
+ "version": "1.1.0",
140
+ "description": "删除向量数据库中的向量",
141
+ "endpoint": {
142
+ "method": "POST",
143
+ "uri": "/api/v1/llm/aiops_base/embedding/delete"
144
+ },
145
+ "request": {
146
+ "type": "object",
147
+ "fields": [
148
+ {
149
+ "name": "namespace",
150
+ "type": "string",
151
+ "description": "知识库id,同search中的命名空间(废弃)"
152
+ },
153
+ {
154
+ "name": "deleteKnowledge",
155
+ "type": "bool",
156
+ "description": "是否删除整个知识库(废弃)"
157
+ },
158
+ {
159
+ "name": "ids",
160
+ "type": "string[]",
161
+ "description": "文档所包含的id列表(废弃)"
162
+ },
163
+ {
164
+ "name": "instanceIds",
165
+ "type": "string[]",
166
+ "description": "文档的instanceId"
167
+ }
168
+ ]
169
+ },
170
+ "response": null,
171
+ "examples": [
172
+ {
173
+ "description": {
174
+ "zh": "删除指定向量"
175
+ },
176
+ "request": {
177
+ "method": "POST",
178
+ "uri": "http://localhost:port/api/v1/llm/aiops_base/embedding/delete",
179
+ "headers": {
180
+ "Content-Type": "application/json",
181
+ "user": "easyops",
182
+ "org": 8888
183
+ },
184
+ "body": "{\n \"instanceIds\": [\"6211a7e379579\"]\n}"
185
+ },
186
+ "response": {
187
+ "headers": {
188
+ "Content-Type": "application/json; charset=utf-8"
189
+ },
190
+ "status_code": 200,
191
+ "body": "{\n \"code\": 0,\n \"data\": null\n}"
192
+ }
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "contract": "llm.aiops_base.DeleteKnowledge",
198
+ "name": "DeleteKnowledge",
199
+ "version": "1.0.0",
200
+ "description": "删除知识库",
201
+ "endpoint": {
202
+ "method": "POST",
203
+ "uri": "/api/v1/llm/aiops_base/knowledge/delete"
204
+ },
205
+ "request": {
206
+ "type": "object",
207
+ "fields": [
208
+ {
209
+ "name": "instanceId",
210
+ "type": "string",
211
+ "description": "知识库的instanceId"
212
+ }
213
+ ]
214
+ },
215
+ "response": null,
216
+ "examples": [
217
+ {
218
+ "description": {
219
+ "zh": "删除知识库"
220
+ },
221
+ "request": {
222
+ "method": "POST",
223
+ "uri": "http://localhost:port/api/v1/llm/aiops_base/knowledge/delete",
224
+ "headers": {
225
+ "Content-Type": "application/json",
226
+ "user": "easyops",
227
+ "org": 8888
228
+ },
229
+ "body": "{\n \"instanceId\": \"6211a7e379579\"\n}"
230
+ },
231
+ "response": {
232
+ "headers": {
233
+ "Content-Type": "application/json; charset=utf-8"
234
+ },
235
+ "status_code": 200,
236
+ "body": "{\n \"code\": 0,\n \"data\": null\n}"
237
+ }
238
+ }
239
+ ]
240
+ },
241
+ {
242
+ "contract": "llm.aiops_base.ImportDocumentEmbeddings",
243
+ "name": "ImportDocumentEmbeddings",
244
+ "version": "1.0.0",
245
+ "description": "导入document",
246
+ "endpoint": {
247
+ "method": "POST",
248
+ "uri": "/api/v1/llm/aiops_base/import_doc"
249
+ },
250
+ "import": [
251
+ "easyops/model/llm/llm_document"
252
+ ],
253
+ "request": {
254
+ "type": "object",
255
+ "fields": [
256
+ {
257
+ "name": "namespace",
258
+ "type": "string",
259
+ "description": "导入的namespace"
260
+ },
261
+ {
262
+ "name": "docId",
263
+ "type": "string",
264
+ "description": "doc id"
265
+ },
266
+ {
267
+ "name": "docList",
268
+ "type": "object[]",
269
+ "description": "导入的document",
270
+ "fields": [
271
+ {
272
+ "name": "pageContent",
273
+ "type": "string",
274
+ "description": "内容"
275
+ },
276
+ {
277
+ "name": "metadata",
278
+ "type": "map",
279
+ "description": "metadata"
280
+ }
281
+ ]
282
+ },
283
+ {
284
+ "name": "append",
285
+ "type": "bool",
286
+ "description": "是否append"
287
+ }
288
+ ]
289
+ },
290
+ "response": {
291
+ "type": "object",
292
+ "fields": [
293
+ {
294
+ "name": "docs",
295
+ "type": "LLMDocument[]",
296
+ "description": "解析的文档内容"
297
+ }
298
+ ]
299
+ },
300
+ "examples": [
301
+ {
302
+ "description": {
303
+ "zh": "直接导入document"
304
+ },
305
+ "request": {
306
+ "method": "POST",
307
+ "uri": "http://localhost:8095/api/v1/llm/aiops_base/import_doc",
308
+ "headers": {
309
+ "Content-Type": "application/json",
310
+ "user": "easyops",
311
+ "org": 8888
312
+ },
313
+ "body": "{\n \"namespace\": \"fal_knowledge\",\n \"docId\": \"doc1\",\n “docList”: [\n {\"pageContent\":\"1\", metadata:{}}\n ]\n}"
314
+ },
315
+ "response": {
316
+ "headers": {
317
+ "Content-Type": "application/json; charset=utf-8"
318
+ },
319
+ "status_code": 200,
320
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"id\":\"id1\", \"len\": 10},\n {\"id\":\"id2\", \"len\": 11},\n ]\n }\n}"
321
+ }
322
+ }
323
+ ]
324
+ },
325
+ {
326
+ "contract": "llm.aiops_base.LLMChatServiceV1",
327
+ "name": "LLMChatServiceV1",
328
+ "version": "1.0.0",
329
+ "description": "大模型聊天接口",
330
+ "endpoint": {
331
+ "method": "POST",
332
+ "uri": "/api/v1/llm/aiops_base/chat_service"
333
+ },
334
+ "import": [
335
+ "easyops/model/aiops_service/llm_chat_request",
336
+ "easyops/model/aiops_service/llm_chat_response"
337
+ ],
338
+ "request": {
339
+ "type": "object",
340
+ "fields": [
341
+ {
342
+ "ref": "LLMChatRequest.*"
343
+ }
344
+ ],
345
+ "default": {
346
+ "LLMChatResponse.temperature": 0.1,
347
+ "LLMChatResponse.stream": false
348
+ }
349
+ },
350
+ "response": {
351
+ "type": "object",
352
+ "description": "接口返回,有两种格式,流式返回为sseDataList:[{\"role\":\"assistant\",\"content\":\"abc\"}],非流式返回为LLMChatResponse",
353
+ "fields": [
354
+ {
355
+ "ref": "LLMChatResponse.*"
356
+ },
357
+ {
358
+ "name": "sseDataList",
359
+ "type": "value[]",
360
+ "description": "流式数据列表"
361
+ }
362
+ ]
363
+ },
364
+ "examples": [
365
+ {
366
+ "description": {
367
+ "zh": "大模型聊天接口"
368
+ },
369
+ "request": {
370
+ "method": "POST",
371
+ "uri": "http://localhost:8095/api/v1/llm/aiops_base/chat_service",
372
+ "headers": {
373
+ "Content-Type": "application/json",
374
+ "user": "easyops",
375
+ "org": 8888
376
+ },
377
+ "body": "{\n \"model\": \"glm-4\",\n \"messages\": [\n {\"role\": \"user\", \"content\": \"作为一名营销专家,请为我的产品创作一个吸引人的slogan\"},\n {\"role\": \"assistant\", \"content\": \"当然,为了创作一个吸引人的slogan,请告诉我一些关于您产品的信息\"},\n {\"role\": \"user\", \"content\": \"智谱AI开放平台\"},\n {\"role\": \"assistant\", \"content\": \"智启未来,谱绘无限一智谱AI,让创新触手可及!\"},\n {\"role\": \"user\", \"content\": \"创造一个更精准、吸引人的slogan\"}\n ]\n}"
378
+ },
379
+ "response": {
380
+ "headers": {
381
+ "Content-Type": "application/json; charset=utf-8"
382
+ },
383
+ "status_code": 200,
384
+ "body": "{\n \"created\": 1703487403,\n \"id\": \"8239375684858666781\",\n \"model\": \"glm-4\",\n \"request_id\": \"8239375684858666781\",\n \"choices\": [\n {\n \"finish_reason\": \"stop\",\n \"index\": 0,\n \"message\": {\n \"content\": \"智绘蓝图,AI驱动 —— 智谱AI,让每一刻创新成为可能。\",\n \"role\": \"assistant\"\n }\n }\n ],\n \"usage\": {\n \"completion_tokens\": 217,\n \"prompt_tokens\": 31,\n \"total_tokens\": 248\n }\n}"
385
+ }
386
+ },
387
+ {
388
+ "description": {
389
+ "zh": "调用智谱glm-4模型,流式返回"
390
+ },
391
+ "request": {
392
+ "method": "POST",
393
+ "uri": "http://ip:port/api/v1/llm/aiops_service/chat_service",
394
+ "headers": {
395
+ "Content-Type": "application/json",
396
+ "Org": 8888,
397
+ "User": "easyops"
398
+ },
399
+ "body": "{\n \"message\": [\n {\"role\": \"user\", \"content\": \"1+1等于多少\"}\n ],\n \"stream\": true,\n \"model\": \"glm-4\"\n}"
400
+ },
401
+ "response": {
402
+ "headers": {
403
+ "Content-Type": "text/event-stream"
404
+ },
405
+ "body": "data:{\"role\":\"assistant\", \"content\":\"等于\"}\\n\\n data:{\"role\":\"assistant\", \"content\":\"2\"}\\n\\n"
406
+ }
407
+ }
408
+ ]
409
+ },
410
+ {
411
+ "contract": "llm.aiops_base.OpenaiChat",
412
+ "name": "OpenaiChat",
413
+ "version": "1.0.0",
414
+ "description": "通用大模型聊天接口, 直接转发返回大模型请求",
415
+ "endpoint": {
416
+ "method": "POST",
417
+ "uri": "/v1/chat/completions"
418
+ },
419
+ "import": [
420
+ "easyops/model/aiops_service/llm_chat_request",
421
+ "easyops/model/aiops_service/llm_chat_response"
422
+ ],
423
+ "request": {
424
+ "type": "object",
425
+ "fields": [
426
+ {
427
+ "ref": "LLMChatRequest.*"
428
+ }
429
+ ],
430
+ "default": {
431
+ "LLMChatResponse.temperature": 0.1,
432
+ "LLMChatResponse.stream": false
433
+ }
434
+ },
435
+ "response": {
436
+ "type": "object",
437
+ "description": "接口返回,有两种格式,流式返回为sseDataList:[{\"role\":\"assistant\",\"content\":\"abc\"}],非流式返回为LLMChatResponse",
438
+ "wrapper": false,
439
+ "fields": [
440
+ {
441
+ "ref": "LLMChatResponse.*"
442
+ },
443
+ {
444
+ "name": "sseDataList",
445
+ "type": "value[]",
446
+ "description": "流式数据列表"
447
+ }
448
+ ]
449
+ },
450
+ "examples": [
451
+ {
452
+ "description": {
453
+ "zh": "调用智谱glm-4模型,流式返回"
454
+ },
455
+ "request": {
456
+ "method": "POST",
457
+ "uri": "http://ip:port/api/v1/llm/aiops_base/chat_service_proxy",
458
+ "headers": {
459
+ "Content-Type": "application/json",
460
+ "Org": 8888,
461
+ "User": "easyops"
462
+ },
463
+ "body": "{\n \"message\": [\n {\"role\": \"user\", \"content\": \"1+1等于多少\"}\n ],\n \"stream\": true,\n \"model\": \"glm-4\"\n}"
464
+ },
465
+ "response": {
466
+ "headers": {
467
+ "Content-Type": "text/event-stream"
468
+ },
469
+ "body": "data:{\"role\":\"assistant\", \"content\":\"等于\"}\\n\\n data:{\"role\":\"assistant\", \"content\":\"2\"}\\n\\n"
470
+ }
471
+ }
472
+ ]
473
+ },
474
+ {
475
+ "contract": "llm.aiops_base.SearchEmbedding",
476
+ "name": "SearchEmbedding",
477
+ "version": "1.0.0",
478
+ "description": "向向量数据库做相似查询",
479
+ "endpoint": {
480
+ "method": "POST",
481
+ "uri": "/api/v1/llm/aiops_base/embedding/search"
482
+ },
483
+ "import": [
484
+ "easyops/model/llm/llm_document"
485
+ ],
486
+ "request": {
487
+ "type": "object",
488
+ "fields": [
489
+ {
490
+ "name": "namespace",
491
+ "type": "string",
492
+ "description": "命名空间"
493
+ },
494
+ {
495
+ "name": "query",
496
+ "type": "string",
497
+ "description": "查询的句子"
498
+ },
499
+ {
500
+ "name": "filter",
501
+ "type": "map",
502
+ "description": "过滤条件"
503
+ },
504
+ {
505
+ "name": "topk",
506
+ "type": "int",
507
+ "description": "返回topk条记录"
508
+ },
509
+ {
510
+ "name": "uniqWithContent",
511
+ "type": "bool",
512
+ "description": "是否按文档内容去重"
513
+ }
514
+ ]
515
+ },
516
+ "response": {
517
+ "type": "object",
518
+ "fields": [
519
+ {
520
+ "name": "matchedDocs",
521
+ "type": "LLMDocument[]",
522
+ "description": "相似查询结果"
523
+ }
524
+ ]
525
+ },
526
+ "examples": [
527
+ {
528
+ "description": {
529
+ "zh": "文档向量搜索"
530
+ },
531
+ "request": {
532
+ "method": "POST",
533
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/embedding/search_doc",
534
+ "headers": {
535
+ "Content-Type": "application/json",
536
+ "user": "linus",
537
+ "org": 1234
538
+ },
539
+ "body": "{\n \"namespace\": \"easyops_cmdb123\",\n \"query\": \"查询负责人为aaa的主机\",\n \"uniqWithContent\":true,\n \"topk\": 2\n}"
540
+ },
541
+ "response": {
542
+ "headers": {
543
+ "Content-Type": "application/json; charset=utf-8"
544
+ },
545
+ "status_code": 200,
546
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"matchedDocs\": [\n {\"pageContent\":\"host:主机\",\"metadata\":{\"id\":\"HOST\",\"name\":\"主机\"}},\n {\"pageContent\":\"app:应用\",\"metadata\":{\"id\":\"APP\",\"name\":\"应用\"}},\n ]\n }\n}"
547
+ }
548
+ }
549
+ ]
550
+ },
551
+ {
552
+ "contract": "llm.aiops_base.UpsertDocument",
553
+ "name": "UpsertDocument",
554
+ "version": "1.0.0",
555
+ "description": "更新或者插入文档",
556
+ "endpoint": {
557
+ "method": "POST",
558
+ "uri": "/api/v1/llm/aiops_base/upsert_doc"
559
+ },
560
+ "import": [
561
+ "easyops/model/llm/llm_document"
562
+ ],
563
+ "request": {
564
+ "type": "object",
565
+ "fields": [
566
+ {
567
+ "name": "namespace",
568
+ "type": "string",
569
+ "description": "导入的namespace"
570
+ },
571
+ {
572
+ "name": "filter",
573
+ "type": "map",
574
+ "description": "过滤条件"
575
+ },
576
+ {
577
+ "name": "docList",
578
+ "type": "object[]",
579
+ "description": "导入的document",
580
+ "fields": [
581
+ {
582
+ "name": "pageContent",
583
+ "type": "string",
584
+ "description": "内容"
585
+ },
586
+ {
587
+ "name": "metadata",
588
+ "type": "map",
589
+ "description": "metadata"
590
+ }
591
+ ]
592
+ }
593
+ ]
594
+ },
595
+ "response": {
596
+ "type": "object",
597
+ "fields": [
598
+ {
599
+ "name": "docs",
600
+ "type": "LLMDocument[]",
601
+ "description": "解析的文档内容"
602
+ }
603
+ ]
604
+ },
605
+ "examples": [
606
+ {
607
+ "description": {
608
+ "zh": "直接导入document"
609
+ },
610
+ "request": {
611
+ "method": "POST",
612
+ "uri": "http://localhost:8095/api/v1/llm/aiops_base/upsert_doc",
613
+ "headers": {
614
+ "Content-Type": "application/json",
615
+ "user": "easyops",
616
+ "org": 8888
617
+ },
618
+ "body": "{\n \"namespace\": \"fal_knowledge\",\n \"filter\":{\"docId\":\"doc1\"},\n “docList”: [\n {\"pageContent\":\"1\", metadata:{}}\n ]\n}"
619
+ },
620
+ "response": {
621
+ "headers": {
622
+ "Content-Type": "application/json; charset=utf-8"
623
+ },
624
+ "status_code": 200,
625
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"id\":\"id1\", \"len\": 10},\n {\"id\":\"id2\", \"len\": 11},\n ]\n }\n}"
626
+ }
627
+ }
628
+ ]
629
+ },
630
+ {
631
+ "contract": "llm.aiops_base.UpsertWithDocId",
632
+ "name": "UpsertWithDocId",
633
+ "version": "1.0.0",
634
+ "description": "根据DocId更新或者插入文档",
635
+ "endpoint": {
636
+ "method": "POST",
637
+ "uri": "/api/v1/llm/aiops_base/upsert_with_doc_id"
638
+ },
639
+ "import": [
640
+ "easyops/model/llm/llm_document"
641
+ ],
642
+ "request": {
643
+ "type": "object",
644
+ "fields": [
645
+ {
646
+ "name": "namespace",
647
+ "type": "string",
648
+ "description": "导入的namespace"
649
+ },
650
+ {
651
+ "name": "docId",
652
+ "type": "string",
653
+ "description": "文档id"
654
+ },
655
+ {
656
+ "name": "docList",
657
+ "type": "object[]",
658
+ "description": "导入的document",
659
+ "fields": [
660
+ {
661
+ "name": "pageContent",
662
+ "type": "string",
663
+ "description": "内容"
664
+ },
665
+ {
666
+ "name": "metadata",
667
+ "type": "map",
668
+ "description": "metadata"
669
+ }
670
+ ]
671
+ }
672
+ ]
673
+ },
674
+ "response": {
675
+ "type": "object",
676
+ "fields": [
677
+ {
678
+ "name": "docs",
679
+ "type": "LLMDocument[]",
680
+ "description": "解析的文档内容"
681
+ }
682
+ ]
683
+ },
684
+ "examples": [
685
+ {
686
+ "description": {
687
+ "zh": "直接导入document"
688
+ },
689
+ "request": {
690
+ "method": "POST",
691
+ "uri": "http://localhost:8095/api/v1/llm/aiops_base/upsert_with_doc_id_",
692
+ "headers": {
693
+ "Content-Type": "application/json",
694
+ "user": "easyops",
695
+ "org": 8888
696
+ },
697
+ "body": "{\n \"namespace\": \"fal_knowledge\",\n \"docId\":\"doc1\",\n “docList”: [\n {\"pageContent\":\"1\", metadata:{}}\n ]\n}"
698
+ },
699
+ "response": {
700
+ "headers": {
701
+ "Content-Type": "application/json; charset=utf-8"
702
+ },
703
+ "status_code": 200,
704
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"id\":\"id1\", \"len\": 10},\n {\"id\":\"id2\", \"len\": 11},\n ]\n }\n}"
705
+ }
706
+ }
707
+ ]
708
+ },
709
+ {
710
+ "contract": "llm.aiops_memory.CreateMemoryEnv",
711
+ "name": "CreateMemoryEnv",
712
+ "version": "1.0.0",
713
+ "description": "创建大模型记忆的调试环境",
714
+ "endpoint": {
715
+ "method": "POST",
716
+ "uri": "/api/v1/llm/aiops_service/memory/env/create"
717
+ },
718
+ "import": [
719
+ "easyops/model/llm/llm_memory_env"
720
+ ],
721
+ "request": {
722
+ "type": "object",
723
+ "fields": [
724
+ {
725
+ "ref": "LLMMemoryEnv.*"
726
+ }
727
+ ]
728
+ },
729
+ "response": {
730
+ "type": "LLMMemoryEnv"
731
+ },
732
+ "examples": [
733
+ {
734
+ "description": {
735
+ "zh": "创建大模型记忆的调试环境"
736
+ },
737
+ "request": {
738
+ "method": "PUT",
739
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/env/create",
740
+ "headers": {
741
+ "Content-Type": "application/json",
742
+ "user": "easyops",
743
+ "org": 1234
744
+ },
745
+ "body": "{\n \"name\": \"测试1环境\",\n \"remark\": \"Google搜索专用\"\n}"
746
+ },
747
+ "response": {
748
+ "headers": {
749
+ "Content-Type": "application/json; charset=utf-8"
750
+ },
751
+ "status_code": 200,
752
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"_row_id\": \"xxxxxx\"\n \"name\": \"测试1环境\",\n \"remark\": \"Google搜索专用\",\n \"\"\n }\n}"
753
+ }
754
+ }
755
+ ]
756
+ },
757
+ {
758
+ "contract": "llm.aiops_memory.DeleteLlmMemoryWithConversationId",
759
+ "name": "DeleteLlmMemoryWithConversationId",
760
+ "version": "1.0.0",
761
+ "description": "通过会话id删除大模型记忆",
762
+ "endpoint": {
763
+ "method": "DELETE",
764
+ "uri": "/api/v1/llm/aiops_service/memory/delete/:conversationId"
765
+ },
766
+ "import": [
767
+ "easyops/model/llm/llm_memory"
768
+ ],
769
+ "request": {
770
+ "type": "object",
771
+ "fields": [
772
+ {
773
+ "name": "conversationId",
774
+ "type": "string",
775
+ "description": "会话id"
776
+ }
777
+ ]
778
+ },
779
+ "response": null,
780
+ "examples": [
781
+ {
782
+ "description": {
783
+ "zh": "删除会话中的记忆"
784
+ },
785
+ "request": {
786
+ "method": "POST",
787
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/delete/a1427b34-7709-11ef-837e-06f1e0835fb3",
788
+ "headers": {
789
+ "Content-Type": "application/json",
790
+ "user": "easyops",
791
+ "org": 1234
792
+ },
793
+ "body": "{ }"
794
+ },
795
+ "response": {
796
+ "headers": {
797
+ "Content-Type": "application/json; charset=utf-8"
798
+ },
799
+ "status_code": 200,
800
+ "body": "{\n \"code\": 0,\n \"data\": {\n }\n}"
801
+ }
802
+ }
803
+ ]
804
+ },
805
+ {
806
+ "contract": "llm.aiops_memory.DeleteLlmMemoryWithConversationIdAndKey",
807
+ "name": "DeleteLlmMemoryWithConversationIdAndKey",
808
+ "version": "1.0.0",
809
+ "description": "通过会话id和记忆key删除大模型记忆",
810
+ "endpoint": {
811
+ "method": "POST",
812
+ "uri": "/api/v1/llm/aiops_service/memory/delete/:conversationId/key"
813
+ },
814
+ "import": [
815
+ "easyops/model/llm/llm_memory"
816
+ ],
817
+ "request": {
818
+ "type": "object",
819
+ "fields": [
820
+ {
821
+ "name": "conversationId",
822
+ "type": "string",
823
+ "description": "会话id"
824
+ },
825
+ {
826
+ "name": "memKey",
827
+ "type": "string",
828
+ "description": "记忆key"
829
+ }
830
+ ]
831
+ },
832
+ "response": null,
833
+ "examples": [
834
+ {
835
+ "description": {
836
+ "zh": "删除会话中单个记忆信息"
837
+ },
838
+ "request": {
839
+ "method": "POST",
840
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/delete/a1427b34-7709-11ef-837e-06f1e0835fb3/key",
841
+ "headers": {
842
+ "Content-Type": "application/json",
843
+ "user": "easyops",
844
+ "org": 1234
845
+ },
846
+ "body": "{\n \"memKey\": \"birthday\",\n}"
847
+ },
848
+ "response": {
849
+ "headers": {
850
+ "Content-Type": "application/json; charset=utf-8"
851
+ },
852
+ "status_code": 200,
853
+ "body": "{\n \"code\": 0,\n \"data\": { \n }\n}"
854
+ }
855
+ }
856
+ ]
857
+ },
858
+ {
859
+ "contract": "llm.aiops_memory.DeleteMemoryEnv",
860
+ "name": "DeleteMemoryEnv",
861
+ "version": "1.0.0",
862
+ "description": "删除大模型记忆的调试环境",
863
+ "endpoint": {
864
+ "method": "DELETE",
865
+ "uri": "/api/v1/llm/aiops_service/memory/env/:_row_id"
866
+ },
867
+ "import": [
868
+ "easyops/model/llm/llm_memory_env"
869
+ ],
870
+ "request": {
871
+ "type": "object",
872
+ "fields": [
873
+ {
874
+ "ref": "LLMMemoryEnv._row_id"
875
+ }
876
+ ]
877
+ },
878
+ "response": null,
879
+ "examples": [
880
+ {
881
+ "description": {
882
+ "zh": "删除大模型记忆的调试环境"
883
+ },
884
+ "request": {
885
+ "method": "DELETE",
886
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/env/5daa2e9a6d6ae",
887
+ "headers": {
888
+ "Content-Type": "application/json",
889
+ "user": "easyops",
890
+ "org": 1234
891
+ },
892
+ "body": "{}"
893
+ },
894
+ "response": {
895
+ "headers": {
896
+ "Content-Type": "application/json; charset=utf-8"
897
+ },
898
+ "status_code": 200,
899
+ "body": "{\n \"code\": 0,\n \"data\": {\n }\n}"
900
+ }
901
+ }
902
+ ]
903
+ },
904
+ {
905
+ "contract": "llm.aiops_memory.GetLlmMemoryWithConversationId",
906
+ "name": "GetLlmMemoryWithConversationId",
907
+ "version": "1.0.0",
908
+ "description": "通过会话id获取大模型记忆",
909
+ "endpoint": {
910
+ "method": "POST",
911
+ "uri": "/api/v1/llm/aiops_service/memory/get_with_conversation"
912
+ },
913
+ "import": [
914
+ "easyops/model/llm/llm_memory"
915
+ ],
916
+ "request": {
917
+ "type": "object",
918
+ "fields": [
919
+ {
920
+ "name": "conversationId",
921
+ "type": "string",
922
+ "description": "会话id"
923
+ }
924
+ ]
925
+ },
926
+ "response": {
927
+ "type": "object",
928
+ "fields": [
929
+ {
930
+ "name": "memories",
931
+ "type": "LLMMemory[]",
932
+ "description": "大模型记忆"
933
+ }
934
+ ]
935
+ },
936
+ "examples": [
937
+ {
938
+ "description": {
939
+ "zh": "查询会话中的记忆"
940
+ },
941
+ "request": {
942
+ "method": "POST",
943
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/get_with_conversation",
944
+ "headers": {
945
+ "Content-Type": "application/json",
946
+ "user": "easyops",
947
+ "org": 1234
948
+ },
949
+ "body": "{\n \"conversationId\": \"a1427b34-7709-11ef-837e-06f1e0835fb3\"\n}"
950
+ },
951
+ "response": {
952
+ "headers": {
953
+ "Content-Type": "application/json; charset=utf-8"
954
+ },
955
+ "status_code": 200,
956
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"memories\": [\n {\"conversationId\":\"a1427b34-7709-11ef-837e-06f1e0835fb3\",\"memKey\":\"birthday\",\"description\":\"小明的生日\",\"memValue\":\"1999-01-25\",\"mtime\":\"1999-01-25\"}\n ]\n }\n}"
957
+ }
958
+ }
959
+ ]
960
+ },
961
+ {
962
+ "contract": "llm.aiops_memory.GetLlmMemoryWithConversationIdAndKey",
963
+ "name": "GetLlmMemoryWithConversationIdAndKey",
964
+ "version": "1.0.0",
965
+ "description": "通过会话id和记忆key获取大模型记忆",
966
+ "endpoint": {
967
+ "method": "POST",
968
+ "uri": "/api/v1/llm/aiops_service/memory/get_with_conversation_and_key"
969
+ },
970
+ "import": [
971
+ "easyops/model/llm/llm_memory"
972
+ ],
973
+ "request": {
974
+ "type": "object",
975
+ "fields": [
976
+ {
977
+ "name": "conversationId",
978
+ "type": "string",
979
+ "description": "会话id"
980
+ },
981
+ {
982
+ "name": "memKey",
983
+ "type": "string",
984
+ "description": "记忆key"
985
+ }
986
+ ]
987
+ },
988
+ "response": {
989
+ "type": "object",
990
+ "fields": [
991
+ {
992
+ "name": "memory",
993
+ "type": "LLMMemory",
994
+ "description": "大模型记忆"
995
+ }
996
+ ]
997
+ },
998
+ "examples": [
999
+ {
1000
+ "description": {
1001
+ "zh": "查询会话中单个记忆信息"
1002
+ },
1003
+ "request": {
1004
+ "method": "POST",
1005
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/get_with_conversation_and_key",
1006
+ "headers": {
1007
+ "Content-Type": "application/json",
1008
+ "user": "easyops",
1009
+ "org": 1234
1010
+ },
1011
+ "body": "{\n \"conversationId\": \"a1427b34-7709-11ef-837e-06f1e0835fb3\",\n \"memKey\": \"birthday\",\n}"
1012
+ },
1013
+ "response": {
1014
+ "headers": {
1015
+ "Content-Type": "application/json; charset=utf-8"
1016
+ },
1017
+ "status_code": 200,
1018
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"memory\":{\n \"conversationId\":\"a1427b34-7709-11ef-837e-06f1e0835fb3\",\"memKey\":\"birthday\",\"description\":\"小明的生日\",\"memValue\":\"1999-01-25\",\"mtime\":\"1999-01-25\"\n }\n }\n}"
1019
+ }
1020
+ }
1021
+ ]
1022
+ },
1023
+ {
1024
+ "contract": "llm.aiops_memory.SearchMemoryEnv",
1025
+ "name": "SearchMemoryEnv",
1026
+ "version": "1.0.0",
1027
+ "description": "查询大模型记忆的调试环境",
1028
+ "endpoint": {
1029
+ "method": "POST",
1030
+ "uri": "/api/v1/llm/aiops_service/memory/env/search"
1031
+ },
1032
+ "import": [
1033
+ "easyops/model/llm/llm_memory_env"
1034
+ ],
1035
+ "request": {
1036
+ "type": "object",
1037
+ "fields": [
1038
+ {
1039
+ "name": "limit",
1040
+ "type": "int",
1041
+ "description": "返回限制的数量"
1042
+ },
1043
+ {
1044
+ "name": "nextToken",
1045
+ "type": "string",
1046
+ "description": "上一页,或者下一页的token"
1047
+ },
1048
+ {
1049
+ "name": "query",
1050
+ "type": "string",
1051
+ "description": "查询关键字,使用字符串模糊匹配"
1052
+ }
1053
+ ]
1054
+ },
1055
+ "response": {
1056
+ "type": "object",
1057
+ "fields": [
1058
+ {
1059
+ "name": "list",
1060
+ "type": "LLMMemoryEnv[]",
1061
+ "description": "环境 列表"
1062
+ },
1063
+ {
1064
+ "name": "nextToken",
1065
+ "type": "string",
1066
+ "description": "本次调用返回的查询凭证(Token)。当该返回值为空时,表示该页为末页,不再有后续页。"
1067
+ },
1068
+ {
1069
+ "name": "previousToken",
1070
+ "type": "string",
1071
+ "description": "上一页token"
1072
+ }
1073
+ ]
1074
+ },
1075
+ "examples": [
1076
+ {
1077
+ "description": {
1078
+ "zh": "搜索大模型记忆的调试环境"
1079
+ },
1080
+ "request": {
1081
+ "method": "POST",
1082
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/env/search",
1083
+ "headers": {
1084
+ "Content-Type": "application/json",
1085
+ "user": "easyops",
1086
+ "org": 1234
1087
+ },
1088
+ "body": "{\n \"limit\": 3000,\n \"query\": \"google\"\n}"
1089
+ },
1090
+ "response": {
1091
+ "headers": {
1092
+ "Content-Type": "application/json; charset=utf-8"
1093
+ },
1094
+ "status_code": 200,
1095
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"list\": [\n {\"_row_id\": \"xxxxxxx\", \"name\": \"测试2环境\", \"remark\": \"Google搜索专用\"}\n ]\n }\n}"
1096
+ }
1097
+ }
1098
+ ]
1099
+ },
1100
+ {
1101
+ "contract": "llm.aiops_memory.UpdateMemoryEnv",
1102
+ "name": "UpdateMemoryEnv",
1103
+ "version": "1.0.0",
1104
+ "description": "更新大模型记忆的调试环境",
1105
+ "endpoint": {
1106
+ "method": "POST",
1107
+ "uri": "/api/v1/llm/aiops_service/memory/env/:_row_id/update"
1108
+ },
1109
+ "import": [
1110
+ "easyops/model/llm/llm_memory_env"
1111
+ ],
1112
+ "request": {
1113
+ "type": "object",
1114
+ "fields": [
1115
+ {
1116
+ "ref": "LLMMemoryEnv.*"
1117
+ }
1118
+ ]
1119
+ },
1120
+ "response": null,
1121
+ "examples": [
1122
+ {
1123
+ "description": {
1124
+ "zh": "更新大模型记忆的调试环境"
1125
+ },
1126
+ "request": {
1127
+ "method": "POST",
1128
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/env/5daa2e9a6d6ae/update",
1129
+ "headers": {
1130
+ "Content-Type": "application/json",
1131
+ "user": "easyops",
1132
+ "org": 1234
1133
+ },
1134
+ "body": "{\n \"name\": \"测试2环境\",\n \"remark\": \"Google搜索专用\"\n}"
1135
+ },
1136
+ "response": {
1137
+ "headers": {
1138
+ "Content-Type": "application/json; charset=utf-8"
1139
+ },
1140
+ "status_code": 200,
1141
+ "body": "{\n \"code\": 0,\n \"data\": {\n }\n}"
1142
+ }
1143
+ }
1144
+ ]
1145
+ },
1146
+ {
1147
+ "contract": "llm.aiops_memory.UpsertLlmMemoryWithConversationIdAndKey",
1148
+ "name": "UpsertLlmMemoryWithConversationIdAndKey",
1149
+ "version": "1.0.0",
1150
+ "description": "通过会话id和记忆key导入大模型记忆",
1151
+ "endpoint": {
1152
+ "method": "POST",
1153
+ "uri": "/api/v1/llm/aiops_service/memory/upsert/:conversationId"
1154
+ },
1155
+ "import": [
1156
+ "easyops/model/llm/llm_memory"
1157
+ ],
1158
+ "request": {
1159
+ "type": "object",
1160
+ "fields": [
1161
+ {
1162
+ "name": "memories",
1163
+ "type": "LLMMemory[]",
1164
+ "description": "需要更新或插入的记忆"
1165
+ },
1166
+ {
1167
+ "name": "conversationId",
1168
+ "type": "string",
1169
+ "description": "会话id"
1170
+ }
1171
+ ]
1172
+ },
1173
+ "response": null,
1174
+ "examples": [
1175
+ {
1176
+ "description": {
1177
+ "zh": "查询会话中单个记忆信息"
1178
+ },
1179
+ "request": {
1180
+ "method": "POST",
1181
+ "uri": "http://localhost:8320/api/v1/llm/aiops_service/memory/upsert/a1427b34-7709-11ef-837e-06f1e0835fb3",
1182
+ "headers": {
1183
+ "Content-Type": "application/json",
1184
+ "user": "easyops",
1185
+ "org": 1234
1186
+ },
1187
+ "body": "{\n \"memories\": [\n {\"conversationId\":\"a1427b34-7709-11ef-837e-06f1e0835fb3\",\"memKey\":\"birthday\",\"description\":\"小明的生日\",\"memValue\":\"1999-01-25\",\"mtime\":\"1999-01-25\"}\n ]\n}"
1188
+ },
1189
+ "response": {
1190
+ "headers": {
1191
+ "Content-Type": "application/json; charset=utf-8"
1192
+ },
1193
+ "status_code": 200,
1194
+ "body": "{\n \"code\": 0,\n \"data\": {\n }\n}"
1195
+ }
1196
+ }
1197
+ ]
1198
+ },
1199
+ {
1200
+ "contract": "llm.aiops_prompt.LLMDeletePrompt",
1201
+ "name": "LLMDeletePrompt",
1202
+ "version": "1.0.0",
1203
+ "description": "删除提示词",
1204
+ "endpoint": {
1205
+ "method": "POST",
1206
+ "uri": "/api/v1/llm/aiops_service/prompt/delete"
1207
+ },
1208
+ "request": {
1209
+ "type": "object",
1210
+ "fields": [
1211
+ {
1212
+ "name": "instanceId",
1213
+ "type": "string",
1214
+ "description": "instanceId"
1215
+ },
1216
+ {
1217
+ "name": "agentId",
1218
+ "type": "string",
1219
+ "description": "agent的id"
1220
+ },
1221
+ {
1222
+ "name": "key",
1223
+ "type": "string",
1224
+ "description": "对应的key"
1225
+ },
1226
+ {
1227
+ "name": "modelId",
1228
+ "type": "string",
1229
+ "description": "对应模型的id"
1230
+ }
1231
+ ]
1232
+ },
1233
+ "response": {
1234
+ "type": "object",
1235
+ "fields": [
1236
+ {
1237
+ "name": "nums",
1238
+ "type": "int",
1239
+ "description": "删除的提示词的数量"
1240
+ }
1241
+ ]
1242
+ },
1243
+ "examples": [
1244
+ {
1245
+ "description": {
1246
+ "zh": "删除提示词"
1247
+ },
1248
+ "request": {
1249
+ "method": "POST",
1250
+ "uri": "http://ip:port/api/v1/llm/aiops_service/prompt/delete",
1251
+ "headers": {
1252
+ "Content-Type": "application/json",
1253
+ "user": "user",
1254
+ "org": 1234
1255
+ },
1256
+ "body": "{\n \"instanceId\": \"618611d9dc7a1\"\n}"
1257
+ },
1258
+ "response": {
1259
+ "headers": {
1260
+ "Content-Type": "application/json; charset=utf-8"
1261
+ },
1262
+ "status_code": 200,
1263
+ "body": "{\n \"nums\": 1\n}"
1264
+ }
1265
+ }
1266
+ ]
1267
+ },
1268
+ {
1269
+ "contract": "llm.aiops_prompt.LLMGetPrompt",
1270
+ "name": "LLMGetPrompt",
1271
+ "version": "1.0.0",
1272
+ "description": "获取提示词",
1273
+ "endpoint": {
1274
+ "method": "POST",
1275
+ "uri": "/api/v1/llm/aiops_service/prompt/get"
1276
+ },
1277
+ "request": {
1278
+ "type": "object",
1279
+ "fields": [
1280
+ {
1281
+ "name": "agentId",
1282
+ "type": "string",
1283
+ "description": "agent的id"
1284
+ },
1285
+ {
1286
+ "name": "key",
1287
+ "type": "string",
1288
+ "description": "对应的key"
1289
+ },
1290
+ {
1291
+ "name": "modelId",
1292
+ "type": "string",
1293
+ "description": "对应模型的id"
1294
+ }
1295
+ ],
1296
+ "required": [
1297
+ "agentId",
1298
+ "key"
1299
+ ]
1300
+ },
1301
+ "response": {
1302
+ "type": "object",
1303
+ "fields": [
1304
+ {
1305
+ "name": "prompt",
1306
+ "type": "string",
1307
+ "description": "获取到的提示词"
1308
+ }
1309
+ ]
1310
+ },
1311
+ "examples": [
1312
+ {
1313
+ "description": {
1314
+ "zh": "获取提示词"
1315
+ },
1316
+ "request": {
1317
+ "method": "POST",
1318
+ "uri": "http://ip:port/api/v1/llm/aiops_service/prompt/get",
1319
+ "headers": {
1320
+ "Content-Type": "application/json",
1321
+ "user": "user",
1322
+ "org": 1234
1323
+ },
1324
+ "body": "{\n \"agentId\": \"agentId\",\n \"key\": \"key\",\n}"
1325
+ },
1326
+ "response": {
1327
+ "headers": {
1328
+ "Content-Type": "application/json; charset=utf-8"
1329
+ },
1330
+ "status_code": 200,
1331
+ "body": "{\n \"prompt\": \"你是xxx\"\n}"
1332
+ }
1333
+ }
1334
+ ]
1335
+ },
1336
+ {
1337
+ "contract": "llm.aiops_prompt.LLMUpsertPrompt",
1338
+ "name": "LLMUpsertPrompt",
1339
+ "version": "1.0.0",
1340
+ "description": "插入或更新提示词",
1341
+ "endpoint": {
1342
+ "method": "POST",
1343
+ "uri": "/api/v1/llm/aiops_service/prompt/upsert"
1344
+ },
1345
+ "request": {
1346
+ "type": "object",
1347
+ "fields": [
1348
+ {
1349
+ "name": "agentId",
1350
+ "type": "string",
1351
+ "description": "agent的id"
1352
+ },
1353
+ {
1354
+ "name": "key",
1355
+ "type": "string",
1356
+ "description": "对应的key"
1357
+ },
1358
+ {
1359
+ "name": "modelId",
1360
+ "type": "string",
1361
+ "description": "对应模型的id"
1362
+ },
1363
+ {
1364
+ "name": "description",
1365
+ "type": "string",
1366
+ "description": "描述"
1367
+ },
1368
+ {
1369
+ "name": "prompt",
1370
+ "type": "string",
1371
+ "description": "对应的提示词"
1372
+ }
1373
+ ],
1374
+ "required": [
1375
+ "agentId",
1376
+ "key",
1377
+ "prompt"
1378
+ ]
1379
+ },
1380
+ "response": {
1381
+ "type": "object",
1382
+ "fields": [
1383
+ {
1384
+ "name": "instanceId",
1385
+ "type": "string",
1386
+ "description": "插入或更新的实例的instanceId"
1387
+ }
1388
+ ]
1389
+ },
1390
+ "examples": [
1391
+ {
1392
+ "description": {
1393
+ "zh": "插入提示词"
1394
+ },
1395
+ "request": {
1396
+ "method": "POST",
1397
+ "uri": "http://ip:port/api/v1/llm/aiops_service/prompt/upsert",
1398
+ "headers": {
1399
+ "Content-Type": "application/json",
1400
+ "user": "user",
1401
+ "org": 1234
1402
+ },
1403
+ "body": "{\n \"agentId\": \"agentId\",\n \"key\": \"key\",\n \"prompt\": \"你是xxx\"\n}"
1404
+ },
1405
+ "response": {
1406
+ "headers": {
1407
+ "Content-Type": "application/json; charset=utf-8"
1408
+ },
1409
+ "status_code": 200,
1410
+ "body": "{\n \"instanceId\": \"618611d9dc7a1\"\n}"
1411
+ }
1412
+ }
1413
+ ]
1414
+ },
1415
+ {
1416
+ "contract": "llm.aiops_rag.AddSynonymsWords",
1417
+ "name": "AddSynonymsWords",
1418
+ "version": "1.0.0",
1419
+ "description": "增加同义词",
1420
+ "endpoint": {
1421
+ "method": "POST",
1422
+ "uri": "/api/v1/llm/aiops_rag/add_synonyms_words"
1423
+ },
1424
+ "request": {
1425
+ "type": "object",
1426
+ "fields": [
1427
+ {
1428
+ "name": "url",
1429
+ "type": "string",
1430
+ "description": "url"
1431
+ },
1432
+ {
1433
+ "name": "synonyms",
1434
+ "type": "object[]",
1435
+ "description": "同义词列表",
1436
+ "fields": [
1437
+ {
1438
+ "name": "words",
1439
+ "type": "string[]",
1440
+ "description": "同义词"
1441
+ }
1442
+ ]
1443
+ }
1444
+ ]
1445
+ },
1446
+ "response": {
1447
+ "type": "object",
1448
+ "fields": [
1449
+ {
1450
+ "name": "words",
1451
+ "type": "int",
1452
+ "description": "导入的同义词数量"
1453
+ }
1454
+ ]
1455
+ },
1456
+ "examples": [
1457
+ {
1458
+ "description": {
1459
+ "zh": "导入同义词"
1460
+ },
1461
+ "request": {
1462
+ "method": "POST",
1463
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/add_synonyms_words",
1464
+ "headers": {
1465
+ "Content-Type": "application/json",
1466
+ "user": "easyops",
1467
+ "org": 8888
1468
+ },
1469
+ "body": "{\n \"url\": \"api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/ai-center/object/abc.txt\",\n}"
1470
+ },
1471
+ "response": {
1472
+ "headers": {
1473
+ "Content-Type": "application/json; charset=utf-8"
1474
+ },
1475
+ "status_code": 200,
1476
+ "body": "{\n \"words\": 10\n}"
1477
+ }
1478
+ }
1479
+ ]
1480
+ },
1481
+ {
1482
+ "contract": "llm.aiops_rag.ImportConfluenceEmbedding",
1483
+ "name": "ImportConfluenceEmbedding",
1484
+ "version": "1.0.0",
1485
+ "description": "导入Confluence向量",
1486
+ "endpoint": {
1487
+ "method": "POST",
1488
+ "uri": "/api/v1/llm/aiops_rag/import_confluence"
1489
+ },
1490
+ "import": [
1491
+ "easyops/model/llm/llm_document"
1492
+ ],
1493
+ "request": {
1494
+ "type": "object",
1495
+ "fields": [
1496
+ {
1497
+ "name": "namespace",
1498
+ "type": "string",
1499
+ "description": "知识库id/namespace"
1500
+ },
1501
+ {
1502
+ "name": "docId",
1503
+ "type": "string",
1504
+ "description": "文档的id,非instanceId"
1505
+ },
1506
+ {
1507
+ "name": "append",
1508
+ "type": "bool",
1509
+ "description": "是否append"
1510
+ },
1511
+ {
1512
+ "name": "confluenceMeta",
1513
+ "type": "object",
1514
+ "description": "confluence配置信息",
1515
+ "fields": [
1516
+ {
1517
+ "name": "url",
1518
+ "type": "string",
1519
+ "description": "confluence终端,如:http://tapd.easyops.local"
1520
+ },
1521
+ {
1522
+ "name": "token",
1523
+ "type": "string",
1524
+ "description": "认证token"
1525
+ },
1526
+ {
1527
+ "name": "username",
1528
+ "type": "string",
1529
+ "description": "username"
1530
+ },
1531
+ {
1532
+ "name": "apiKey",
1533
+ "type": "string",
1534
+ "description": "api_key/password"
1535
+ },
1536
+ {
1537
+ "name": "spaceKey",
1538
+ "type": "string",
1539
+ "description": "confluence space key"
1540
+ },
1541
+ {
1542
+ "name": "maxPages",
1543
+ "type": "int",
1544
+ "description": "最大page条目"
1545
+ },
1546
+ {
1547
+ "name": "includeAttachments",
1548
+ "type": "bool",
1549
+ "description": "是否包含附件"
1550
+ }
1551
+ ]
1552
+ }
1553
+ ]
1554
+ },
1555
+ "response": {
1556
+ "type": "object",
1557
+ "fields": [
1558
+ {
1559
+ "name": "docs",
1560
+ "type": "LLMDocument[]",
1561
+ "description": "解析的文档内容"
1562
+ }
1563
+ ]
1564
+ },
1565
+ "examples": [
1566
+ {
1567
+ "description": {
1568
+ "zh": "导入confluence文档"
1569
+ },
1570
+ "request": {
1571
+ "method": "POST",
1572
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/import_confluence",
1573
+ "headers": {
1574
+ "Content-Type": "application/json",
1575
+ "user": "easyops",
1576
+ "org": 8888
1577
+ },
1578
+ "body": "{\n \"namespace\": \"fal_knowledge\",\n \"docId\": \"doc1\",\n \"confluence_meta\": {\n \"url\": \"http://tapd.easyops.local\",\n \"username\": \"monitor\",\n \"apiKey\": \"password\",\n \"spaceKey\": \"platform\",\n \"maxPages\": 10,\n \"includeAttachments\": true\n }\n}"
1579
+ },
1580
+ "response": {
1581
+ "headers": {
1582
+ "Content-Type": "application/json; charset=utf-8"
1583
+ },
1584
+ "status_code": 200,
1585
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"id\":\"id1\", \"len\": 10},\n {\"id\":\"id2\", \"len\": 11},\n ]\n }\n}"
1586
+ }
1587
+ }
1588
+ ]
1589
+ },
1590
+ {
1591
+ "contract": "llm.aiops_rag.ImportURLEmbedding",
1592
+ "name": "ImportURLEmbedding",
1593
+ "version": "1.0.0",
1594
+ "description": "向向量数据库中导入知识库文档",
1595
+ "endpoint": {
1596
+ "method": "POST",
1597
+ "uri": "/api/v1/llm/aiops_rag/import_url"
1598
+ },
1599
+ "import": [
1600
+ "easyops/model/llm/llm_document"
1601
+ ],
1602
+ "request": {
1603
+ "type": "object",
1604
+ "fields": [
1605
+ {
1606
+ "name": "namespace",
1607
+ "type": "string",
1608
+ "description": "知识库id,同search中的命名空间"
1609
+ },
1610
+ {
1611
+ "name": "docId",
1612
+ "type": "string",
1613
+ "description": "文档id"
1614
+ },
1615
+ {
1616
+ "name": "url",
1617
+ "type": "string",
1618
+ "description": "文档链接"
1619
+ },
1620
+ {
1621
+ "name": "openapiUrl",
1622
+ "type": "string",
1623
+ "description": "优先使用openapiUrl,上面的url目前不生效"
1624
+ },
1625
+ {
1626
+ "name": "docType",
1627
+ "type": "string",
1628
+ "description": "文档类型,为file或者url"
1629
+ },
1630
+ {
1631
+ "name": "append",
1632
+ "type": "bool",
1633
+ "description": "是否为append"
1634
+ },
1635
+ {
1636
+ "name": "contentType",
1637
+ "type": "string",
1638
+ "description": "文档内容类型,QA:问答对,document:普通文档"
1639
+ }
1640
+ ]
1641
+ },
1642
+ "response": {
1643
+ "type": "object",
1644
+ "fields": [
1645
+ {
1646
+ "name": "docs",
1647
+ "type": "LLMDocument[]",
1648
+ "description": "解析的文档内容"
1649
+ }
1650
+ ]
1651
+ },
1652
+ "examples": [
1653
+ {
1654
+ "description": {
1655
+ "zh": "向量化文档"
1656
+ },
1657
+ "request": {
1658
+ "method": "POST",
1659
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/embedding/search_doc",
1660
+ "headers": {
1661
+ "Content-Type": "application/json",
1662
+ "user": "linus",
1663
+ "org": 1234
1664
+ },
1665
+ "body": "{\n \"knowledgeId\": \"knowledge_id\",\n \"docId\": \"document_id\",\n \"append\": false,\n \"contentType\":\"document\",\n \"url\": \"http://sit.easyops.local/next/api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/ai-center/object/long_text_2024-03-15-10-21-151711596669017324400.txt\"\n}"
1666
+ },
1667
+ "response": {
1668
+ "headers": {
1669
+ "Content-Type": "application/json; charset=utf-8"
1670
+ },
1671
+ "status_code": 200,
1672
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"pageContent\":\"host:主机\"},\n {\"pageContent\":\"app:应用\"},\n ]\n }\n}"
1673
+ }
1674
+ }
1675
+ ]
1676
+ },
1677
+ {
1678
+ "contract": "llm.aiops_rag.UpsertKnowledgeDocument",
1679
+ "name": "UpsertKnowledgeDocument",
1680
+ "version": "1.0.0",
1681
+ "description": "根据knowledge instanceId导入数据到向量库",
1682
+ "endpoint": {
1683
+ "method": "POST",
1684
+ "uri": "/api/v1/llm/aiops_rag/upsert_knowledge_document"
1685
+ },
1686
+ "import": [
1687
+ "easyops/model/llm/llm_document"
1688
+ ],
1689
+ "request": {
1690
+ "type": "object",
1691
+ "fields": [
1692
+ {
1693
+ "name": "instanceId",
1694
+ "type": "string",
1695
+ "description": "knowledge instanceId"
1696
+ }
1697
+ ]
1698
+ },
1699
+ "response": {
1700
+ "type": "object",
1701
+ "fields": [
1702
+ {
1703
+ "name": "docs",
1704
+ "type": "int",
1705
+ "description": "插入或更新的文档数量"
1706
+ }
1707
+ ]
1708
+ },
1709
+ "examples": [
1710
+ {
1711
+ "description": {
1712
+ "zh": "导入向量库"
1713
+ },
1714
+ "request": {
1715
+ "method": "POST",
1716
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/upsert_knowledge_document",
1717
+ "headers": {
1718
+ "Content-Type": "application/json",
1719
+ "user": "easyops",
1720
+ "org": 8888
1721
+ },
1722
+ "body": "{\n \"instanceId\": \"abc\",\n}"
1723
+ },
1724
+ "response": {
1725
+ "headers": {
1726
+ "Content-Type": "application/json; charset=utf-8"
1727
+ },
1728
+ "status_code": 200,
1729
+ "body": "{\n \"docs\": 10\n}"
1730
+ }
1731
+ }
1732
+ ]
1733
+ },
1734
+ {
1735
+ "contract": "llm.aiops_service.LLMEmbeddingDeleteDocs",
1736
+ "name": "LLMEmbeddingDeleteDocs",
1737
+ "version": "1.0.0",
1738
+ "description": "向量数据库中删除知识库中的文档",
1739
+ "endpoint": {
1740
+ "method": "POST",
1741
+ "uri": "/api/v1/llm/aiops_service/delete_docs"
1742
+ },
1743
+ "request": {
1744
+ "type": "object",
1745
+ "fields": [
1746
+ {
1747
+ "name": "knowledgeId",
1748
+ "type": "string",
1749
+ "description": "知识库id,同search中的命名空间"
1750
+ },
1751
+ {
1752
+ "name": "deleteKnowledge",
1753
+ "type": "bool",
1754
+ "description": "是否删除整个知识库"
1755
+ },
1756
+ {
1757
+ "name": "ids",
1758
+ "type": "string[]",
1759
+ "description": "文档所包含的id列表"
1760
+ }
1761
+ ]
1762
+ },
1763
+ "response": {
1764
+ "type": "map"
1765
+ },
1766
+ "examples": [
1767
+ {
1768
+ "description": {
1769
+ "zh": "向量化文档"
1770
+ },
1771
+ "request": {
1772
+ "method": "POST",
1773
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/embedding/delete_docs",
1774
+ "headers": {
1775
+ "Content-Type": "application/json",
1776
+ "user": "linus",
1777
+ "org": 1234
1778
+ },
1779
+ "body": "{\n \"knowledgeId\": \"knowledge_id\",\n \"deleteKnowledge\": false,\n \"ids\": [\"aaa\",\"bbb\"]\n}"
1780
+ },
1781
+ "response": {
1782
+ "headers": {
1783
+ "Content-Type": "application/json; charset=utf-8"
1784
+ },
1785
+ "status_code": 200,
1786
+ "body": "{\n \"code\": 0,\n \"data\": {\n }\n}"
1787
+ }
1788
+ }
1789
+ ]
1790
+ },
1791
+ {
1792
+ "contract": "llm.aiops_service.LLMEmbeddingImportUrl",
1793
+ "name": "LLMEmbeddingImportUrl",
1794
+ "version": "1.0.0",
1795
+ "description": "向向量数据库中导入知识库文档",
1796
+ "endpoint": {
1797
+ "method": "POST",
1798
+ "uri": "/api/v1/llm/aiops_service/import_url"
1799
+ },
1800
+ "import": [
1801
+ "easyops/model/llm/llm_document"
1802
+ ],
1803
+ "request": {
1804
+ "type": "object",
1805
+ "fields": [
1806
+ {
1807
+ "name": "knowledgeId",
1808
+ "type": "string",
1809
+ "description": "知识库id,同search中的命名空间"
1810
+ },
1811
+ {
1812
+ "name": "docId",
1813
+ "type": "string",
1814
+ "description": "文档id"
1815
+ },
1816
+ {
1817
+ "name": "url",
1818
+ "type": "string",
1819
+ "description": "文档链接"
1820
+ },
1821
+ {
1822
+ "name": "openapiUrl",
1823
+ "type": "string",
1824
+ "description": "优先使用openapiUrl,上面的url目前不生效"
1825
+ },
1826
+ {
1827
+ "name": "docType",
1828
+ "type": "string",
1829
+ "description": "文档类型,为file或者url"
1830
+ },
1831
+ {
1832
+ "name": "append",
1833
+ "type": "bool",
1834
+ "description": "是否为append"
1835
+ }
1836
+ ]
1837
+ },
1838
+ "response": {
1839
+ "type": "object",
1840
+ "fields": [
1841
+ {
1842
+ "name": "docs",
1843
+ "type": "LLMDocument[]",
1844
+ "description": "解析的文档内容"
1845
+ }
1846
+ ]
1847
+ },
1848
+ "examples": [
1849
+ {
1850
+ "description": {
1851
+ "zh": "向量化文档"
1852
+ },
1853
+ "request": {
1854
+ "method": "POST",
1855
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/embedding/search_doc",
1856
+ "headers": {
1857
+ "Content-Type": "application/json",
1858
+ "user": "linus",
1859
+ "org": 1234
1860
+ },
1861
+ "body": "{\n \"knowledgeId\": \"knowledge_id\",\n \"docId\": \"document_id\",\n \"append\": false,\n \"url\": \"http://sit.easyops.local/next/api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/ai-center/object/long_text_2024-03-15-10-21-151711596669017324400.txt\"\n}"
1862
+ },
1863
+ "response": {
1864
+ "headers": {
1865
+ "Content-Type": "application/json; charset=utf-8"
1866
+ },
1867
+ "status_code": 200,
1868
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"pageContent\":\"host:主机\"},\n {\"pageContent\":\"app:应用\"},\n ]\n }\n}"
1869
+ }
1870
+ }
1871
+ ]
1872
+ },
1873
+ {
1874
+ "contract": "llm.aiops_service.LLMEmbeddingSearch",
1875
+ "name": "LLMEmbeddingSearch",
1876
+ "version": "1.0.0",
1877
+ "description": "从向量数据库查询匹配的文档",
1878
+ "endpoint": {
1879
+ "method": "POST",
1880
+ "uri": "/api/v1/llm/aiops_service/embedding/search_doc"
1881
+ },
1882
+ "import": [
1883
+ "easyops/model/llm/llm_document"
1884
+ ],
1885
+ "request": {
1886
+ "type": "object",
1887
+ "fields": [
1888
+ {
1889
+ "name": "namespace",
1890
+ "type": "string",
1891
+ "description": "命名空间"
1892
+ },
1893
+ {
1894
+ "name": "query",
1895
+ "type": "string",
1896
+ "description": "查询的句子"
1897
+ },
1898
+ {
1899
+ "name": "filter",
1900
+ "type": "map",
1901
+ "description": "过滤条件"
1902
+ },
1903
+ {
1904
+ "name": "topk",
1905
+ "type": "int",
1906
+ "description": "返回topk条记录"
1907
+ }
1908
+ ]
1909
+ },
1910
+ "response": {
1911
+ "type": "object",
1912
+ "fields": [
1913
+ {
1914
+ "name": "matchedDocs",
1915
+ "type": "LLMDocument[]",
1916
+ "description": "相似查询结果"
1917
+ }
1918
+ ]
1919
+ },
1920
+ "examples": [
1921
+ {
1922
+ "description": {
1923
+ "zh": "文档向量搜索"
1924
+ },
1925
+ "request": {
1926
+ "method": "POST",
1927
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/embedding/search_doc",
1928
+ "headers": {
1929
+ "Content-Type": "application/json",
1930
+ "user": "linus",
1931
+ "org": 1234
1932
+ },
1933
+ "body": "{\n \"namespace\": \"easyops_cmdb123\",\n \"query\": \"查询负责人为aaa的主机\",\n \"topk\": 2\n}"
1934
+ },
1935
+ "response": {
1936
+ "headers": {
1937
+ "Content-Type": "application/json; charset=utf-8"
1938
+ },
1939
+ "status_code": 200,
1940
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"matchedDocs\": [\n {\"pageContent\":\"host:主机\",\"metadata\":{\"id\":\"HOST\",\"name\":\"主机\"}},\n {\"pageContent\":\"app:应用\",\"metadata\":{\"id\":\"APP\",\"name\":\"应用\"}},\n ]\n }\n}"
1941
+ }
1942
+ }
1943
+ ]
1944
+ },
1945
+ {
1946
+ "contract": "llm.aiops_service.LLMExecTools",
1947
+ "name": "LLMExecTools",
1948
+ "version": "1.0.0",
1949
+ "description": "大模型执行工具",
1950
+ "endpoint": {
1951
+ "method": "POST",
1952
+ "uri": "/api/v1/llm/aiops_service/tools/exec"
1953
+ },
1954
+ "request": {
1955
+ "type": "object",
1956
+ "fields": [
1957
+ {
1958
+ "name": "toolId",
1959
+ "type": "string",
1960
+ "description": "工具id"
1961
+ },
1962
+ {
1963
+ "name": "parameters",
1964
+ "type": "map",
1965
+ "description": "输入的参数"
1966
+ },
1967
+ {
1968
+ "name": "conversationId",
1969
+ "type": "string",
1970
+ "description": "当前任务上下文的id"
1971
+ },
1972
+ {
1973
+ "name": "agentId",
1974
+ "type": "string",
1975
+ "description": "在多agent场景,指定使用哪个agent"
1976
+ },
1977
+ {
1978
+ "name": "callId",
1979
+ "type": "string",
1980
+ "description": "执行工具的过程id"
1981
+ }
1982
+ ],
1983
+ "required": [
1984
+ "toolId"
1985
+ ]
1986
+ },
1987
+ "response": {
1988
+ "type": "object",
1989
+ "fields": [
1990
+ {
1991
+ "name": "data",
1992
+ "type": "value",
1993
+ "description": "执行工具的结果"
1994
+ },
1995
+ {
1996
+ "name": "callId",
1997
+ "type": "string",
1998
+ "description": "执行工具的过程id"
1999
+ }
2000
+ ]
2001
+ },
2002
+ "examples": [
2003
+ {
2004
+ "description": {
2005
+ "zh": "执行大模型工具tools"
2006
+ },
2007
+ "request": {
2008
+ "method": "POST",
2009
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/tools/exec",
2010
+ "headers": {
2011
+ "Content-Type": "application/json",
2012
+ "user": "user",
2013
+ "org": 1234
2014
+ },
2015
+ "body": "{\n \"conversationId\": \"xxxxx\",\n \"toolId\": \"search-weather\",\n \"parameters\": {\n \"city\": \"深圳\"\n }\n}"
2016
+ },
2017
+ "response": {
2018
+ "status_code": 200,
2019
+ "body": "{\n \"data\": {\n \"xxx\":\"xxx\"\n }\n \"callId\": \"xxxx\"\n}"
2020
+ }
2021
+ }
2022
+ ]
2023
+ },
2024
+ {
2025
+ "contract": "llm.aiops_service.ExportAgents",
2026
+ "name": "ExportAgents",
2027
+ "version": "1.0.0",
2028
+ "description": "导出agent",
2029
+ "endpoint": {
2030
+ "method": "POST",
2031
+ "uri": "/api/v1/llm/aiops_service/agents/export"
2032
+ },
2033
+ "request": {
2034
+ "type": "object",
2035
+ "fields": [
2036
+ {
2037
+ "name": "agents",
2038
+ "type": "string[]",
2039
+ "description": "需要导出的agent id"
2040
+ }
2041
+ ],
2042
+ "required": [
2043
+ "agents"
2044
+ ]
2045
+ },
2046
+ "response": {
2047
+ "type": "file"
2048
+ },
2049
+ "examples": [
2050
+ {
2051
+ "description": {
2052
+ "zh": "导出agent"
2053
+ },
2054
+ "request": {
2055
+ "method": "POST",
2056
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/agents/export",
2057
+ "headers": {
2058
+ "Content-Type": "application/json",
2059
+ "user": "user",
2060
+ "org": 1234
2061
+ },
2062
+ "body": "{\n \"agents\": [\"agent1\", \"agent2\"]\n}"
2063
+ },
2064
+ "response": {
2065
+ "status_code": 200,
2066
+ "body": "二进制文件流"
2067
+ }
2068
+ }
2069
+ ]
2070
+ },
2071
+ {
2072
+ "contract": "llm.aiops_service.ExportConversation",
2073
+ "name": "ExportConversation",
2074
+ "version": "1.0.0",
2075
+ "description": "导出会话历史",
2076
+ "endpoint": {
2077
+ "method": "POST",
2078
+ "uri": "/api/v1/llm/aiops_service/conversation/export"
2079
+ },
2080
+ "request": {
2081
+ "type": "object",
2082
+ "fields": [
2083
+ {
2084
+ "name": "start_time",
2085
+ "type": "int64",
2086
+ "description": "开始时间"
2087
+ },
2088
+ {
2089
+ "name": "end_time",
2090
+ "type": "int64",
2091
+ "description": "结束时间"
2092
+ },
2093
+ {
2094
+ "name": "agent_id",
2095
+ "type": "string",
2096
+ "description": "指定智能体"
2097
+ },
2098
+ {
2099
+ "name": "robot_id",
2100
+ "type": "string",
2101
+ "description": "指定助手"
2102
+ },
2103
+ {
2104
+ "name": "is_like",
2105
+ "type": "bool",
2106
+ "description": "is_like"
2107
+ },
2108
+ {
2109
+ "name": "is_solve",
2110
+ "type": "bool",
2111
+ "description": "is_solve"
2112
+ },
2113
+ {
2114
+ "name": "user_name",
2115
+ "type": "string",
2116
+ "description": "按用户搜索"
2117
+ }
2118
+ ],
2119
+ "required": [
2120
+ "start_time",
2121
+ "end_time"
2122
+ ]
2123
+ },
2124
+ "response": {
2125
+ "type": "file"
2126
+ },
2127
+ "examples": [
2128
+ {
2129
+ "description": {
2130
+ "zh": "导出会话历史"
2131
+ },
2132
+ "request": {
2133
+ "method": "POST",
2134
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/conversation/export",
2135
+ "headers": {
2136
+ "Content-Type": "application/json",
2137
+ "user": "user",
2138
+ "org": 1234
2139
+ },
2140
+ "body": "{\n \"start_time\": 1725941620274,\n \"end_time\": 1725941627274\n}"
2141
+ },
2142
+ "response": {
2143
+ "status_code": 200,
2144
+ "body": "二进制文件流"
2145
+ }
2146
+ }
2147
+ ]
2148
+ },
2149
+ {
2150
+ "contract": "llm.aiops_service.ExportRobots",
2151
+ "name": "ExportRobots",
2152
+ "version": "1.0.0",
2153
+ "description": "导出robots",
2154
+ "endpoint": {
2155
+ "method": "POST",
2156
+ "uri": "/api/v1/llm/aiops_service/robots/export"
2157
+ },
2158
+ "request": {
2159
+ "type": "object",
2160
+ "fields": [
2161
+ {
2162
+ "name": "robots",
2163
+ "type": "string[]",
2164
+ "description": "需要导出的robot id"
2165
+ }
2166
+ ],
2167
+ "required": [
2168
+ "robots"
2169
+ ]
2170
+ },
2171
+ "response": {
2172
+ "type": "file"
2173
+ },
2174
+ "examples": [
2175
+ {
2176
+ "description": {
2177
+ "zh": "导出robots"
2178
+ },
2179
+ "request": {
2180
+ "method": "POST",
2181
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/robots/export",
2182
+ "headers": {
2183
+ "Content-Type": "application/json",
2184
+ "user": "user",
2185
+ "org": 1234
2186
+ },
2187
+ "body": "{\n \"robots\": [\"robot1\", \"robot2\"]\n}"
2188
+ },
2189
+ "response": {
2190
+ "status_code": 200,
2191
+ "body": "二进制文件流"
2192
+ }
2193
+ }
2194
+ ]
2195
+ },
2196
+ {
2197
+ "contract": "llm.aiops_service.ExportTools",
2198
+ "name": "ExportTools",
2199
+ "version": "1.0.0",
2200
+ "description": "导出工具",
2201
+ "endpoint": {
2202
+ "method": "POST",
2203
+ "uri": "/api/v1/llm/aiops_service/tools/export"
2204
+ },
2205
+ "request": {
2206
+ "type": "object",
2207
+ "fields": [
2208
+ {
2209
+ "name": "tools",
2210
+ "type": "string[]",
2211
+ "description": "需要导出的tool id"
2212
+ }
2213
+ ],
2214
+ "required": [
2215
+ "tools"
2216
+ ]
2217
+ },
2218
+ "response": {
2219
+ "type": "file"
2220
+ },
2221
+ "examples": [
2222
+ {
2223
+ "description": {
2224
+ "zh": "导出工具"
2225
+ },
2226
+ "request": {
2227
+ "method": "POST",
2228
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/tools/export",
2229
+ "headers": {
2230
+ "Content-Type": "application/json",
2231
+ "user": "user",
2232
+ "org": 1234
2233
+ },
2234
+ "body": "{\n \"tools\": [\"tool1\", \"tool2\"]\n}"
2235
+ },
2236
+ "response": {
2237
+ "status_code": 200,
2238
+ "body": "二进制文件流"
2239
+ }
2240
+ }
2241
+ ]
2242
+ },
2243
+ {
2244
+ "contract": "llm.aiops_service.ImportAgents",
2245
+ "name": "ImportAgents",
2246
+ "version": "1.0.0",
2247
+ "description": "导入agent",
2248
+ "endpoint": {
2249
+ "method": "POST",
2250
+ "uri": "/api/v1/llm/aiops_service/agents/import"
2251
+ },
2252
+ "request": {
2253
+ "type": "object",
2254
+ "fields": [
2255
+ {
2256
+ "name": "agents",
2257
+ "type": "file",
2258
+ "description": "需要导入的文件"
2259
+ },
2260
+ {
2261
+ "name": "update",
2262
+ "type": "bool",
2263
+ "description": "是否覆盖原来的"
2264
+ }
2265
+ ],
2266
+ "required": [
2267
+ "agents"
2268
+ ]
2269
+ },
2270
+ "response": {
2271
+ "type": "object",
2272
+ "fields": [
2273
+ {
2274
+ "name": "agents",
2275
+ "type": "int",
2276
+ "description": "导入成功的agent数量"
2277
+ }
2278
+ ]
2279
+ },
2280
+ "examples": [
2281
+ {
2282
+ "description": {
2283
+ "zh": "导入agent"
2284
+ },
2285
+ "request": {
2286
+ "method": "POST",
2287
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/agents/import",
2288
+ "headers": {
2289
+ "Content-Type": "multipart/form-data",
2290
+ "user": "user",
2291
+ "org": 1234
2292
+ },
2293
+ "body": "\"file\": 导入文件流"
2294
+ },
2295
+ "response": {
2296
+ "status_code": 200,
2297
+ "body": "{\n \"agents\": 1\n}"
2298
+ }
2299
+ }
2300
+ ]
2301
+ },
2302
+ {
2303
+ "contract": "llm.aiops_service.ImportConfluenceEmbedding",
2304
+ "name": "ImportConfluenceEmbedding",
2305
+ "version": "1.0.0",
2306
+ "description": "导入Confluence向量",
2307
+ "endpoint": {
2308
+ "method": "POST",
2309
+ "uri": "/api/v1/llm/aiops_service/import_confluence"
2310
+ },
2311
+ "import": [
2312
+ "easyops/model/llm/llm_document"
2313
+ ],
2314
+ "request": {
2315
+ "type": "object",
2316
+ "fields": [
2317
+ {
2318
+ "name": "namespace",
2319
+ "type": "string",
2320
+ "description": "知识库id/namespace"
2321
+ },
2322
+ {
2323
+ "name": "doc_id",
2324
+ "type": "string",
2325
+ "description": "文档的id,非instanceId"
2326
+ },
2327
+ {
2328
+ "name": "append",
2329
+ "type": "bool",
2330
+ "description": "是否append"
2331
+ },
2332
+ {
2333
+ "name": "confluence_meta",
2334
+ "type": "object",
2335
+ "description": "confluence配置信息",
2336
+ "fields": [
2337
+ {
2338
+ "name": "url",
2339
+ "type": "string",
2340
+ "description": "confluence终端,如:http://tapd.easyops.local"
2341
+ },
2342
+ {
2343
+ "name": "token",
2344
+ "type": "string",
2345
+ "description": "认证token"
2346
+ },
2347
+ {
2348
+ "name": "username",
2349
+ "type": "string",
2350
+ "description": "username"
2351
+ },
2352
+ {
2353
+ "name": "api_key",
2354
+ "type": "string",
2355
+ "description": "api_key/password"
2356
+ },
2357
+ {
2358
+ "name": "space_key",
2359
+ "type": "string",
2360
+ "description": "confluence space key"
2361
+ },
2362
+ {
2363
+ "name": "max_pages",
2364
+ "type": "int",
2365
+ "description": "最大page条目"
2366
+ },
2367
+ {
2368
+ "name": "include_attachments",
2369
+ "type": "bool",
2370
+ "description": "是否包含附件"
2371
+ }
2372
+ ]
2373
+ }
2374
+ ]
2375
+ },
2376
+ "response": {
2377
+ "type": "object",
2378
+ "fields": [
2379
+ {
2380
+ "name": "docs",
2381
+ "type": "LLMDocument[]",
2382
+ "description": "解析的文档内容"
2383
+ }
2384
+ ]
2385
+ },
2386
+ "examples": [
2387
+ {
2388
+ "description": {
2389
+ "zh": "导入confluence文档"
2390
+ },
2391
+ "request": {
2392
+ "method": "POST",
2393
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/import_confluence",
2394
+ "headers": {
2395
+ "Content-Type": "application/json",
2396
+ "user": "easyops",
2397
+ "org": 8888
2398
+ },
2399
+ "body": "{\n \"namespace\": \"fal_knowledge\",\n \"doc_id\": \"doc1\",\n \"confluence_meta\": {\n \"url\": \"http://tapd.easyops.local\",\n \"username\": \"monitor\",\n \"api_key\": \"password\",\n \"space_key\": \"platform\",\n \"max_pages\": 10,\n \"include_attachments\": true\n }\n}"
2400
+ },
2401
+ "response": {
2402
+ "headers": {
2403
+ "Content-Type": "application/json; charset=utf-8"
2404
+ },
2405
+ "status_code": 200,
2406
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"id\":\"id1\", \"len\": 10},\n {\"id\":\"id2\", \"len\": 11},\n ]\n }\n}"
2407
+ }
2408
+ }
2409
+ ]
2410
+ },
2411
+ {
2412
+ "contract": "llm.aiops_service.ImportDocumentEmbedding",
2413
+ "name": "ImportDocumentEmbedding",
2414
+ "version": "1.0.2",
2415
+ "description": "导入document",
2416
+ "endpoint": {
2417
+ "method": "POST",
2418
+ "uri": "/api/v1/llm/aiops_service/import_doc"
2419
+ },
2420
+ "import": [
2421
+ "easyops/model/llm/llm_document"
2422
+ ],
2423
+ "request": {
2424
+ "type": "object",
2425
+ "fields": [
2426
+ {
2427
+ "name": "namespace",
2428
+ "type": "string",
2429
+ "description": "导入的namespace"
2430
+ },
2431
+ {
2432
+ "name": "doc_id",
2433
+ "type": "string",
2434
+ "description": "doc id"
2435
+ },
2436
+ {
2437
+ "name": "docList",
2438
+ "type": "object[]",
2439
+ "description": "导入的document",
2440
+ "fields": [
2441
+ {
2442
+ "name": "page_content",
2443
+ "type": "string",
2444
+ "description": "内容"
2445
+ },
2446
+ {
2447
+ "name": "metadata",
2448
+ "type": "map",
2449
+ "description": "metadata"
2450
+ }
2451
+ ]
2452
+ },
2453
+ {
2454
+ "name": "append",
2455
+ "type": "bool",
2456
+ "description": "是否append"
2457
+ }
2458
+ ]
2459
+ },
2460
+ "response": {
2461
+ "type": "object",
2462
+ "fields": [
2463
+ {
2464
+ "name": "docs",
2465
+ "type": "LLMDocument[]",
2466
+ "description": "解析的文档内容"
2467
+ }
2468
+ ]
2469
+ },
2470
+ "examples": [
2471
+ {
2472
+ "description": {
2473
+ "zh": "直接导入document"
2474
+ },
2475
+ "request": {
2476
+ "method": "POST",
2477
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/import_doc",
2478
+ "headers": {
2479
+ "Content-Type": "application/json",
2480
+ "user": "easyops",
2481
+ "org": 8888
2482
+ },
2483
+ "body": "{\n \"namespace\": \"fal_knowledge\",\n \"doc_id\": \"doc1\",\n “docList”: [\n {\"page_content\":\"1\", metadata:{}}\n ]\n}"
2484
+ },
2485
+ "response": {
2486
+ "headers": {
2487
+ "Content-Type": "application/json; charset=utf-8"
2488
+ },
2489
+ "status_code": 200,
2490
+ "body": "{\n \"code\": 0,\n \"data\": {\n \"docs\": [\n {\"id\":\"id1\", \"len\": 10},\n {\"id\":\"id2\", \"len\": 11},\n ]\n }\n}"
2491
+ }
2492
+ }
2493
+ ]
2494
+ },
2495
+ {
2496
+ "contract": "llm.aiops_service.ImportRobots",
2497
+ "name": "ImportRobots",
2498
+ "version": "1.0.0",
2499
+ "description": "导入robots",
2500
+ "endpoint": {
2501
+ "method": "POST",
2502
+ "uri": "/api/v1/llm/aiops_service/robots/import"
2503
+ },
2504
+ "request": {
2505
+ "type": "object",
2506
+ "fields": [
2507
+ {
2508
+ "name": "robots",
2509
+ "type": "file",
2510
+ "description": "需要导入的文件"
2511
+ },
2512
+ {
2513
+ "name": "update",
2514
+ "type": "bool",
2515
+ "description": "是否覆盖原来的"
2516
+ }
2517
+ ],
2518
+ "required": [
2519
+ "robots"
2520
+ ]
2521
+ },
2522
+ "response": {
2523
+ "type": "object",
2524
+ "fields": [
2525
+ {
2526
+ "name": "robots",
2527
+ "type": "int",
2528
+ "description": "导入成功的robot数量"
2529
+ }
2530
+ ]
2531
+ },
2532
+ "examples": [
2533
+ {
2534
+ "description": {
2535
+ "zh": "导入robot"
2536
+ },
2537
+ "request": {
2538
+ "method": "POST",
2539
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/robots/import",
2540
+ "headers": {
2541
+ "Content-Type": "multipart/form-data",
2542
+ "user": "user",
2543
+ "org": 1234
2544
+ },
2545
+ "body": "\"robots\": 导入文件流 \"update\": true"
2546
+ },
2547
+ "response": {
2548
+ "status_code": 200,
2549
+ "body": "{\n \"robots\": 1\n}"
2550
+ }
2551
+ }
2552
+ ]
2553
+ },
2554
+ {
2555
+ "contract": "llm.aiops_service.ImportTools",
2556
+ "name": "ImportTools",
2557
+ "version": "1.0.0",
2558
+ "description": "导入tools",
2559
+ "endpoint": {
2560
+ "method": "POST",
2561
+ "uri": "/api/v1/llm/aiops_service/tools/import"
2562
+ },
2563
+ "request": {
2564
+ "type": "object",
2565
+ "fields": [
2566
+ {
2567
+ "name": "tools",
2568
+ "type": "file",
2569
+ "description": "需要导入的文件"
2570
+ },
2571
+ {
2572
+ "name": "update",
2573
+ "type": "bool",
2574
+ "description": "是否覆盖原来的"
2575
+ }
2576
+ ],
2577
+ "required": [
2578
+ "tools"
2579
+ ]
2580
+ },
2581
+ "response": {
2582
+ "type": "object",
2583
+ "fields": [
2584
+ {
2585
+ "name": "tools",
2586
+ "type": "int",
2587
+ "description": "导入成功的agent数量"
2588
+ }
2589
+ ]
2590
+ },
2591
+ "examples": [
2592
+ {
2593
+ "description": {
2594
+ "zh": "导入tools"
2595
+ },
2596
+ "request": {
2597
+ "method": "POST",
2598
+ "uri": "http://localhost:port/api/v1/llm/aiops_service/tools/import",
2599
+ "headers": {
2600
+ "Content-Type": "multipart/form-data",
2601
+ "user": "user",
2602
+ "org": 1234
2603
+ },
2604
+ "body": "\"tools\": 导入文件流 \"update\": true"
2605
+ },
2606
+ "response": {
2607
+ "status_code": 200,
2608
+ "body": "{\n \"tools\": 1\n}"
2609
+ }
2610
+ }
2611
+ ]
2612
+ },
2613
+ {
2614
+ "contract": "llm.aiops_service.LLMAgentChat",
2615
+ "name": "LLMAgentChat",
2616
+ "version": "1.2.0",
2617
+ "description": "大模型agent对话,不会记录会话历史",
2618
+ "endpoint": {
2619
+ "method": "POST",
2620
+ "uri": "/api/v1/llm/aiops_service/agent/chat"
2621
+ },
2622
+ "import": [
2623
+ "easyops/model/aiops_service/llm_chat_message",
2624
+ "easyops/model/aiops_service/llm_chat_agent_task_response"
2625
+ ],
2626
+ "request": {
2627
+ "type": "object",
2628
+ "fields": [
2629
+ {
2630
+ "name": "inputTemplate",
2631
+ "type": "string",
2632
+ "description": "任务需求, 支持模板引擎"
2633
+ },
2634
+ {
2635
+ "name": "inputVariables",
2636
+ "type": "map",
2637
+ "description": "模板所需要的数据"
2638
+ },
2639
+ {
2640
+ "name": "systemTemplate",
2641
+ "type": "string",
2642
+ "description": "system角色的提示词模板"
2643
+ },
2644
+ {
2645
+ "name": "systemVariables",
2646
+ "type": "map",
2647
+ "description": "system模板所需要的数据"
2648
+ },
2649
+ {
2650
+ "name": "config",
2651
+ "type": "map",
2652
+ "description": "任务配置"
2653
+ },
2654
+ {
2655
+ "name": "conversationId",
2656
+ "type": "string",
2657
+ "description": "当前任务上下文的id"
2658
+ },
2659
+ {
2660
+ "name": "agentId",
2661
+ "type": "string",
2662
+ "description": "在多agent场景,指定使用哪个agent"
2663
+ },
2664
+ {
2665
+ "name": "taskId",
2666
+ "type": "string",
2667
+ "description": "当前任务Id"
2668
+ },
2669
+ {
2670
+ "name": "formData",
2671
+ "type": "value",
2672
+ "description": "已经提取的表单数据"
2673
+ },
2674
+ {
2675
+ "name": "outputType",
2676
+ "type": "string",
2677
+ "description": "输出格式,默认json"
2678
+ },
2679
+ {
2680
+ "name": "stream",
2681
+ "type": "bool",
2682
+ "description": "是否流式返回"
2683
+ },
2684
+ {
2685
+ "name": "historyMessages",
2686
+ "type": "LLMChatMessage[]",
2687
+ "description": "历史会话消息,适用支持多轮会话的agent"
2688
+ },
2689
+ {
2690
+ "name": "images",
2691
+ "type": "string[]",
2692
+ "description": "图片的url,支持多个图片"
2693
+ }
2694
+ ]
2695
+ },
2696
+ "response": {
2697
+ "type": "object",
2698
+ "description": "接口返回,有两种格式,流式返回为delta, 非流式返回为message\n",
2699
+ "fields": [
2700
+ {
2701
+ "name": "data",
2702
+ "type": "value",
2703
+ "description": "提取返回的数据"
2704
+ },
2705
+ {
2706
+ "name": "debug_resp",
2707
+ "type": "string",
2708
+ "description": "调试时大模型返回值"
2709
+ },
2710
+ {
2711
+ "name": "errorOutput",
2712
+ "type": "string",
2713
+ "description": "如果解析不到正确的数据格式,则将大模型返回的数据塞到这里"
2714
+ },
2715
+ {
2716
+ "ref": "LlmChatAgentTaskResponse.*"
2717
+ }
2718
+ ]
2719
+ },
2720
+ "examples": [
2721
+ {
2722
+ "description": {
2723
+ "zh": "大模型聊天接口"
2724
+ },
2725
+ "request": {
2726
+ "method": "POST",
2727
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/agent/chat",
2728
+ "headers": {
2729
+ "Content-Type": "application/json",
2730
+ "user": "linus",
2731
+ "org": 1234
2732
+ },
2733
+ "body": "{\n \"inputTemplate\": \"你好啊\",\n \"agentId\": \"general-helper\"\n}"
2734
+ },
2735
+ "response": {
2736
+ "headers": {
2737
+ "Content-Type": "application/json; charset=utf-8"
2738
+ },
2739
+ "status_code": 200,
2740
+ "body": "{\n \"created\": 1703487403,\n \"type\": \"TEXT\",\n \"taskId\": \"8239375684858666781\",\n \"message\": {\n \"role\":\"assistant\",\n \"content\":\"有什么可以帮到你\"\n }\n}"
2741
+ }
2742
+ },
2743
+ {
2744
+ "description": {
2745
+ "zh": "调用智谱glm-4模型,流式返回"
2746
+ },
2747
+ "request": {
2748
+ "method": "POST",
2749
+ "uri": "http://ip:port/api/v1/llm/aiops_service/chat_service",
2750
+ "headers": {
2751
+ "Content-Type": "application/json",
2752
+ "Org": 8888,
2753
+ "User": "easyops"
2754
+ },
2755
+ "body": "{\n \"inputTemplate\": \"你好啊\",\n \"agentId\": \"general-helper\",\n \"stream\": true\n}"
2756
+ },
2757
+ "response": {
2758
+ "headers": {
2759
+ "Content-Type": "text/event-stream"
2760
+ },
2761
+ "body": "data: {\"created\":1703487403,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"有什么可以\"}}\\n\\n data: {\"created\":1703487404,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"帮到你\"}}\\n\\n data: [DONE]"
2762
+ }
2763
+ }
2764
+ ]
2765
+ },
2766
+ {
2767
+ "contract": "llm.aiops_service.LLMChatSelectAgent",
2768
+ "name": "LLMChatSelectAgent",
2769
+ "version": "1.1.0",
2770
+ "description": "大模型选择处理的agent",
2771
+ "endpoint": {
2772
+ "method": "POST",
2773
+ "uri": "/api/v1/llm/aiops_service/agent/select"
2774
+ },
2775
+ "import": [
2776
+ "easyops/model/aiops_service/llm_chat_select_agent_request",
2777
+ "easyops/model/aiops_service/llm_chat_select_agent_response"
2778
+ ],
2779
+ "request": {
2780
+ "type": "object",
2781
+ "fields": [
2782
+ {
2783
+ "ref": "LlmChatSelectAgentRequest.*"
2784
+ }
2785
+ ]
2786
+ },
2787
+ "response": {
2788
+ "type": "object",
2789
+ "description": "接口返回选择agent的结果,有breakMsg时,需要中断",
2790
+ "fields": [
2791
+ {
2792
+ "ref": "LlmChatSelectAgentResponse.*"
2793
+ }
2794
+ ]
2795
+ },
2796
+ "examples": [
2797
+ {
2798
+ "description": {
2799
+ "zh": "大模型代理聊天接口,选择agent"
2800
+ },
2801
+ "request": {
2802
+ "method": "POST",
2803
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/chat/completions",
2804
+ "headers": {
2805
+ "Content-Type": "application/json",
2806
+ "user": "linus",
2807
+ "org": 1234
2808
+ },
2809
+ "body": "{\n \"input\": \"你好啊\"\n}"
2810
+ },
2811
+ "response": {
2812
+ "headers": {
2813
+ "Content-Type": "application/json; charset=utf-8"
2814
+ },
2815
+ "status_code": 200,
2816
+ "body": "{\n \"created\": 1703487403000,\n \"conversationId\": \"adfa7fde-3773-4d43-a6ba-bedf04d4c2fe\",\n \"agentId\":\"no_agent\"\n}"
2817
+ }
2818
+ }
2819
+ ]
2820
+ },
2821
+ {
2822
+ "contract": "llm.aiops_service.LLMChatService",
2823
+ "name": "LLMChatService",
2824
+ "version": "1.0.0",
2825
+ "description": "大模型聊天接口",
2826
+ "endpoint": {
2827
+ "method": "POST",
2828
+ "uri": "/api/v1/llm/aiops_service/chat_service"
2829
+ },
2830
+ "import": [
2831
+ "easyops/model/aiops_service/llm_chat_request",
2832
+ "easyops/model/aiops_service/llm_chat_response"
2833
+ ],
2834
+ "request": {
2835
+ "type": "object",
2836
+ "fields": [
2837
+ {
2838
+ "ref": "LLMChatRequest.*"
2839
+ }
2840
+ ],
2841
+ "default": {
2842
+ "LLMChatResponse.temperature": 0.1,
2843
+ "LLMChatResponse.stream": false
2844
+ }
2845
+ },
2846
+ "response": {
2847
+ "type": "object",
2848
+ "description": "接口返回,有两种格式,流式返回为sseDataList:[{\"role\":\"assistant\",\"content\":\"abc\"}],非流式返回为LLMChatResponse",
2849
+ "fields": [
2850
+ {
2851
+ "ref": "LLMChatResponse.*"
2852
+ },
2853
+ {
2854
+ "name": "sseDataList",
2855
+ "type": "value[]",
2856
+ "description": "流式数据列表"
2857
+ }
2858
+ ]
2859
+ },
2860
+ "examples": [
2861
+ {
2862
+ "description": {
2863
+ "zh": "大模型聊天接口"
2864
+ },
2865
+ "request": {
2866
+ "method": "POST",
2867
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/chat_service",
2868
+ "headers": {
2869
+ "Content-Type": "application/json",
2870
+ "user": "linus",
2871
+ "org": 1234
2872
+ },
2873
+ "body": "{\n \"model\": \"glm-4\",\n \"messages\": [\n {\"role\": \"user\", \"content\": \"作为一名营销专家,请为我的产品创作一个吸引人的slogan\"},\n {\"role\": \"assistant\", \"content\": \"当然,为了创作一个吸引人的slogan,请告诉我一些关于您产品的信息\"},\n {\"role\": \"user\", \"content\": \"智谱AI开放平台\"},\n {\"role\": \"assistant\", \"content\": \"智启未来,谱绘无限一智谱AI,让创新触手可及!\"},\n {\"role\": \"user\", \"content\": \"创造一个更精准、吸引人的slogan\"}\n ]\n}"
2874
+ },
2875
+ "response": {
2876
+ "headers": {
2877
+ "Content-Type": "application/json; charset=utf-8"
2878
+ },
2879
+ "status_code": 200,
2880
+ "body": "{\n \"created\": 1703487403,\n \"id\": \"8239375684858666781\",\n \"model\": \"glm-4\",\n \"request_id\": \"8239375684858666781\",\n \"choices\": [\n {\n \"finish_reason\": \"stop\",\n \"index\": 0,\n \"message\": {\n \"content\": \"智绘蓝图,AI驱动 —— 智谱AI,让每一刻创新成为可能。\",\n \"role\": \"assistant\"\n }\n }\n ],\n \"usage\": {\n \"completion_tokens\": 217,\n \"prompt_tokens\": 31,\n \"total_tokens\": 248\n }\n}"
2881
+ }
2882
+ },
2883
+ {
2884
+ "description": {
2885
+ "zh": "调用智谱glm-4模型,流式返回"
2886
+ },
2887
+ "request": {
2888
+ "method": "POST",
2889
+ "uri": "http://ip:port/api/v1/llm/aiops_service/chat_service",
2890
+ "headers": {
2891
+ "Content-Type": "application/json",
2892
+ "Org": 8888,
2893
+ "User": "easyops"
2894
+ },
2895
+ "body": "{\n \"message\": [\n {\"role\": \"user\", \"content\": \"1+1等于多少\"}\n ],\n \"stream\": true,\n \"model\": \"glm-4\"\n}"
2896
+ },
2897
+ "response": {
2898
+ "headers": {
2899
+ "Content-Type": "text/event-stream"
2900
+ },
2901
+ "body": "data:{\"role\":\"assistant\", \"content\":\"等于\"}\\n\\n data:{\"role\":\"assistant\", \"content\":\"2\"}\\n\\n"
2902
+ }
2903
+ }
2904
+ ]
2905
+ },
2906
+ {
2907
+ "contract": "llm.aiops_service.LLMCreateConversation",
2908
+ "name": "LLMCreateConversation",
2909
+ "version": "1.0.0",
2910
+ "description": "大模型新建会话",
2911
+ "endpoint": {
2912
+ "method": "POST",
2913
+ "uri": "/api/v1/llm/aiops_service/conversation/create"
2914
+ },
2915
+ "request": {
2916
+ "type": "object",
2917
+ "fields": [
2918
+ {
2919
+ "name": "sessionId",
2920
+ "type": "string",
2921
+ "description": "sessionId"
2922
+ },
2923
+ {
2924
+ "name": "conversationTitle",
2925
+ "type": "string",
2926
+ "description": "会话标题"
2927
+ },
2928
+ {
2929
+ "name": "robotId",
2930
+ "type": "string",
2931
+ "description": "助手id"
2932
+ }
2933
+ ]
2934
+ },
2935
+ "response": {
2936
+ "type": "object",
2937
+ "fields": [
2938
+ {
2939
+ "name": "conversationId",
2940
+ "type": "string",
2941
+ "description": "会话ID"
2942
+ }
2943
+ ]
2944
+ },
2945
+ "examples": [
2946
+ {
2947
+ "description": {
2948
+ "zh": "大模型新建会话"
2949
+ },
2950
+ "request": {
2951
+ "method": "POST",
2952
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/conversation/create",
2953
+ "headers": {
2954
+ "Content-Type": "application/json",
2955
+ "user": "linus",
2956
+ "org": 1234
2957
+ },
2958
+ "body": "{\n \"conversationTitle\": \"你好啊\",\n \"sessionId\": \"xxxx\"\n}"
2959
+ },
2960
+ "response": {
2961
+ "headers": {
2962
+ "Content-Type": "application/json; charset=utf-8"
2963
+ },
2964
+ "status_code": 200,
2965
+ "body": "{\n \"conversationId\": \"adfa7fde-3773-4d43-a6ba-bedf04d4c2fe\",\n}"
2966
+ }
2967
+ }
2968
+ ]
2969
+ },
2970
+ {
2971
+ "contract": "llm.aiops_service.LLMRobotChat",
2972
+ "name": "LLMRobotChat",
2973
+ "version": "1.2.0",
2974
+ "description": "大模型助手聊天",
2975
+ "endpoint": {
2976
+ "method": "POST",
2977
+ "uri": "/api/v1/llm/aiops_service/robot/chat"
2978
+ },
2979
+ "import": [
2980
+ "easyops/model/aiops_service/llm_chat_agent_task_request",
2981
+ "easyops/model/aiops_service/llm_chat_agent_task_response"
2982
+ ],
2983
+ "request": {
2984
+ "type": "LlmChatAgentTaskRequest"
2985
+ },
2986
+ "response": {
2987
+ "type": "LlmChatAgentTaskResponse",
2988
+ "description": "接口返回,有两种格式,流式返回为delta, 非流式返回为message\n"
2989
+ },
2990
+ "examples": [
2991
+ {
2992
+ "description": {
2993
+ "zh": "大模型聊天接口"
2994
+ },
2995
+ "request": {
2996
+ "method": "POST",
2997
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/chat_service",
2998
+ "headers": {
2999
+ "Content-Type": "application/json",
3000
+ "user": "linus",
3001
+ "org": 1234
3002
+ },
3003
+ "body": "{\n \"input\": \"你好啊\",\n \"robotId\": \"general-helper\"\n}"
3004
+ },
3005
+ "response": {
3006
+ "headers": {
3007
+ "Content-Type": "application/json; charset=utf-8"
3008
+ },
3009
+ "status_code": 200,
3010
+ "body": "{\n \"created\": 1703487403,\n \"type\": \"TEXT\",\n \"taskId\": \"8239375684858666781\",\n \"message\": {\n \"role\":\"assistant\",\n \"content\":\"有什么可以帮到你\"\n }\n}"
3011
+ }
3012
+ },
3013
+ {
3014
+ "description": {
3015
+ "zh": "调用智谱glm-4模型,流式返回"
3016
+ },
3017
+ "request": {
3018
+ "method": "POST",
3019
+ "uri": "http://ip:port/api/v1/llm/aiops_service/chat_service",
3020
+ "headers": {
3021
+ "Content-Type": "application/json",
3022
+ "Org": 8888,
3023
+ "User": "easyops"
3024
+ },
3025
+ "body": "{\n \"input\": \"你好啊\",\n \"robotId\": \"general-helper\",\n \"stream\": true\n}"
3026
+ },
3027
+ "response": {
3028
+ "headers": {
3029
+ "Content-Type": "text/event-stream"
3030
+ },
3031
+ "body": "data: {\"created\":1703487403,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"有什么可以\"}}\\n\\n data: {\"created\":1703487404,\"type\":\"TEXT\",\"taskId\":\"8239375684858666781\",\"delta\":{\"role\":\"assistant\",\"content\":\"帮到你\"}}\\n\\n data: [DONE]"
3032
+ }
3033
+ }
3034
+ ]
3035
+ },
3036
+ {
3037
+ "contract": "llm.aiops_service.LLMStreamChatService",
3038
+ "name": "LLMStreamChatService",
3039
+ "version": "1.0.0",
3040
+ "description": "大模型聊天流式接口",
3041
+ "endpoint": {
3042
+ "method": "POST",
3043
+ "uri": "/api/v1/llm/aiops_service/stream_chat_service"
3044
+ },
3045
+ "import": [
3046
+ "easyops/model/aiops_service/llm_chat_request"
3047
+ ],
3048
+ "request": {
3049
+ "type": "object",
3050
+ "fields": [
3051
+ {
3052
+ "ref": "LLMChatRequest.*"
3053
+ }
3054
+ ]
3055
+ },
3056
+ "response": {
3057
+ "wrapper": false,
3058
+ "type": "object",
3059
+ "fields": [
3060
+ {
3061
+ "name": "data",
3062
+ "type": "value[]",
3063
+ "description": "流式接口,返回的是一个数组。fb会做后置校验,这里最好先声明为value格式且name为data。这个返回的为:{\"role\":\"assistant\",\"content\":\"土\"}"
3064
+ }
3065
+ ]
3066
+ },
3067
+ "examples": [
3068
+ {
3069
+ "description": {
3070
+ "zh": "大模型聊天接口"
3071
+ },
3072
+ "request": {
3073
+ "method": "POST",
3074
+ "uri": "http://localhost:8095/api/v1/llm/aiops_service/chat_service",
3075
+ "headers": {
3076
+ "Content-Type": "application/json",
3077
+ "user": "linus",
3078
+ "org": 1234
3079
+ },
3080
+ "body": "{\n \"model\": \"glm-4\",\n \"messages\": [\n {\"role\": \"user\", \"content\": \"作为一名营销专家,请为我的产品创作一个吸引人的slogan\"},\n {\"role\": \"assistant\", \"content\": \"当然,为了创作一个吸引人的slogan,请告诉我一些关于您产品的信息\"},\n {\"role\": \"user\", \"content\": \"智谱AI开放平台\"},\n {\"role\": \"assistant\", \"content\": \"智启未来,谱绘无限一智谱AI,让创新触手可及!\"},\n {\"role\": \"user\", \"content\": \"创造一个更精准、吸引人的slogan\"}\n ]\n}"
3081
+ },
3082
+ "response": {
3083
+ "headers": {
3084
+ "Content-Type": "application/json; charset=utf-8"
3085
+ },
3086
+ "status_code": 200,
3087
+ "body": "[\n {\n \"content\": \"智绘蓝图,AI驱动 —— 智谱AI,让每一刻创新成为可能。\",\n \"role\": \"assistant\"\n },\n {\n \"content\": \"智绘蓝图,AI驱动 —— 智谱AI,让每一刻创新成为可能。\",\n \"role\": \"assistant\"\n }\n]"
3088
+ }
3089
+ }
3090
+ ]
3091
+ },
3092
+ {
3093
+ "contract": "llm.aiops_tools.SummaryQuestionV2",
3094
+ "name": "SummaryQuestionV2",
3095
+ "version": "1.0.0",
3096
+ "description": "根据模板与大模型对话,总结用户问题",
3097
+ "endpoint": {
3098
+ "method": "POST",
3099
+ "uri": "/api/v1/llm/tools/summary_question_v2"
3100
+ },
3101
+ "import": [
3102
+ "easyops/model/aiops_service/llm_chat_message",
3103
+ "easyops/model/aiops_service/llm_chat_agent_task_response"
3104
+ ],
3105
+ "request": {
3106
+ "fields": [
3107
+ {
3108
+ "description": "总结提示词模版引擎,为空时,使用默认模板",
3109
+ "name": "template",
3110
+ "type": "string"
3111
+ },
3112
+ {
3113
+ "description": "模板引擎的数据,默认会注入 input 变量",
3114
+ "name": "variables",
3115
+ "type": "map"
3116
+ },
3117
+ {
3118
+ "description": "大模型id",
3119
+ "name": "model",
3120
+ "type": "string"
3121
+ },
3122
+ {
3123
+ "description": "历史对话消息",
3124
+ "name": "historyMessages",
3125
+ "type": "LLMChatMessage[]"
3126
+ },
3127
+ {
3128
+ "description": "输入的问题",
3129
+ "name": "input",
3130
+ "type": "string"
3131
+ },
3132
+ {
3133
+ "description": "system角色的提示词模板",
3134
+ "name": "systemTemplate",
3135
+ "type": "string"
3136
+ },
3137
+ {
3138
+ "description": "system模板所需要的数据",
3139
+ "name": "systemVariables",
3140
+ "type": "map"
3141
+ },
3142
+ {
3143
+ "description": "输入的图片url",
3144
+ "name": "images",
3145
+ "type": "string[]"
3146
+ }
3147
+ ],
3148
+ "required": [],
3149
+ "type": "object"
3150
+ },
3151
+ "response": {
3152
+ "default": {},
3153
+ "fields": [
3154
+ {
3155
+ "description": "总结后的新问题",
3156
+ "name": "data",
3157
+ "type": "string"
3158
+ }
3159
+ ],
3160
+ "type": "object"
3161
+ },
3162
+ "examples": [
3163
+ {
3164
+ "description": {
3165
+ "zh": "根据模板与大模型对话,总结用户问题"
3166
+ },
3167
+ "request": {
3168
+ "method": "POST",
3169
+ "uri": "http://localhost:8320/api/v1/llm/tools/summary_question_v2",
3170
+ "headers": {
3171
+ "Content-Type": "application/json",
3172
+ "user": "linus",
3173
+ "org": 1234
3174
+ },
3175
+ "body": "{\n \"input\": \"你好啊\",\n \"outputType\": \"string\"\n}"
3176
+ },
3177
+ "response": {
3178
+ "headers": {
3179
+ "Content-Type": "application/json; charset=utf-8"
3180
+ },
3181
+ "status_code": 200,
3182
+ "body": "{\n \"data\": \"你好啊\",\n}"
3183
+ }
3184
+ }
3185
+ ]
3186
+ },
3187
+ {
3188
+ "contract": "llm.aiops_tools.TemplateLlmChatV2",
3189
+ "name": "TemplateLlmChatV2",
3190
+ "version": "1.0.0",
3191
+ "description": "根据模板与大模型对话,返回json",
3192
+ "endpoint": {
3193
+ "method": "POST",
3194
+ "uri": "/api/v1/llm/tools/template_llm_chat_v2"
3195
+ },
3196
+ "import": [
3197
+ "easyops/model/aiops_service/llm_chat_message",
3198
+ "easyops/model/aiops_service/llm_chat_agent_task_response"
3199
+ ],
3200
+ "request": {
3201
+ "default": {
3202
+ "temperature": 0.1
3203
+ },
3204
+ "fields": [
3205
+ {
3206
+ "description": "模板,为空时,不使用默认引擎",
3207
+ "name": "template",
3208
+ "type": "string"
3209
+ },
3210
+ {
3211
+ "description": "模板引擎的数据",
3212
+ "name": "variables",
3213
+ "type": "map"
3214
+ },
3215
+ {
3216
+ "description": "大模型id",
3217
+ "name": "model",
3218
+ "type": "string"
3219
+ },
3220
+ {
3221
+ "description": "历史对话消息",
3222
+ "name": "historyMessages",
3223
+ "type": "LLMChatMessage[]"
3224
+ },
3225
+ {
3226
+ "description": "输入对话,模板为空时才生效",
3227
+ "name": "input",
3228
+ "type": "string"
3229
+ },
3230
+ {
3231
+ "description": "输出格式,默认json",
3232
+ "name": "outputType",
3233
+ "type": "string"
3234
+ },
3235
+ {
3236
+ "description": "取值范围是:(0.0, 1.0],不能等于 0,默认值为 0.1,值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定",
3237
+ "name": "temperature",
3238
+ "type": "float"
3239
+ },
3240
+ {
3241
+ "description": "是否是调试模式,为true时,返回debug_resp",
3242
+ "name": "debug",
3243
+ "type": "bool"
3244
+ },
3245
+ {
3246
+ "description": "是否是流式",
3247
+ "name": "stream",
3248
+ "type": "bool"
3249
+ },
3250
+ {
3251
+ "description": "system角色的提示词模板",
3252
+ "name": "systemTemplate",
3253
+ "type": "string"
3254
+ },
3255
+ {
3256
+ "description": "system模板所需要的数据",
3257
+ "name": "systemVariables",
3258
+ "type": "map"
3259
+ },
3260
+ {
3261
+ "description": "任务id",
3262
+ "name": "taskId",
3263
+ "type": "string"
3264
+ },
3265
+ {
3266
+ "description": "输入的图片url",
3267
+ "name": "images",
3268
+ "type": "string[]"
3269
+ }
3270
+ ],
3271
+ "required": [],
3272
+ "type": "object"
3273
+ },
3274
+ "response": {
3275
+ "default": {},
3276
+ "fields": [
3277
+ {
3278
+ "ref": "LlmChatAgentTaskResponse.*"
3279
+ },
3280
+ {
3281
+ "description": "提取返回的数据",
3282
+ "name": "data",
3283
+ "type": "value"
3284
+ },
3285
+ {
3286
+ "description": "调试时大模型返回值",
3287
+ "name": "debug_resp",
3288
+ "type": "string"
3289
+ },
3290
+ {
3291
+ "description": "如果解析不到正确的数据格式,则将大模型返回的数据塞到这里",
3292
+ "name": "errorOutput",
3293
+ "type": "string"
3294
+ }
3295
+ ],
3296
+ "type": "object"
3297
+ },
3298
+ "examples": [
3299
+ {
3300
+ "description": {
3301
+ "zh": "根据模板与大模型对话,返回json"
3302
+ },
3303
+ "request": {
3304
+ "method": "POST",
3305
+ "uri": "http://localhost:8320/api/v1/llm/tools/template_llm_chat_v2",
3306
+ "headers": {
3307
+ "Content-Type": "application/json",
3308
+ "user": "linus",
3309
+ "org": 1234
3310
+ },
3311
+ "body": "{\n \"input\": \"你好啊\",\n \"outputType\": \"string\"\n}"
3312
+ },
3313
+ "response": {
3314
+ "headers": {
3315
+ "Content-Type": "application/json; charset=utf-8"
3316
+ },
3317
+ "status_code": 200,
3318
+ "body": "{\n \"data\": \"有什么可以帮你\",\n}"
3319
+ }
3320
+ }
3321
+ ]
3322
+ },
3323
+ {
3324
+ "contract": "llm.virtual_builder.GenerateStoryboard",
3325
+ "name": "GenerateStoryboard",
3326
+ "version": "1.0.0",
3327
+ "description": "自动生成brick",
3328
+ "endpoint": {
3329
+ "method": "POST",
3330
+ "uri": "/api/v1/llm/virtual_builder/generate_storyboard"
3331
+ },
3332
+ "request": {
3333
+ "type": "object",
3334
+ "fields": [
3335
+ {
3336
+ "name": "userInput",
3337
+ "type": "string",
3338
+ "description": "用户输入"
3339
+ },
3340
+ {
3341
+ "name": "sessionId",
3342
+ "type": "string",
3343
+ "description": "会话id"
3344
+ }
3345
+ ],
3346
+ "required": [
3347
+ "userInput"
3348
+ ]
3349
+ },
3350
+ "response": {
3351
+ "type": "object",
3352
+ "fields": [
3353
+ {
3354
+ "name": "outputs",
3355
+ "type": "object[]",
3356
+ "description": "llm的输出",
3357
+ "fields": [
3358
+ {
3359
+ "name": "type",
3360
+ "type": "string",
3361
+ "enum": [
3362
+ "markdown",
3363
+ "storyboard"
3364
+ ],
3365
+ "description": "输出内容的类型,markdown或者storyboard"
3366
+ },
3367
+ {
3368
+ "name": "content",
3369
+ "type": "string",
3370
+ "description": "输出内容"
3371
+ }
3372
+ ]
3373
+ },
3374
+ {
3375
+ "name": "sessionId",
3376
+ "type": "string",
3377
+ "description": "会话id"
3378
+ }
3379
+ ]
3380
+ },
3381
+ "examples": [
3382
+ {
3383
+ "description": {
3384
+ "zh": "自动生成storyboard"
3385
+ },
3386
+ "request": {
3387
+ "method": "POST",
3388
+ "uri": "http://localhost:8095/api/v1/llm/virtual_builder/generate_storyboard",
3389
+ "headers": {
3390
+ "Content-Type": "application/json",
3391
+ "user": "linus",
3392
+ "org": 1234
3393
+ },
3394
+ "body": "{\n \"userInput\": \"生成一个通用按钮,圆形\",\n \"sessionId\": \"1233abc\"\n}"
3395
+ },
3396
+ "response": {
3397
+ "headers": {
3398
+ "Content-Type": "application/json; charset=utf-8"
3399
+ },
3400
+ "status_code": 200,
3401
+ "body": "{\n \"code\": 0,\n \"error\": \"\",\n \"message\": \"\",\n \"data\": {\n \"outputs\":[\n {\"type\":\"markdown\",\"content\":\"根据用户需求,生成以下storyboard\"},\n {\"type\":\"storyboard\",\"content\":\"{\\\"brick\\\":\\\"abc\\\"}\"},\n {\"type\":\"markdown\",\"content\":\"\"},\n ],\n \"sessionId\":\"12345\"\n\n }\n}"
3402
+ }
3403
+ }
3404
+ ]
3405
+ },
3406
+ {
3407
+ "contract": "llm.virtual_builder.GenerateStoryboardStream",
3408
+ "name": "GenerateStoryboardStream",
3409
+ "version": "1.0.0",
3410
+ "description": "流式自动生成brick",
3411
+ "endpoint": {
3412
+ "method": "POST",
3413
+ "uri": "/api/v1/llm/virtual_builder/generate_storyboard/stream"
3414
+ },
3415
+ "request": {
3416
+ "type": "object",
3417
+ "fields": [
3418
+ {
3419
+ "name": "userInput",
3420
+ "type": "string",
3421
+ "description": "用户输入"
3422
+ },
3423
+ {
3424
+ "name": "sessionId",
3425
+ "type": "string",
3426
+ "description": "会话id"
3427
+ }
3428
+ ],
3429
+ "required": [
3430
+ "userInput"
3431
+ ]
3432
+ },
3433
+ "response": {
3434
+ "type": "object",
3435
+ "fields": [
3436
+ {
3437
+ "name": "websocket",
3438
+ "type": "object",
3439
+ "description": "websocket消息信息",
3440
+ "fields": [
3441
+ {
3442
+ "name": "system",
3443
+ "type": "string",
3444
+ "description": "websocket消息的system"
3445
+ },
3446
+ {
3447
+ "name": "topic",
3448
+ "type": "string",
3449
+ "description": "websocket消息的topic"
3450
+ }
3451
+ ]
3452
+ },
3453
+ {
3454
+ "name": "sessionId",
3455
+ "type": "string",
3456
+ "description": "会话id"
3457
+ }
3458
+ ]
3459
+ },
3460
+ "examples": [
3461
+ {
3462
+ "description": {
3463
+ "zh": "自动生成storyboard"
3464
+ },
3465
+ "request": {
3466
+ "method": "POST",
3467
+ "uri": "http://localhost:8095/api/v1/llm/virtual_builder/generate_storyboard",
3468
+ "headers": {
3469
+ "Content-Type": "application/json",
3470
+ "user": "linus",
3471
+ "org": 1234
3472
+ },
3473
+ "body": "{\n \"userInput\": \"生成一个通用按钮,圆形\",\n \"sessionId\": \"1233abc\"\n}"
3474
+ },
3475
+ "response": {
3476
+ "headers": {
3477
+ "Content-Type": "application/json; charset=utf-8"
3478
+ },
3479
+ "status_code": 200,
3480
+ "body": "{\n \"code\": 0,\n \"error\": \"\",\n \"message\": \"\",\n \"data\": {\n \"websocket\": {\n \"system\":\"aiops\",\n \"topic\":\"aiops.visual_builder.generate_dashboard.12345\"\n },\n \"sessionId\":\"12345\"\n\n }\n}"
3481
+ }
3482
+ }
3483
+ ]
3484
+ }
3485
+ ]
3486
+ }