mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Fix handling failure to select default chat tools
Issue: chosen_io variable was accessed before initialization when ValueError was raise. Fix: Set chosen_io to fallback values on failure to select default chat tools
This commit is contained in:
@@ -995,7 +995,7 @@ async def event_generator(
|
||||
)
|
||||
except ValueError as e:
|
||||
logger.error(f"Error getting data sources and output format: {e}. Falling back to default.")
|
||||
conversation_commands = [ConversationCommand.General]
|
||||
chosen_io = {"sources": [ConversationCommand.General], "output": ConversationCommand.Text}
|
||||
|
||||
conversation_commands = chosen_io.get("sources") + [chosen_io.get("output")]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user