Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GCS dependency for backend and prompt service #1106

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 80 additions & 80 deletions backend/pdm.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
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:
Expand All @@ -20,11 +17,6 @@ def __init__(self, log_level: LogLevel = LogLevel.INFO, org_id: str = "") -> Non
self.log_level = log_level
self.org_id = org_id
self.workflow_filestorage = None
if check_feature_flag_status(FeatureFlag.REMOTE_FILE_STORAGE):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harini-venkataraman Wondering if we should initialise workflow_filestorage to GCS here. This will save us from doing checks like provider==gcs in the SDK PR.
This is based on the assumption that PromptIdeBase tool is only used in the context of PromptStudio and no other tool
I think if we rename workflow_filestorage to a more generic name like filestorage, it would look much cleaner. But we can do that later.

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)

Expand Down
1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies = [
"social-auth-app-django==5.3.0", # For OAuth
"social-auth-core==4.4.2", # For OAuth
"unstract-sdk~=0.56.0rc4",
"gcsfs",
# ! IMPORTANT!
# Indirect local dependencies usually need to be added in their own projects
# as: https://pdm-project.org/latest/usage/dependency/#local-dependencies.
Expand Down
148 changes: 74 additions & 74 deletions platform-service/pdm.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion platform-service/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = [
"cryptography>=41.0.7",
"requests>=2.31.0",
"unstract-sdk~=0.56.0rc4",
"gcsfs==2024.10.0",
"gcsfs",
"unstract-flags @ file:///${PROJECT_ROOT}/../unstract/flags",
]
requires-python = ">=3.9,<3.11.1"
Expand Down
Loading