class FewShotChatMessagePromptTemplateInternal method that handles batching and configuration for a runnable
Return the string type key uniquely identifying this class of prompt template.
Default streaming implementation.
Helper method to transform an Iterator of Input values into an Iterator of
Assigns new fields to the dict output of this runnable. Returns a new runnable.
Convert a runnable to a tool. Return a new instance of RunnableToolLike
Default implementation of batch, which calls invoke N times.
Format the prompt given the input values.
Format the prompt given the input values and return a formatted prompt value.
Invokes the prompt template with the given input and options.
Merges partial variables and user variables.
Pick keys from the dict output of this runnable. Returns a new runnable.
Create a new runnable sequence that runs each individual runnable in series,
Stream output in chunks.
Generate a stream of events emitted by the internal steps of the runnable.
Stream all output from a runnable, as reported to the callback system.
Default implementation of transform, which buffers input and then calls stream.
Bind config to a Runnable, returning a new Runnable.
Create a new runnable from the current one that will try invoking
Bind lifecycle listeners to a Runnable, returning a new Runnable.
Add retry logic to an existing runnable.
The name of the serializable. Override to provide an alias or
A list of variable names the prompt template expects
A path to the module that contains the class, eg. ["langchain", "llms"]
Metadata to be used for tracing.
How to parse the output of calling an LLM on this formatted prompt
Partial variables
Tags to be used for tracing.
A path to the module that contains the class, eg. ["langchain", "llms"]
Internal method that handles batching and configuration for a runnable
A path to the module that contains the class, eg. ["langchain", "llms"]
An BaseMessagePromptTemplate | BaseChatPromptTemplate used to format a single example.
Examples to format into the prompt. Exactly one of this or exampleSelector must be provided.
An BaseExampleSelector Examples to format into the prompt. Exactly one of this or examples must be provided.
String separator used to join the prefix, the examples, and suffix.
A list of variable names the prompt template expects
A path to the module that contains the class, eg. ["langchain", "llms"] Usually should be the same as the entrypoint the class is exported from.
How to parse the output of calling an LLM on this formatted prompt
Partial variables
A prompt template string to put before the examples.
A prompt template string to put after the examples.
The format of the prompt template. Options are: 'f-string'
Whether or not to try validating the template on initialization.
Chat prompt template that contains few-shot examples.
Default streaming implementation.