Search in brand rag documents for similar documents

GET /chat/rag/search-documents

Headers

  • X-Popsell-Brand integer Required

    The id of the target brand

Query parameters

  • question string

    The question to search for

Responses

  • 200 application/json

    Returns the brand vectors that are similar to the question

    Hide response attributes Show response attributes object
    • id integer
    • content string
    • distance number
    • actions array[object]
      Hide actions attributes Show actions attributes object
      • type integer
      • id_chat_topic integer
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

GET /chat/rag/search-documents
curl \
 --request GET 'https://domain.tld/api/v2/chat/rag/search-documents' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "X-Popsell-Brand: 3"
Response examples (200)
[
  {
    "id": 42,
    "content": "string",
    "distance": 42.0,
    "actions": [
      {
        "type": 42,
        "id_chat_topic": 42
      }
    ]
  }
]
Response examples (401)
{
  "message": "Unauthorized."
}