Troubleshooting
To resolve this error:- Ensure proper format: All inputs to chat models must be an array of LangChain message classes or a supported message-like format
- Verify no unintended stringification or transformation occurs to your messages
- Examine the error’s stack trace and add logging statements to inspect message objects before they’re passed to the model