fix: Update import location for LanceDB
Updated import path for LanceDB exceptions Fix COG-502
This commit is contained in:
parent
04960eeb4e
commit
343ac47fd4
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ import lancedb
|
|||
from pydantic import BaseModel
|
||||
from lancedb.pydantic import Vector, LanceModel
|
||||
|
||||
from cognee.exceptions import InvalidValueError, EntityNotFoundError
|
||||
from cognee.exceptions import InvalidValueError
|
||||
from cognee.infrastructure.engine import DataPoint
|
||||
from cognee.infrastructure.files.storage import LocalStorage
|
||||
from cognee.modules.storage.utils import copy_model, get_own_properties
|
||||
|
|
@ -151,7 +151,7 @@ class LanceDBAdapter(VectorDBInterface):
|
|||
query_vector: List[float] = None
|
||||
):
|
||||
if query_text is None and query_vector is None:
|
||||
raise ValueError("One of query_text or query_vector must be provided!")
|
||||
raise InvalidValueError(message="One of query_text or query_vector must be provided!")
|
||||
|
||||
if query_text and not query_vector:
|
||||
query_vector = (await self.embedding_engine.embed_text([query_text]))[0]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue