mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 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
|
||||
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
|
||||
def get_vision_enabled_config():
|
||||
|
||||
Reference in New Issue
Block a user