The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Replace function in CassandraVectorStore with simpler lambda (#20323)
Christophe Borneta22da4315b46
diff --git a/libs/community/langchain_community/vectorstores/cassandra.py b/libs/community/langchain_community/vectorstores/cassandra.pyindex 799ea79b48..ac70c21d1c 100644--- a/libs/community/langchain_community/vectorstores/cassandra.py+++ b/libs/community/langchain_community/vectorstores/cassandra.py@@ -112,18 +112,13 @@ class Cassandra(VectorStore):def embeddings(self) -> Embeddings:return self.embedding- @staticmethod- def _dont_flip_the_cos_score(distance: float) -> float:- # the identity- return distance-def _select_relevance_score_fn(self) -> Callable[[float], float]:"""The underlying VectorTable already returns a "score proper",i.e. one in [0, 1] where higher means more *similar*,so here the final score transformation is not reversing the interval:"""- return self._dont_flip_the_cos_score+ return lambda score: scoredef delete_collection(self) -> None:"""