Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
duwenxin99 committed Aug 29, 2024
1 parent 58ed399 commit abf2ff1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/langchain_google_alloydb_pg/vectorstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ def _similarity_search_with_relevance_scores(
docs_and_scores = self.similarity_search_with_score(
query=query, image_uri=image_uri, k=k, **kwargs
)
print([score for docs, score in docs_and_scores])
return [(doc, relevance_score_fn(score)) for doc, score in docs_and_scores]

def similarity_search_with_relevance_scores(
Expand Down Expand Up @@ -973,6 +974,8 @@ def similarity_search_with_relevance_scores(
"Relevance scores must be between"
f" 0 and 1, got {docs_and_similarities}"
)
for doc, sim in docs_and_similarities:
print(sim)

if score_threshold is not None:
docs_and_similarities = [
Expand Down

0 comments on commit abf2ff1

Please sign in to comment.