Skip to content

Commit 8a63c09

Browse files
Fix indexing errors for cases where the index does not have a column doc_id (#23)
* Fix indexing issues for new documents. Roll up adapter version * Merge with latest main * Update pdm.lock file --------- Signed-off-by: Gayathri <[email protected]>
1 parent d87222e commit 8a63c09

File tree

4 files changed

+249
-9
lines changed

4 files changed

+249
-9
lines changed

pdm.lock

Lines changed: 244 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"python-magic~=0.4.27",
1616
"python-dotenv==1.0.0",
1717
# LLM Triad
18-
"unstract-adapters~=0.5.0",
18+
"unstract-adapters~=0.6.0",
1919
"llama-index==0.9.28",
2020
"tiktoken~=0.4.0",
2121
"transformers==4.37.0",
@@ -55,4 +55,4 @@ package-dir = "src"
5555

5656
[tool.pdm.version]
5757
source = "file"
58-
path = "src/unstract/sdk/__init__.py"
58+
path = "src/unstract/sdk/__init__.py"

src/unstract/sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.15.2"
1+
__version__ = "0.16.0"
22

33

44
def get_sdk_version():

src/unstract/sdk/index.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,11 @@ def index_file(
172172
)
173173
raise SdkError(f"Error loading {vector_db}")
174174

175+
filter = [{"field_name": "doc_id", "operator": "=", "value": doc_id}]
175176
q = VectorStoreQuery(
176177
query_embedding=embedding_li.get_query_embedding(" "),
177178
doc_ids=[doc_id],
179+
filters=filter,
178180
)
179181

180182
doc_id_not_found = True

0 commit comments

Comments
 (0)