LangChain 1 · Chat models
Send a conversation
Pass a list of messages, including a system message, instead of a single string.
model.invoke([
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "What is a closure?"},
])
Official LangChain 1 documentation