openapi.yaml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  1. openapi: 3.1.0
  2. info:
  3. title: FastAPI - Swagger UI
  4. version: 1.0.0
  5. paths:
  6. /agent/job:
  7. post:
  8. tags:
  9. - agent job interface
  10. summary: Submit Job
  11. operationId: submit_job_agent_job_post
  12. requestBody:
  13. content:
  14. application/json:
  15. schema:
  16. $ref: '#/components/schemas/BasicRequest'
  17. required: true
  18. responses:
  19. '200':
  20. description: Successful Response
  21. content:
  22. application/json:
  23. schema:
  24. $ref: '#/components/schemas/StandardResponse'
  25. '422':
  26. description: Validation Error
  27. content:
  28. application/json:
  29. schema:
  30. $ref: '#/components/schemas/HTTPValidationError'
  31. /agent/queue:
  32. post:
  33. tags:
  34. - agent job interface
  35. summary: Submit Queue
  36. operationId: submit_queue_agent_queue_post
  37. requestBody:
  38. content:
  39. application/json:
  40. schema:
  41. $ref: '#/components/schemas/BasicRequest'
  42. required: true
  43. responses:
  44. '200':
  45. description: Successful Response
  46. content:
  47. application/json:
  48. schema:
  49. $ref: '#/components/schemas/StandardResponse'
  50. '422':
  51. description: Validation Error
  52. content:
  53. application/json:
  54. schema:
  55. $ref: '#/components/schemas/HTTPValidationError'
  56. /file/upload/{file_type}/{job_id}:
  57. post:
  58. tags:
  59. - agent job interface
  60. summary: Upload File
  61. operationId: upload_file_file_upload__file_type___job_id__post
  62. parameters:
  63. - name: file_type
  64. in: path
  65. required: true
  66. schema:
  67. type: string
  68. title: File Type
  69. - name: job_id
  70. in: path
  71. required: true
  72. schema:
  73. type: integer
  74. title: Job Id
  75. requestBody:
  76. required: true
  77. content:
  78. multipart/form-data:
  79. schema:
  80. $ref: '#/components/schemas/Body_upload_file_file_upload__file_type___job_id__post'
  81. responses:
  82. '200':
  83. description: Successful Response
  84. content:
  85. application/json:
  86. schema:
  87. $ref: '#/components/schemas/StandardResponse'
  88. '422':
  89. description: Validation Error
  90. content:
  91. application/json:
  92. schema:
  93. $ref: '#/components/schemas/HTTPValidationError'
  94. /file/browse:
  95. post:
  96. tags:
  97. - agent job interface
  98. summary: Browser File
  99. operationId: browser_file_file_browse_post
  100. requestBody:
  101. content:
  102. application/json:
  103. schema:
  104. $ref: '#/components/schemas/BasicRequest'
  105. required: true
  106. responses:
  107. '200':
  108. description: Successful Response
  109. content:
  110. application/json:
  111. schema:
  112. $ref: '#/components/schemas/StandardResponse'
  113. '422':
  114. description: Validation Error
  115. content:
  116. application/json:
  117. schema:
  118. $ref: '#/components/schemas/HTTPValidationError'
  119. /file/download/{job_id}:
  120. get:
  121. tags:
  122. - agent job interface
  123. summary: Download File
  124. operationId: download_file_file_download__job_id__get
  125. parameters:
  126. - name: job_id
  127. in: path
  128. required: true
  129. schema:
  130. type: integer
  131. title: Job Id
  132. - name: path
  133. in: query
  134. required: false
  135. schema:
  136. type: string
  137. default: path
  138. title: Path
  139. responses:
  140. '200':
  141. description: Successful Response
  142. content:
  143. application/json:
  144. schema: {}
  145. '422':
  146. description: Validation Error
  147. content:
  148. application/json:
  149. schema:
  150. $ref: '#/components/schemas/HTTPValidationError'
  151. /file/view/{job_id}:
  152. get:
  153. tags:
  154. - agent job interface
  155. summary: View File
  156. operationId: view_file_file_view__job_id__get
  157. parameters:
  158. - name: job_id
  159. in: path
  160. required: true
  161. schema:
  162. type: integer
  163. title: Job Id
  164. - name: path
  165. in: query
  166. required: false
  167. schema:
  168. type: string
  169. default: path
  170. title: Path
  171. responses:
  172. '200':
  173. description: Successful Response
  174. content:
  175. application/json:
  176. schema:
  177. $ref: '#/components/schemas/StandardResponse'
  178. '422':
  179. description: Validation Error
  180. content:
  181. application/json:
  182. schema:
  183. $ref: '#/components/schemas/HTTPValidationError'
  184. /user/session:
  185. post:
  186. tags:
  187. - agent job interface
  188. summary: Register
  189. operationId: register_user_session_post
  190. requestBody:
  191. content:
  192. application/json:
  193. schema:
  194. $ref: '#/components/schemas/BasicRequest'
  195. required: true
  196. responses:
  197. '200':
  198. description: Successful Response
  199. content:
  200. application/json:
  201. schema:
  202. $ref: '#/components/schemas/StandardResponse'
  203. '422':
  204. description: Validation Error
  205. content:
  206. application/json:
  207. schema:
  208. $ref: '#/components/schemas/HTTPValidationError'
  209. /user/logout/{session_id}:
  210. get:
  211. tags:
  212. - agent job interface
  213. summary: Logout
  214. operationId: logout_user_logout__session_id__get
  215. parameters:
  216. - name: session_id
  217. in: path
  218. required: true
  219. schema:
  220. type: string
  221. title: Session Id
  222. responses:
  223. '200':
  224. description: Successful Response
  225. content:
  226. application/json:
  227. schema:
  228. $ref: '#/components/schemas/StandardResponse'
  229. '422':
  230. description: Validation Error
  231. content:
  232. application/json:
  233. schema:
  234. $ref: '#/components/schemas/HTTPValidationError'
  235. /user/signin:
  236. post:
  237. tags:
  238. - agent job interface
  239. summary: Signin
  240. operationId: signin_user_signin_post
  241. requestBody:
  242. content:
  243. application/json:
  244. schema:
  245. $ref: '#/components/schemas/BasicRequest'
  246. required: true
  247. responses:
  248. '200':
  249. description: Successful Response
  250. content:
  251. application/json:
  252. schema:
  253. $ref: '#/components/schemas/StandardResponse'
  254. '422':
  255. description: Validation Error
  256. content:
  257. application/json:
  258. schema:
  259. $ref: '#/components/schemas/HTTPValidationError'
  260. /kb/summary:
  261. post:
  262. tags:
  263. - knowledge build interface
  264. summary: Summary Func
  265. operationId: summary_func_kb_summary_post
  266. requestBody:
  267. content:
  268. application/json:
  269. schema:
  270. $ref: '#/components/schemas/BasicRequest'
  271. required: true
  272. responses:
  273. '200':
  274. description: Successful Response
  275. content:
  276. application/json:
  277. schema:
  278. $ref: '#/components/schemas/StandardResponse'
  279. '422':
  280. description: Validation Error
  281. content:
  282. application/json:
  283. schema:
  284. $ref: '#/components/schemas/HTTPValidationError'
  285. /kb/schemas:
  286. post:
  287. tags:
  288. - knowledge build interface
  289. summary: Schemas Func
  290. operationId: schemas_func_kb_schemas_post
  291. requestBody:
  292. content:
  293. application/json:
  294. schema:
  295. $ref: '#/components/schemas/BasicRequest'
  296. required: true
  297. responses:
  298. '200':
  299. description: Successful Response
  300. content:
  301. application/json:
  302. schema:
  303. $ref: '#/components/schemas/StandardResponse'
  304. '422':
  305. description: Validation Error
  306. content:
  307. application/json:
  308. schema:
  309. $ref: '#/components/schemas/HTTPValidationError'
  310. /kb/nodes:
  311. post:
  312. tags:
  313. - knowledge build interface
  314. summary: Nodes Func
  315. operationId: nodes_func_kb_nodes_post
  316. requestBody:
  317. content:
  318. application/json:
  319. schema:
  320. $ref: '#/components/schemas/BasicRequest'
  321. required: true
  322. responses:
  323. '200':
  324. description: Successful Response
  325. content:
  326. application/json:
  327. schema:
  328. $ref: '#/components/schemas/StandardResponse'
  329. '422':
  330. description: Validation Error
  331. content:
  332. application/json:
  333. schema:
  334. $ref: '#/components/schemas/HTTPValidationError'
  335. /knowledge-base/:
  336. post:
  337. tags:
  338. - knowledge base interface
  339. summary: Create Knowledge Base
  340. operationId: create_knowledge_base_knowledge_base__post
  341. requestBody:
  342. required: true
  343. content:
  344. application/json:
  345. schema:
  346. $ref: '#/components/schemas/KnowledgeBaseCreate'
  347. responses:
  348. '200':
  349. description: Successful Response
  350. content:
  351. application/json:
  352. schema:
  353. $ref: '#/components/schemas/ResponseModel'
  354. '422':
  355. description: Validation Error
  356. content:
  357. application/json:
  358. schema:
  359. $ref: '#/components/schemas/HTTPValidationError'
  360. get:
  361. tags:
  362. - knowledge base interface
  363. summary: List Knowledge Bases
  364. operationId: list_knowledge_bases_knowledge_base__get
  365. parameters:
  366. - name: pageNo
  367. in: query
  368. required: false
  369. schema:
  370. type: integer
  371. default: 1
  372. title: Pageno
  373. - name: pageSize
  374. in: query
  375. required: false
  376. schema:
  377. type: integer
  378. default: 10
  379. title: Pagesize
  380. - name: name
  381. in: query
  382. required: false
  383. schema:
  384. anyOf:
  385. - type: string
  386. - type: 'null'
  387. title: Name
  388. responses:
  389. '200':
  390. description: Successful Response
  391. content:
  392. application/json:
  393. schema:
  394. $ref: '#/components/schemas/ResponseModel'
  395. '422':
  396. description: Validation Error
  397. content:
  398. application/json:
  399. schema:
  400. $ref: '#/components/schemas/HTTPValidationError'
  401. /knowledge-base/{kb_id}:
  402. put:
  403. tags:
  404. - knowledge base interface
  405. summary: Update Knowledge Base
  406. operationId: update_knowledge_base_knowledge_base__kb_id__put
  407. parameters:
  408. - name: kb_id
  409. in: path
  410. required: true
  411. schema:
  412. type: integer
  413. title: Kb Id
  414. requestBody:
  415. required: true
  416. content:
  417. application/json:
  418. schema:
  419. $ref: '#/components/schemas/KnowledgeBaseUpdate'
  420. responses:
  421. '200':
  422. description: Successful Response
  423. content:
  424. application/json:
  425. schema:
  426. $ref: '#/components/schemas/ResponseModel'
  427. '422':
  428. description: Validation Error
  429. content:
  430. application/json:
  431. schema:
  432. $ref: '#/components/schemas/HTTPValidationError'
  433. delete:
  434. tags:
  435. - knowledge base interface
  436. summary: Delete Knowledge Base
  437. operationId: delete_knowledge_base_knowledge_base__kb_id__delete
  438. parameters:
  439. - name: kb_id
  440. in: path
  441. required: true
  442. schema:
  443. type: integer
  444. title: Kb Id
  445. responses:
  446. '200':
  447. description: Successful Response
  448. content:
  449. application/json:
  450. schema:
  451. $ref: '#/components/schemas/ResponseModel'
  452. '422':
  453. description: Validation Error
  454. content:
  455. application/json:
  456. schema:
  457. $ref: '#/components/schemas/HTTPValidationError'
  458. get:
  459. tags:
  460. - knowledge base interface
  461. summary: Get Knowledge Base
  462. operationId: get_knowledge_base_knowledge_base__kb_id__get
  463. parameters:
  464. - name: kb_id
  465. in: path
  466. required: true
  467. schema:
  468. type: integer
  469. title: Kb Id
  470. responses:
  471. '200':
  472. description: Successful Response
  473. content:
  474. application/json:
  475. schema:
  476. $ref: '#/components/schemas/ResponseModel'
  477. '422':
  478. description: Validation Error
  479. content:
  480. application/json:
  481. schema:
  482. $ref: '#/components/schemas/HTTPValidationError'
  483. /knowledge-base/name/{name}:
  484. get:
  485. tags:
  486. - knowledge base interface
  487. summary: Get Knowledge Base By Name
  488. operationId: get_knowledge_base_by_name_knowledge_base_name__name__get
  489. parameters:
  490. - name: name
  491. in: path
  492. required: true
  493. schema:
  494. type: string
  495. title: Name
  496. responses:
  497. '200':
  498. description: Successful Response
  499. content:
  500. application/json:
  501. schema:
  502. $ref: '#/components/schemas/ResponseModel'
  503. '422':
  504. description: Validation Error
  505. content:
  506. application/json:
  507. schema:
  508. $ref: '#/components/schemas/HTTPValidationError'
  509. /knowledge-base/{kb_id}/files/:
  510. post:
  511. tags:
  512. - knowledge base interface
  513. summary: Upload Files
  514. operationId: upload_files_knowledge_base__kb_id__files__post
  515. parameters:
  516. - name: kb_id
  517. in: path
  518. required: true
  519. schema:
  520. type: integer
  521. title: Kb Id
  522. requestBody:
  523. required: true
  524. content:
  525. multipart/form-data:
  526. schema:
  527. $ref: '#/components/schemas/Body_upload_files_knowledge_base__kb_id__files__post'
  528. responses:
  529. '200':
  530. description: Successful Response
  531. content:
  532. application/json:
  533. schema:
  534. $ref: '#/components/schemas/ResponseModel'
  535. '422':
  536. description: Validation Error
  537. content:
  538. application/json:
  539. schema:
  540. $ref: '#/components/schemas/HTTPValidationError'
  541. get:
  542. tags:
  543. - knowledge base interface
  544. summary: List Files
  545. operationId: list_files_knowledge_base__kb_id__files__get
  546. parameters:
  547. - name: kb_id
  548. in: path
  549. required: true
  550. schema:
  551. type: integer
  552. title: Kb Id
  553. - name: pageNo
  554. in: query
  555. required: false
  556. schema:
  557. type: integer
  558. default: 1
  559. title: Pageno
  560. - name: pageSize
  561. in: query
  562. required: false
  563. schema:
  564. type: integer
  565. default: 10
  566. title: Pagesize
  567. - name: file_name
  568. in: query
  569. required: false
  570. schema:
  571. anyOf:
  572. - type: string
  573. - type: 'null'
  574. title: File Name
  575. responses:
  576. '200':
  577. description: Successful Response
  578. content:
  579. application/json:
  580. schema:
  581. $ref: '#/components/schemas/ResponseModel'
  582. '422':
  583. description: Validation Error
  584. content:
  585. application/json:
  586. schema:
  587. $ref: '#/components/schemas/HTTPValidationError'
  588. /knowledge-base/{kb_id}/files/search/:
  589. get:
  590. tags:
  591. - knowledge base interface
  592. summary: Search Files
  593. operationId: search_files_knowledge_base__kb_id__files_search__get
  594. parameters:
  595. - name: kb_id
  596. in: path
  597. required: true
  598. schema:
  599. type: integer
  600. title: Kb Id
  601. - name: file_name
  602. in: query
  603. required: true
  604. schema:
  605. type: string
  606. title: File Name
  607. responses:
  608. '200':
  609. description: Successful Response
  610. content:
  611. application/json:
  612. schema:
  613. $ref: '#/components/schemas/ResponseModel'
  614. '422':
  615. description: Validation Error
  616. content:
  617. application/json:
  618. schema:
  619. $ref: '#/components/schemas/HTTPValidationError'
  620. /files/{file_id}/download:
  621. get:
  622. tags:
  623. - knowledge base interface
  624. summary: Download File
  625. operationId: download_file_files__file_id__download_get
  626. parameters:
  627. - name: file_id
  628. in: path
  629. required: true
  630. schema:
  631. type: integer
  632. title: File Id
  633. responses:
  634. '200':
  635. description: Successful Response
  636. content:
  637. application/json:
  638. schema: {}
  639. '422':
  640. description: Validation Error
  641. content:
  642. application/json:
  643. schema:
  644. $ref: '#/components/schemas/HTTPValidationError'
  645. /files/{file_id}:
  646. delete:
  647. tags:
  648. - knowledge base interface
  649. summary: Delete File
  650. operationId: delete_file_files__file_id__delete
  651. parameters:
  652. - name: file_id
  653. in: path
  654. required: true
  655. schema:
  656. type: integer
  657. title: File Id
  658. responses:
  659. '200':
  660. description: Successful Response
  661. content:
  662. application/json:
  663. schema:
  664. type: object
  665. additionalProperties: true
  666. title: Response Delete File Files File Id Delete
  667. '422':
  668. description: Validation Error
  669. content:
  670. application/json:
  671. schema:
  672. $ref: '#/components/schemas/HTTPValidationError'
  673. /files/batch-update:
  674. put:
  675. tags:
  676. - knowledge base interface
  677. summary: Batch Update Files
  678. operationId: batch_update_files_files_batch_update_put
  679. requestBody:
  680. content:
  681. application/json:
  682. schema:
  683. $ref: '#/components/schemas/BatchFileUpdate'
  684. required: true
  685. responses:
  686. '200':
  687. description: Successful Response
  688. content:
  689. application/json:
  690. schema:
  691. $ref: '#/components/schemas/ResponseModel'
  692. '422':
  693. description: Validation Error
  694. content:
  695. application/json:
  696. schema:
  697. $ref: '#/components/schemas/HTTPValidationError'
  698. components:
  699. schemas:
  700. BasicRequest:
  701. properties:
  702. action:
  703. type: string
  704. title: Action
  705. id:
  706. type: string
  707. title: Id
  708. params:
  709. items:
  710. $ref: '#/components/schemas/BasicRequestParameter'
  711. type: array
  712. title: Params
  713. type: object
  714. required:
  715. - action
  716. - id
  717. - params
  718. title: BasicRequest
  719. BasicRequestParameter:
  720. properties:
  721. name:
  722. type: string
  723. title: Name
  724. value:
  725. anyOf:
  726. - type: string
  727. - type: integer
  728. - type: number
  729. - type: boolean
  730. - items:
  731. type: string
  732. type: array
  733. - items:
  734. type: integer
  735. type: array
  736. - items:
  737. type: number
  738. type: array
  739. - items:
  740. type: boolean
  741. type: array
  742. title: Value
  743. type: object
  744. required:
  745. - name
  746. - value
  747. title: BasicRequestParameter
  748. BatchFileUpdate:
  749. properties:
  750. files:
  751. items:
  752. $ref: '#/components/schemas/FileUpdate'
  753. type: array
  754. title: Files
  755. type: object
  756. required:
  757. - files
  758. title: BatchFileUpdate
  759. Body_upload_file_file_upload__file_type___job_id__post:
  760. properties:
  761. file:
  762. type: string
  763. format: binary
  764. title: File
  765. type: object
  766. required:
  767. - file
  768. title: Body_upload_file_file_upload__file_type___job_id__post
  769. Body_upload_files_knowledge_base__kb_id__files__post:
  770. properties:
  771. files:
  772. items:
  773. type: string
  774. format: binary
  775. type: array
  776. title: Files
  777. type: object
  778. required:
  779. - files
  780. title: Body_upload_files_knowledge_base__kb_id__files__post
  781. FileUpdate:
  782. properties:
  783. id:
  784. type: integer
  785. title: Id
  786. file_name:
  787. anyOf:
  788. - type: string
  789. - type: 'null'
  790. title: File Name
  791. version:
  792. anyOf:
  793. - type: string
  794. - type: 'null'
  795. title: Version
  796. author:
  797. anyOf:
  798. - type: string
  799. - type: 'null'
  800. title: Author
  801. year:
  802. anyOf:
  803. - type: integer
  804. - type: 'null'
  805. title: Year
  806. page_count:
  807. anyOf:
  808. - type: integer
  809. - type: 'null'
  810. title: Page Count
  811. creator:
  812. anyOf:
  813. - type: string
  814. - type: 'null'
  815. title: Creator
  816. knowledge_type:
  817. anyOf:
  818. - type: string
  819. - type: 'null'
  820. title: Knowledge Type
  821. type: object
  822. required:
  823. - id
  824. title: FileUpdate
  825. HTTPValidationError:
  826. properties:
  827. detail:
  828. items:
  829. $ref: '#/components/schemas/ValidationError'
  830. type: array
  831. title: Detail
  832. type: object
  833. title: HTTPValidationError
  834. KnowledgeBaseCreate:
  835. properties:
  836. name:
  837. type: string
  838. title: Name
  839. description:
  840. anyOf:
  841. - type: string
  842. - type: 'null'
  843. title: Description
  844. tags:
  845. anyOf:
  846. - type: string
  847. - type: 'null'
  848. title: Tags
  849. type: object
  850. required:
  851. - name
  852. title: KnowledgeBaseCreate
  853. KnowledgeBaseUpdate:
  854. properties:
  855. name:
  856. type: string
  857. title: Name
  858. description:
  859. anyOf:
  860. - type: string
  861. - type: 'null'
  862. title: Description
  863. tags:
  864. anyOf:
  865. - type: string
  866. - type: 'null'
  867. title: Tags
  868. type: object
  869. required:
  870. - name
  871. title: KnowledgeBaseUpdate
  872. ResponseModel:
  873. properties:
  874. code:
  875. type: integer
  876. title: Code
  877. message:
  878. type: string
  879. title: Message
  880. data:
  881. anyOf:
  882. - additionalProperties: true
  883. type: object
  884. - items: {}
  885. type: array
  886. - type: boolean
  887. - type: 'null'
  888. title: Data
  889. type: object
  890. required:
  891. - code
  892. - message
  893. - data
  894. title: ResponseModel
  895. StandardResponse:
  896. properties:
  897. code:
  898. type: integer
  899. title: Code
  900. default: 200
  901. message:
  902. type: string
  903. title: Message
  904. default: success
  905. meta:
  906. additionalProperties: true
  907. type: object
  908. title: Meta
  909. default: {}
  910. records:
  911. items: {}
  912. type: array
  913. title: Records
  914. default: []
  915. type: object
  916. title: StandardResponse
  917. ValidationError:
  918. properties:
  919. loc:
  920. items:
  921. anyOf:
  922. - type: string
  923. - type: integer
  924. type: array
  925. title: Location
  926. msg:
  927. type: string
  928. title: Message
  929. type:
  930. type: string
  931. title: Error Type
  932. type: object
  933. required:
  934. - loc
  935. - msg
  936. - type
  937. title: ValidationError