Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt

Use this file to discover all available pages before exploring further.

This error occurs when message objects don’t conform to the expected format. TODO: Add JS example

Troubleshooting

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