From 78012b8111aa5252bb522531de27cbe42f9cc05d Mon Sep 17 00:00:00 2001 From: sabaimran Date: Thu, 3 Aug 2023 00:39:06 -0700 Subject: [PATCH] Avoid null ref issue when setting model state for web UI. Closes #410 --- src/khoj/routers/web_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/khoj/routers/web_client.py b/src/khoj/routers/web_client.py index 9b199050..f856aeb5 100644 --- a/src/khoj/routers/web_client.py +++ b/src/khoj/routers/web_client.py @@ -48,6 +48,8 @@ if not state.demo: "github": False, "notion": False, "enable_offline_model": False, + "conversation_openai": False, + "conversation_gpt4all": False, } if state.content_index: @@ -62,7 +64,7 @@ if not state.demo: } ) - if state.processor_config: + if state.processor_config and state.processor_config.conversation: successfully_configured.update( { "conversation_openai": state.processor_config.conversation.openai_model is not None,