Skip to content

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

fix: Propagated error from prompt-service back to BE (#1244)

Chandrasekharan M4d54877c7ca3
diff --git a/backend/prompt_studio/prompt_studio_core_v2/exceptions.py b/backend/prompt_studio/prompt_studio_core_v2/exceptions.py
index 32cf43a0f..21590931f 100644
--- a/backend/prompt_studio/prompt_studio_core_v2/exceptions.py
+++ b/backend/prompt_studio/prompt_studio_core_v2/exceptions.py
@@ -24,6 +24,15 @@ class IndexingAPIError(APIException):
self.status_code = status_code
+class ExtractionAPIError(APIException):
+ status_code = 500
+ default_detail = "Error while extracting file"
+
+ def __init__(self, detail: Optional[str] = None, status_code: int = 500):
+ super().__init__(detail)
+ self.status_code = status_code
+
+
class AnswerFetchError(APIException):
status_code = 500
default_detail = "Error occured while fetching response for the prompt"
diff --git a/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py b/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py
index 4ad5fdff3..fe045df49 100644
--- a/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py
+++ b/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py
@@ -34,6 +34,7 @@ from prompt_studio.prompt_studio_core_v2.exceptions import (
AnswerFetchError,
DefaultProfileError,
EmptyPromptError,
+ ExtractionAPIError,
IndexingAPIError,
NoPromptsFound,
OperationNotSupported,
@@ -1138,13 +1139,15 @@ class PromptStudioHelper:
)
headers = {Common.X_REQUEST_ID: StateStore.get(Common.REQUEST_ID)}
response = responder.index(payload=payload, headers=headers)
- try:
- response_text = PromptStudioHelper.handle_response(response)
- doc_id = json.loads(response_text).get("doc_id")
- except IndexingAPIError as e:
- logger.error(f"Failed to index document: {str(e)}")
- raise IndexingAPIError(f"Failed to index document: {str(e)}") from e
+ status_code = response.get("status_code")
+ if status_code == 200:
+ doc_id = json.loads(response.get("structure_output")).get("doc_id")
+ else:
+ error_message = f"Failed to index '{filename}'. " + response.get(
+ "error", ""
+ )
+ raise IndexingAPIError(error_message)
PromptStudioIndexHelper.handle_index_manager(
document_id=document_id,
@@ -1373,26 +1376,19 @@ class PromptStudioHelper:
)
headers = {Common.X_REQUEST_ID: StateStore.get(Common.REQUEST_ID)}
response = responder.extract(payload=payload, headers=headers)
- try:
- response_data = PromptStudioHelper.handle_response(response)
+ status_code = response.get("status_code")
+ if status_code == 200:
+ response_data = response.get("structure_output")
extracted_text = json.loads(response_data)
PromptStudioIndexHelper.mark_extraction_status(
document_id=document_id,
profile_manager=profile_manager,
doc_id=doc_id,
)
- except IndexingAPIError as e:
- logger.error(f"Failed to extract document: {str(e)}")
- raise IndexingAPIError(f"Failed to extract document: {str(e)}") from e
+ else:
+ error_message = f"Failed to extract '{filename}'. " + response.get(
+ "error", ""
+ )
+ raise ExtractionAPIError(error_message)
return extracted_text
-
- @staticmethod
- def handle_response(response: dict) -> dict:
- """Handles API responses stored in dictionary format."""
- status_code = response.get("status_code")
- if status_code == 200:
- return response.get("structure_output")
- else:
- error_message = response.get("error", "Unknown error")
- raise IndexingAPIError(f"Error while fetching response. {error_message}")
diff --git a/prompt-service/pdm.lock b/prompt-service/pdm.lock
index 613e945cd..7a998566a 100644
--- a/prompt-service/pdm.lock
+++ b/prompt-service/pdm.lock
@@ -2,10 +2,10 @@
# It is not intended for manual editing.
[metadata]
-groups = ["default", "deploy", "test"]
+groups = ["default", "deploy", "dev", "test"]
strategy = ["cross_platform", "inherit_metadata"]
lock_version = "4.4.2"
-content_hash = "sha256:2aa513059e35c24dcbbf3592ac4b227fd2473cfb75a29843918a4fb0a5a171e4"
+content_hash = "sha256:b991b85f2d6b223a45507d4d2b48e95d6cf529f514e21cb7fc6a9b7641a7583b"
[[package]]
name = "adlfs"
@@ -202,7 +202,7 @@ name = "amqp"
version = "5.3.1"
requires_python = ">=3.6"
summary = "Low-level AMQP client for Python (fork of amqplib)."
-groups = ["default"]
+groups = ["default", "dev"]
dependencies = [
"vine<6.0.0,>=5.0.0",
]
@@ -282,7 +282,7 @@ name = "async-timeout"
version = "5.0.1"
requires_python = ">=3.8"
summary = "Timeout context manager for asyncio programs"
-groups = ["default"]
+groups = ["default", "dev"]
marker = "python_full_version < \"3.11.3\""
files = [
{file = "async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c"},
@@ -523,7 +523,7 @@ name = "certifi"
version = "2025.1.31"
requires_python = ">=3.6"
summary = "Python package for providing Mozilla's CA Bundle."
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
{file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"},
{file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"},
@@ -583,7 +583,7 @@ name = "charset-normalizer"
version = "3.4.1"
requires_python = ">=3.7"
summary = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
{file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"},
{file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"},
@@ -1101,7 +1101,7 @@ files = [
[[package]]
name = "google-cloud-aiplatform"
-version = "1.87.0"
+version = "1.88.0"
requires_python = ">=3.8"
summary = "Vertex AI API client library"
groups = ["default"]
@@ -1120,8 +1120,8 @@ dependencies = [
"typing-extensions",
]
files = [
- {file = "google_cloud_aiplatform-1.87.0-py2.py3-none-any.whl", hash = "sha256:23421cb288550e1b35c5a81f471618e0c34c32dfc73db895498ac01c9a5fa46c"},
- {file = "google_cloud_aiplatform-1.87.0.tar.gz", hash = "sha256:3628c573d677d72c7ad62e9c898ff7073c915241e86fd563ff2ee581d281e494"},
+ {file = "google_cloud_aiplatform-1.88.0-py2.py3-none-any.whl", hash = "sha256:7d632577b758021a1306e2c6d3e837e41da635b651776041d4a54cdbbf63f6f1"},
+ {file = "google_cloud_aiplatform-1.88.0.tar.gz", hash = "sha256:07a06549f97a98e4d67d193ec225c581415f142b6a1d3aa4270187d429045d52"},
]
[[package]]
@@ -1364,7 +1364,7 @@ name = "grpcio"
version = "1.60.0"
requires_python = ">=3.7"
summary = "HTTP/2-based RPC framework"
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
{file = "grpcio-1.60.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:d020cfa595d1f8f5c6b343530cd3ca16ae5aefdd1e832b777f9f0eb105f5b139"},
{file = "grpcio-1.60.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:b98f43fcdb16172dec5f4b49f2fece4b16a99fd284d81c6bbac1b3b69fcbe0ff"},
@@ -1432,7 +1432,7 @@ name = "grpcio-tools"
version = "1.60.0"
requires_python = ">=3.7"
summary = "Protobuf code generator for gRPC"
-groups = ["default"]
+groups = ["default", "dev"]
dependencies = [
"grpcio>=1.60.0",
"protobuf<5.0dev,>=4.21.6",
@@ -1601,7 +1601,7 @@ files = [
[[package]]
name = "huggingface-hub"
-version = "0.30.1"
+version = "0.30.2"
requires_python = ">=3.8.0"
summary = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
groups = ["default"]
@@ -1615,8 +1615,8 @@ dependencies = [
"typing-extensions>=3.7.4.3",
]
files = [
- {file = "huggingface_hub-0.30.1-py3-none-any.whl", hash = "sha256:0f6aa5ec5a4e68e5b9e45d556b4e5ea180c58f5a5ffa734e7f38c9d573028959"},
- {file = "huggingface_hub-0.30.1.tar.gz", hash = "sha256:f379e8b8d0791295602538856638460ae3cf679c7f304201eb80fb98c771950e"},
+ {file = "huggingface_hub-0.30.2-py3-none-any.whl", hash = "sha256:68ff05969927058cfa41df4f2155d4bb48f5f54f719dd0390103eefa9b191e28"},
+ {file = "huggingface_hub-0.30.2.tar.gz", hash = "sha256:9a7897c5b6fd9dad3168a794a8998d6378210f5b9688d0dfc180b1a228dc2466"},
]
[[package]]
@@ -1635,7 +1635,7 @@ name = "idna"
version = "3.10"
requires_python = ">=3.6"
summary = "Internationalized Domain Names in Applications (IDNA)"
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
{file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"},
{file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"},
@@ -1817,7 +1817,7 @@ name = "kombu"
version = "5.3.7"
requires_python = ">=3.8"
summary = "Messaging library for Python."
-groups = ["default"]
+groups = ["default", "dev"]
dependencies = [
"amqp<6.0.0,>=5.1.1",
"typing-extensions; python_version < \"3.10\"",
@@ -1830,7 +1830,7 @@ files = [
[[package]]
name = "llama-cloud"
-version = "0.1.17"
+version = "0.1.18"
requires_python = "<4,>=3.8"
summary = ""
groups = ["default"]
@@ -1840,8 +1840,8 @@ dependencies = [
"pydantic>=1.10",
]
files = [
- {file = "llama_cloud-0.1.17-py3-none-any.whl", hash = "sha256:4c13267c23d336227176d33ef9cd091f77aded4e1c9c6e7031a3b0ecfe7d5c8d"},
- {file = "llama_cloud-0.1.17.tar.gz", hash = "sha256:f351fa0f1f5b6b9bce650eda78fc84511ba72c09bdafd4525fde6b7a4aac20f3"},
+ {file = "llama_cloud-0.1.18-py3-none-any.whl", hash = "sha256:5842722a0c3033afa930b4a50d43e6f1e77ff1dab12383a769dc51a15fb87c9b"},
+ {file = "llama_cloud-0.1.18.tar.gz", hash = "sha256:65cb88b1cb1a3a0e63e4438e8c8a2e6013dfdafbb4201d274c0459e5d04fb328"},
]
[[package]]
@@ -1903,7 +1903,7 @@ files = [
[[package]]
name = "llama-index-core"
-version = "0.12.28"
+version = "0.12.30"
requires_python = "<4.0,>=3.9"
summary = "Interface between LLMs and your data"
groups = ["default"]
@@ -1934,8 +1934,8 @@ dependencies = [
"wrapt",
]
files = [
- {file = "llama_index_core-0.12.28-py3-none-any.whl", hash = "sha256:9bd24224bd57dd5e97bb0a2550f31f6c08b7dc396305f35bbe9714d17b1409a6"},
- {file = "llama_index_core-0.12.28.tar.gz", hash = "sha256:bf4a9697525e1294855d2df5c3a56b9720c185cde0eae2da713e7629c456c643"},
+ {file = "llama_index_core-0.12.30-py3-none-any.whl", hash = "sha256:6e0b33158de52108debe66528adb84adb626aed5c6c7762874fb7a799d8c48a9"},
+ {file = "llama_index_core-0.12.30.tar.gz", hash = "sha256:dfbed9cdba18358750ad3895cd97fa1ea0dd0b856bbd623a4904ac61641e2765"},
]
[[package]]
@@ -2508,7 +2508,7 @@ files = [
[[package]]
name = "multidict"
-version = "6.3.2"
+version = "6.4.3"
requires_python = ">=3.9"
summary = "multidict implementation"
groups = ["default"]
@@ -2516,53 +2516,59 @@ dependencies = [
"typing-extensions>=4.1.0; python_version < \"3.11\"",
]
files = [
- {file = "multidict-6.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8b3dc0eec9304fa04d84a51ea13b0ec170bace5b7ddeaac748149efd316f1504"},
- {file = "multidict-6.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9534f3d84addd3b6018fa83f97c9d4247aaa94ac917d1ed7b2523306f99f5c16"},
- {file = "multidict-6.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a003ce1413ae01f0b8789c1c987991346a94620a4d22210f7a8fe753646d3209"},
- {file = "multidict-6.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b43f7384e68b1b982c99f489921a459467b5584bdb963b25e0df57c9039d0ad"},
- {file = "multidict-6.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d142ae84047262dc75c1f92eaf95b20680f85ce11d35571b4c97e267f96fadc4"},
- {file = "multidict-6.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ec7e86fbc48aa1d6d686501a8547818ba8d645e7e40eaa98232a5d43ee4380ad"},
- {file = "multidict-6.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe019fb437632b016e6cac67a7e964f1ef827ef4023f1ca0227b54be354da97e"},
- {file = "multidict-6.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b60cb81214a9da7cfd8ae2853d5e6e47225ece55fe5833142fe0af321c35299"},
- {file = "multidict-6.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:32d9e8ef2e0312d4e96ca9adc88e0675b6d8e144349efce4a7c95d5ccb6d88e0"},
- {file = "multidict-6.3.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:335d584312e3fa43633d63175dfc1a5f137dd7aa03d38d1310237d54c3032774"},
- {file = "multidict-6.3.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:b8df917faa6b8cac3d6870fc21cb7e4d169faca68e43ffe568c156c9c6408a4d"},
- {file = "multidict-6.3.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:cc060b9b89b701dd8fedef5b99e1f1002b8cb95072693233a63389d37e48212d"},
- {file = "multidict-6.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f2ce3be2500658f3c644494b934628bb0c82e549dde250d2119689ce791cc8b8"},
- {file = "multidict-6.3.2-cp310-cp310-win32.whl", hash = "sha256:dbcb4490d8e74b484449abd51751b8f560dd0a4812eb5dacc6a588498222a9ab"},
- {file = "multidict-6.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:06944f9ced30f8602be873563ed4df7e3f40958f60b2db39732c11d615a33687"},
- {file = "multidict-6.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:45a034f41fcd16968c0470d8912d293d7b0d0822fc25739c5c2ff7835b85bc56"},
- {file = "multidict-6.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:352585cec45f5d83d886fc522955492bb436fca032b11d487b12d31c5a81b9e3"},
- {file = "multidict-6.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:da9d89d293511fd0a83a90559dc131f8b3292b6975eb80feff19e5f4663647e2"},
- {file = "multidict-6.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79fa716592224aa652b9347a586cfe018635229074565663894eb4eb21f8307f"},
- {file = "multidict-6.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0326278a44c56e94792475268e5cd3d47fbc0bd41ee56928c3bbb103ba7f58fe"},
- {file = "multidict-6.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bb1ea87f7fe45e5079f6315e95d64d4ca8b43ef656d98bed63a02e3756853a22"},
- {file = "multidict-6.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cff3c5a98d037024a9065aafc621a8599fad7b423393685dc83cf7a32f8b691"},
- {file = "multidict-6.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ed99834b053c655d980fb98029003cb24281e47a796052faad4543aa9e01b8e8"},
- {file = "multidict-6.3.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7048440e505d2b4741e5d0b32bd2f427c901f38c7760fc245918be2cf69b3b85"},
- {file = "multidict-6.3.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:27248c27b563f5889556da8a96e18e98a56ff807ac1a7d56cf4453c2c9e4cd91"},
- {file = "multidict-6.3.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6323b4ba0e018bd266f776c35f3f0943fc4ee77e481593c9f93bd49888f24e94"},
- {file = "multidict-6.3.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:81f7ce5ec7c27d0b45c10449c8f0fed192b93251e2e98cb0b21fec779ef1dc4d"},
- {file = "multidict-6.3.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03bfcf2825b3bed0ba08a9d854acd18b938cab0d2dba3372b51c78e496bac811"},
- {file = "multidict-6.3.2-cp311-cp311-win32.whl", hash = "sha256:f32c2790512cae6ca886920e58cdc8c784bdc4bb2a5ec74127c71980369d18dc"},
- {file = "multidict-6.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:0b0c15e58e038a2cd75ef7cf7e072bc39b5e0488b165902efb27978984bbad70"},
- {file = "multidict-6.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2516c5eb5732d6c4e29fa93323bfdc55186895124bc569e2404e3820934be378"},
- {file = "multidict-6.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:be5c8622e665cc5491c13c0fcd52915cdbae991a3514251d71129691338cdfb2"},
- {file = "multidict-6.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3ef33150eea7953cfdb571d862cff894e0ad97ab80d97731eb4b9328fc32d52b"},
- {file = "multidict-6.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40b357738ce46e998f1b1bad9c4b79b2a9755915f71b87a8c01ce123a22a4f99"},
- {file = "multidict-6.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:27c60e059fcd3655a653ba99fec2556cd0260ec57f9cb138d3e6ffc413638a2e"},
- {file = "multidict-6.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:629e7c5e75bde83e54a22c7043ce89d68691d1f103be6d09a1c82b870df3b4b8"},
- {file = "multidict-6.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee6c8fc97d893fdf1fff15a619fee8de2f31c9b289ef7594730e35074fa0cefb"},
- {file = "multidict-6.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:52081d2f27e0652265d4637b03f09b82f6da5ce5e1474f07dc64674ff8bfc04c"},
- {file = "multidict-6.3.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:64529dc395b5fd0a7826ffa70d2d9a7f4abd8f5333d6aaaba67fdf7bedde9f21"},
- {file = "multidict-6.3.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2b7c3fad827770840f5399348c89635ed6d6e9bba363baad7d3c7f86a9cf1da3"},
- {file = "multidict-6.3.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:24aa42b1651c654ae9e5273e06c3b7ccffe9f7cc76fbde40c37e9ae65f170818"},
- {file = "multidict-6.3.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:04ceea01e9991357164b12882e120ce6b4d63a0424bb9f9cd37910aa56d30830"},
- {file = "multidict-6.3.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:943897a41160945416617db567d867ab34e9258adaffc56a25a4c3f99d919598"},
- {file = "multidict-6.3.2-cp39-cp39-win32.whl", hash = "sha256:76157a9a0c5380aadd3b5ff7b8deee355ff5adecc66c837b444fa633b4d409a2"},
- {file = "multidict-6.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:d091d123e44035cd5664554308477aff0b58db37e701e7598a67e907b98d1925"},
- {file = "multidict-6.3.2-py3-none-any.whl", hash = "sha256:71409d4579f716217f23be2f5e7afca5ca926aaeb398aa11b72d793bff637a1f"},
- {file = "multidict-6.3.2.tar.gz", hash = "sha256:c1035eea471f759fa853dd6e76aaa1e389f93b3e1403093fa0fd3ab4db490678"},
+ {file = "multidict-6.4.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:32a998bd8a64ca48616eac5a8c1cc4fa38fb244a3facf2eeb14abe186e0f6cc5"},
+ {file = "multidict-6.4.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a54ec568f1fc7f3c313c2f3b16e5db346bf3660e1309746e7fccbbfded856188"},
+ {file = "multidict-6.4.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a7be07e5df178430621c716a63151165684d3e9958f2bbfcb644246162007ab7"},
+ {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b128dbf1c939674a50dd0b28f12c244d90e5015e751a4f339a96c54f7275e291"},
+ {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b9cb19dfd83d35b6ff24a4022376ea6e45a2beba8ef3f0836b8a4b288b6ad685"},
+ {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3cf62f8e447ea2c1395afa289b332e49e13d07435369b6f4e41f887db65b40bf"},
+ {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:909f7d43ff8f13d1adccb6a397094adc369d4da794407f8dd592c51cf0eae4b1"},
+ {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0bb8f8302fbc7122033df959e25777b0b7659b1fd6bcb9cb6bed76b5de67afef"},
+ {file = "multidict-6.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:224b79471b4f21169ea25ebc37ed6f058040c578e50ade532e2066562597b8a9"},
+ {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a7bd27f7ab3204f16967a6f899b3e8e9eb3362c0ab91f2ee659e0345445e0078"},
+ {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:99592bd3162e9c664671fd14e578a33bfdba487ea64bcb41d281286d3c870ad7"},
+ {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a62d78a1c9072949018cdb05d3c533924ef8ac9bcb06cbf96f6d14772c5cd451"},
+ {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:3ccdde001578347e877ca4f629450973c510e88e8865d5aefbcb89b852ccc666"},
+ {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:eccb67b0e78aa2e38a04c5ecc13bab325a43e5159a181a9d1a6723db913cbb3c"},
+ {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8b6fcf6054fc4114a27aa865f8840ef3d675f9316e81868e0ad5866184a6cba5"},
+ {file = "multidict-6.4.3-cp310-cp310-win32.whl", hash = "sha256:f92c7f62d59373cd93bc9969d2da9b4b21f78283b1379ba012f7ee8127b3152e"},
+ {file = "multidict-6.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:b57e28dbc031d13916b946719f213c494a517b442d7b48b29443e79610acd887"},
+ {file = "multidict-6.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f6f19170197cc29baccd33ccc5b5d6a331058796485857cf34f7635aa25fb0cd"},
+ {file = "multidict-6.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f2882bf27037eb687e49591690e5d491e677272964f9ec7bc2abbe09108bdfb8"},
+ {file = "multidict-6.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fbf226ac85f7d6b6b9ba77db4ec0704fde88463dc17717aec78ec3c8546c70ad"},
+ {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e329114f82ad4b9dd291bef614ea8971ec119ecd0f54795109976de75c9a852"},
+ {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1f4e0334d7a555c63f5c8952c57ab6f1c7b4f8c7f3442df689fc9f03df315c08"},
+ {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:740915eb776617b57142ce0bb13b7596933496e2f798d3d15a20614adf30d229"},
+ {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255dac25134d2b141c944b59a0d2f7211ca12a6d4779f7586a98b4b03ea80508"},
+ {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4e8535bd4d741039b5aad4285ecd9b902ef9e224711f0b6afda6e38d7ac02c7"},
+ {file = "multidict-6.4.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c433a33be000dd968f5750722eaa0991037be0be4a9d453eba121774985bc8"},
+ {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4eb33b0bdc50acd538f45041f5f19945a1f32b909b76d7b117c0c25d8063df56"},
+ {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:75482f43465edefd8a5d72724887ccdcd0c83778ded8f0cb1e0594bf71736cc0"},
+ {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ce5b3082e86aee80b3925ab4928198450d8e5b6466e11501fe03ad2191c6d777"},
+ {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e413152e3212c4d39f82cf83c6f91be44bec9ddea950ce17af87fbf4e32ca6b2"},
+ {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:8aac2eeff69b71f229a405c0a4b61b54bade8e10163bc7b44fcd257949620618"},
+ {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ab583ac203af1d09034be41458feeab7863c0635c650a16f15771e1386abf2d7"},
+ {file = "multidict-6.4.3-cp311-cp311-win32.whl", hash = "sha256:1b2019317726f41e81154df636a897de1bfe9228c3724a433894e44cd2512378"},
+ {file = "multidict-6.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:43173924fa93c7486402217fab99b60baf78d33806af299c56133a3755f69589"},
+ {file = "multidict-6.4.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5427a2679e95a642b7f8b0f761e660c845c8e6fe3141cddd6b62005bd133fc21"},
+ {file = "multidict-6.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24a8caa26521b9ad09732972927d7b45b66453e6ebd91a3c6a46d811eeb7349b"},
+ {file = "multidict-6.4.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6b5a272bc7c36a2cd1b56ddc6bff02e9ce499f9f14ee4a45c45434ef083f2459"},
+ {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edf74dc5e212b8c75165b435c43eb0d5e81b6b300a938a4eb82827119115e840"},
+ {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9f35de41aec4b323c71f54b0ca461ebf694fb48bec62f65221f52e0017955b39"},
+ {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae93e0ff43b6f6892999af64097b18561691ffd835e21a8348a441e256592e1f"},
+ {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e3929269e9d7eff905d6971d8b8c85e7dbc72c18fb99c8eae6fe0a152f2e343"},
+ {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb6214fe1750adc2a1b801a199d64b5a67671bf76ebf24c730b157846d0e90d2"},
+ {file = "multidict-6.4.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d79cf5c0c6284e90f72123f4a3e4add52d6c6ebb4a9054e88df15b8d08444c6"},
+ {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2427370f4a255262928cd14533a70d9738dfacadb7563bc3b7f704cc2360fc4e"},
+ {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:fbd8d737867912b6c5f99f56782b8cb81f978a97b4437a1c476de90a3e41c9a1"},
+ {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:0ee1bf613c448997f73fc4efb4ecebebb1c02268028dd4f11f011f02300cf1e8"},
+ {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:578568c4ba5f2b8abd956baf8b23790dbfdc953e87d5b110bce343b4a54fc9e7"},
+ {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:a059ad6b80de5b84b9fa02a39400319e62edd39d210b4e4f8c4f1243bdac4752"},
+ {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:dd53893675b729a965088aaadd6a1f326a72b83742b056c1065bdd2e2a42b4df"},
+ {file = "multidict-6.4.3-cp39-cp39-win32.whl", hash = "sha256:abcfed2c4c139f25c2355e180bcc077a7cae91eefbb8b3927bb3f836c9586f1f"},
+ {file = "multidict-6.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:b1b389ae17296dd739015d5ddb222ee99fd66adeae910de21ac950e00979d897"},
+ {file = "multidict-6.4.3-py3-none-any.whl", hash = "sha256:59fe01ee8e2a1e8ceb3f6dbb216b09c8d9f4ef1c22c4fc825d045a147fa2ebc9"},
+ {file = "multidict-6.4.3.tar.gz", hash = "sha256:3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec"},
]
[[package]]
@@ -2687,7 +2693,7 @@ files = [
[[package]]
name = "openai"
-version = "1.71.0"
+version = "1.72.0"
requires_python = ">=3.8"
summary = "The official Python library for the openai API"
groups = ["default"]
@@ -2702,13 +2708,13 @@ dependencies = [
"typing-extensions<5,>=4.11",
]
files = [
- {file = "openai-1.71.0-py3-none-any.whl", hash = "sha256:e1c643738f1fff1af52bce6ef06a7716c95d089281e7011777179614f32937aa"},
- {file = "openai-1.71.0.tar.gz", hash = "sha256:52b20bb990a1780f9b0b8ccebac93416343ebd3e4e714e3eff730336833ca207"},
+ {file = "openai-1.72.0-py3-none-any.whl", hash = "sha256:34f5496ba5c8cb06c592831d69e847e2d164526a2fb92afdc3b5cf2891c328c3"},
+ {file = "openai-1.72.0.tar.gz", hash = "sha256:f51de971448905cc90ed5175a5b19e92fd94e31f68cde4025762f9f5257150db"},
]
[[package]]
name = "opentelemetry-api"
-version = "1.31.1"
+version = "1.32.0"
requires_python = ">=3.8"
summary = "OpenTelemetry Python API"
groups = ["deploy"]
@@ -2717,24 +2723,24 @@ dependencies = [
"importlib-metadata<8.7.0,>=6.0",
]
files = [
- {file = "opentelemetry_api-1.31.1-py3-none-any.whl", hash = "sha256:1511a3f470c9c8a32eeea68d4ea37835880c0eed09dd1a0187acc8b1301da0a1"},
- {file = "opentelemetry_api-1.31.1.tar.gz", hash = "sha256:137ad4b64215f02b3000a0292e077641c8611aab636414632a9b9068593b7e91"},
+ {file = "opentelemetry_api-1.32.0-py3-none-any.whl", hash = "sha256:15df743c765078611f376037b0d9111ec5c1febf2ec9440cdd919370faa1ce55"},
+ {file = "opentelemetry_api-1.32.0.tar.gz", hash = "sha256:2623280c916f9b19cad0aa4280cb171265f19fd2909b0d47e4f06f7c83b02cb5"},
]
[[package]]
name = "opentelemetry-distro"
-version = "0.52b1"
+version = "0.53b0"
requires_python = ">=3.8"
summary = "OpenTelemetry Python Distro"
groups = ["deploy"]
dependencies = [
"opentelemetry-api~=1.12",
- "opentelemetry-instrumentation==0.52b1",
+ "opentelemetry-instrumentation==0.53b0",
"opentelemetry-sdk~=1.13",
]
files = [
- {file = "opentelemetry_distro-0.52b1-py3-none-any.whl", hash = "sha256:5562a039e4c36524d0dbb45a0857f8acfda3afbef7e8462513c7946309eb5c8c"},
- {file = "opentelemetry_distro-0.52b1.tar.gz", hash = "sha256:cb8df34a95034c7d038fd245556fb732853dc66473746d652bee6c5c2fb7dfc6"},
+ {file = "opentelemetry_distro-0.53b0-py3-none-any.whl", hash = "sha256:4cf709f4e7472b5903fca8cc5641c908538775e40cdbcb6677aa39d951d6d7f0"},
+ {file = "opentelemetry_distro-0.53b0.tar.gz", hash = "sha256:2f1aa500a771509feaf3b5bc7601cf5b1d255a6d702d608536e7cd03dbf58bc9"},
]
[[package]]
@@ -2792,19 +2798,19 @@ files = [
[[package]]
name = "opentelemetry-instrumentation"
-version = "0.52b1"
+version = "0.53b0"
requires_python = ">=3.8"
summary = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python"
groups = ["deploy"]
dependencies = [
"opentelemetry-api~=1.4",
- "opentelemetry-semantic-conventions==0.52b1",
+ "opentelemetry-semantic-conventions==0.53b0",
"packaging>=18.0",
"wrapt<2.0.0,>=1.0.0",
]
files = [
- {file = "opentelemetry_instrumentation-0.52b1-py3-none-any.whl", hash = "sha256:8c0059c4379d77bbd8015c8d8476020efe873c123047ec069bb335e4b8717477"},
- {file = "opentelemetry_instrumentation-0.52b1.tar.gz", hash = "sha256:739f3bfadbbeec04dd59297479e15660a53df93c131d907bb61052e3d3c1406f"},
+ {file = "opentelemetry_instrumentation-0.53b0-py3-none-any.whl", hash = "sha256:70600778fd567c9c5fbfca181378ae179c0dec3ff613171707d3d77c360ff105"},
+ {file = "opentelemetry_instrumentation-0.53b0.tar.gz", hash = "sha256:f2c21d71a3cdf28c656e3d90d247ee7558fb9b0239b3d9e9190266499dbed9d2"},
]
[[package]]
@@ -2823,33 +2829,33 @@ files = [
[[package]]
name = "opentelemetry-sdk"
-version = "1.31.1"
+version = "1.32.0"
requires_python = ">=3.8"
summary = "OpenTelemetry Python SDK"
groups = ["deploy"]
dependencies = [
- "opentelemetry-api==1.31.1",
- "opentelemetry-semantic-conventions==0.52b1",
+ "opentelemetry-api==1.32.0",
+ "opentelemetry-semantic-conventions==0.53b0",
"typing-extensions>=3.7.4",
]
files = [
- {file = "opentelemetry_sdk-1.31.1-py3-none-any.whl", hash = "sha256:882d021321f223e37afaca7b4e06c1d8bbc013f9e17ff48a7aa017460a8e7dae"},
- {file = "opentelemetry_sdk-1.31.1.tar.gz", hash = "sha256:c95f61e74b60769f8ff01ec6ffd3d29684743404603df34b20aa16a49dc8d903"},
+ {file = "opentelemetry_sdk-1.32.0-py3-none-any.whl", hash = "sha256:ed252d035c22a15536c1f603ca089298daab60850fc2f5ddfa95d95cc1c043ea"},
+ {file = "opentelemetry_sdk-1.32.0.tar.gz", hash = "sha256:5ff07fb371d1ab1189fa7047702e2e888b5403c5efcbb18083cae0d5aa5f58d2"},
]
[[package]]
name = "opentelemetry-semantic-conventions"
-version = "0.52b1"
+version = "0.53b0"
requires_python = ">=3.8"
summary = "OpenTelemetry Semantic Conventions"
groups = ["deploy"]
dependencies = [
"deprecated>=1.2.6",
- "opentelemetry-api==1.31.1",
+ "opentelemetry-api==1.32.0",
]
files = [
- {file = "opentelemetry_semantic_conventions-0.52b1-py3-none-any.whl", hash = "sha256:72b42db327e29ca8bb1b91e8082514ddf3bbf33f32ec088feb09526ade4bc77e"},
- {file = "opentelemetry_semantic_conventions-0.52b1.tar.gz", hash = "sha256:7b3d226ecf7523c27499758a58b542b48a0ac8d12be03c0488ff8ec60c5bae5d"},
+ {file = "opentelemetry_semantic_conventions-0.53b0-py3-none-any.whl", hash = "sha256:561da89f766ab51615c0e72b12329e0a1bc16945dbd62c8646ffc74e36a1edff"},
+ {file = "opentelemetry_semantic_conventions-0.53b0.tar.gz", hash = "sha256:05b7908e1da62d72f9bf717ed25c72f566fe005a2dd260c61b11e025f2552cf6"},
]
[[package]]
@@ -3163,7 +3169,7 @@ name = "protobuf"
version = "4.25.6"
requires_python = ">=3.8"
summary = ""
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
{file = "protobuf-4.25.6-cp310-abi3-win32.whl", hash = "sha256:61df6b5786e2b49fc0055f636c1e8f0aff263808bb724b95b164685ac1bcc13a"},
{file = "protobuf-4.25.6-cp310-abi3-win_amd64.whl", hash = "sha256:b8f837bfb77513fe0e2f263250f423217a173b6d85135be4d81e96a4653bcd3c"},
@@ -3259,7 +3265,7 @@ files = [
[[package]]
name = "pydantic"
-version = "2.11.2"
+version = "2.11.3"
requires_python = ">=3.9"
summary = "Data validation using Python type hints"
groups = ["default"]
@@ -3270,8 +3276,8 @@ dependencies = [
"typing-inspection>=0.4.0",
]
files = [
- {file = "pydantic-2.11.2-py3-none-any.whl", hash = "sha256:7f17d25846bcdf89b670a86cdfe7b29a9f1c9ca23dee154221c9aa81845cfca7"},
- {file = "pydantic-2.11.2.tar.gz", hash = "sha256:2138628e050bd7a1e70b91d4bf4a91167f4ad76fdb83209b107c8d84b854917e"},
+ {file = "pydantic-2.11.3-py3-none-any.whl", hash = "sha256:a082753436a07f9ba1289c6ffa01cd93db3548776088aa917cc43b63f68fa60f"},
+ {file = "pydantic-2.11.3.tar.gz", hash = "sha256:7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3"},
]
[[package]]
@@ -3622,7 +3628,7 @@ name = "redis"
version = "5.2.1"
requires_python = ">=3.8"
summary = "Python client for Redis database and key-value store"
-groups = ["default"]
+groups = ["default", "dev"]
dependencies = [
"async-timeout>=4.0.3; python_full_version < \"3.11.3\"",
]
@@ -3709,7 +3715,7 @@ name = "requests"
version = "2.31.0"
requires_python = ">=3.7"
summary = "Python HTTP for Humans."
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
dependencies = [
"certifi>=2017.4.17",
"charset-normalizer<4,>=2",
@@ -3893,7 +3899,7 @@ name = "setuptools"
version = "78.1.0"
requires_python = ">=3.9"
summary = "Easily download, build, install, upgrade, and uninstall Python packages"
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
{file = "setuptools-78.1.0-py3-none-any.whl", hash = "sha256:3e386e96793c8702ae83d17b853fb93d3e09ef82ec62722e61da5cd22376dcd8"},
{file = "setuptools-78.1.0.tar.gz", hash = "sha256:18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54"},
@@ -4244,13 +4250,13 @@ files = [
[[package]]
name = "typing-extensions"
-version = "4.13.1"
+version = "4.13.2"
requires_python = ">=3.8"
summary = "Backported and Experimental Type Hints for Python 3.8+"
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
- {file = "typing_extensions-4.13.1-py3-none-any.whl", hash = "sha256:4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69"},
- {file = "typing_extensions-4.13.1.tar.gz", hash = "sha256:98795af00fb9640edec5b8e31fc647597b4691f099ad75f469a2616be1a76dff"},
+ {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"},
+ {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"},
]
[[package]]
@@ -4353,9 +4359,10 @@ files = [
name = "unstract-core"
version = "0.0.1"
requires_python = ">=3.9,<3.11.1"
+editable = true
path = "../unstract/core"
summary = "Core library that helps with executing workflows."
-groups = ["default"]
+groups = ["default", "dev"]
dependencies = [
"kombu==5.3.7",
"redis~=5.2.1",
@@ -4366,9 +4373,10 @@ dependencies = [
name = "unstract-flags"
version = "0.0.1"
requires_python = ">=3.9"
+editable = true
path = "../unstract/flags"
summary = "Unstract's feature flags package."
-groups = ["default"]
+groups = ["default", "dev"]
dependencies = [
"grpcio-tools<=1.60.0",
"grpcio<=1.60.0",
@@ -4454,7 +4462,7 @@ name = "urllib3"
version = "1.26.20"
requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7"
summary = "HTTP library with thread-safe connection pooling, file post, and more."
-groups = ["default", "deploy"]
+groups = ["default", "deploy", "dev"]
files = [
{file = "urllib3-1.26.20-py2.py3-none-any.whl", hash = "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e"},
{file = "urllib3-1.26.20.tar.gz", hash = "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32"},
@@ -4476,7 +4484,7 @@ name = "vine"
version = "5.1.0"
requires_python = ">=3.6"
summary = "Python promises."
-groups = ["default"]
+groups = ["default", "dev"]
files = [
{file = "vine-5.1.0-py3-none-any.whl", hash = "sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc"},
{file = "vine-5.1.0.tar.gz", hash = "sha256:8b62e981d35c41049211cf62a0a1242d8c1ee9bd15bb196ce38aefd6799e61e0"},
diff --git a/prompt-service/pyproject.toml b/prompt-service/pyproject.toml
index 725f4282c..bdd026b7b 100644
--- a/prompt-service/pyproject.toml
+++ b/prompt-service/pyproject.toml
@@ -15,8 +15,8 @@ dependencies = [
"flask~=3.0",
"llama-index==0.12.8",
"python-dotenv==1.0.0",
- #ToDo: Temporarily removing the extra dependencies of aws and gcs from unstract-sdk
- #to resolve lock file. Will have to be re-looked into
+ # TODO: Temporarily removing the extra dependencies of aws and gcs from unstract-sdk
+ # to resolve lock file. Will have to be re-looked into
"unstract-sdk[azure]~=0.62.1",
"gcsfs==2024.10.0",
"s3fs==2024.10.0",
@@ -49,6 +49,10 @@ test = [
"python-dotenv==1.0.0",
"flask-WTF~=1.1"
]
+dev = [
+ "-e unstract-core @ file:///${PROJECT_ROOT}/../unstract/core",
+ "-e unstract-flags @ file:///${PROJECT_ROOT}/../unstract/flags",
+]
[tool.pdm.scripts]
prompt_service.cmd = "flask --app src/unstract/prompt_service/run.py run --port 3003"
diff --git a/prompt-service/sample.env b/prompt-service/sample.env
index cb0aeb73e..7da48c2ad 100644
--- a/prompt-service/sample.env
+++ b/prompt-service/sample.env
@@ -12,33 +12,48 @@ REDIS_PORT=6379
REDIS_PASSWORD=""
REDIS_USER=default
-# Platform Service
-PLATFORM_SERVICE_HOST=http://unstract-platform-service
-PLATFORM_SERVICE_PORT=3001
-
# Logging
LOG_LEVEL=INFO
-#Celery for PublishLogs
-CELERY_BROKER_URL="redis://unstract-redis:6379"
+### Env from `unstract-core` ###
+# Celery for PublishLogs
+CELERY_BROKER_URL="redis://unstract-redis:6379"
# Logs Expiry of 24 hours
LOGS_EXPIRATION_TIME_IN_SECOND=86400
+
+### Env from `unstract-flags` ###
# Feature Flags
EVALUATION_SERVER_IP=unstract-flipt
EVALUATION_SERVER_PORT=9000
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
-
# Flipt Service
FLIPT_SERVICE_AVAILABLE=False
-#Remote storage related envs
-PERMANENT_REMOTE_STORAGE='{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
-TEMPORARY_REMOTE_STORAGE='{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
-REMOTE_PROMPT_STUDIO_FILE_PATH="unstract/prompt-studio-data/"
+### Env from `unstract-sdk` ###
+# Platform Service
+PLATFORM_SERVICE_HOST=http://unstract-platform-service
+PLATFORM_SERVICE_PORT=3001
-#X2Text Service
+# X2Text Service
X2TEXT_HOST=http://unstract-x2text-service
X2TEXT_PORT=3004
+
+# Remote storage related envs
+PERMANENT_REMOTE_STORAGE='{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
+TEMPORARY_REMOTE_STORAGE='{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
+REMOTE_PROMPT_STUDIO_FILE_PATH="unstract/prompt-studio-data/"
+
+# Timeout for LLMW (v2) extraction
+ADAPTER_LLMW_WAIT_TIMEOUT=900 # 15 mins
+
+# Control async extraction of LLMWhisperer (v1)
+# Time in seconds to wait before polling LLMWhisperer's status API
+ADAPTER_LLMW_POLL_INTERVAL=30
+# Total number of times to poll the status API.
+# 500 mins to allow 1500 (max pages limit) * 20 (approx time in sec to process a page)
+ADAPTER_LLMW_MAX_POLLS=1000
+# Number of times to retry the /whisper-status API before failing the extraction
+ADAPTER_LLMW_STATUS_RETRIES=5
diff --git a/prompt-service/src/unstract/prompt_service/exceptions.py b/prompt-service/src/unstract/prompt_service/exceptions.py
index 3df7d16ac..15f2c19fa 100644
--- a/prompt-service/src/unstract/prompt_service/exceptions.py
+++ b/prompt-service/src/unstract/prompt_service/exceptions.py
@@ -1,49 +1,4 @@
-from dataclasses import asdict, dataclass
-from typing import Any, Optional
-
-from werkzeug.exceptions import HTTPException
-
-DEFAULT_ERR_MESSAGE = "Error from prompt service"
-
-
-@dataclass
-class ErrorResponse:
- """Represents error response from prompt service."""
-
- error: str = DEFAULT_ERR_MESSAGE
- name: str = "PromptServiceError"
- code: int = 500
- payload: Optional[Any] = None
-
-
-class APIError(HTTPException):
- code = 500
- message = DEFAULT_ERR_MESSAGE
-
- def __init__(
- self,
- message: Optional[str] = None,
- code: Optional[int] = None,
- payload: Any = None,
- ):
- if message:
- self.message = message
- if code:
- self.code = code
- self.payload = payload
- super().__init__(description=message)
-
- def to_dict(self):
- err = ErrorResponse(
- error=self.message,
- code=self.code,
- payload=self.payload,
- name=self.__class__.__name__,
- )
- return asdict(err)
-
- def __str__(self):
- return str(self.message)
+from unstract.core.flask.exceptions import APIError
class BadRequest(APIError):
@@ -71,3 +26,7 @@ class RetrievalError(APIError):
"Error while retrieving data from the VectorDB. "
"Please contact the admin for further assistance."
)
+
+
+class ExtractionError(APIError):
+ DEFAULT_MESSAGE = "Error while extracting from a document"
diff --git a/prompt-service/src/unstract/prompt_service/services/extraction.py b/prompt-service/src/unstract/prompt_service/services/extraction.py
index 866e325f8..0793d5ca6 100644
--- a/prompt-service/src/unstract/prompt_service/services/extraction.py
+++ b/prompt-service/src/unstract/prompt_service/services/extraction.py
@@ -2,13 +2,13 @@ from typing import Any, Optional
from unstract.prompt_service.constants import ExecutionSource
from unstract.prompt_service.constants import IndexingConstants as IKeys
+from unstract.prompt_service.exceptions import ExtractionError
from unstract.prompt_service.helpers.prompt_ide_base_tool import PromptServiceBaseTool
from unstract.prompt_service.utils.file_utils import FileUtils
from unstract.sdk.adapters.exceptions import AdapterError
from unstract.sdk.adapters.x2text.constants import X2TextConstants
from unstract.sdk.adapters.x2text.llm_whisperer.src import LLMWhisperer
from unstract.sdk.adapters.x2text.llm_whisperer_v2.src import LLMWhispererV2
-from unstract.sdk.exceptions import X2TextError
from unstract.sdk.utils import ToolUtils
from unstract.sdk.utils.common_utils import log_elapsed
from unstract.sdk.x2txt import TextExtractionResult, X2Text
@@ -69,7 +69,8 @@ class ExtractionService:
except AdapterError as e:
msg = f"Error from text extractor '{x2text.x2text_instance.get_name()}'. "
msg += str(e)
- raise X2TextError(msg) from e
+ code = e.status_code if e.status_code != -1 else 500
+ raise ExtractionError(msg, code=code) from e
@staticmethod
def update_exec_metadata(