mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Use prefetch_related for the openai_config when retrieving all chatmodeloptions async
This commit is contained in:
@@ -763,7 +763,7 @@ class ConversationAdapters:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def aget_all_conversation_configs():
|
async def aget_all_conversation_configs():
|
||||||
return await sync_to_async(list)(ChatModelOptions.objects.all())
|
return await sync_to_async(list)(ChatModelOptions.objects.prefetch_related("openai_config").all())
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_vision_enabled_config():
|
def get_vision_enabled_config():
|
||||||
|
|||||||
Reference in New Issue
Block a user