v1

latestOpenAPI 3.0.22026-07-174617345.8 KB
Message

Update the reaction for a specific message

put/api/v1/projects/{projectId}/conversations/{sessionId}/messages/{promptId}/feedback

Path parameters

projectIdinteger required
Example:1

The ID of the agent to get the messages for

sessionIdstring required
Example:1

The session ID of the conversation to get the messages for

promptIdinteger required

The message id of the message

Request body

reactionstring

The new reaction

Example request

{
  "reaction": "liked"
}

Response

Feedback has been updated

status'error' | 'success'

The status of the response

Example response

{
  "status": "success",
  "data": {
    "id": 1,
    "user_id": 1,
    "user_query": "What is the meaning of life?",
    "openai_response": "The meaning of life is to be happy.",
    "created_at": "2021-01-01 00:00:00",
    "updated_at": "2021-01-01 00:00:00",
    "conversation_id": 1,
    "citations": [
      1,
      2,
      3
    ],
    "metadata": {
      "user_ip": "127.0.0.1",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)",
      "external_id": "ext_id_1234567890",
      "request_source": "web"
    },
    "response_feedback": {
      "created_at": "2024-08-27T21:07:20.000000Z",
      "updated_at": "2024-08-27T21:07:20.000000Z",
      "user_id": 1,
      "reaction": "liked"
    }
  }
}