# 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-chat-messages.yaml get: summary: '列出 chat-messages' tags: - chat-messages operationId: get_api_v2_chat_messages description: 实现:`ChatMessageController@index` parameters: - name: chat in: query schema: type: string - name: limit in: query schema: type: string - name: search in: query description: 搜索关键字 schema: type: string - name: order in: query description: 排序字段 schema: type: string - name: dir in: query description: 排序方向 schema: type: string enum: - desc - asc - name: offset in: query description: 从第几条记录开始提取 schema: type: number responses: 200: description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。' content: application/json: schema: type: object properties: ok: type: boolean message: type: string data: type: object properties: rows: type: array items: type: object properties: { id: { type: integer }, chat_id: { type: integer }, parent_id: { type: integer }, session_id: { type: integer }, role: { type: string }, content: { type: string }, model_name: { type: string }, tool_calls: { type: string }, tool_call_id: { type: integer }, is_active: { type: boolean }, created_at: { type: string }, updated_at: { type: string } } count: type: integer 401: $ref: '../../main.yaml#/components/responses/Unauthorized' 422: $ref: '../../main.yaml#/components/responses/ValidationError' post: summary: '新建 chat-messages' tags: - chat-messages operationId: post_api_v2_chat_messages description: 实现:`ChatMessageController@store` responses: 200: description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。' content: application/json: schema: type: object properties: ok: type: boolean message: type: string data: type: object properties: id: type: integer chat_id: type: integer parent_id: type: integer session_id: type: integer role: type: string content: type: string model_name: type: string tool_calls: type: string tool_call_id: type: integer is_active: type: boolean created_at: type: string updated_at: type: string 401: $ref: '../../main.yaml#/components/responses/Unauthorized' 422: $ref: '../../main.yaml#/components/responses/ValidationError'