Skip to content

Modifications

add_all_user_messages(uow, user_id, wait=False, updatable=None) async

Add users messages to qdrant (loading from db).

RETURNS DESCRIPTION
int

Number of messages added.

add_messages(uow, messages, user_id, conversation_uid, thread_uid, wait=False, text_splitter=None) async

Add new messages to the vectorstore.

PARAMETER DESCRIPTION
uow

The unit of work for the message search service.

TYPE: MessageSearchUnitOfWork

messages

The messages to add.

TYPE: list[MessageSchema]

user_id

The user the message belongs to.

TYPE: UserID | None

conversation_uid

The conversation the message belongs to.

TYPE: UUID | None

thread_uid

The thread that the message belongs to.

TYPE: UUID | None

wait

Whether to wait for the operation to complete (defaults to False).

TYPE: bool DEFAULT: False

text_splitter

The text splitter to use for splitting long messages into snippets.

TYPE: TextSplitter | None DEFAULT: None

delete_all_user_messages(uow, user_id, wait=True) async

Delete all messages for a user from the vectorstore.