create defiltered query after conversation command is extracted

This commit is contained in:
sabaimran 2024-11-01 16:48:03 -07:00
parent b79a9ec36d
commit 327fcb8f62

View file

@ -716,7 +716,6 @@ async def chat(
## Extract Document References ## Extract Document References
compiled_references: List[Any] = [] compiled_references: List[Any] = []
inferred_queries: List[Any] = [] inferred_queries: List[Any] = []
defiltered_query = defilter_query(q)
if conversation_commands == [ConversationCommand.Default] or is_automated_task: if conversation_commands == [ConversationCommand.Default] or is_automated_task:
conversation_commands = await aget_relevant_information_sources( conversation_commands = await aget_relevant_information_sources(
@ -751,6 +750,8 @@ async def chat(
await conversation_command_rate_limiter.update_and_check_if_valid(request, cmd) await conversation_command_rate_limiter.update_and_check_if_valid(request, cmd)
q = q.replace(f"/{cmd.value}", "").strip() q = q.replace(f"/{cmd.value}", "").strip()
defiltered_query = defilter_query(q)
if conversation_commands == [ConversationCommand.Research]: if conversation_commands == [ConversationCommand.Research]:
async for research_result in execute_information_collection( async for research_result in execute_information_collection(
request=request, request=request,