mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 04:30:11 +01:00
feat: bump dependencies (#1987)
Some checks failed
release-please / release-please (push) Has been cancelled
tests / setup (push) Has been cancelled
tests / ${{ matrix.quality-command }} (black) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (mypy) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (ruff) (push) Has been cancelled
tests / test (push) Has been cancelled
tests / all_checks_passed (push) Has been cancelled
Some checks failed
release-please / release-please (push) Has been cancelled
tests / setup (push) Has been cancelled
tests / ${{ matrix.quality-command }} (black) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (mypy) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (ruff) (push) Has been cancelled
tests / test (push) Has been cancelled
tests / all_checks_passed (push) Has been cancelled
This commit is contained in:
parent
c7212ac7cc
commit
b687dc8524
3 changed files with 507 additions and 483 deletions
|
|
@ -4,10 +4,10 @@ import typing
|
|||
from injector import inject, singleton
|
||||
from llama_index.core.indices.vector_store import VectorIndexRetriever, VectorStoreIndex
|
||||
from llama_index.core.vector_stores.types import (
|
||||
BasePydanticVectorStore,
|
||||
FilterCondition,
|
||||
MetadataFilter,
|
||||
MetadataFilters,
|
||||
VectorStore,
|
||||
)
|
||||
|
||||
from private_gpt.open_ai.extensions.context_filter import ContextFilter
|
||||
|
|
@ -32,7 +32,7 @@ def _doc_id_metadata_filter(
|
|||
@singleton
|
||||
class VectorStoreComponent:
|
||||
settings: Settings
|
||||
vector_store: VectorStore
|
||||
vector_store: BasePydanticVectorStore
|
||||
|
||||
@inject
|
||||
def __init__(self, settings: Settings) -> None:
|
||||
|
|
@ -54,7 +54,7 @@ class VectorStoreComponent:
|
|||
)
|
||||
|
||||
self.vector_store = typing.cast(
|
||||
VectorStore,
|
||||
BasePydanticVectorStore,
|
||||
PGVectorStore.from_params(
|
||||
**settings.postgres.model_dump(exclude_none=True),
|
||||
table_name="embeddings",
|
||||
|
|
@ -87,7 +87,7 @@ class VectorStoreComponent:
|
|||
) # TODO
|
||||
|
||||
self.vector_store = typing.cast(
|
||||
VectorStore,
|
||||
BasePydanticVectorStore,
|
||||
BatchedChromaVectorStore(
|
||||
chroma_client=chroma_client, chroma_collection=chroma_collection
|
||||
),
|
||||
|
|
@ -115,7 +115,7 @@ class VectorStoreComponent:
|
|||
**settings.qdrant.model_dump(exclude_none=True)
|
||||
)
|
||||
self.vector_store = typing.cast(
|
||||
VectorStore,
|
||||
BasePydanticVectorStore,
|
||||
QdrantVectorStore(
|
||||
client=client,
|
||||
collection_name="make_this_parameterizable_per_api_call",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue