mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Lookback 3 previous turns to select next tool, for questions history
This commit is contained in:
@@ -221,7 +221,7 @@ def construct_chat_history(conversation_history: dict, n: int = 4, agent_name="A
|
||||
def construct_question_history(
|
||||
conversation_log: dict,
|
||||
include_query: bool = True,
|
||||
lookback: int = 4,
|
||||
lookback: int = 6,
|
||||
query_prefix: str = "Q",
|
||||
agent_name: str = "Khoj",
|
||||
) -> str:
|
||||
|
||||
@@ -386,7 +386,7 @@ async def aget_data_sources_and_output_format(
|
||||
if len(agent_outputs) == 0 or output.value in agent_outputs:
|
||||
output_options_str += f'- "{output.value}": "{description}"\n'
|
||||
|
||||
chat_history = construct_chat_history(conversation_history)
|
||||
chat_history = construct_chat_history(conversation_history, n=6)
|
||||
|
||||
if query_images:
|
||||
query = f"[placeholder for {len(query_images)} user attached images]\n{query}"
|
||||
|
||||
Reference in New Issue
Block a user