Update Weaviate Langchain retriever to V4

Could we please update the Weaviate Langchain retriever client to the new V4 version.

And also if we can add the following functionality:
-Multi tenancy (this was only added to the Langchain Weaviate Vector store package)
-auto_cut: This is one of the best features of Weaviate, much better than a hard top_k cut off.

Code:

Langchain docs:

hi @bobby_r !! Welcome to our community!

This was recently done already:

I even updated this recipe to use the new integration:

Let me know if this helps.

Thanks!

Also, check here for the documentation:

The Langchain hybrid code still says

if not isinstance(values[“client”], weaviate.Client):
client = values[“client”]
raise ValueError(
f"client should be an instance of weaviate.Client, got {type(client)}"
)

and execution results

ValidationError: 1 validation error for WeaviateHybridSearchRetriever
root
client should be an instance of weaviate.Client, got <class ‘weaviate.client.WeaviateClient’> (type=value_error)

I am using

weaviate-client (4.6.5)
langchain-community (0.2.5)
langchain (0.2.5)

hi! Welcome to our community! :hugs:

please, open a new forum topic, and provide some code to reproduce this issue, including installation steps.

Thanks!