Skip to content

Commit

Permalink
Removing unused helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
harini-venkataraman committed Dec 18, 2024
1 parent 03174ef commit db6c1dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 48 deletions.
18 changes: 1 addition & 17 deletions prompt-service/src/unstract/prompt_service/env_manager.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import json
import os
from typing import Any, Optional

from unstract.prompt_service.constants import FileStorageKeys
from typing import Optional


class EnvLoader:
Expand All @@ -12,16 +9,3 @@ def get_env_or_die(env_key: str, default: Optional[str] = None) -> str:
if env_value is None or env_value == "":
raise ValueError(f"Env variable {env_key} is required")
return env_value

@staticmethod
def load_provider_credentials() -> dict[str, Any]:
cred_env_data: str = EnvLoader.get_env_or_die(
env_key=FileStorageKeys.FILE_STORAGE_CREDENTIALS
)
credentials = json.loads(cred_env_data)
provider_data: dict[str, Any] = {}
provider_data[FileStorageKeys.FILE_STORAGE_PROVIDER] = credentials["provider"]
provider_data[FileStorageKeys.FILE_STORAGE_CREDENTIALS] = credentials[
"credentials"
]
return provider_data

This file was deleted.

0 comments on commit db6c1dd

Please sign in to comment.