Search
MessageSearchResult
dataclass
content
instance-attribute
metadata
instance-attribute
qdrant_id
instance-attribute
score
instance-attribute
__init__(qdrant_id, content, metadata, score)
as_artifact()
as_content()
MessageSearchResults
dataclass
results
instance-attribute
__init__(results)
__post_init__()
as_artifact()
as_content()
search_messages(uow, query_text, user_id, conversation_uid=None, thread_uid=None, embed_type=None, max_results=None, max_message_age=None, message_types=None, result_index_offset=None, include_long_content=False)
async
Search for message contents/snippets in the vectorstore.
Optionally, filter or customize the search.
| PARAMETER | DESCRIPTION |
|---|---|
uow
|
Search unit of work.
TYPE:
|
query_text
|
Text to search for (by embedding and doing similarity search).
TYPE:
|
user_id
|
User id to filter by.
TYPE:
|
conversation_uid
|
Conversation uid to filter by.
TYPE:
|
thread_uid
|
Thread uid to filter by. (Assistant run)
TYPE:
|
embed_type
|
Type of embedding to search for (default None means all types).
TYPE:
|
max_results
|
Max number of results to return.
TYPE:
|
max_message_age
|
Maximum age of messages to search.
TYPE:
|
message_types
|
Types of messages to search.
TYPE:
|
result_index_offset
|
Offset of the first result to return.
TYPE:
|
include_long_content
|
Whether to also search messages with long content (EmbeddedContentLocation).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MessageSearchResults
|
MessageSearchResults (has list of MessageSearchResult with methods to transform) |