v2-ai-model-ai-model.yaml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-ai-model-ai-model.yaml
  2. get:
  3. summary: '获取单个 ai-model/{ai_model}'
  4. tags:
  5. - ai-model
  6. operationId: get_api_v2_ai_model_ai_model_
  7. description: 实现:`AiModelController@show`
  8. parameters:
  9. -
  10. name: ai_model
  11. in: path
  12. required: true
  13. schema:
  14. type: string
  15. responses:
  16. 200:
  17. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  18. content:
  19. application/json:
  20. schema:
  21. type: object
  22. properties:
  23. ok:
  24. type: boolean
  25. message:
  26. type: string
  27. data:
  28. type: object
  29. properties:
  30. uid:
  31. type: string
  32. name:
  33. type: string
  34. description:
  35. type: string
  36. url:
  37. type: string
  38. model:
  39. type: string
  40. privacy:
  41. type: string
  42. owner_id:
  43. type: integer
  44. editor_id:
  45. type: integer
  46. created_at:
  47. type: string
  48. updated_at:
  49. type: string
  50. user:
  51. type: string
  52. key:
  53. type: string
  54. system_prompt:
  55. type: string
  56. 401:
  57. $ref: '../../main.yaml#/components/responses/Unauthorized'
  58. 422:
  59. $ref: '../../main.yaml#/components/responses/ValidationError'
  60. put:
  61. summary: '更新 ai-model/{ai_model}'
  62. tags:
  63. - ai-model
  64. operationId: put_api_v2_ai_model_ai_model_
  65. description: 实现:`AiModelController@update`
  66. parameters:
  67. -
  68. name: ai_model
  69. in: path
  70. required: true
  71. schema:
  72. type: string
  73. requestBody:
  74. required: false
  75. content:
  76. application/json:
  77. schema:
  78. type: object
  79. properties:
  80. name:
  81. type: string
  82. responses:
  83. 200:
  84. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  85. content:
  86. application/json:
  87. schema:
  88. type: object
  89. properties:
  90. ok:
  91. type: boolean
  92. message:
  93. type: string
  94. data:
  95. type: object
  96. properties:
  97. uid:
  98. type: string
  99. name:
  100. type: string
  101. description:
  102. type: string
  103. url:
  104. type: string
  105. model:
  106. type: string
  107. privacy:
  108. type: string
  109. owner_id:
  110. type: integer
  111. editor_id:
  112. type: integer
  113. created_at:
  114. type: string
  115. updated_at:
  116. type: string
  117. user:
  118. type: string
  119. key:
  120. type: string
  121. system_prompt:
  122. type: string
  123. 401:
  124. $ref: '../../main.yaml#/components/responses/Unauthorized'
  125. 422:
  126. $ref: '../../main.yaml#/components/responses/ValidationError'
  127. patch:
  128. summary: '更新 ai-model/{ai_model}'
  129. tags:
  130. - ai-model
  131. operationId: patch_api_v2_ai_model_ai_model_
  132. description: 实现:`AiModelController@update`
  133. parameters:
  134. -
  135. name: ai_model
  136. in: path
  137. required: true
  138. schema:
  139. type: string
  140. requestBody:
  141. required: false
  142. content:
  143. application/json:
  144. schema:
  145. type: object
  146. properties:
  147. name:
  148. type: string
  149. responses:
  150. 200:
  151. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  152. content:
  153. application/json:
  154. schema:
  155. type: object
  156. properties:
  157. ok:
  158. type: boolean
  159. message:
  160. type: string
  161. data:
  162. type: object
  163. properties:
  164. uid:
  165. type: string
  166. name:
  167. type: string
  168. description:
  169. type: string
  170. url:
  171. type: string
  172. model:
  173. type: string
  174. privacy:
  175. type: string
  176. owner_id:
  177. type: integer
  178. editor_id:
  179. type: integer
  180. created_at:
  181. type: string
  182. updated_at:
  183. type: string
  184. user:
  185. type: string
  186. key:
  187. type: string
  188. system_prompt:
  189. type: string
  190. 401:
  191. $ref: '../../main.yaml#/components/responses/Unauthorized'
  192. 422:
  193. $ref: '../../main.yaml#/components/responses/ValidationError'
  194. delete:
  195. summary: '删除 ai-model/{ai_model}'
  196. tags:
  197. - ai-model
  198. operationId: delete_api_v2_ai_model_ai_model_
  199. description: 实现:`AiModelController@destroy`
  200. parameters:
  201. -
  202. name: ai_model
  203. in: path
  204. required: true
  205. schema:
  206. type: string
  207. responses:
  208. 200:
  209. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  210. content:
  211. application/json:
  212. schema:
  213. type: object
  214. properties:
  215. ok:
  216. type: boolean
  217. message:
  218. type: string
  219. data:
  220. type: object
  221. 401:
  222. $ref: '../../main.yaml#/components/responses/Unauthorized'
  223. 422:
  224. $ref: '../../main.yaml#/components/responses/ValidationError'