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
:
QianfanChatEndpoint
supports more LLMs in the Qianfan platform.QianfanChatEndpoint
supports streaming mode.QianfanChatEndpoint
support function calling usage.ErnieBotChat
is no longer maintained and has been deprecated.
- change
ernie_client_id
toqianfan_ak
, also changeernie_client_secret
toqianfan_sk
. - install
qianfan
package. likepip install qianfan
- change
ErnieBotChat
toQianfanChatEndpoint
.
Usage
client_id
and client_secret
in your environment variables