Skip to main content
POST
/
query
/
answer-with-quote
Get Answer With Quote
curl --request POST \
  --url https://api.example.com/query/answer-with-quote \
  --header 'Content-Type: application/json' \
  --cookie fastapiusersauth= \
  --data '
{
  "messages": [
    {
      "message": "<string>",
      "sender": "<string>",
      "role": "user"
    }
  ],
  "persona_id": 123,
  "prompt_id": 123,
  "retrieval_options": {
    "run_search": "always",
    "real_time": true,
    "filters": {
      "source_type": [
        "ingestion_api"
      ],
      "document_set": [
        "<string>"
      ],
      "time_cutoff": "2023-11-07T05:31:56Z",
      "tags": [
        {
          "tag_key": "<string>",
          "tag_value": "<string>"
        }
      ]
    },
    "enable_auto_detect_filters": true,
    "offset": 123,
    "limit": 123
  },
  "chain_of_thought": false,
  "return_contexts": false
}
'
{
  "answer": "<string>",
  "rephrase": "<string>",
  "citations": [
    {
      "citation_num": 123,
      "document_id": "<string>"
    }
  ],
  "llm_chunks_indices": [
    123
  ],
  "error_msg": "<string>",
  "answer_valid": true,
  "chat_message_id": 123
}

Authorizations

fastapiusersauth
string
cookie
required

Body

application/json
messages
ThreadMessage · object[]
required
persona_id
integer
required
prompt_id
integer
retrieval_options
RetrievalDetails · object
chain_of_thought
boolean
default:false
return_contexts
boolean
default:false

Response

Successful Response

answer
string
rephrase
string
quotes
UtopikAIQuotes · object
citations
CitationInfo · object[]
docs
QADocsResponse · object
llm_chunks_indices
integer[]
error_msg
string
answer_valid
boolean
default:true
chat_message_id
integer
contexts
UtopikAIContexts · object