Prompt template that contains few shot examples.
prompts.pipeline.PipelinePromptTemplate
A prompt template for composing multiple prompt templates together.
prompts.prompt.PromptTemplate
A prompt template for a language model.
prompts.string.StringPromptTemplate
String prompt that exposes the format method, returning a prompt.
Functions¶
prompts.base.format_document(doc, prompt)
Format a document into a string based on a prompt template.
prompts.loading.load_prompt(path)
Unified method for loading a prompt from LangChainHub or local fs.
prompts.loading.load_prompt_from_config(config)
Load prompt from Config Dict.
prompts.string.check_valid_template(...)
Check that template string is valid.
prompts.string.get_template_variables(...)
Get the variables from the template.
prompts.string.jinja2_formatter(template, ...)
Format a template using jinja2.
prompts.string.validate_jinja2(template, ...)
Validate that the input variables are valid for the template.
langchain_core.retrievers¶
Classes¶
retrievers.BaseRetriever
Abstract base class for a Document retrieval system.
langchain_core.runnables¶
LangChain Runnable and the LangChain Expression Language (LCEL).
The LangChain Expression Language (LCEL) offers a declarative method to build
production-grade programs that harness the power of LLMs.
Programs created using LCEL and LangChain Runnables inherently support
synchronous, asynchronous, batch, and streaming operations.
Support for async allows servers hosting LCEL based programs to scale better
for higher concurrent loads.
Streaming of intermediate outputs as they’re being generated allows for
creating more responsive UX.
This module contains schema and implementation of LangChain Runnables primitives.
Classes¶
runnables.base.Runnable()
A unit of work that can be invoked, batched, streamed, transformed and composed.