mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Construct available data sources, output modes as a bullet list in prompts
This commit is contained in:
parent
f28fb89af8
commit
9a516bed47
1 changed files with 6 additions and 2 deletions
|
@ -153,15 +153,17 @@ async def aget_relevant_information_sources(query: str, conversation_history: di
|
|||
"""
|
||||
|
||||
tool_options = dict()
|
||||
tool_options_str = ""
|
||||
|
||||
for tool, description in tool_descriptions_for_llm.items():
|
||||
tool_options[tool.value] = description
|
||||
tool_options_str += f'- "{tool.value}": "{description}"\n'
|
||||
|
||||
chat_history = construct_chat_history(conversation_history)
|
||||
|
||||
relevant_tools_prompt = prompts.pick_relevant_information_collection_tools.format(
|
||||
query=query,
|
||||
tools=str(tool_options),
|
||||
tools=tool_options_str,
|
||||
chat_history=chat_history,
|
||||
)
|
||||
|
||||
|
@ -195,15 +197,17 @@ async def aget_relevant_output_modes(query: str, conversation_history: dict):
|
|||
"""
|
||||
|
||||
mode_options = dict()
|
||||
mode_options_str = ""
|
||||
|
||||
for mode, description in mode_descriptions_for_llm.items():
|
||||
mode_options[mode.value] = description
|
||||
mode_options_str += f'- "{mode.value}": "{description}"\n'
|
||||
|
||||
chat_history = construct_chat_history(conversation_history)
|
||||
|
||||
relevant_mode_prompt = prompts.pick_relevant_output_mode.format(
|
||||
query=query,
|
||||
modes=str(mode_options),
|
||||
modes=mode_options_str,
|
||||
chat_history=chat_history,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue