mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-18 07:39:13 +03:00
- Description: improve the ernie chat model. - fix missing kwargs to payload - new test cases - add some debug level log - improve description - Issue: None - Dependencies: None - Tag maintainer: @baskaryan
2.1 KiB
2.1 KiB
In [7]:
from langchain.chat_models import ErnieBotChat
from langchain.schema import HumanMessageIn [13]:
chat = ErnieBotChat(ernie_client_id='YOUR_CLIENT_ID', ernie_client_secret='YOUR_CLIENT_SECRET')In [15]:
chat([
HumanMessage(content='hello there, who are you?')
])Out [15]:
AIMessage(content='Hello, I am an artificial intelligence language model. My purpose is to help users answer questions or provide information. What can I do for you?', additional_kwargs={}, example=False)