Prompt template for a language model.
A prompt template consists of a string template. It accepts a set of parameters from the user that can be used to generate a prompt for a language model.
The te
Prompt template for chat models.
Use to create flexible templated prompts for chat models.
from langchain_core.prompts import ChatPromptTemplate
template = ChatPr
<!--/ADMON-->
Prompt template that assumes variable is already list of messages.
A placeholder which can be used to pass in a list of messages.
from langchain_core.pr
<!--/ADMON-->
Human message prompt template.
This is a message sent from the user.
AI message prompt template.
This is a message sent from the AI.
System message prompt template.
This is a message that is not sent to the user.
Chat message prompt template.
Prompt template that contains few shot examples.
Chat prompt template that supports few-shot examples.
The high level structure of produced by this prompt template is a list of messages consisting of prefix message(s), example message(s), and suffi
Prompt template that contains few shot examples.
Structured prompt template for a language model.
Template represented by a dictionary.
Recognizes variables in f-string or mustache formatted string dict values.
Does NOT recognize variables in dict keys. Applies recursively.
Base class for chat prompt templates.
Base class for message prompt templates that use a string prompt template.
Base class for message prompt templates.
String prompt that exposes the format method, returning a prompt.