PUT
/
api
/
message

Authorizations

Authorization
string
headerrequired

Headers

TR-Dataset
string
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.

Body

application/json
concat_user_messages_query
boolean | null

If concat user messages query is set to true, all of the user messages in the topic will be concatenated together and used as the search query. If not specified, this defaults to false. Default is false.

filters
object

Filters is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata.

highlight_options
object

Highlight Options lets you specify different methods to highlight the chunks in the result set. If not specified, this defaults to the score of the chunks.

llm_options
object

LLM options to use for the completion. If not specified, this defaults to the dataset's LLM options.

message_sort_order
integer
required

The sort order of the message to edit.

new_message_content
string
required

The new content of the message to replace the old content with.

page_size
integer | null

Page size is the number of chunks to fetch during RAG. If 0, then no search will be performed. If specified, this will override the N retrievals to include in the dataset configuration. Default is None.

score_threshold
number | null

Set score_threshold to a float to filter out chunks with a score below the threshold. This threshold applies before weight and bias modifications. If not specified, this defaults to 0.0.

search_query
string | null

Query is the search query. This can be any string. The search_query will be used to create a dense embedding vector and/or sparse vector which will be used to find the result set. If not specified, will default to the last user message or HyDE if HyDE is enabled in the dataset configuration. Default is None.

search_type
enum<string>
Available options:
fulltext,
semantic,
hybrid,
bm25
topic_id
string
required

The id of the topic to edit the message at the given sort order for.

user_id
string | null

The user_id is the id of the user who is making the request. This is used to track user interactions with the RAG results.