mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-28 21:05:17 +02:00
Add query override
This commit is contained in:
@@ -129,7 +129,7 @@ def stream_answer_objects(
|
|||||||
messages=history, max_tokens=max_history_tokens
|
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,
|
user_query=query_msg.message,
|
||||||
history_str=history_str,
|
history_str=history_str,
|
||||||
)
|
)
|
||||||
|
@@ -34,10 +34,17 @@ class DirectQARequest(ChunkContext):
|
|||||||
skip_llm_chunk_filter: bool | None = None
|
skip_llm_chunk_filter: bool | None = None
|
||||||
chain_of_thought: bool = False
|
chain_of_thought: bool = False
|
||||||
return_contexts: 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:
|
# This is to toggle agentic evaluation:
|
||||||
# 1. Evaluates whether each response is relevant or not
|
# 1. Evaluates whether each response is relevant or not
|
||||||
# 2. Provides a summary of the document's relevance in the resulsts
|
# 2. Provides a summary of the document's relevance in the resulsts
|
||||||
llm_doc_eval: bool = False
|
llm_doc_eval: bool = False
|
||||||
|
|
||||||
# If True, skips generative an AI response to the search query
|
# If True, skips generative an AI response to the search query
|
||||||
skip_gen_ai_answer_generation: bool = False
|
skip_gen_ai_answer_generation: bool = False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user