LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
fix: Reverted bucket removal for GCS (#622)
Chandrasekharan M73679b16d9e1
diff --git a/backend/connector_processor/connector_processor.py b/backend/connector_processor/connector_processor.pyindex 770d03c49..e49d1910a 100644--- a/backend/connector_processor/connector_processor.py+++ b/backend/connector_processor/connector_processor.py@@ -133,7 +133,7 @@ class ConnectorProcessor:logger.info(f"{connector_id} test result: {test_result}")return test_resultexcept ConnectorError as e:- raise TestConnectorInputError(core_err=e)+ raise TestConnectorInputError(core_err=e) from edef get_connector_data_with_key(connector_id: str, key_value: str) -> Any:"""Generic Function to get connector data with provided key."""diff --git a/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/google_cloud_storage.py b/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/google_cloud_storage.pyindex 10433ca08..025ede70c 100644--- a/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/google_cloud_storage.py+++ b/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/google_cloud_storage.py@@ -14,6 +14,7 @@ logger = logging.getLogger(__name__)class GoogleCloudStorageFS(UnstractFileSystem):def __init__(self, settings: dict[str, Any]):super().__init__("GoogleCloudStorage")+ self.bucket = settings.get("bucket", "")project_id = settings.get("project_id", "")json_credentials = json.loads(settings.get("json_credentials", "{}"))self.gcs_fs = GCSFileSystem(token=json_credentials, project=project_id)@@ -63,7 +64,7 @@ class GoogleCloudStorageFS(UnstractFileSystem):def test_credentials(self) -> bool:"""To test credentials for Google Cloud Storage."""try:- is_dir = bool(self.get_fsspec_fs().isdir(""))+ is_dir = bool(self.get_fsspec_fs().isdir(self.bucket))if not is_dir:raise RuntimeError("Could not access root directory.")except Exception as e:diff --git a/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/static/json_schema.json b/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/static/json_schema.jsonindex cbf13ec61..fdccac7f3 100644--- a/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/static/json_schema.json+++ b/unstract/connectors/src/unstract/connectors/filesystems/google_cloud_storage/static/json_schema.json@@ -24,6 +24,11 @@"type": "string","title": "Project ID","description": "Name of the project ID."+ },+ "bucket": {+ "type": "string",+ "title": "Bucket Name",+ "description": "Name of the bucket to be restricted to."}}}