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] Prompt service v2 - Stabilization fixes (#1241)
harini-venkataraman542b6cdc13c3
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.pyindex a94eca4f7..4ad5fdff3 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@@ -881,7 +881,7 @@ class PromptStudioHelper:logger.info(f"Indexing document {doc_path} for {doc_id}")index_result = PromptStudioHelper.dynamic_indexer(profile_manager=profile_manager,- file_path=doc_path,+ file_path=file_path,tool_id=str(tool.tool_id),org_id=org_id,document_id=document_id,@@ -1333,12 +1333,12 @@ class PromptStudioHelper:usage_kwargs = {"run_id": run_id}# Orginal file name with which file got uploaded in prompt studiousage_kwargs["file_name"] = filename+ is_extracted = PromptStudioIndexHelper.check_extraction_status(+ document_id=document_id,+ profile_manager=profile_manager,+ doc_id=doc_id,+ )if is_extracted and not reindex:- is_extracted = PromptStudioIndexHelper.check_extraction_status(- document_id=document_id,- profile_manager=profile_manager,- doc_id=doc_id,- )fs_instance = EnvHelper.get_storage(storage_type=StorageType.PERMANENT,env_name=FileStorageKeys.PERMANENT_REMOTE_STORAGE,diff --git a/backend/sample.env b/backend/sample.envindex 0b9a8f626..e99074eab 100644--- a/backend/sample.env+++ b/backend/sample.env@@ -75,9 +75,9 @@ PROMPT_STUDIO_FILE_PATH=/app/prompt-studio-data# Structure Tool Image (Runs prompt studio exported tools)# https://hub.docker.com/r/unstract/tool-structure-STRUCTURE_TOOL_IMAGE_URL="docker:unstract/tool-structure:0.0.72"+STRUCTURE_TOOL_IMAGE_URL="docker:unstract/tool-structure:0.0.73"STRUCTURE_TOOL_IMAGE_NAME="unstract/tool-structure"-STRUCTURE_TOOL_IMAGE_TAG="0.0.72"+STRUCTURE_TOOL_IMAGE_TAG="0.0.73"# Feature FlagsEVALUATION_SERVER_IP=unstract-fliptdiff --git a/tools/structure/src/config/properties.json b/tools/structure/src/config/properties.jsonindex 86409598f..9d42b2689 100644--- a/tools/structure/src/config/properties.json+++ b/tools/structure/src/config/properties.json@@ -2,7 +2,7 @@"schemaVersion": "0.0.1","displayName": "Structure Tool","functionName": "structure_tool",- "toolVersion": "0.0.72",+ "toolVersion": "0.0.73","description": "This is a template tool which can answer set of input prompts designed in the Prompt Studio","input": {"description": "File that needs to be indexed and parsed for answers"diff --git a/tools/structure/src/main.py b/tools/structure/src/main.pyindex ba1da29eb..34e52b9f1 100644--- a/tools/structure/src/main.py+++ b/tools/structure/src/main.py@@ -179,12 +179,17 @@ class StructureTool(BaseTool):payload[SettingsKeys.OUTPUTS] = outputspayload[SettingsKeys.FILE_HASH] = summarize_file_hashbreak- if (- reindex- or not summarize_as_source- and not output[SettingsKeys.CHUNK_SIZE] == 0- ):- self.stream_log("Sucessfully extracted text, indexing..")+ self.stream_log(+ f"Chunk size '{output[SettingsKeys.CHUNK_SIZE]}', "+ f"indexing '{tool_data_dir / SettingsKeys.EXTRACT}'.."+ )+ if (reindex or not summarize_as_source) and output[+ SettingsKeys.CHUNK_SIZE+ ] != 0:+ self.stream_log(+ f"Sucessfully extracted text, "+ f"indexing {tool_data_dir / SettingsKeys.EXTRACT}.."+ )STHelper.dynamic_indexing(tool_settings=tool_settings,run_id=self.file_execution_id,