Skip to content

Commit 6872817

Browse files
committed
Remove request to set default chat model during interactive init
It wasn't being set correctly and seems unnecessary as can switch to desired chat models via the settings page or chat side pane easily
1 parent 0c257c0 commit 6872817

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/khoj/utils/initialization.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -159,23 +159,7 @@ def _create_chat_configuration():
159159
interactive=interactive,
160160
)
161161

162-
# Explicitly set default chat model
163-
chat_models_configured = ChatModel.objects.count()
164-
if chat_models_configured > 0:
165-
default_chat_model_name = ChatModel.objects.first().name
166-
# If there are multiple chat models, ask the user to choose the default chat model
167-
if chat_models_configured > 1 and interactive:
168-
user_chat_model_name = input(
169-
f"Enter the default chat model to use (default: {default_chat_model_name}): "
170-
)
171-
else:
172-
user_chat_model_name = None
173-
174-
# If the user's choice is valid, set it as the default chat model
175-
if user_chat_model_name and ChatModel.objects.filter(name=user_chat_model_name).exists():
176-
default_chat_model_name = user_chat_model_name
177-
178-
logger.info("🗣️ Chat model configuration complete")
162+
logger.info("🗣️ Chat model configuration complete")
179163

180164
# Set up offline speech to text model
181165
use_offline_speech2text_model = "n" if not interactive else input("Use offline speech to text model? (y/n): ")

0 commit comments

Comments
 (0)