langchain-experimental: 0.0.64#

agents#

autonomous_agents#

autonomous_agents.autogpt.agent.AutoGPT(...)

Agent for interacting with AutoGPT.

autonomous_agents.autogpt.memory.AutoGPTMemory

Memory for AutoGPT.

autonomous_agents.autogpt.output_parser.AutoGPTAction(...)

Action returned by AutoGPTOutputParser.

autonomous_agents.autogpt.output_parser.AutoGPTOutputParser

Output parser for AutoGPT.

autonomous_agents.autogpt.output_parser.BaseAutoGPTOutputParser

Base Output parser for AutoGPT.

autonomous_agents.autogpt.prompt.AutoGPTPrompt

Prompt for AutoGPT.

autonomous_agents.autogpt.prompt_generator.PromptGenerator()

Generator of custom prompt strings.

autonomous_agents.baby_agi.baby_agi.BabyAGI

Controller model for the BabyAGI agent.

autonomous_agents.baby_agi.task_creation.TaskCreationChain

Chain generating tasks.

autonomous_agents.baby_agi.task_execution.TaskExecutionChain

Chain to execute tasks.

autonomous_agents.baby_agi.task_prioritization.TaskPrioritizationChain

Chain to prioritize tasks.

autonomous_agents.hugginggpt.hugginggpt.HuggingGPT(...)

Agent for interacting with HuggingGPT.

autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerationChain

Chain to execute tasks.

autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerator(...)

Generates a response based on the input.

autonomous_agents.hugginggpt.task_executor.Task(...)

Task to be executed.

autonomous_agents.hugginggpt.task_executor.TaskExecutor(plan)

Load tools and execute tasks.

autonomous_agents.hugginggpt.task_planner.BasePlanner

Base class for a planner.

autonomous_agents.hugginggpt.task_planner.Plan(steps)

A plan to execute.

autonomous_agents.hugginggpt.task_planner.PlanningOutputParser

Parses the output of the planning stage.

autonomous_agents.hugginggpt.task_planner.Step(...)

A step in the plan.

autonomous_agents.hugginggpt.task_planner.TaskPlaningChain

Chain to execute tasks.

autonomous_agents.hugginggpt.task_planner.TaskPlanner

Planner for tasks.

chat_models#

comprehend_moderation#

comprehend_moderation.amazon_comprehend_moderation.AmazonComprehendModerationChain

Moderation Chain, based on Amazon Comprehend service.

comprehend_moderation.base_moderation.BaseModeration(client)

Base class for moderation.

comprehend_moderation.base_moderation_callbacks.BaseModerationCallbackHandler()

Base class for moderation callback handlers.

comprehend_moderation.base_moderation_config.BaseModerationConfig

Base configuration settings for moderation.

comprehend_moderation.base_moderation_config.ModerationPiiConfig

Configuration for PII moderation filter.

comprehend_moderation.base_moderation_config.ModerationPromptSafetyConfig

Configuration for Prompt Safety moderation filter.

comprehend_moderation.base_moderation_config.ModerationToxicityConfig

Configuration for Toxicity moderation filter.

comprehend_moderation.base_moderation_exceptions.ModerationPiiError([...])

Exception raised if PII entities are detected.

comprehend_moderation.base_moderation_exceptions.ModerationPromptSafetyError([...])

Exception raised if Unsafe prompts are detected.

comprehend_moderation.base_moderation_exceptions.ModerationToxicityError([...])

Exception raised if Toxic entities are detected.

comprehend_moderation.pii.ComprehendPII(client)

Class to handle Personally Identifiable Information (PII) moderation.

comprehend_moderation.prompt_safety.ComprehendPromptSafety(client)

Class to handle prompt safety moderation.

comprehend_moderation.toxicity.ComprehendToxicity(client)

Class to handle toxicity moderation.

cpal#

cpal.base.CPALChain

Causal program-aided language (CPAL) chain implementation.

cpal.base.CausalChain

Translate the causal narrative into a stack of operations.

cpal.base.InterventionChain

Set the hypothetical conditions for the causal model.

cpal.base.NarrativeChain

Decompose the narrative into its story elements.

cpal.base.QueryChain

Query the outcome table using SQL.

cpal.constants.Constant(value[, names, ...])

Enum for constants used in the CPAL.

cpal.models.CausalModel

Casual data.

cpal.models.EntityModel

Entity in the story.

cpal.models.EntitySettingModel

Entity initial conditions.

cpal.models.InterventionModel

Intervention data of the story aka initial conditions.

cpal.models.NarrativeModel

Narrative input as three story elements.

cpal.models.QueryModel

Query data of the story.

cpal.models.ResultModel

Result of the story query.

cpal.models.StoryModel

Story data.

cpal.models.SystemSettingModel

System initial conditions.

data_anonymizer#

data_anonymizer.base.AnonymizerBase()

Base abstract class for anonymizers.

data_anonymizer.base.ReversibleAnonymizerBase()

Base abstract class for reversible anonymizers.

data_anonymizer.deanonymizer_mapping.DeanonymizerMapping(...)

Deanonymizer mapping.

data_anonymizer.presidio.PresidioAnonymizer([...])

Anonymizer using Microsoft Presidio.

data_anonymizer.presidio.PresidioAnonymizerBase([...])

Base Anonymizer using Microsoft Presidio.

data_anonymizer.presidio.PresidioReversibleAnonymizer([...])

Reversible Anonymizer using Microsoft Presidio.

fallacy_removal#

fallacy_removal.base.FallacyChain

Chain for applying logical fallacy evaluations.

fallacy_removal.models.LogicalFallacy

Logical fallacy.

generative_agents#

generative_agents.generative_agent.GenerativeAgent

Agent as a character with memory and innate characteristics.

generative_agents.memory.GenerativeAgentMemory

Memory for the generative agent.

graph_transformers#

graph_transformers.diffbot.DiffbotGraphTransformer(...)

Transform documents into graph documents using Diffbot NLP API.

graph_transformers.diffbot.NodesList()

List of nodes with associated properties.

graph_transformers.diffbot.SimplifiedSchema()

Simplified schema mapping.

graph_transformers.diffbot.TypeOption(value)

graph_transformers.gliner.GlinerGraphTransformer(...)

A transformer class for converting documents into graph structures using the GLiNER and GLiREL models.

graph_transformers.llm.LLMGraphTransformer(llm)

Transform documents into graph-based documents using a LLM.

graph_transformers.llm.UnstructuredRelation

Create a new model by parsing and validating input data from keyword arguments.

graph_transformers.relik.RelikGraphTransformer([...])

A transformer class for converting documents into graph structures using the Relik library and models.

llm_bash#

llm_bash.base.LLMBashChain

Chain that interprets a prompt and executes bash operations.

llm_bash.bash.BashProcess([strip_newlines, ...])

Wrapper for starting subprocesses.

llm_bash.prompt.BashOutputParser

Parser for bash output.

llm_symbolic_math#

llm_symbolic_math.base.LLMSymbolicMathChain

Chain that interprets a prompt and executes python code to do symbolic math.

llms#

llms.anthropic_functions.TagParser()

Parser for the tool tags.

llms.jsonformer_decoder.JsonFormer

Jsonformer wrapped LLM using HuggingFace Pipeline API.

llms.llamaapi.ChatLlamaAPI

Chat model using the Llama API.

llms.lmformatenforcer_decoder.LMFormatEnforcer

LMFormatEnforcer wrapped LLM using HuggingFace Pipeline API.

llms.rellm_decoder.RELLM

RELLM wrapped LLM using HuggingFace Pipeline API.

open_clip#

open_clip.open_clip.OpenCLIPEmbeddings

OpenCLIP Embeddings model.

pal_chain#

pal_chain.base.PALChain

Chain that implements Program-Aided Language Models (PAL).

pal_chain.base.PALValidation([...])

Validation for PAL generated code.

plan_and_execute#

prompt_injection_identifier#

prompt_injection_identifier.hugging_face_identifier.HuggingFaceInjectionIdentifier

Tool that uses HuggingFace Prompt Injection model to detect prompt injection attacks.

prompt_injection_identifier.hugging_face_identifier.PromptInjectionException([...])

Exception raised when prompt injection attack is detected.

recommenders#

recommenders.amazon_personalize.AmazonPersonalize([...])

Amazon Personalize Runtime wrapper for executing real-time operations.

