Message
Create message
Chunk
- POSTCreate or Upsert Chunk or Chunks
- POSTSearch
- POSTAutocomplete
- POSTGet Recommended Chunks
- POSTScroll Chunks
- POSTCount chunks above threshold
- POSTGenerate suggested queries
- POSTRAG on Specified Chunks
- PUTUpdate Chunk
- PUTUpdate Chunk By Tracking Id
- GETGet Chunk By Id
- GETGet Chunk By Tracking Id
- POSTGet Chunks By Tracking Ids
- POSTGet Chunks By Ids
- DELDelete Chunk
- DELDelete Chunk By Tracking Id
- DELBulk Delete Chunks
- POSTSplit HTML Content into Chunks
Chunk Group
- POSTCreate or Upsert Group or Groups
- POSTSearch Over Groups
- POSTSearch Within Group
- POSTGet Recommended Groups
- POSTAdd Chunk to Group
- POSTAdd Chunk to Group by Tracking ID
- POSTGet Groups for Chunks
- GETGet Chunks in Group by Tracking ID
- GETGet Group by Tracking ID
- PUTUpdate Group
- DELRemove Chunk from Group
- DELDelete Group by Tracking ID
- DELDelete Group
- GETGet Group
- GETGet Chunks in Group
- GETGet Groups for Dataset
Message
Crawl
File
Analytics
Dataset
- POSTCreate Dataset
- POSTBatch Create Datasets
- POSTGet All Tags
- POSTGet events for the dataset
- PUTUpdate Dataset by ID or Tracking ID
- PUTClear Dataset
- GETGet Dataset By ID
- GETGet Dataset by Tracking ID
- GETGet Datasets from Organization
- POSTCreate ETL Job
- PUTCreate Pagefind Index for Dataset
- GETGet Pagefind Index Url for Dataset
- GETGet Usage By Dataset ID
- GETGet dataset crawl options
- GETGet apipublic page
- DELDelete Dataset
- DELDelete Dataset by Tracking ID
Organization
Health
Stripe
Metrics
Message
Create message
Create message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions.Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
POST
/
api
/
message
curl --request POST \
--url https://api.trieve.ai/api/message \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"audio_input": "<string>",
"concat_user_messages_query": true,
"context_options": {
"include_links": true
},
"currency": "<string>",
"filters": {
"must": [
{
"field": "tag_set",
"match_all": [
"A",
"B"
]
},
{
"field": "num_value",
"range": {
"gte": 10,
"lte": 25
}
}
]
},
"highlight_options": {
"highlight_delimiters": [
"<string>"
],
"highlight_max_length": 1,
"highlight_max_num": 1,
"highlight_results": true,
"highlight_strategy": "exactmatch",
"highlight_threshold": 123,
"highlight_window": 1,
"post_tag": "<string>",
"pre_tag": "<string>"
},
"image_urls": [
"<string>"
],
"llm_options": {
"completion_first": true,
"frequency_penalty": 123,
"image_config": {
"images_per_chunk": 1,
"use_images": true
},
"max_tokens": 1,
"presence_penalty": 123,
"stop_tokens": [
"<string>"
],
"stream_response": true,
"system_prompt": "<string>",
"temperature": 123
},
"metadata": "<any>",
"new_message_content": "<string>",
"no_result_message": "<string>",
"only_include_docs_used": true,
"page_size": 1,
"remove_stop_words": true,
"score_threshold": 123,
"search_query": "<string>",
"search_type": "fulltext",
"sort_options": {
"location_bias": {
"bias": 123,
"location": {
"lat": 123,
"lon": 123
}
},
"mmr": {
"mmr_lambda": 123,
"use_mmr": true
},
"recency_bias": 123,
"sort_by": {
"direction": "desc",
"field": "<string>",
"prefetch_amount": 1
},
"tag_weights": {},
"use_weights": true
},
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"typo_options": {
"correct_typos": true,
"disable_on_word": [
"<string>"
],
"one_typo_word_range": {
"max": 1,
"min": 1
},
"prioritize_domain_specifc_words": true,
"two_typo_word_range": {
"max": 1,
"min": 1
}
},
"use_group_search": true,
"use_quote_negated_terms": true,
"user_id": "<string>"
}'
"<string>"
Authorizations
Headers
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 create a message completion
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
.
Was this page helpful?
curl --request POST \
--url https://api.trieve.ai/api/message \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"audio_input": "<string>",
"concat_user_messages_query": true,
"context_options": {
"include_links": true
},
"currency": "<string>",
"filters": {
"must": [
{
"field": "tag_set",
"match_all": [
"A",
"B"
]
},
{
"field": "num_value",
"range": {
"gte": 10,
"lte": 25
}
}
]
},
"highlight_options": {
"highlight_delimiters": [
"<string>"
],
"highlight_max_length": 1,
"highlight_max_num": 1,
"highlight_results": true,
"highlight_strategy": "exactmatch",
"highlight_threshold": 123,
"highlight_window": 1,
"post_tag": "<string>",
"pre_tag": "<string>"
},
"image_urls": [
"<string>"
],
"llm_options": {
"completion_first": true,
"frequency_penalty": 123,
"image_config": {
"images_per_chunk": 1,
"use_images": true
},
"max_tokens": 1,
"presence_penalty": 123,
"stop_tokens": [
"<string>"
],
"stream_response": true,
"system_prompt": "<string>",
"temperature": 123
},
"metadata": "<any>",
"new_message_content": "<string>",
"no_result_message": "<string>",
"only_include_docs_used": true,
"page_size": 1,
"remove_stop_words": true,
"score_threshold": 123,
"search_query": "<string>",
"search_type": "fulltext",
"sort_options": {
"location_bias": {
"bias": 123,
"location": {
"lat": 123,
"lon": 123
}
},
"mmr": {
"mmr_lambda": 123,
"use_mmr": true
},
"recency_bias": 123,
"sort_by": {
"direction": "desc",
"field": "<string>",
"prefetch_amount": 1
},
"tag_weights": {},
"use_weights": true
},
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"typo_options": {
"correct_typos": true,
"disable_on_word": [
"<string>"
],
"one_typo_word_range": {
"max": 1,
"min": 1
},
"prioritize_domain_specifc_words": true,
"two_typo_word_range": {
"max": 1,
"min": 1
}
},
"use_group_search": true,
"use_quote_negated_terms": true,
"user_id": "<string>"
}'
"<string>"