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:
Brett England 2024-03-15 04:55:17 -04:00 committed by GitHub
parent 68b3a34b03
commit 63de7e4930
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 39 additions and 45 deletions

View file

@ -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
"""