Lookback 3 previous turns to select next tool, for questions history

This commit is contained in:
Debanjum
2025-05-29 11:23:01 -07:00
parent d511cbfa34
commit b6aa77a6f5
2 changed files with 2 additions and 2 deletions

View File

@@ -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:

View File

@@ -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}"