From 33dcf03e20f572da5aaf7b43910486fece1e3b5d Mon Sep 17 00:00:00 2001 From: Daniel Smilkov Date: Fri, 23 Feb 2024 17:06:05 -0500 Subject: [PATCH] Fix llama-index test after upgrading deps (#1192) --- lilac/sources/github_source.py | 2 +- lilac/sources/llama_index_docs_source.py | 2 +- lilac/sources/llama_index_docs_source_test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lilac/sources/github_source.py b/lilac/sources/github_source.py index 25884f634..485851a2d 100644 --- a/lilac/sources/github_source.py +++ b/lilac/sources/github_source.py @@ -74,7 +74,7 @@ def scrub_github_token(self, github_token: str) -> str: @override def setup(self) -> None: try: - from llama_index import download_loader + from llama_index.core.readers import download_loader except ImportError: raise ImportError( diff --git a/lilac/sources/llama_index_docs_source.py b/lilac/sources/llama_index_docs_source.py index 3214f7d12..75577db72 100644 --- a/lilac/sources/llama_index_docs_source.py +++ b/lilac/sources/llama_index_docs_source.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, ClassVar, Iterable, Iterator, Optional if TYPE_CHECKING: - from llama_index import Document + from llama_index.core.schema import Document from typing_extensions import override diff --git a/lilac/sources/llama_index_docs_source_test.py b/lilac/sources/llama_index_docs_source_test.py index 5a6428265..39300ecd7 100644 --- a/lilac/sources/llama_index_docs_source_test.py +++ b/lilac/sources/llama_index_docs_source_test.py @@ -1,6 +1,6 @@ """Tests for the Llama Index Docs source.""" -from llama_index import Document +from llama_index.core.schema import Document from ..schema import schema from ..source import SourceSchema