DSPy: The framework for programming—not prompting—language models
Python
Explain v3 / v4 compatibility
Connor Shorten86a94601978c
diff --git a/dspy/retrieve/weaviate_rm.py b/dspy/retrieve/weaviate_rm.pyindex b5b6aa28c..33117b5b4 100644--- a/dspy/retrieve/weaviate_rm.py+++ b/dspy/retrieve/weaviate_rm.py@@ -51,7 +51,7 @@ class WeaviateRM(dspy.Retrieve):self._weaviate_client = weaviate_clientself._weaviate_collection_text_key = weaviate_collection_text_key- # Check the type of weaviate_client+ # Check the type of weaviate_client (this is added to support v3 and v4)if hasattr(weaviate_client, "collections"):self._client_type = "WeaviateClient"elif hasattr(weaviate_client, "query"):