LangChain 1 · Chat models

Call a model

Send a prompt and get a message back. Read the text with .content.

response = model.invoke("Explain recursion in one sentence.")
print(response.content)

Official LangChain 1 documentation

More chat models commands

All chat models commands · LangChain 1 cheatsheet

Was this page helpful?