BasePrompt schema definition.
Get colored text.
Determine if running within IPython or Jupyter.
Format a template using jinja2.
As of LangChain 0.0.329, this method uses Jinja2's SandboxedEnvironment by
default. However, this sandboxing should be treated as a best-effort approach
rather than a guarantee of security.
Do not accept jinja2 templates from untrusted sources as they may lead to arbitrary Python code execution.
Validate that the input variables are valid for the template.
Issues a warning if missing or extra variables are found.
Format a template using mustache.
Get the top-level variables from a mustache template.
For nested variables like {{person.name}}, only the top-level key (person) is
returned.
Get the variables from a mustache template.
Check that template string is valid.
Get the variables from the template.
Return True if child is subsequence of parent.
Base abstract class for inputs to any language model.
PromptValues can be converted to both LLM (pure text-generation) inputs and
chat model inputs.
String prompt value.
Base class for all prompt templates, returning a prompt.
String prompt that exposes the format method, returning a prompt.