From 0a31ddaae6f449f3160589208bcfaffe3ee9913d Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Tue, 22 Apr 2025 01:41:53 +0530 Subject: [PATCH] (feat:storage) use get storage --- application/llm/google_ai.py | 3 +-- application/llm/openai.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/application/llm/google_ai.py b/application/llm/google_ai.py index 0cfda686..06dbbdfd 100644 --- a/application/llm/google_ai.py +++ b/application/llm/google_ai.py @@ -5,7 +5,6 @@ import json from application.llm.base import BaseLLM from application.storage.storage_creator import StorageCreator -from application.core.settings import settings class GoogleLLM(BaseLLM): @@ -14,7 +13,7 @@ class GoogleLLM(BaseLLM): self.api_key = api_key self.user_api_key = user_api_key self.client = genai.Client(api_key=self.api_key) - self.storage = StorageCreator.create_storage(getattr(settings, "STORAGE_TYPE", "local")) + self.storage = StorageCreator.get_storage() def get_supported_attachment_types(self): """ diff --git a/application/llm/openai.py b/application/llm/openai.py index 87eb295b..e8df92dd 100644 --- a/application/llm/openai.py +++ b/application/llm/openai.py @@ -19,7 +19,7 @@ class OpenAILLM(BaseLLM): self.client = OpenAI(api_key=api_key) self.api_key = api_key self.user_api_key = user_api_key - self.storage = StorageCreator.create_storage(getattr(settings, "STORAGE_TYPE", "local")) + self.storage = StorageCreator.get_storage() def _clean_messages_openai(self, messages): cleaned_messages = []