ninehills / langchain-wenxin

langchain baidu wenxinworkshop wrapper
MIT License
68 stars 13 forks source link

【已解决】metaclass conflict 问题 #9

Open MoonTTMM opened 12 months ago

MoonTTMM commented 12 months ago

Wenxin(LLM, BaiduCommon)会报以下错误: TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

MoonTTMM commented 12 months ago

seems not compatible with langchain==0.0.288 change back to 0.0.259(version around your last commit), it works

ninehills commented 11 months ago

seems not compatible with langchain==0.0.288 change back to 0.0.259(version around your last commit), it works

这是因为Langchain新版本默认使用了 pydantic-2 导致的,请使用 langchain-wenxin 最新版本,其限定了 pydantic 版本为1.10 从而避免了这个问题。