Skip to content

Commit f0e3d14

Browse files
authored
Upgrade LlamaIndex v0.9.14 (#129)
1 parent 1494347 commit f0e3d14

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ python = ">=3.9,<3.12"
1414
astrapy = "~0.6.2"
1515
cassio = "~0.1.3"
1616
unstructured = "^0.10"
17-
llama-index = { version = "0.9.11", extras = ["langchain"] }
17+
llama-index = { version = "0.9.14", extras = ["langchain"] }
1818
langchain = { version = "0.0.343", extras = ["openai"] }
1919
langchain-core = "0.0.8"
2020

ragstack-e2e-tests/e2e_tests/langchain_llamaindex/test_astra.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from llama_index.vector_stores import (
2020
AstraDBVectorStore,
2121
MetadataFilters,
22-
MetadataFilter,
2322
ExactMatchFilter,
2423
)
2524

@@ -194,21 +193,23 @@ def test_ingest_langchain_retrieve_llama_index(environment):
194193
print("doc:", doc)
195194
assert "framework" in doc.text
196195

197-
# TODO: uncomment this after https://github.com/run-llama/llama_index/issues/9432 is fixed
198-
199196
# Verify compatibility of metadata filtering
200-
# filters = MetadataFilters(filters=[ExactMatchFilter(key="source", value="llama-index-ingest")])
201-
# retriever = index.as_retriever(filters=filters)
202-
# documents_from_llamaindex = retriever.retrieve("What is RAGStack ?")
203-
# assert len(documents_from_llamaindex) > 0
204-
# for doc in documents_from_llamaindex:
205-
# print("doc:", doc)
206-
# assert "framework" in doc.text
207-
208-
# filters = MetadataFilters(filters=[ExactMatchFilter(key="source", value="don't-find-anything-please")])
209-
# retriever_no_docs = index.as_retriever(filters=filters)
210-
# documents_from_llamaindex = retriever_no_docs.retrieve("What is RAGStack ?")
211-
# assert len(documents_from_llamaindex) == 0
197+
filters = MetadataFilters(
198+
filters=[ExactMatchFilter(key="source", value="llama-index-ingest")]
199+
)
200+
retriever = index.as_retriever(filters=filters)
201+
documents_from_llamaindex = retriever.retrieve("What is RAGStack ?")
202+
assert len(documents_from_llamaindex) > 0
203+
for doc in documents_from_llamaindex:
204+
print("doc:", doc)
205+
assert "framework" in doc.text
206+
207+
filters = MetadataFilters(
208+
filters=[ExactMatchFilter(key="source", value="don't-find-anything-please")]
209+
)
210+
retriever_no_docs = index.as_retriever(filters=filters)
211+
documents_from_llamaindex = retriever_no_docs.retrieve("What is RAGStack ?")
212+
assert len(documents_from_llamaindex) == 0
212213

213214
# Basic RAG with LlamaIndex
214215
query_engine = index.as_query_engine()

ragstack-e2e-tests/e2e_tests/llama_index/test_llama_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def huggingface_hub_embedding():
183183
("openai_embedding", "openai_llm"),
184184
("azure_openai_embedding", "azure_openai_llm"),
185185
("vertex_embedding", "vertex_llm"),
186-
("bedrock_titan_embedding", "bedrock_anthropic_llm"),
186+
# ("bedrock_titan_embedding", "bedrock_anthropic_llm"),
187187
# Deactivated for now because of
188188
# https://github.com/run-llama/llama_index/pull/9396
189189
# ("bedrock_cohere_embedding", "bedrock_meta_llm"),

ragstack-e2e-tests/pyproject.langchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ beautifulsoup4 = "^4"
2121

2222
langchain = { git = "https://github.com/langchain-ai/langchain.git", branch = "master", subdirectory = "libs/langchain", extras = ["openai"] }
2323
langchain_core = { git = "https://github.com/langchain-ai/langchain.git", branch = "master", subdirectory = "libs/core" }
24-
llama-index = { version = "0.9.11", extras = ["langchain"] }
24+
llama-index = { version = "0.9.14", extras = ["langchain"] }
2525
astrapy = "^0.6"
2626
cassio = "^0.1"
2727

tests/unit-tests/test_ragstack.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
def test_import():
2-
from llama_index.vector_stores import (
3-
AstraDBVectorStore,
4-
CassandraVectorStore,
5-
) # noqa
2+
from llama_index.vector_stores import AstraDBVectorStore # noqa
3+
from llama_index.vector_stores import CassandraVectorStore # noqa
64
from langchain.vectorstores import AstraDB # noqa
75
import langchain_core # noqa
86
import langsmith # noqa

0 commit comments

Comments
 (0)