mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 20:12:55 +01:00
Fix mypy
This commit is contained in:
parent
34d48d7b4d
commit
63d3b9f936
7 changed files with 39 additions and 23 deletions
|
|
@ -3,7 +3,7 @@ from typing import Any
|
|||
|
||||
from llama_index.core.schema import BaseNode, MetadataMode
|
||||
from llama_index.core.vector_stores.utils import node_to_metadata_dict
|
||||
from llama_index.vector_stores.chroma import ChromaVectorStore
|
||||
from llama_index.vector_stores.chroma import ChromaVectorStore # type: ignore
|
||||
|
||||
|
||||
def chunk_list(
|
||||
|
|
@ -22,7 +22,7 @@ def chunk_list(
|
|||
yield lst[i : i + max_chunk_size]
|
||||
|
||||
|
||||
class BatchedChromaVectorStore(ChromaVectorStore):
|
||||
class BatchedChromaVectorStore(ChromaVectorStore): # type: ignore
|
||||
"""Chroma vector store, batching additions to avoid reaching the max batch limit.
|
||||
|
||||
In this vector store, embeddings are stored within a ChromaDB collection.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ class VectorStoreComponent:
|
|||
match settings.vectorstore.database:
|
||||
case "pgvector":
|
||||
try:
|
||||
from llama_index.vector_stores.postgres import PGVectorStore
|
||||
from llama_index.vector_stores.postgres import ( # type: ignore
|
||||
PGVectorStore,
|
||||
)
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"Postgres dependencies not found, install with `poetry install --extras postgres`"
|
||||
|
|
@ -91,7 +93,9 @@ class VectorStoreComponent:
|
|||
|
||||
case "qdrant":
|
||||
try:
|
||||
from llama_index.vector_stores.qdrant import QdrantVectorStore
|
||||
from llama_index.vector_stores.qdrant import ( # type: ignore
|
||||
QdrantVectorStore,
|
||||
)
|
||||
from qdrant_client import QdrantClient
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue