Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Update to handle /tmp being a symlink on macOS

davidmezzetti7b055c5b2648
diff --git a/src/python/txtai/pipeline/data/textractor.py b/src/python/txtai/pipeline/data/textractor.py
index 49e8c2b7..68865e78 100644
--- a/src/python/txtai/pipeline/data/textractor.py
+++ b/src/python/txtai/pipeline/data/textractor.py
@@ -52,7 +52,7 @@ class Textractor(Segmentation):
self.headers = headers if headers else {}
# Safe open mode. When set only local temp urls (or a specified directory) and non-private URLs are supported
- self.safeopen = os.path.abspath(tempfile.gettempdir() if isinstance(safeopen, bool) else safeopen) if safeopen else safeopen
+ self.safeopen = os.path.realpath(tempfile.gettempdir() if isinstance(safeopen, bool) else safeopen) if safeopen else safeopen
def text(self, text):
# Check if text is a valid file path or url
diff --git a/test/python/testapi/testapipipeline.py b/test/python/testapi/testapipipeline.py
index e68fe09f..618f67b3 100644
--- a/test/python/testapi/testapipipeline.py
+++ b/test/python/testapi/testapipipeline.py
@@ -58,7 +58,6 @@ tabular:
# Text extraction
textractor:
- safeopen: /tmp/txtai
# Text to speech
texttospeech: