mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 13:55:41 +01:00
feat: unify settings for vector and nodestore connections to PostgreSQL (#1730)
* Unify pgvector and postgres connection settings * Remove local changes * Update file pgvector->postgres
This commit is contained in:
parent
68b3a34b03
commit
63de7e4930
5 changed files with 39 additions and 45 deletions
|
|
@ -105,7 +105,7 @@ class LLMSettings(BaseModel):
|
|||
|
||||
|
||||
class VectorstoreSettings(BaseModel):
|
||||
database: Literal["chroma", "qdrant", "pgvector"]
|
||||
database: Literal["chroma", "qdrant", "postgres"]
|
||||
|
||||
|
||||
class NodeStoreSettings(BaseModel):
|
||||
|
|
@ -177,6 +177,10 @@ class EmbeddingSettings(BaseModel):
|
|||
"Do not set it higher than your number of threads of your CPU."
|
||||
),
|
||||
)
|
||||
embed_dim: int = Field(
|
||||
384,
|
||||
description="The dimension of the embeddings stored in the Postgres database",
|
||||
)
|
||||
|
||||
|
||||
class SagemakerSettings(BaseModel):
|
||||
|
|
@ -280,17 +284,6 @@ class PostgresSettings(BaseModel):
|
|||
)
|
||||
|
||||
|
||||
class PGVectorSettings(PostgresSettings):
|
||||
embed_dim: int = Field(
|
||||
384,
|
||||
description="The dimension of the embeddings stored in the Postgres database",
|
||||
)
|
||||
table_name: str = Field(
|
||||
"embeddings",
|
||||
description="The name of the table in the Postgres database where the embeddings are stored",
|
||||
)
|
||||
|
||||
|
||||
class QdrantSettings(BaseModel):
|
||||
location: str | None = Field(
|
||||
None,
|
||||
|
|
@ -360,7 +353,6 @@ class Settings(BaseModel):
|
|||
nodestore: NodeStoreSettings
|
||||
qdrant: QdrantSettings | None = None
|
||||
postgres: PostgresSettings | None = None
|
||||
pgvector: PGVectorSettings | None = None
|
||||
|
||||
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue