会话

回滚当前会话到指定用户或助手消息:删除其后消息,可到达时 git reset 工作区。

post/sessions/{session_id}/rewind

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/sessions/{session_id}/rewind
  • Auth
    • API key in header Authorization
    • or API key in header X-API-Key

Path parameters

session_idstring required

会话 ID

Request body

message_idstring required

MessageID is the message to rewind to. A user message deletes itself and everything after (the client prefills that question). An assistant message keeps itself and deletes everything after.

Response

回滚结果

object required

Changes