curl --request POST \
--url https://api.trieve.ai/api/topic \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"first_user_message": "<string>",
"metadata": "<any>",
"name": "<string>",
"owner_id": "<string>"
}'
{
"created_at": "2021-01-01 00:00:00.000",
"dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"deleted": false,
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"owner_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"updated_at": "2021-01-01 00:00:00.000"
}
Create a new chat topic. Topics are attached to a owner_id’s and act as a coordinator for conversation message history of gen-AI chat sessions. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
curl --request POST \
--url https://api.trieve.ai/api/topic \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"first_user_message": "<string>",
"metadata": "<any>",
"name": "<string>",
"owner_id": "<string>"
}'
{
"created_at": "2021-01-01 00:00:00.000",
"dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"deleted": false,
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"owner_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.
JSON request payload to create chat topic
The body is of type object
.
The JSON response payload containing the created topic
The response is of type object
.
Was this page helpful?