GPTCache icon indicating copy to clipboard operation
GPTCache copied to clipboard

Getting Error during processing: BaseChatModel.__call__() missing 1 required positional argument: 'messages' eror

Open ompanda opened this issue 10 months ago • 4 comments

LangChainDeprecationWarning: The method BaseChatModel.__call__ was deprecated in langchain-core 0.1.7 and will be removed in 1.0. Use :meth:~invoke instead. res = func(*args, **kwargs) Error during processing: BaseChatModel.call() missing 1 required positional argument: 'messages'

ompanda avatar Apr 21 '25 12:04 ompanda

Can you help fix it?

SimFG avatar Apr 21 '25 13:04 SimFG

yes..please let me know if you have any info about this issue

ompanda avatar Apr 21 '25 13:04 ompanda

Because langchain iterates very quickly, many APIs change at a very fast pace, and it seems that compatibility issues are not taken into consideration.

SimFG avatar Apr 21 '25 13:04 SimFG

The main files involved are: https://github.com/zilliztech/GPTCache/blob/main/gptcache/adapter/langchain_models.py

Previously, we mainly connected to the relevant models of langchain by inheriting BaseChatModel. However, this method is not very good. It is recommended to directly set the cache module in langchain, which is also connected to gptcache

SimFG avatar Apr 21 '25 13:04 SimFG