Message for priming AI behavior.
public class SystemMessageMessage for priming AI behavior. The system message is usually passed in as the first of a sequence of input messages. 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?"),
]
# Define a chat model and invoke it with the messages
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 [SystemMessage].
unexpectedly missing or null (e.g.
unexpectedly missing or null (e.g.
unexpectedly missing or null (e.g.
Alias for calling [content] with
Content.ofUnnamedSchemaWithArrayParent3s(unnamedSchemaWithArrayParent3s)..
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 [SystemMessage].