recommenders.amazon_personalize_chain.AmazonPersonalizeChain

Chain for retrieving recommendations from Amazon Personalize,

retrievers#

retrievers.vector_sql_database.VectorSQLDatabaseChainRetriever

Retriever that uses Vector SQL Database.

rl_chain#

rl_chain.base.AutoSelectionScorer

Auto selection scorer.

rl_chain.base.Embedder(*args, **kwargs)

Abstract class to represent an embedder.

rl_chain.base.Event(inputs[, selected])

Abstract class to represent an event.

rl_chain.base.Policy(**kwargs)

Abstract class to represent a policy.

rl_chain.base.RLChain

Chain that leverages the Vowpal Wabbit (VW) model as a learned policy for reinforcement learning.

rl_chain.base.Selected()

Abstract class to represent the selected item.

rl_chain.base.SelectionScorer

Abstract class to grade the chosen selection or the response of the llm.

rl_chain.base.VwPolicy(model_repo, vw_cmd, ...)

Vowpal Wabbit policy.

rl_chain.metrics.MetricsTrackerAverage(step)

Metrics Tracker Average.

rl_chain.metrics.MetricsTrackerRollingWindow(...)

Metrics Tracker Rolling Window.

rl_chain.model_repository.ModelRepository(folder)

Model Repository.

rl_chain.pick_best_chain.PickBest

Chain that leverages the Vowpal Wabbit (VW) model for reinforcement learning with a context, with the goal of modifying the prompt before the LLM call.

rl_chain.pick_best_chain.PickBestEvent(...)

Event class for PickBest chain.

rl_chain.pick_best_chain.PickBestFeatureEmbedder(...)

Embed the BasedOn and ToSelectFrom inputs into a format that can be used by the learning policy.

rl_chain.pick_best_chain.PickBestRandomPolicy(...)

Random policy for PickBest chain.

rl_chain.pick_best_chain.PickBestSelected([...])

Selected class for PickBest chain.

rl_chain.vw_logger.VwLogger(path)

Vowpal Wabbit custom logger.

smart_llm#

smart_llm.base.SmartLLMChain

Chain for applying self-critique using the SmartGPT workflow.

sql#

sql.base.SQLDatabaseChain

Chain for interacting with SQL Database.

sql.base.SQLDatabaseSequentialChain

Chain for querying SQL database that is a sequential chain.

sql.vector_sql.VectorSQLDatabaseChain

Chain for interacting with Vector SQL Database.

sql.vector_sql.VectorSQLOutputParser

Output Parser for Vector SQL.

sql.vector_sql.VectorSQLRetrieveAllOutputParser

Parser based on VectorSQLOutputParser.

tabular_synthetic_data#

tabular_synthetic_data.base.SyntheticDataGenerator

Generate synthetic data using the given LLM and few-shot template.

text_splitter#

text_splitter.SemanticChunker(embeddings[, ...])

Split the text based on semantic similarity.

tools#

tools.python.tool.PythonAstREPLTool

Tool for running python code in a REPL.

tools.python.tool.PythonInputs

Python inputs.

tools.python.tool.PythonREPLTool

Tool for running python code in a REPL.

tot#

tot.base.ToTChain

Chain implementing the Tree of Thought (ToT).

tot.checker.ToTChecker

Tree of Thought (ToT) checker.

tot.controller.ToTController([c])

Tree of Thought (ToT) controller.

tot.memory.ToTDFSMemory([stack])

Memory for the Tree of Thought (ToT) chain.

tot.prompts.CheckerOutputParser

Parse and check the output of the language model.

tot.prompts.JSONListOutputParser

Parse the output of a PROPOSE_PROMPT response.

tot.thought.Thought

A thought in the ToT.

tot.thought.ThoughtValidity(value[, names, ...])

Enum for the validity of a thought.

tot.thought_generation.BaseThoughtGenerationStrategy

Base class for a thought generation strategy.

tot.thought_generation.ProposePromptStrategy

Strategy that is sequentially using a "propose prompt".

tot.thought_generation.SampleCoTStrategy

Sample strategy from a Chain-of-Thought (CoT) prompt.

utilities#

utilities.python.PythonREPL

Simulates a standalone Python REPL.

video_captioning#