当消息对象不符合预期格式时,会发生此错误。 TODO: 添加 JS 示例Documentation Index
Fetch the complete documentation index at: https://langchain-zh.cn/llms.txt
Use this file to discover all available pages before exploring further.
故障排除
要解决此错误:- 确保格式正确:聊天模型的所有输入必须是 LangChain 消息类的数组或受支持的消息类格式
- 验证你的消息没有发生意外的字符串化或转换
- 检查错误的堆栈跟踪,并在消息传递给模型之前添加日志语句来检查消息对象
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

