-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial import * adding Secret support and fixing tests * completing docs * code formating * linting and typing * fixing tests * adding custom from_dict * adding test coverage * use deserialize_secrets_inplace()
- Loading branch information
1 parent
3fad8ca
commit 613e4ec
Showing
8 changed files
with
51 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
import os | ||
|
||
import pytest | ||
from haystack_integrations.document_stores.pgvector import PgvectorDocumentStore | ||
|
||
|
||
@pytest.fixture | ||
def document_store(request): | ||
connection_string = "postgresql://postgres:postgres@localhost:5432/postgres" | ||
os.environ["PG_CONN_STR"] = "postgresql://postgres:postgres@localhost:5432/postgres" | ||
table_name = f"haystack_{request.node.name}" | ||
embedding_dimension = 768 | ||
vector_function = "cosine_similarity" | ||
recreate_table = True | ||
search_strategy = "exact_nearest_neighbor" | ||
|
||
store = PgvectorDocumentStore( | ||
connection_string=connection_string, | ||
table_name=table_name, | ||
embedding_dimension=embedding_dimension, | ||
vector_function=vector_function, | ||
recreate_table=recreate_table, | ||
search_strategy=search_strategy, | ||
) | ||
|
||
yield store | ||
|
||
store.delete_table() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters