mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-15 20:12:30 +00:00
docs[patch]: add deprecated note for ErnieChatBot (#14061)
- **Description:** just a little change of ErnieChatBot class description, sugguesting user to use more suitable class - **Issue:** none, - **Dependencies:** none, - **Tag maintainer:** @baskaryan , - **Twitter handle:** none
This commit is contained in:
parent
1757258b2a
commit
1b36ddf16c
@ -7,7 +7,19 @@
|
|||||||
"# ERNIE-Bot Chat\n",
|
"# ERNIE-Bot Chat\n",
|
||||||
"\n",
|
"\n",
|
||||||
"[ERNIE-Bot](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11) is a large language model developed by Baidu, covering a huge amount of Chinese data.\n",
|
"[ERNIE-Bot](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11) is a large language model developed by Baidu, covering a huge amount of Chinese data.\n",
|
||||||
"This notebook covers how to get started with ErnieBot chat models."
|
"This notebook covers how to get started with ErnieBot chat models.\n",
|
||||||
|
"\n",
|
||||||
|
"**Note:** We recommend users using this class to switch to [Baidu Qianfan](./baidu_qianfan_endpoint). they are 3 why we recommend users to use `QianfanChatEndpoint`:\n",
|
||||||
|
"1. `QianfanChatEndpoint` support more LLM in the Qianfan platform.\n",
|
||||||
|
"2. `QianfanChatEndpoint` support streaming mode.\n",
|
||||||
|
"3. `QianfanChatEndpoint` support function calling usgage.\n",
|
||||||
|
"\n",
|
||||||
|
"Some tips for migration:\n",
|
||||||
|
"- change `ernie_client_id` to `qianfan_ak`, also change `ernie_client_secret` to `qianfan_sk`.\n",
|
||||||
|
"- install `qianfan` package. \n",
|
||||||
|
" ```\n",
|
||||||
|
" pip install qianfan\n",
|
||||||
|
" ```"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -54,6 +54,20 @@ class ErnieBotChat(BaseChatModel):
|
|||||||
from langchain.chat_models import ErnieBotChat
|
from langchain.chat_models import ErnieBotChat
|
||||||
chat = ErnieBotChat(model_name='ERNIE-Bot')
|
chat = ErnieBotChat(model_name='ERNIE-Bot')
|
||||||
|
|
||||||
|
|
||||||
|
Deprecated Note:
|
||||||
|
Please use `QianfanChatEndpoint` instead of this class.
|
||||||
|
`QianfanChatEndpoint` is a more suitable choice for production.
|
||||||
|
|
||||||
|
Always test your code after changing to `QianfanChatEndpoint`.
|
||||||
|
|
||||||
|
Example of `QianfanChatEndpoint`:
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from langchain.chat_models import QianfanChatEndpoint
|
||||||
|
qianfan_chat = QianfanChatEndpoint(model="ERNIE-Bot",
|
||||||
|
endpoint="your_endpoint", qianfan_ak="your_ak", qianfan_sk="your_sk")
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ernie_api_base: Optional[str] = None
|
ernie_api_base: Optional[str] = None
|
||||||
|
Loading…
Reference in New Issue
Block a user