tools.tool_vector_search module
Semantic search across message history using vector embeddings.
- async tools.tool_vector_search.run(query, top_k=10, channel_id='', *, ctx=None)[source]
Execute this tool and return the result.
- Parameters:
query (
str) – Search query or input string.top_k (
int) – Maximum number of results to return (clamped to 1-50).channel_id (
str) – Optional Discord/Matrix channel identifier to filter results. Empty string searches across all channels.ctx (
ToolContext|None) – Tool execution context; itsmessage_cachesupplies the vector search backend.
- Returns:
JSON string containing the query, result count, and matched messages.
- Return type: