langchain_community.chat_models.ErnieBotChat to langchain_community.chat_models.QianfanChatEndpoint.
documentation for QianfanChatEndpoint is here.
There are 4 reasons why we recommend users to use QianfanChatEndpoint:
QianfanChatEndpointsupports more LLMs in the Qianfan platform.QianfanChatEndpointsupports streaming mode.QianfanChatEndpointsupport function calling usage.ErnieBotChatis no longer maintained and has been deprecated.
- change
ernie_client_idtoqianfan_ak, also changeernie_client_secrettoqianfan_sk. - install
qianfanpackage. likepip install qianfan - change
ErnieBotChattoQianfanChatEndpoint.
Usage
client_id and client_secret in your environment variables
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.