Add query override

This commit is contained in:
Weves 2024-07-26 17:31:34 -07:00 committed by Chris Weaver
parent e422f96dff
commit d839595330
2 changed files with 8 additions and 1 deletions

View File

@ -129,7 +129,7 @@ def stream_answer_objects(
messages=history, max_tokens=max_history_tokens
)
rephrased_query = thread_based_query_rephrase(
rephrased_query = query_req.query_override or thread_based_query_rephrase(
user_query=query_msg.message,
history_str=history_str,
)

View File

@ -34,10 +34,17 @@ class DirectQARequest(ChunkContext):
skip_llm_chunk_filter: bool | None = None
chain_of_thought: bool = False
return_contexts: bool = False
# allows the caller to specify the exact search query they want to use
# can be used if the message sent to the LLM / query should not be the same
# will also disable Thread-based Rewording if specified
query_override: str | None = None
# This is to toggle agentic evaluation:
# 1. Evaluates whether each response is relevant or not
# 2. Provides a summary of the document's relevance in the resulsts
llm_doc_eval: bool = False
# If True, skips generative an AI response to the search query
skip_gen_ai_answer_generation: bool = False