Message from the user.
public class HumanMessageMessage from the user.
A HumanMessage is a message that is passed in from a user to the model.
Example:
from langchain_core.messages import HumanMessage, SystemMessage
messages = [
SystemMessage(content="You are a helpful assistant! Your name is Bob."),
HumanMessage(content="What is your name?"),
]
# Instantiate a chat model and invoke it with the messages
model = ...
print(model.invoke(messages))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)..
Returns the raw JSON value of [content].
Returns the raw JSON value of [id].
Returns the raw JSON value of [name].
Returns the raw JSON value of [type].
Returns a mutable builder for constructing an instance of [HumanMessage].
unexpectedly missing or null (e.g.
unexpectedly missing or null (e.g.
unexpectedly missing or null (e.g.
Alias for calling [content] with
Content.ofUnnamedSchemaWithArrayParent1s(unnamedSchemaWithArrayParent1s)..
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)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
if the server responded with an unexpected value)..
Returns an immutable instance of [HumanMessage].