Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2024
1 parent ba8def6 commit 03174ef
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions prompt-service/src/unstract/prompt_service/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
ExecutionSource,
FeatureFlag,
FileStorageKeys,
FileStorageType,
)
from unstract.prompt_service.constants import PromptServiceContants as PSKeys
from unstract.prompt_service.db_utils import DBUtils
Expand All @@ -27,8 +26,8 @@

if check_feature_flag_status(FeatureFlag.REMOTE_FILE_STORAGE):
from unstract.sdk.file_storage import FileStorage, FileStorageProvider
from unstract.sdk.file_storage.env_helper import EnvHelper
from unstract.sdk.file_storage.constants import StorageType
from unstract.sdk.file_storage.env_helper import EnvHelper

load_dotenv()

Expand Down Expand Up @@ -305,16 +304,18 @@ def run_completion(
fs_instance: FileStorage = FileStorage(FileStorageProvider.LOCAL)
if execution_source == ExecutionSource.IDE.value:
fs_instance = EnvHelper.get_storage(
storage_type=StorageType.PERMANENT,
env_name=FileStorageKeys.REMOTE_STORAGE
storage_type=StorageType.PERMANENT,
env_name=FileStorageKeys.REMOTE_STORAGE,
)
if execution_source == ExecutionSource.TOOL.value:
fs_instance = EnvHelper.get_storage(
storage_type=StorageType.TEMPORARY,
env_name=FileStorageKeys.REMOTE_STORAGE,
)
highlight_data = highlight_data_plugin["entrypoint_cls"](
logger=current_app.logger, file_path=file_path, fs_instance=fs_instance
logger=current_app.logger,
file_path=file_path,
fs_instance=fs_instance,
).run
else:
highlight_data = highlight_data_plugin["entrypoint_cls"](
Expand Down

0 comments on commit 03174ef

Please sign in to comment.