ai.openapi.json 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "默认模块",
  5. "description": "",
  6. "version": "1.0.0"
  7. },
  8. "servers": [
  9. {
  10. "url": "/",
  11. "description": "默认服务器"
  12. }
  13. ],
  14. "tags": [
  15. {
  16. "name": "ai-chat",
  17. "description": "ai对话相关接口"
  18. }
  19. ],
  20. "paths": {
  21. "/api/ai/chat/knowledge-chat": {
  22. "post": {
  23. "summary": "基于知识库的问答 (SSE)",
  24. "deprecated": false,
  25. "description": "",
  26. "tags": ["ai-chat"],
  27. "parameters": [
  28. {
  29. "name": "Authorization",
  30. "in": "header",
  31. "description": "",
  32. "example": "bpm_client_1513029045627916288",
  33. "schema": {
  34. "type": "string",
  35. "default": "bpm_client_1513029045627916288"
  36. }
  37. }
  38. ],
  39. "requestBody": {
  40. "content": {
  41. "application/json": {
  42. "schema": {
  43. "type": "object",
  44. "properties": {
  45. "session_id": {
  46. "type": "string"
  47. },
  48. "query": {
  49. "type": "string"
  50. },
  51. "knowledge_base_ids": {
  52. "type": "array",
  53. "items": {
  54. "type": "string"
  55. }
  56. },
  57. "knowledge_ids": {
  58. "type": "array",
  59. "items": {
  60. "type": "string"
  61. }
  62. },
  63. "summary_model_id": {
  64. "type": "string"
  65. },
  66. "disable_title": {
  67. "type": "boolean"
  68. },
  69. "enable_memory": {
  70. "type": "boolean"
  71. }
  72. },
  73. "required": [
  74. "session_id",
  75. "query",
  76. "knowledge_base_ids",
  77. "knowledge_ids",
  78. "summary_model_id",
  79. "disable_title",
  80. "enable_memory"
  81. ]
  82. },
  83. "example": {
  84. "session_id": "",
  85. "query": "你好啊",
  86. "knowledge_base_ids": [],
  87. "knowledge_ids": [],
  88. "summary_model_id": "",
  89. "disable_title": false,
  90. "enable_memory": true
  91. }
  92. }
  93. },
  94. "required": true
  95. },
  96. "responses": {
  97. "200": {
  98. "description": "",
  99. "content": {
  100. "application/json": {
  101. "schema": {
  102. "type": "object",
  103. "properties": {}
  104. }
  105. }
  106. },
  107. "headers": {}
  108. }
  109. },
  110. "security": []
  111. }
  112. },
  113. "/api/ai/chat/agent-chat": {
  114. "post": {
  115. "summary": "基于Agent的智能问答 (SSE)",
  116. "deprecated": false,
  117. "description": "",
  118. "tags": ["ai-chat"],
  119. "parameters": [
  120. {
  121. "name": "Authorization",
  122. "in": "header",
  123. "description": "",
  124. "example": "bpm_client_1513029045627916288",
  125. "schema": {
  126. "type": "string",
  127. "default": "bpm_client_1513029045627916288"
  128. }
  129. }
  130. ],
  131. "requestBody": {
  132. "content": {
  133. "application/json": {
  134. "schema": {
  135. "type": "object",
  136. "properties": {
  137. "session_id": {
  138. "type": "string"
  139. },
  140. "query": {
  141. "type": "string"
  142. },
  143. "knowledge_base_ids": {
  144. "type": "array",
  145. "items": {
  146. "type": "string"
  147. }
  148. },
  149. "knowledge_ids": {
  150. "type": "array",
  151. "items": {
  152. "type": "string"
  153. }
  154. },
  155. "agent_id": {
  156. "type": "string"
  157. },
  158. "summary_model_id": {
  159. "type": "string"
  160. },
  161. "disable_title": {
  162. "type": "boolean"
  163. },
  164. "enable_memory": {
  165. "type": "boolean"
  166. },
  167. "images": {
  168. "type": "array",
  169. "items": {
  170. "type": "string"
  171. }
  172. },
  173. "agent_enabled": {
  174. "type": "boolean"
  175. },
  176. "web_search_enabled": {
  177. "type": "boolean"
  178. }
  179. },
  180. "required": [
  181. "session_id",
  182. "query",
  183. "knowledge_base_ids",
  184. "knowledge_ids",
  185. "agent_id",
  186. "summary_model_id",
  187. "disable_title",
  188. "enable_memory",
  189. "images",
  190. "agent_enabled",
  191. "web_search_enabled"
  192. ]
  193. },
  194. "example": {
  195. "session_id": "",
  196. "query": "帮我分析一下图片中有哪些信息?",
  197. "knowledge_base_ids": [],
  198. "knowledge_ids": [],
  199. "agent_id": "builtin-smart-reasoning",
  200. "summary_model_id": "",
  201. "disable_title": false,
  202. "enable_memory": true,
  203. "images": ["f2048d34-0cee-4850-a280-70707f3d14e7"],
  204. "agent_enabled": true,
  205. "web_search_enabled": false
  206. }
  207. }
  208. },
  209. "required": true
  210. },
  211. "responses": {
  212. "200": {
  213. "description": "",
  214. "content": {
  215. "application/json": {
  216. "schema": {
  217. "type": "object",
  218. "properties": {}
  219. }
  220. }
  221. },
  222. "headers": {}
  223. }
  224. },
  225. "security": []
  226. }
  227. },
  228. "/api/ai/chat/model-chat": {
  229. "post": {
  230. "summary": "基于模型聊天 (SSE)",
  231. "deprecated": false,
  232. "description": "",
  233. "tags": ["ai-chat"],
  234. "parameters": [
  235. {
  236. "name": "Authorization",
  237. "in": "header",
  238. "description": "",
  239. "example": "bpm_client_1513029045627916288",
  240. "schema": {
  241. "type": "string",
  242. "default": "bpm_client_1513029045627916288"
  243. }
  244. }
  245. ],
  246. "requestBody": {
  247. "content": {
  248. "application/json": {
  249. "schema": {
  250. "type": "object",
  251. "properties": {
  252. "session_id": {
  253. "type": "string"
  254. },
  255. "query": {
  256. "type": "string"
  257. },
  258. "summary_model_id": {
  259. "type": "string"
  260. },
  261. "disable_title": {
  262. "type": "boolean"
  263. },
  264. "enable_memory": {
  265. "type": "boolean"
  266. }
  267. },
  268. "required": [
  269. "session_id",
  270. "query",
  271. "summary_model_id",
  272. "disable_title",
  273. "enable_memory"
  274. ]
  275. },
  276. "example": {
  277. "session_id": "",
  278. "query": "你好啊",
  279. "summary_model_id": "ea1598d8-1578-4ce3-8898-c47981e00e2a",
  280. "disable_title": false,
  281. "enable_memory": true
  282. }
  283. }
  284. },
  285. "required": true
  286. },
  287. "responses": {
  288. "200": {
  289. "description": "",
  290. "content": {
  291. "application/json": {
  292. "schema": {
  293. "type": "object",
  294. "properties": {}
  295. }
  296. }
  297. },
  298. "headers": {}
  299. }
  300. },
  301. "security": []
  302. }
  303. },
  304. "/api/ai/session/pageList": {
  305. "post": {
  306. "summary": "获取分页列表",
  307. "deprecated": false,
  308. "description": "",
  309. "tags": ["ai-chat"],
  310. "parameters": [
  311. {
  312. "name": "Authorization",
  313. "in": "header",
  314. "description": "",
  315. "example": "bpm_client_1513029045627916288",
  316. "schema": {
  317. "type": "string",
  318. "default": "bpm_client_1513029045627916288"
  319. }
  320. }
  321. ],
  322. "requestBody": {
  323. "content": {
  324. "application/json": {
  325. "schema": {
  326. "type": "object",
  327. "properties": {
  328. "pageIndex": {
  329. "type": "integer"
  330. },
  331. "pageSize": {
  332. "type": "integer"
  333. }
  334. },
  335. "required": ["pageIndex", "pageSize"]
  336. },
  337. "example": {
  338. "pageIndex": 1,
  339. "pageSize": 20
  340. }
  341. }
  342. },
  343. "required": true
  344. },
  345. "responses": {
  346. "200": {
  347. "description": "",
  348. "content": {
  349. "application/json": {
  350. "schema": {
  351. "type": "object",
  352. "properties": {
  353. "isSuccess": {
  354. "type": "boolean"
  355. },
  356. "code": {
  357. "type": "integer"
  358. },
  359. "result": {
  360. "type": "object",
  361. "properties": {
  362. "currentPage": {
  363. "type": "integer"
  364. },
  365. "hasNextPage": {
  366. "type": "boolean"
  367. },
  368. "hasPreviousPage": {
  369. "type": "boolean"
  370. },
  371. "model": {
  372. "type": "array",
  373. "items": {
  374. "type": "object",
  375. "properties": {
  376. "app": {
  377. "type": "string"
  378. },
  379. "creationTime": {
  380. "type": "string"
  381. },
  382. "entityId": {
  383. "type": "string"
  384. },
  385. "id": {
  386. "type": "string"
  387. },
  388. "isDeleted": {
  389. "type": "boolean"
  390. },
  391. "name": {
  392. "type": "string"
  393. },
  394. "sessionId": {
  395. "type": "string"
  396. },
  397. "updateTime": {
  398. "type": "string"
  399. },
  400. "userId": {
  401. "type": "string"
  402. },
  403. "creatorUserId": {
  404. "type": "string"
  405. }
  406. },
  407. "required": [
  408. "app",
  409. "creationTime",
  410. "entityId",
  411. "id",
  412. "isDeleted",
  413. "name",
  414. "sessionId",
  415. "updateTime",
  416. "userId",
  417. "creatorUserId"
  418. ]
  419. }
  420. },
  421. "pageSize": {
  422. "type": "integer"
  423. },
  424. "totalCount": {
  425. "type": "integer"
  426. },
  427. "totalPages": {
  428. "type": "integer"
  429. }
  430. },
  431. "required": [
  432. "currentPage",
  433. "hasNextPage",
  434. "hasPreviousPage",
  435. "model",
  436. "pageSize",
  437. "totalCount",
  438. "totalPages"
  439. ]
  440. },
  441. "isAuthorized": {
  442. "type": "boolean"
  443. }
  444. },
  445. "required": ["isSuccess", "code", "result", "isAuthorized"]
  446. },
  447. "example": {
  448. "isSuccess": true,
  449. "code": 1,
  450. "result": {
  451. "currentPage": 1,
  452. "hasNextPage": true,
  453. "hasPreviousPage": false,
  454. "model": [
  455. {
  456. "app": "ShaLu",
  457. "creationTime": "2026-05-17 09:49:34",
  458. "entityId": "Global",
  459. "id": "965e68f8-4947-45d4-a800-df7c4e1ed7ea",
  460. "isDeleted": false,
  461. "name": "修改会话名称",
  462. "sessionId": "ea9e1f06-0017-4544-b769-2d2d7b5ac3ec",
  463. "updateTime": "2026-05-17 09:54:29",
  464. "userId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993"
  465. },
  466. {
  467. "app": "shalu",
  468. "creationTime": "2026-05-16 14:17:23",
  469. "creatorUserId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993",
  470. "entityId": "GLOBAL",
  471. "id": "84434a22-24ac-4d6b-a0c6-f08cdba0cc03",
  472. "isDeleted": false,
  473. "name": "新的会话",
  474. "sessionId": "45e3b97e-dc67-486a-aeac-87093f5727ba",
  475. "updateTime": "2026-05-16 14:17:23",
  476. "userId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993"
  477. },
  478. {
  479. "app": "shalu",
  480. "creationTime": "2026-05-16 14:05:51",
  481. "creatorUserId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993",
  482. "entityId": "GLOBAL",
  483. "id": "29026a3d-6dd7-4cd9-9dae-755439b81fae",
  484. "isDeleted": false,
  485. "name": "新的会话",
  486. "sessionId": "6cae1573-f97b-4423-8df5-c4a62b3ca87a",
  487. "updateTime": "2026-05-16 14:05:51",
  488. "userId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993"
  489. },
  490. {
  491. "app": "shalu",
  492. "creationTime": "2026-05-16 14:04:43",
  493. "creatorUserId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993",
  494. "entityId": "GLOBAL",
  495. "id": "5309f00d-6ff4-468c-bde1-140aeab5cb63",
  496. "isDeleted": false,
  497. "name": "新的会话",
  498. "sessionId": "95ed68d9-9e62-427a-bfe0-c70531fcc482",
  499. "updateTime": "2026-05-16 14:04:43",
  500. "userId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993"
  501. },
  502. {
  503. "app": "shalu",
  504. "creationTime": "2026-05-16 13:53:01",
  505. "creatorUserId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993",
  506. "entityId": "GLOBAL",
  507. "id": "acb4b3cf-2fe3-462d-9727-c9c41177edd8",
  508. "isDeleted": false,
  509. "name": "新的会话",
  510. "sessionId": "714836a0-3f1b-47af-87e9-81c46024c9c5",
  511. "updateTime": "2026-05-16 13:53:01",
  512. "userId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993"
  513. }
  514. ],
  515. "pageSize": 20,
  516. "totalCount": 5,
  517. "totalPages": 1
  518. },
  519. "isAuthorized": true
  520. }
  521. }
  522. },
  523. "headers": {}
  524. }
  525. },
  526. "security": []
  527. }
  528. },
  529. "/api/ai/session/sessionMessages": {
  530. "post": {
  531. "summary": "获取消息分页列表",
  532. "deprecated": false,
  533. "description": "",
  534. "tags": ["ai-chat"],
  535. "parameters": [
  536. {
  537. "name": "Authorization",
  538. "in": "header",
  539. "description": "",
  540. "example": "bpm_client_1513029045627916288",
  541. "schema": {
  542. "type": "string",
  543. "default": "bpm_client_1513029045627916288"
  544. }
  545. }
  546. ],
  547. "requestBody": {
  548. "content": {
  549. "application/json": {
  550. "schema": {
  551. "type": "object",
  552. "properties": {
  553. "sessionId": {
  554. "type": "string"
  555. },
  556. "pageIndex": {
  557. "type": "integer"
  558. },
  559. "pageSize": {
  560. "type": "integer"
  561. }
  562. },
  563. "required": ["sessionId", "pageIndex", "pageSize"]
  564. },
  565. "example": {
  566. "sessionId": "d24107a9-2a6f-4a8e-a95d-45a14f936db1",
  567. "pageIndex": 1,
  568. "pageSize": 20
  569. }
  570. }
  571. },
  572. "required": true
  573. },
  574. "responses": {
  575. "200": {
  576. "description": "",
  577. "content": {
  578. "application/json": {
  579. "schema": {
  580. "type": "object",
  581. "properties": {
  582. "isSuccess": {
  583. "type": "boolean"
  584. },
  585. "code": {
  586. "type": "integer"
  587. },
  588. "result": {
  589. "type": "object",
  590. "properties": {
  591. "currentPage": {
  592. "type": "integer"
  593. },
  594. "hasNextPage": {
  595. "type": "boolean"
  596. },
  597. "hasPreviousPage": {
  598. "type": "boolean"
  599. },
  600. "model": {
  601. "type": "array",
  602. "items": {
  603. "type": "object",
  604. "properties": {
  605. "answer": {
  606. "type": "string"
  607. },
  608. "app": {
  609. "type": "string"
  610. },
  611. "creationTime": {
  612. "type": "string"
  613. },
  614. "creatorUserId": {
  615. "type": "string"
  616. },
  617. "entityId": {
  618. "type": "string"
  619. },
  620. "id": {
  621. "type": "string"
  622. },
  623. "isDeleted": {
  624. "type": "boolean"
  625. },
  626. "message_files": {
  627. "type": "string"
  628. },
  629. "msgId": {
  630. "type": "string"
  631. },
  632. "query": {
  633. "type": "string"
  634. },
  635. "sessionId": {
  636. "type": "string"
  637. },
  638. "taskId": {
  639. "type": "string"
  640. },
  641. "updateTime": {
  642. "type": "string"
  643. },
  644. "userId": {
  645. "type": "string"
  646. }
  647. }
  648. }
  649. },
  650. "pageSize": {
  651. "type": "integer"
  652. },
  653. "totalCount": {
  654. "type": "integer"
  655. },
  656. "totalPages": {
  657. "type": "integer"
  658. }
  659. },
  660. "required": [
  661. "currentPage",
  662. "hasNextPage",
  663. "hasPreviousPage",
  664. "model",
  665. "pageSize",
  666. "totalCount",
  667. "totalPages"
  668. ]
  669. },
  670. "isAuthorized": {
  671. "type": "boolean"
  672. }
  673. },
  674. "required": ["isSuccess", "code", "result", "isAuthorized"]
  675. },
  676. "example": {
  677. "isSuccess": true,
  678. "code": 1,
  679. "result": {
  680. "currentPage": 1,
  681. "hasNextPage": true,
  682. "hasPreviousPage": false,
  683. "model": [
  684. {
  685. "answer": "根据您提供的图片描述,我为您分析出以下信息:\n\n## 一、游戏核心信息\n1. **游戏名称**:《黑神话:悟空》\n2. **主要角色**:悟空(孙悟空)\n3. **游戏场景**:雪地背景,人物持械站立,可能是游戏中的战斗或探索场景\n\n## 二、发行与平台信息\n1. **开发商**:游戏科学(Game Science)\n2. **发行平台**:WeGame(腾讯游戏平台)\n3. **版本信息**:豪华版(Deluxe Edition)\n\n## 三、用户状态信息\n1. **用户身份**:码神(可能是用户名或昵称)\n2. **拥有状态**:已拥有《黑神话:悟空》豪华版\n3. **获取方式**:通过WeGame平台购买或获得\n\n## 四、时间信息\n1. **记录时间**:2024年10月3日 11:36\n2. **时间意义**:可能是购买时间、截图时间或成就解锁时间\n\n## 五、视觉设计元素\n1. **左上角标识**:游戏科学和WeGame的logo组合\n2. **右上角文字**:\"悟 空\"字样,采用艺术字体设计\n3. **右侧印章**:红底黑字印章样式图案,具有中国传统文化特色\n4. **整体色调**:以雪地白色为背景,与游戏主题相呼应\n\n## 六、功能元素\n1. **二维码**:位于图片底部,可能用于:\n - 游戏下载链接\n - 分享功能\n - 社区或社交平台跳转\n - 验证或兑换功能\n\n## 七、信息层级分析\n1. **一级信息**(最显眼):游戏名称、角色形象\n2. **二级信息**(重要标识):开发商、平台、版本\n3. **三级信息**(用户相关):拥有状态、时间、用户ID\n4. **四级信息**(功能元素):二维码\n\n## 八、潜在用途推断\n这张图片可能是:\n1. **购买确认截图**:显示用户在WeGame平台成功购买豪华版\n2. **成就分享图**:展示用户已获得该游戏豪华版\n3. **宣传素材**:结合用户个性化信息的宣传图片\n4. **社区分享内容**:用于游戏社区或社交平台分享\n\n这张图片包含了从游戏基本信息到用户个性化数据的完整链条,既展示了游戏本身的特色,也体现了平台与用户的交互关系。",
  686. "app": "ShaLu",
  687. "creationTime": "2026-05-17 11:00:43",
  688. "creatorUserId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993",
  689. "entityId": "Global",
  690. "id": "ebdb16da-cfa2-488f-9cc7-44d241349457",
  691. "isDeleted": false,
  692. "message_files": "f2048d34-0cee-4850-a280-70707f3d14e7",
  693. "msgId": "",
  694. "query": "帮我分析一下图片中有哪些信息?",
  695. "sessionId": "d24107a9-2a6f-4a8e-a95d-45a14f936db1",
  696. "taskId": "",
  697. "updateTime": "2026-05-17 11:00:43",
  698. "userId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993"
  699. }
  700. ],
  701. "pageSize": 20,
  702. "totalCount": 1,
  703. "totalPages": 1
  704. },
  705. "isAuthorized": true
  706. }
  707. }
  708. },
  709. "headers": {}
  710. }
  711. },
  712. "security": []
  713. }
  714. },
  715. "/api/ai/session/create": {
  716. "post": {
  717. "summary": "创建会话",
  718. "deprecated": false,
  719. "description": "",
  720. "tags": ["ai-chat"],
  721. "parameters": [
  722. {
  723. "name": "Authorization",
  724. "in": "header",
  725. "description": "",
  726. "example": "bpm_client_1513029045627916288",
  727. "schema": {
  728. "type": "string",
  729. "default": "bpm_client_1513029045627916288"
  730. }
  731. }
  732. ],
  733. "requestBody": {
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "type": "object",
  738. "properties": {
  739. "name": {
  740. "type": "string"
  741. }
  742. },
  743. "required": ["name"]
  744. },
  745. "example": "{\r\n \"name\": \"\",\r\n}"
  746. }
  747. },
  748. "required": true
  749. },
  750. "responses": {
  751. "200": {
  752. "description": "",
  753. "content": {
  754. "application/json": {
  755. "schema": {
  756. "type": "object",
  757. "properties": {
  758. "isSuccess": {
  759. "type": "boolean"
  760. },
  761. "code": {
  762. "type": "integer"
  763. },
  764. "result": {
  765. "type": "string"
  766. },
  767. "isAuthorized": {
  768. "type": "boolean"
  769. }
  770. },
  771. "required": ["isSuccess", "code", "result", "isAuthorized"]
  772. },
  773. "example": {
  774. "isSuccess": true,
  775. "code": 1,
  776. "result": "965e68f8-4947-45d4-a800-df7c4e1ed7ea",
  777. "isAuthorized": true
  778. }
  779. }
  780. },
  781. "headers": {}
  782. }
  783. },
  784. "security": []
  785. }
  786. },
  787. "/api/ai/session/update": {
  788. "post": {
  789. "summary": "更新会话",
  790. "deprecated": false,
  791. "description": "",
  792. "tags": ["ai-chat"],
  793. "parameters": [
  794. {
  795. "name": "Authorization",
  796. "in": "header",
  797. "description": "",
  798. "example": "bpm_client_1513029045627916288",
  799. "schema": {
  800. "type": "string",
  801. "default": "bpm_client_1513029045627916288"
  802. }
  803. }
  804. ],
  805. "requestBody": {
  806. "content": {
  807. "application/json": {
  808. "schema": {
  809. "type": "object",
  810. "properties": {
  811. "id": {
  812. "type": "string"
  813. },
  814. "name": {
  815. "type": "string"
  816. }
  817. },
  818. "required": ["id", "name"]
  819. },
  820. "example": {
  821. "id": "965e68f8-4947-45d4-a800-df7c4e1ed7ea",
  822. "name": "修改会话名称"
  823. }
  824. }
  825. },
  826. "required": true
  827. },
  828. "responses": {
  829. "200": {
  830. "description": "",
  831. "content": {
  832. "application/json": {
  833. "schema": {
  834. "type": "object",
  835. "properties": {
  836. "isSuccess": {
  837. "type": "boolean"
  838. },
  839. "code": {
  840. "type": "integer"
  841. },
  842. "isAuthorized": {
  843. "type": "boolean"
  844. }
  845. },
  846. "required": ["isSuccess", "code", "isAuthorized"]
  847. },
  848. "example": {
  849. "isSuccess": true,
  850. "code": 1,
  851. "isAuthorized": true
  852. }
  853. }
  854. },
  855. "headers": {}
  856. }
  857. },
  858. "security": []
  859. }
  860. },
  861. "/api/ai/session/delete": {
  862. "post": {
  863. "summary": "删除会话",
  864. "deprecated": false,
  865. "description": "",
  866. "tags": ["ai-chat"],
  867. "parameters": [
  868. {
  869. "name": "Authorization",
  870. "in": "header",
  871. "description": "",
  872. "example": "bpm_client_1513029045627916288",
  873. "schema": {
  874. "type": "string",
  875. "default": "bpm_client_1513029045627916288"
  876. }
  877. }
  878. ],
  879. "requestBody": {
  880. "content": {
  881. "application/json": {
  882. "schema": {
  883. "type": "object",
  884. "properties": {
  885. "id": {
  886. "type": "string"
  887. }
  888. },
  889. "required": ["id"]
  890. },
  891. "example": {
  892. "id": "49b47841-7f5d-4899-adfb-358198543308"
  893. }
  894. }
  895. },
  896. "required": true
  897. },
  898. "responses": {
  899. "200": {
  900. "description": "",
  901. "content": {
  902. "application/json": {
  903. "schema": {
  904. "type": "object",
  905. "properties": {
  906. "isSuccess": {
  907. "type": "boolean"
  908. },
  909. "code": {
  910. "type": "integer"
  911. },
  912. "isAuthorized": {
  913. "type": "boolean"
  914. }
  915. },
  916. "required": ["isSuccess", "code", "isAuthorized"]
  917. },
  918. "example": {
  919. "isSuccess": true,
  920. "code": 1,
  921. "isAuthorized": true
  922. }
  923. }
  924. },
  925. "headers": {}
  926. }
  927. },
  928. "security": []
  929. }
  930. }
  931. },
  932. "components": {
  933. "schemas": {
  934. "AgentNode": {
  935. "type": "object",
  936. "properties": {
  937. "appAgentId": {
  938. "type": "string",
  939. "format": "uuid"
  940. },
  941. "creationTime": {
  942. "type": "string",
  943. "format": "date-time"
  944. },
  945. "creatorUserId": {
  946. "type": "string",
  947. "format": "uuid"
  948. },
  949. "data": {
  950. "$ref": "#/components/schemas/NodeData"
  951. },
  952. "height": {
  953. "type": "integer"
  954. },
  955. "id": {
  956. "type": "string",
  957. "format": "uuid"
  958. },
  959. "isDeleted": {
  960. "type": "boolean"
  961. },
  962. "position": {
  963. "type": "object",
  964. "properties": {
  965. "x": {
  966. "type": "integer"
  967. },
  968. "y": {
  969. "type": "integer"
  970. }
  971. },
  972. "required": ["x", "y"]
  973. },
  974. "selected": {
  975. "type": "boolean"
  976. },
  977. "type": {
  978. "type": "string",
  979. "enum": ["custom", "start", "end", "condition", "task", "http-request"]
  980. },
  981. "updateTime": {
  982. "type": "string",
  983. "format": "date-time"
  984. },
  985. "width": {
  986. "type": "integer"
  987. },
  988. "zIndex": {
  989. "type": "integer"
  990. }
  991. },
  992. "required": [
  993. "appAgentId",
  994. "creationTime",
  995. "creatorUserId",
  996. "data",
  997. "id",
  998. "position",
  999. "type"
  1000. ]
  1001. },
  1002. "NodeData": {
  1003. "type": "object",
  1004. "properties": {
  1005. "outputs": {
  1006. "type": "array",
  1007. "items": {
  1008. "type": "object",
  1009. "properties": {
  1010. "name": {
  1011. "type": "string"
  1012. },
  1013. "describe": {
  1014. "type": "string"
  1015. },
  1016. "type": {
  1017. "type": "string",
  1018. "enum": ["string", "number", "boolean", "object", "array"]
  1019. }
  1020. },
  1021. "required": ["name", "describe", "type"]
  1022. }
  1023. },
  1024. "output_can_alter": {
  1025. "type": "boolean"
  1026. },
  1027. "variables": {
  1028. "type": "array",
  1029. "items": {
  1030. "type": "string"
  1031. }
  1032. },
  1033. "method": {
  1034. "type": "string",
  1035. "enum": ["get", "post", "put", "delete", "patch", "head", "options"]
  1036. },
  1037. "ssl_verify": {
  1038. "type": "boolean"
  1039. },
  1040. "isInIteration": {
  1041. "type": "boolean"
  1042. },
  1043. "default_value": {
  1044. "type": "array",
  1045. "items": {
  1046. "type": "string"
  1047. }
  1048. },
  1049. "body": {
  1050. "$ref": "#/components/schemas/RequestBody"
  1051. },
  1052. "params": {
  1053. "type": "array",
  1054. "items": {
  1055. "type": "string"
  1056. }
  1057. },
  1058. "title": {
  1059. "type": "string"
  1060. },
  1061. "type": {
  1062. "type": "string",
  1063. "enum": ["http-request", "condition", "task"]
  1064. },
  1065. "error_strategy": {
  1066. "type": "string",
  1067. "enum": ["none", "retry", "abort", "continue"]
  1068. },
  1069. "retry_config": {
  1070. "type": "object",
  1071. "properties": {
  1072. "max_retries": {
  1073. "type": "integer",
  1074. "minimum": 0,
  1075. "maximum": 10
  1076. },
  1077. "retry_enabled": {
  1078. "type": "boolean"
  1079. },
  1080. "retry_interval": {
  1081. "type": "integer",
  1082. "minimum": 0,
  1083. "maximum": 5000
  1084. }
  1085. },
  1086. "required": ["max_retries", "retry_enabled", "retry_interval"]
  1087. },
  1088. "url": {
  1089. "type": "string",
  1090. "format": "uri"
  1091. },
  1092. "authorization": {
  1093. "type": "object",
  1094. "properties": {
  1095. "type": {
  1096. "type": "string",
  1097. "enum": ["none", "bearer", "basic", "api-key"]
  1098. },
  1099. "config": {
  1100. "type": "object",
  1101. "properties": {
  1102. "api_key": {
  1103. "type": "string"
  1104. },
  1105. "header": {
  1106. "type": "string"
  1107. },
  1108. "type": {
  1109. "type": "string"
  1110. }
  1111. }
  1112. }
  1113. },
  1114. "required": ["type", "config"]
  1115. },
  1116. "timeout_config": {
  1117. "type": "object",
  1118. "properties": {
  1119. "max_write_timeout": {
  1120. "type": "integer",
  1121. "minimum": 0
  1122. },
  1123. "max_read_timeout": {
  1124. "type": "integer",
  1125. "minimum": 0
  1126. },
  1127. "max_connect_timeout": {
  1128. "type": "integer",
  1129. "minimum": 0
  1130. }
  1131. },
  1132. "required": ["max_write_timeout", "max_read_timeout", "max_connect_timeout"]
  1133. },
  1134. "heads": {
  1135. "type": "array",
  1136. "items": {
  1137. "$ref": "#/components/schemas/HttpHeader"
  1138. }
  1139. },
  1140. "selected": {
  1141. "type": "boolean"
  1142. },
  1143. "desc": {
  1144. "type": "string"
  1145. },
  1146. "isInLoop": {
  1147. "type": "boolean"
  1148. }
  1149. },
  1150. "required": ["outputs", "method", "title", "type", "url"]
  1151. },
  1152. "RequestBody": {
  1153. "type": "object",
  1154. "properties": {
  1155. "data": {
  1156. "type": "array",
  1157. "items": {
  1158. "$ref": "#/components/schemas/RequestDataItem"
  1159. }
  1160. },
  1161. "type": {
  1162. "type": "string",
  1163. "enum": ["json", "form-data", "x-www-form-urlencoded", "raw", "binary"]
  1164. }
  1165. },
  1166. "required": ["data", "type"]
  1167. },
  1168. "RequestDataItem": {
  1169. "type": "object",
  1170. "properties": {
  1171. "type": {
  1172. "type": "string",
  1173. "enum": ["text", "file", "json"]
  1174. },
  1175. "value": {
  1176. "type": "string"
  1177. },
  1178. "key": {
  1179. "type": "string"
  1180. }
  1181. },
  1182. "required": ["type", "value"]
  1183. },
  1184. "HttpHeader": {
  1185. "type": "object",
  1186. "properties": {
  1187. "name": {
  1188. "type": "string"
  1189. },
  1190. "value": {
  1191. "type": "string"
  1192. }
  1193. },
  1194. "required": ["name", "value"]
  1195. }
  1196. },
  1197. "securitySchemes": {
  1198. "ApiKeyAuth": {
  1199. "type": "apiKey",
  1200. "in": "header",
  1201. "name": "Authorization"
  1202. }
  1203. }
  1204. },
  1205. "security": [
  1206. {
  1207. "ApiKeyAuth": []
  1208. }
  1209. ]
  1210. }