Skip to content

Commit

Permalink
fix: pg_similarity_search error: Relevance scores must be between 0 a…
Browse files Browse the repository at this point in the history
  • Loading branch information
onewesong committed Nov 28, 2024
1 parent 223915c commit 0a0054f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _load_pg_vector(self):
self.pg_vector = PGVector(
embedding_function=get_Embeddings(self.embed_model),
collection_name=self.kb_name,
distance_strategy=DistanceStrategy.EUCLIDEAN,
distance_strategy=DistanceStrategy.COSINE,
connection=PGKBService.engine,
connection_string=Settings.kb_settings.kbs_config.get("pg").get("connection_uri"),
)
Expand Down

0 comments on commit 0a0054f

Please sign in to comment.