langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
93.12k stars 14.98k forks source link

Depreciated initialisation (v3) of Weaviate Vector Database client #20442

Closed cyai closed 1 month ago

cyai commented 5 months ago

Checked other resources

Example Code

The following code: weaviate.Client(url=url, auth=auth, **kwargs) is a v3 type of implementation of Weaviate client

Error Message and Stack Trace (if applicable)

DeprecationWarning: Dep016: You are using the Weaviate v3 client, which is deprecated. Consider upgrading to the new and improved v4 client instead! See here for usage: https://weaviate.io/developers/weaviate/client-libraries/python warnings.warn(```

### Description

- I am trying to create a weaviate client using langhchain's `from langchain_community.vectorstores.weaviate import Weaviate` library. 
- I expected it to create a weaviate client
- The current langchain internal implementaion of creating of weaveate client is working but is `v3` client API implementation which results in the warning, it should be upgraded to `v4` client API.

### System Info

`pip freeze | grep langchain` : 
```bash
langchain==0.1.12
langchain-community==0.0.28
langchain-core==0.1.42
langchain-openai==0.0.8
langchain-pinecone==0.0.3
langchain-text-splitters==0.0.1
langchain-weaviate==0.0.1.post1

python -m langchain_core.sys_info:

System Information
------------------
> OS:  Darwin
> OS Version:  Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103
> Python Version:  3.11.4 (main, Jul  5 2023, 08:54:11) [Clang 14.0.6 ]

Package Information
-------------------
> langchain_core: 0.1.42
> langchain: 0.1.16
> langchain_community: 0.0.32
> langsmith: 0.1.38
> langchain_experimental: 0.0.57
> langchain_openai: 0.1.3
> langchain_text_splitters: 0.0.1
andresmoschini commented 5 months ago

+1

The same is happening to me using langchain-community==0.0.33

Related: https://forum.weaviate.io/t/deprication-warning/1383

Bec-k commented 4 months ago

Same here, need v4 client, v3 client is outdated.

Bec-k commented 4 months ago

Anyone wants to update weaviate integration?