Message from an AI.
public class MessageMessage from an AI.
An AIMessage is returned from a chat model as a response to a prompt.
This message represents the output of the model and consists of both the raw output as
returned by the model and standardized fields (e.g., tool calls, usage metadata) added by the
LangChain framework.
Message from an AI.
Message from the user.
Message that can be assigned an arbitrary speaker (i.e.
Message for priming AI behavior.
Message for passing the result of executing a tool back to a model.
Message for passing the result of executing a tool back to a model.
Message chunk from an AI (yielded when streaming)..
Human Message chunk..
Chat Message chunk..
System Message chunk..
Function Message chunk..
Tool Message chunk..
Message from an AI.
Message from the user.
Message that can be assigned an arbitrary speaker (i.e.
Message for priming AI behavior.
Message for passing the result of executing a tool back to a model.
Message for passing the result of executing a tool back to a model.
Message chunk from an AI (yielded when streaming)..
Human Message chunk..
Chat Message chunk..
System Message chunk..
Function Message chunk..
Tool Message chunk..
Message from an AI.
Message from the user.
Message that can be assigned an arbitrary speaker (i.e.
Message for priming AI behavior.
Message for passing the result of executing a tool back to a model.
Message for passing the result of executing a tool back to a model.
Message chunk from an AI (yielded when streaming)..
Human Message chunk..
Chat Message chunk..
System Message chunk..
Function Message chunk..
Tool Message chunk..
unexpectedly missing or null (e.g.
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
Usage metadata for a message, such as token counts.
Returns the raw JSON value of [content].
Returns the raw JSON value of [id].
Returns the raw JSON value of [invalidToolCalls].
Returns the raw JSON value of [name].
Returns the raw JSON value of [toolCalls].
Returns the raw JSON value of [type].
Returns the raw JSON value of [usageMetadata].
Returns a mutable builder for constructing an instance of [AiMessage].
unexpectedly missing or null (e.g.
unexpectedly missing or null (e.g.
unexpectedly missing or null (e.g.
Alias for calling [content] with
Content.ofUnnamedSchemaWithArrayParent0s(unnamedSchemaWithArrayParent0s)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
Adds a single [InvalidToolCall] to [invalidToolCalls]..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
Adds a single [ToolCall] to [toolCalls]..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
Usage metadata for a message, such as token counts.
Usage metadata for a message, such as token counts.
Usage metadata for a message, such as token counts.
Returns an immutable instance of [AiMessage].
Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] if the class was instantiated with an unknown value.
Returns an enum member corresponding to this class instance's value.