v3-admin-agent-runs.yaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-admin-agent-runs.yaml
  2. get:
  3. summary: 列出提问
  4. tags:
  5. - admin
  6. operationId: get_api_v3_admin_agent_runs
  7. description: |-
  8. 最新的在前。提问原文对管理员可见;游客只显示设备匿名 id 与 IP。
  9. 实现:`V3\AdminAgentRunController@index`
  10. security:
  11. -
  12. bearerAuth: []
  13. parameters:
  14. -
  15. name: per_page
  16. in: query
  17. schema:
  18. type: integer
  19. default: 20
  20. description: '每页数量,最大 100'
  21. -
  22. name: 'filter[status]'
  23. in: query
  24. schema:
  25. type: string
  26. enum:
  27. - ok
  28. - error
  29. - cancelled
  30. - denied
  31. description: 运行结果
  32. -
  33. name: 'filter[route]'
  34. in: query
  35. schema:
  36. type: string
  37. enum:
  38. - question
  39. - term
  40. - passage
  41. - chat
  42. description: '研究路径:question 一般问题 / term 术语与词 / passage 阅读页提问 / chat 闲聊'
  43. -
  44. name: 'filter[account_type]'
  45. in: query
  46. schema:
  47. type: string
  48. enum:
  49. - user
  50. - guest
  51. description: 账号类型
  52. -
  53. name: 'filter[client]'
  54. in: query
  55. schema:
  56. type: string
  57. enum:
  58. - mobile
  59. - web
  60. description: 客户端
  61. -
  62. name: 'filter[improve]'
  63. in: query
  64. schema:
  65. type: boolean
  66. description: 是否允许用于改进回答
  67. -
  68. name: 'filter[q]'
  69. in: query
  70. schema:
  71. type: string
  72. description: 按提问原文模糊搜索
  73. -
  74. name: page
  75. in: query
  76. schema:
  77. type: integer
  78. default: 1
  79. description: 页码
  80. responses:
  81. 200:
  82. description: 成功
  83. content:
  84. application/json:
  85. schema:
  86. type: object
  87. properties:
  88. data:
  89. type: array
  90. items:
  91. type: object
  92. properties:
  93. run_id:
  94. type: string
  95. thread_id:
  96. type: string
  97. nullable: true
  98. thread_title:
  99. type: string
  100. nullable: true
  101. account_type:
  102. type: string
  103. enum: [user, guest]
  104. user:
  105. type: object
  106. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  107. nullable: true
  108. device_id:
  109. type: string
  110. nullable: true
  111. client_ip:
  112. type: string
  113. nullable: true
  114. client:
  115. type: string
  116. nullable: true
  117. app_version:
  118. type: string
  119. nullable: true
  120. question:
  121. type: string
  122. route:
  123. type: string
  124. enum: [question, term, passage, chat]
  125. nullable: true
  126. deep:
  127. type: boolean
  128. improve:
  129. type: boolean
  130. status:
  131. type: string
  132. latency_ms:
  133. type: integer
  134. nullable: true
  135. tokens_in:
  136. type: integer
  137. nullable: true
  138. tokens_out:
  139. type: integer
  140. nullable: true
  141. llm_calls:
  142. type: integer
  143. tool_calls:
  144. type: integer
  145. started_at:
  146. type: string
  147. nullable: true
  148. answer:
  149. type: string
  150. nullable: true
  151. description: 仅在部分查询口径下返回。
  152. evidence:
  153. type: string
  154. nullable: true
  155. description: 仅在部分查询口径下返回。
  156. plan:
  157. type: object
  158. nullable: true
  159. description: 仅在部分查询口径下返回。
  160. passage:
  161. type: object
  162. nullable: true
  163. description: 仅在部分查询口径下返回。
  164. citations:
  165. type: array
  166. items: { type: object }
  167. nullable: true
  168. description: 仅在部分查询口径下返回。
  169. error:
  170. type: string
  171. nullable: true
  172. description: 仅在部分查询口径下返回。
  173. model:
  174. type: string
  175. nullable: true
  176. description: 仅在部分查询口径下返回。
  177. prompt_version:
  178. type: string
  179. nullable: true
  180. description: 仅在部分查询口径下返回。
  181. steps:
  182. type: array
  183. items: { type: object, properties: { seq: { type: integer }, kind: { type: string }, name: { type: string, nullable: true }, args: { type: object, nullable: true }, result: { type: string, nullable: true }, result_chars: { type: integer, nullable: true }, tokens_in: { type: integer, nullable: true }, tokens_out: { type: integer, nullable: true }, ms: { type: integer, nullable: true }, error: { type: string, nullable: true } } }
  184. description: 仅在部分查询口径下返回。
  185. meta:
  186. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  187. 401:
  188. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  189. 422:
  190. $ref: '../../main.yaml#/components/responses/ProblemValidation'