From 1e164cbf2efb5a97103e62627a249c798b0ff0de Mon Sep 17 00:00:00 2001 From: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Date: Wed, 28 Feb 2024 16:20:15 +0530 Subject: [PATCH 1/2] Fixed issue in output file path for tools --- src/unstract/sdk/index.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/unstract/sdk/index.py b/src/unstract/sdk/index.py index 8d1179bb..b0e31b0f 100644 --- a/src/unstract/sdk/index.py +++ b/src/unstract/sdk/index.py @@ -105,7 +105,7 @@ def index_file( chunk_overlap: int, reindex: bool = False, file_hash: Optional[str] = None, - is_summary: bool = False, + output_file_path: Optional[str] = None, ): # Make file content hash if not available if not file_hash: @@ -117,13 +117,7 @@ def index_file( x2text_adapter_inst: X2TextAdapter = x2text.get_x2text( adapter_instance_id=x2text_adapter ) - extract_file_path = None - if not is_summary: - directory, filename = os.path.split(file_path) - extract_file_path: str = os.path.join( - directory, "extract", os.path.splitext(filename)[0] + ".txt" - ) - extracted_text = x2text_adapter_inst.process(input_file_path=file_path, output_file_path=extract_file_path) + extracted_text = x2text_adapter_inst.process(input_file_path=file_path, output_file_path=output_file_path) full_text.append( { "section": "full", From 5c7dc2500b099841b16136743ae9f6e133c676cb Mon Sep 17 00:00:00 2001 From: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Date: Wed, 28 Feb 2024 16:20:29 +0530 Subject: [PATCH 2/2] Bump patch version --- src/unstract/sdk/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unstract/sdk/__init__.py b/src/unstract/sdk/__init__.py index 94631f5d..9b6709e7 100644 --- a/src/unstract/sdk/__init__.py +++ b/src/unstract/sdk/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.12.0" +__version__ = "0.12.1" def get_sdk_version():