v2-system-model.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-system-model.yaml
  2. get:
  3. summary: '列出 system-model'
  4. tags:
  5. - system-model
  6. operationId: get_api_v2_system_model
  7. description: 实现:`SysModelController@index`
  8. parameters:
  9. -
  10. name: view
  11. in: query
  12. schema:
  13. type: string
  14. default: wbw
  15. -
  16. name: search
  17. in: query
  18. description: 搜索关键字
  19. schema:
  20. type: string
  21. -
  22. name: order
  23. in: query
  24. description: 排序字段
  25. schema:
  26. type: string
  27. -
  28. name: dir
  29. in: query
  30. description: 排序方向
  31. schema:
  32. type: string
  33. enum:
  34. - desc
  35. - asc
  36. -
  37. name: limit
  38. in: query
  39. description: 每页记录数
  40. schema:
  41. type: number
  42. -
  43. name: offset
  44. in: query
  45. description: 从第几条记录开始提取
  46. schema:
  47. type: number
  48. responses:
  49. 200:
  50. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  51. content:
  52. application/json:
  53. schema:
  54. type: object
  55. properties:
  56. ok:
  57. type: boolean
  58. message:
  59. type: string
  60. data:
  61. type: object
  62. properties:
  63. rows:
  64. type: array
  65. items:
  66. type: object
  67. properties: { uid: { type: string }, name: { type: string }, description: { type: string }, url: { type: string }, model: { type: string }, privacy: { type: string }, owner_id: { type: integer }, editor_id: { type: integer }, created_at: { type: string }, updated_at: { type: string }, user: { type: string }, key: { type: string }, system_prompt: { type: string } }
  68. count:
  69. type: integer
  70. 401:
  71. $ref: '../../main.yaml#/components/responses/Unauthorized'
  72. 422:
  73. $ref: '../../main.yaml#/components/responses/ValidationError'
  74. post:
  75. summary: '新建 system-model'
  76. tags:
  77. - system-model
  78. operationId: post_api_v2_system_model
  79. description: 实现:`SysModelController@store`
  80. requestBody:
  81. required: false
  82. content:
  83. application/json:
  84. schema:
  85. type: object
  86. properties:
  87. view:
  88. type: string
  89. default: wbw
  90. models:
  91. type: string
  92. responses:
  93. 200:
  94. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  95. content:
  96. application/json:
  97. schema:
  98. type: object
  99. properties:
  100. ok:
  101. type: boolean
  102. message:
  103. type: string
  104. data:
  105. type: object
  106. 401:
  107. $ref: '../../main.yaml#/components/responses/Unauthorized'
  108. 422:
  109. $ref: '../../main.yaml#/components/responses/ValidationError'