LangChain · Class
AIMessage
AIMessage represents an AI response in a conversation. It stores content and can include tool calls, metadata, a name, and an identifier.
Last updated
- Since
- v1.3
Syntax
new AIMessage({ content, name?, id?, additional_kwargs?, response_metadata? })In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
BaseMessagecontentBlockstool_callsusage_metadataresponse_metadatatoDicttoJSON