Skip to content

Commit

Permalink
fix: reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Anhui-tqhuang committed Feb 20, 2024
1 parent 205ce94 commit 197ddf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions private_gpt/components/vector_store/vector_store_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ def __init__(self, settings: Settings) -> None:
"PGVectorStore settings not found. Please provide settings."
)

self.vector_store = typing.cast(VectorStore, PGVectorStore.from_params(
**settings.pgvector.model_dump(exclude_none=True)
))
self.vector_store = typing.cast(
VectorStore,
PGVectorStore.from_params(
**settings.pgvector.model_dump(exclude_none=True)
),
)

case "chroma":
try:
Expand Down
2 changes: 2 additions & 0 deletions private_gpt/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class UISettings(BaseModel):
False, description="If the button to delete all files is enabled or not."
)


class PGVectorSettings(BaseModel):
host: str = Field(
"localhost",
Expand Down Expand Up @@ -230,6 +231,7 @@ class PGVectorSettings(BaseModel):
description="The name of the table in the Postgres database where the embeddings are stored",
)


class QdrantSettings(BaseModel):
location: str | None = Field(
None,
Expand Down

0 comments on commit 197ddf6

Please sign in to comment.