v2-chat-messages-chat-message.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-chat-messages-chat-message.yaml
  2. get:
  3. summary: '获取单个 chat-messages/{chat_message}'
  4. tags:
  5. - chat-messages
  6. operationId: get_api_v2_chat_messages_chat_message_
  7. description: 实现:`ChatMessageController@show`
  8. parameters:
  9. -
  10. name: chat_message
  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. id:
  31. type: integer
  32. chat_id:
  33. type: integer
  34. parent_id:
  35. type: integer
  36. session_id:
  37. type: integer
  38. role:
  39. type: string
  40. content:
  41. type: string
  42. model_name:
  43. type: string
  44. tool_calls:
  45. type: string
  46. tool_call_id:
  47. type: integer
  48. is_active:
  49. type: boolean
  50. created_at:
  51. type: string
  52. updated_at:
  53. type: string
  54. 401:
  55. $ref: '../../main.yaml#/components/responses/Unauthorized'
  56. 422:
  57. $ref: '../../main.yaml#/components/responses/ValidationError'
  58. put:
  59. summary: '更新 chat-messages/{chat_message}'
  60. tags:
  61. - chat-messages
  62. operationId: put_api_v2_chat_messages_chat_message_
  63. description: 实现:`ChatMessageController@update`
  64. parameters:
  65. -
  66. name: chat_message
  67. in: path
  68. required: true
  69. schema:
  70. type: string
  71. responses:
  72. 200:
  73. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  74. content:
  75. application/json:
  76. schema:
  77. type: object
  78. properties:
  79. ok:
  80. type: boolean
  81. message:
  82. type: string
  83. data:
  84. type: object
  85. 401:
  86. $ref: '../../main.yaml#/components/responses/Unauthorized'
  87. 422:
  88. $ref: '../../main.yaml#/components/responses/ValidationError'
  89. patch:
  90. summary: '更新 chat-messages/{chat_message}'
  91. tags:
  92. - chat-messages
  93. operationId: patch_api_v2_chat_messages_chat_message_
  94. description: 实现:`ChatMessageController@update`
  95. parameters:
  96. -
  97. name: chat_message
  98. in: path
  99. required: true
  100. schema:
  101. type: string
  102. responses:
  103. 200:
  104. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  105. content:
  106. application/json:
  107. schema:
  108. type: object
  109. properties:
  110. ok:
  111. type: boolean
  112. message:
  113. type: string
  114. data:
  115. type: object
  116. 401:
  117. $ref: '../../main.yaml#/components/responses/Unauthorized'
  118. 422:
  119. $ref: '../../main.yaml#/components/responses/ValidationError'
  120. delete:
  121. summary: '删除 chat-messages/{chat_message}'
  122. tags:
  123. - chat-messages
  124. operationId: delete_api_v2_chat_messages_chat_message_
  125. description: 实现:`ChatMessageController@destroy`
  126. parameters:
  127. -
  128. name: chat_message
  129. in: path
  130. required: true
  131. schema:
  132. type: string
  133. responses:
  134. 200:
  135. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  136. content:
  137. application/json:
  138. schema:
  139. type: object
  140. properties:
  141. ok:
  142. type: boolean
  143. message:
  144. type: string
  145. data:
  146. type: object
  147. 401:
  148. $ref: '../../main.yaml#/components/responses/Unauthorized'
  149. 422:
  150. $ref: '../../main.yaml#/components/responses/ValidationError'