mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Fix configuration for default voice model settings
This commit is contained in:
parent
998d08f155
commit
b17577c138
2 changed files with 4 additions and 2 deletions
|
@ -752,7 +752,7 @@ class ConversationAdapters:
|
|||
voice_model_config = await UserVoiceModelConfig.objects.filter(user=user).prefetch_related("setting").afirst()
|
||||
if voice_model_config:
|
||||
return voice_model_config.setting
|
||||
return None
|
||||
return await VoiceModelOption.objects.afirst()
|
||||
|
||||
@staticmethod
|
||||
def get_voice_model_options():
|
||||
|
@ -763,7 +763,7 @@ class ConversationAdapters:
|
|||
voice_model_config = UserVoiceModelConfig.objects.filter(user=user).prefetch_related("setting").first()
|
||||
if voice_model_config:
|
||||
return voice_model_config.setting
|
||||
return None
|
||||
return VoiceModelOption.objects.first()
|
||||
|
||||
@staticmethod
|
||||
def get_default_conversation_config():
|
||||
|
|
|
@ -27,6 +27,7 @@ from khoj.database.models import (
|
|||
Subscription,
|
||||
TextToImageModelConfig,
|
||||
UserSearchModelConfig,
|
||||
UserVoiceModelConfig,
|
||||
VoiceModelOption,
|
||||
)
|
||||
from khoj.utils.helpers import ImageIntentType
|
||||
|
@ -99,6 +100,7 @@ admin.site.register(UserSearchModelConfig)
|
|||
admin.site.register(ClientApplication)
|
||||
admin.site.register(GithubConfig)
|
||||
admin.site.register(NotionConfig)
|
||||
admin.site.register(UserVoiceModelConfig)
|
||||
admin.site.register(VoiceModelOption)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue