POST
/
api
/
chunk
/
generate
curl --request POST \
  --url https://api.trieve.ai/api/chunk/generate \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Dataset: <tr-dataset>' \
  --data '{
  "chunk_ids": [
    "d290f1ee-6c54-4b01-90e6-d701748f0851"
  ],
  "prev_messages": [
    {
      "content": "How do I setup RAG with Trieve?",
      "role": "user"
    }
  ],
  "prompt": "Respond to the instruction and include the doc numbers that you used in square brackets at the end of the sentences that you used the docs for:",
  "stream_response": true
}'
"<string>"

Authorizations

Authorization
string
header
required

Headers

TR-Dataset
string
required

The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.

Body

application/json

JSON request payload to perform RAG on some chunks (chunks)

The body is of type object.

Response

200
text/plain

This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming.

The response is of type string.