Get RAG sources for a specific message
GET
/ai-agents/chat/messages/{messageId}/rag-sources
const url = 'https://api.matiasimpulso.com/ai-agents/chat/messages/1/rag-sources';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.matiasimpulso.com/ai-agents/chat/messages/1/rag-sources \ --header 'Authorization: Bearer <token>'Returns the Knowledge Base sources that were used to generate a message response (if RAG was used)
Authorizations
Sección titulada « Authorizations »Parameters
Sección titulada « Parameters »Path Parameters
Sección titulada « Path Parameters » messageId
required
number
Responses
Sección titulada « Responses »RAG sources retrieved successfully
Media type application/json
object
data
object
messageId
number
usedRag
boolean
sources
Array<object>
object
content
string
score
number
location
object
metadata
object
message
string
Example generated
{ "data": { "messageId": 1, "usedRag": true, "sources": [ { "content": "example", "score": 1, "location": {}, "metadata": {} } ] }, "message": "example"}Message not found