curl --request GET \
--url https://api.trieve.ai/api/messages/{messages_topic_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Dataset: <tr-dataset>'
[
{
"completion_tokens": 300,
"content": "Hello, world!",
"created_at": "2021-01-01 00:00:00.000",
"dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"deleted": false,
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"prompt_tokens": 300,
"role": "user",
"sort_order": 1,
"topic_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"updated_at": "2021-01-01 00:00:00.000"
}
]
If the topic is a RAG topic then the response will include Chunks first on each message. The structure will look like [chunks]||mesage
. See docs.trieve.ai for more information.
curl --request GET \
--url https://api.trieve.ai/api/messages/{messages_topic_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Dataset: <tr-dataset>'
[
{
"completion_tokens": 300,
"content": "Hello, world!",
"created_at": "2021-01-01 00:00:00.000",
"dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"deleted": false,
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"prompt_tokens": 300,
"role": "user",
"sort_order": 1,
"topic_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"updated_at": "2021-01-01 00:00:00.000"
}
]
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.
The ID of the topic to get messages for.
All messages relating to the topic with the given ID
The response is of type object[]
.
Was this page helpful?