Chunk
RAG on Specified Chunks
Changed onThis endpoint exists as an alternative to the topic+message resource pattern where our Trieve handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt and the conversation is ephemeral.
post/api/chunk/generate
Request
- Base URLhttps://api.trieve.ai
- URLhttps://api.trieve.ai/api/chunk/generate
- AuthAPI key in header Authorization
Headers
TR-Datasetstring uuid 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.
Request body
Example request
{
"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
}Response
This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming.
Changes
- info
added the new optional request property
- info
- warning
removed the request property
- warning