Merge pull request #3753 from jonathan-rohde/fix/store-default-model

fix: preselect default model from config if no setting stored
This commit is contained in:
Timothy Jaeryang Baek 2024-07-10 12:51:17 -07:00 committed by GitHub
commit f7777f489e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -144,7 +144,10 @@
chatDirection = $settings.chatDirection ?? 'LTR';
userLocation = $settings.userLocation ?? false;
defaultModelId = ($settings?.models ?? ['']).at(0);
defaultModelId = $settings?.models?.at(0) ?? '';
if ($config?.default_models) {
defaultModelId = $config.default_models.split(',')[0];
}
backgroundImageUrl = $settings.backgroundImageUrl ?? null;
});

View File

@ -139,7 +139,7 @@ type Config = {
name: string;
version: string;
default_locale: string;
default_models: string[];
default_models: string;
default_prompt_suggestions: PromptSuggestion[];
features: {
auth: boolean;