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>",
  "quotes": {
    "quotes": [
      {
        "quote": "<string>",
        "document_id": "<string>",
        "source_type": "<string>",
        "semantic_identifier": "<string>",
        "blurb": "<string>",
        "link": "<string>"
      }
    ]
  },
  "citations": [
    {
      "citation_num": 123,
      "document_id": "<string>"
    }
  ],
  "docs": {
    "top_documents": [
      {
        "document_id": "<string>",
        "chunk_ind": 123,
        "semantic_identifier": "<string>",
        "blurb": "<string>",
        "source_type": "ingestion_api",
        "boost": 123,
        "hidden": true,
        "metadata": {},
        "match_highlights": [
          "<string>"
        ],
        "db_doc_id": 123,
        "link": "<string>",
        "score": 0,
        "updated_at": "2023-11-07T05:31:56Z",
        "primary_owners": [
          "<string>"
        ],
        "secondary_owners": [
          "<string>"
        ]
      }
    ],
    "recency_bias_multiplier": 123,
    "rephrased_query": "<string>",
    "predicted_flow": "search",
    "predicted_search": "keyword",
    "applied_source_filters": [
      "ingestion_api"
    ],
    "applied_time_cutoff": "2023-11-07T05:31:56Z"
  },
  "llm_chunks_indices": [
    123
  ],
  "error_msg": "<string>",
  "answer_valid": true,
  "chat_message_id": 123,
  "contexts": {
    "contexts": [
      {
        "content": "<string>",
        "document_id": "<string>",
        "semantic_identifier": "<string>",
        "blurb": "<string>"
      }
    ]
  }
}

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