import { ... } from "@langchain/core/prompts";Class that represents an AI message prompt template. It extends the BaseMessageStringPromptTemplate.
Abstract class that serves as a base for creating chat prompt templates. It extends the BasePromptTemplate.
Abstract class that serves as a base for creating message prompt templates. It defines how to format messages for different roles in a conversation.
Abstract class that serves as a base for creating message string prompt templates. It extends the BaseMessagePromptTemplate.
Base class for prompt templates. Exposes a format method that returns a string prompt given a set of input values.
Base class for string prompt templates. It extends the BasePromptTemplate class and overrides the formatPromptValue method to return a StringPromptValue.
Class that represents a chat message prompt template. It extends the BaseMessageStringPromptTemplate.
Class that represents a chat prompt. It extends the BaseChatPromptTemplate and uses an array of BaseMessagePromptTemplate instances to format a series of messages for a conversation.
A Runnable is a generic unit of work that can be invoked, batched, streamed, and/or transformed.
Chat prompt template that contains few-shot examples.
Prompt template that contains few-shot examples.
Class that represents a human message prompt template. It extends the BaseMessageStringPromptTemplate.
An image prompt template for a multimodal model.
Class that represents a placeholder for messages in a chat prompt. It extends the BaseMessagePromptTemplate.
Class that handles a sequence of prompts, each of which may require different input variables. Includes methods for formatting these prompts, extracting required input values, and handling partial prompts.
Schema to represent a basic prompt for an LLM.
Interface for the input of a ChatPromptTemplate.
Class that represents a system message prompt template. It extends the BaseMessageStringPromptTemplate.
Input common to all prompt templates.
Interface for the fields of a ChatMessagePromptTemplate.
Interface for the input of a ChatPromptTemplate.
Input common to all prompt templates.
Input common to all prompt templates.
Inputs to create a ImagePromptTemplate
Interface for the fields of a MessagePlaceholder.
Interface for the fields of a MessageStringPromptTemplate.
Inputs to create a PromptTemplate
Interface for the input of a ChatPromptTemplate.
Alias for ParsedTemplateNode since it is the same for
both f-string and mustache templates.
Type that represents a node in a parsed format string. It can be either a literal text or a variable name.
Type that includes the name of the prompt and the prompt itself.
Type that extends the BasePromptTemplateInput type, excluding the inputVariables property. It includes an array of pipelinePrompts and a finalPrompt.
Represents a serialized version of a base prompt template. This type can be either a SerializedFewShotTemplate or a SerializedPromptTemplate.
Represents a serialized version of a few-shot template. This type
includes an _type field set to 'few_shot', input_variables which
are an array of strings representing the variables to be used in the
template, examples which can be a string or an array of Example
objects, an optional example_prompt which is a
SerializedPromptTemplate, example_separator which is a string,
optional prefix and suffix strings, and template_format which
specifies the format of the template.
Represents a serialized version of a prompt template. This type is used
to create dynamic prompts for language models. It contains an optional
_type field which, if present, is set to 'prompt'. It also includes
input_variables, an array of strings representing the variables to be
used in the prompt, an optional template_format specifying the format
of the template, and an optional template which is the actual
template string.
Type that specifies the format of a template.