Chat with Baichuan-192K
Baichuan chat models API by Baichuan Intelligent Technology. For more information, see https://platform.baichuan-ai.com/docs/api
from langchain_community.chat_models import ChatBaichuan
from langchain_core.messages import HumanMessage
API Reference:ChatBaichuan | HumanMessage
chat = ChatBaichuan(baichuan_api_key="YOUR_API_KEY")
Alternatively, you can set your API key with:
import os
os.environ["BAICHUAN_API_KEY"] = "YOUR_API_KEY"
chat([HumanMessage(content="