Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

Fix/prompt studio basetool (#860)

alic4a6593cf52f
diff --git a/backend/prompt_studio/prompt_studio_core_v2/prompt_ide_base_tool.py b/backend/prompt_studio/prompt_studio_core_v2/prompt_ide_base_tool.py
index d32828e3e..e72a7ca76 100644
--- a/backend/prompt_studio/prompt_studio_core_v2/prompt_ide_base_tool.py
+++ b/backend/prompt_studio/prompt_studio_core_v2/prompt_ide_base_tool.py
@@ -5,6 +5,9 @@ from prompt_studio.prompt_studio_core_v2.constants import ToolStudioKeys
from unstract.sdk.constants import LogLevel
from unstract.sdk.tool.stream import StreamMixin
+from backend.constants import FeatureFlag
+from unstract.flags.feature_flag import check_feature_flag_status
+
class PromptIdeBaseTool(StreamMixin):
def __init__(self, log_level: LogLevel = LogLevel.INFO, org_id: str = "") -> None:
@@ -16,6 +19,13 @@ class PromptIdeBaseTool(StreamMixin):
"""
self.log_level = log_level
self.org_id = org_id
+ self.workflow_filestorage = None
+ if check_feature_flag_status(FeatureFlag.REMOTE_FILE_STORAGE):
+ from unstract.filesystem import FileStorageType, FileSystem
+
+ file_system = FileSystem(FileStorageType.WORKFLOW_EXECUTION)
+ self.workflow_filestorage = file_system.get_file_storage()
+
super().__init__(log_level=log_level)
def get_env_or_die(self, env_key: str) -> str:
diff --git a/unstract/filesystem/src/unstract/filesystem/file_storage_config.py b/unstract/filesystem/src/unstract/filesystem/file_storage_config.py
index b0b497b7b..eb716fb48 100644
--- a/unstract/filesystem/src/unstract/filesystem/file_storage_config.py
+++ b/unstract/filesystem/src/unstract/filesystem/file_storage_config.py
@@ -13,7 +13,7 @@ logger = logging.getLogger(__name__)
def get_provider(var_name: str, default: str = "minio") -> FileStorageProvider:
"""Retrieve the file storage provider based on an environment variable."""
- provider_name = os.environ.get(var_name, default).capitalize()
+ provider_name = os.environ.get(var_name, default).upper()
try:
# Attempt to map the provider name to an enum value, case-insensitively
return FileStorageProvider[provider_name]