Dataset Viewer
id
stringlengths 14
15
| text
stringlengths 13
2.7k
| source
stringlengths 60
181
|
---|---|---|
58b349b36394-0
|
langchain_experimental 0.0.47¶
langchain_experimental.agents¶
Functions¶
agents.agent_toolkits.csv.base.create_csv_agent(...)
Create csv agent by loading to a dataframe and using pandas agent.
agents.agent_toolkits.pandas.base.create_pandas_dataframe_agent(llm, df)
Construct a pandas agent from an LLM and dataframe.
agents.agent_toolkits.python.base.create_python_agent(...)
Construct a python agent from an LLM and tool.
agents.agent_toolkits.spark.base.create_spark_dataframe_agent(llm, df)
Construct a Spark agent from an LLM and dataframe.
agents.agent_toolkits.xorbits.base.create_xorbits_agent(...)
Construct a xorbits agent from an LLM and dataframe.
langchain_experimental.autonomous_agents¶
Classes¶
autonomous_agents.autogpt.agent.AutoGPT(...)
Agent class for interacting with Auto-GPT.
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()
A class for generating 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.
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-1
|
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(...)
autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerationChain
Chain to execute tasks.
autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerator(...)
autonomous_agents.hugginggpt.task_executor.Task(...)
autonomous_agents.hugginggpt.task_executor.TaskExecutor(plan)
Load tools to execute tasks.
autonomous_agents.hugginggpt.task_planner.BasePlanner
Create a new model by parsing and validating input data from keyword arguments.
autonomous_agents.hugginggpt.task_planner.Plan(steps)
autonomous_agents.hugginggpt.task_planner.PlanningOutputParser
Create a new model by parsing and validating input data from keyword arguments.
autonomous_agents.hugginggpt.task_planner.Step(...)
autonomous_agents.hugginggpt.task_planner.TaskPlaningChain
Chain to execute tasks.
autonomous_agents.hugginggpt.task_planner.TaskPlanner
Create a new model by parsing and validating input data from keyword arguments.
Functions¶
autonomous_agents.autogpt.output_parser.preprocess_json_input(...)
Preprocesses a string to be parsed as json.
autonomous_agents.autogpt.prompt_generator.get_prompt(tools)
Generates a prompt string.
autonomous_agents.hugginggpt.repsonse_generator.load_response_generator(llm)
autonomous_agents.hugginggpt.task_planner.load_chat_planner(llm)
langchain_experimental.chat_models¶
Chat Models are a variation on language models.
While Chat Models use language models under the hood, the interface they expose
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-2
|
While Chat Models use language models under the hood, the interface they expose
is a bit different. Rather than expose a “text in, text out” API, they expose
an interface where “chat messages” are the inputs and outputs.
Class hierarchy:
BaseLanguageModel --> BaseChatModel --> <name> # Examples: ChatOpenAI, ChatGooglePalm
Main helpers:
AIMessage, BaseMessage, HumanMessage
Classes¶
chat_models.llm_wrapper.ChatWrapper
Create a new model by parsing and validating input data from keyword arguments.
chat_models.llm_wrapper.Llama2Chat
Create a new model by parsing and validating input data from keyword arguments.
chat_models.llm_wrapper.Orca
Create a new model by parsing and validating input data from keyword arguments.
chat_models.llm_wrapper.Vicuna
Create a new model by parsing and validating input data from keyword arguments.
langchain_experimental.comprehend_moderation¶
Classes¶
comprehend_moderation.amazon_comprehend_moderation.AmazonComprehendModerationChain
A subclass of Chain, designed to apply moderation to LLMs.
comprehend_moderation.base_moderation.BaseModeration(client)
comprehend_moderation.base_moderation_callbacks.BaseModerationCallbackHandler()
comprehend_moderation.base_moderation_config.BaseModerationConfig
Create a new model by parsing and validating input data from keyword arguments.
comprehend_moderation.base_moderation_config.ModerationPiiConfig
Create a new model by parsing and validating input data from keyword arguments.
comprehend_moderation.base_moderation_config.ModerationPromptSafetyConfig
Create a new model by parsing and validating input data from keyword arguments.
comprehend_moderation.base_moderation_config.ModerationToxicityConfig
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-3
|
comprehend_moderation.base_moderation_config.ModerationToxicityConfig
Create a new model by parsing and validating input data from keyword arguments.
comprehend_moderation.base_moderation_exceptions.ModerationPiiError([...])
Exception raised if PII entities are detected.
comprehend_moderation.base_moderation_exceptions.ModerationPromptSafetyError([...])
Exception raised if Intention entities are detected.
comprehend_moderation.base_moderation_exceptions.ModerationToxicityError([...])
Exception raised if Toxic entities are detected.
comprehend_moderation.pii.ComprehendPII(client)
comprehend_moderation.prompt_safety.ComprehendPromptSafety(client)
comprehend_moderation.toxicity.ComprehendToxicity(client)
langchain_experimental.cpal¶
Classes¶
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
Create a new model by parsing and validating input data from keyword arguments.
cpal.models.EntityModel
Create a new model by parsing and validating input data from keyword arguments.
cpal.models.EntitySettingModel
Initial conditions for an entity
cpal.models.InterventionModel
aka initial conditions
cpal.models.NarrativeModel
Represent the narrative input as three story elements.
cpal.models.QueryModel
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-4
|
Represent the narrative input as three story elements.
cpal.models.QueryModel
translate a question about the story outcome into a programmatic expression
cpal.models.ResultModel
Create a new model by parsing and validating input data from keyword arguments.
cpal.models.StoryModel
Create a new model by parsing and validating input data from keyword arguments.
cpal.models.SystemSettingModel
Initial global conditions for the system.
langchain_experimental.data_anonymizer¶
Data anonymizer package
Classes¶
data_anonymizer.base.AnonymizerBase()
Base abstract class for anonymizers. It is public and non-virtual because it allows wrapping the behavior for all methods in a base class.
data_anonymizer.base.ReversibleAnonymizerBase()
Base abstract class for reversible anonymizers.
data_anonymizer.deanonymizer_mapping.DeanonymizerMapping(...)
data_anonymizer.presidio.PresidioAnonymizer([...])
param analyzed_fields
List of fields to detect and then anonymize.
data_anonymizer.presidio.PresidioAnonymizerBase([...])
param analyzed_fields
List of fields to detect and then anonymize.
data_anonymizer.presidio.PresidioReversibleAnonymizer([...])
param analyzed_fields
List of fields to detect and then anonymize.
Functions¶
data_anonymizer.deanonymizer_mapping.create_anonymizer_mapping(...)
Creates or updates the mapping used to anonymize and/or deanonymize text.
data_anonymizer.deanonymizer_mapping.format_duplicated_operator(...)
Format the operator name with the count
data_anonymizer.deanonymizer_matching_strategies.case_insensitive_matching_strategy(...)
Case insensitive matching strategy for deanonymization. It replaces all the anonymized entities with the original ones irrespective of their letter case.
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-5
|
data_anonymizer.deanonymizer_matching_strategies.combined_exact_fuzzy_matching_strategy(...)
RECOMMENDED STRATEGY.
data_anonymizer.deanonymizer_matching_strategies.exact_matching_strategy(...)
Exact matching strategy for deanonymization.
data_anonymizer.deanonymizer_matching_strategies.fuzzy_matching_strategy(...)
Fuzzy matching strategy for deanonymization.
data_anonymizer.deanonymizer_matching_strategies.ngram_fuzzy_matching_strategy(...)
N-gram fuzzy matching strategy for deanonymization.
data_anonymizer.faker_presidio_mapping.get_pseudoanonymizer_mapping([seed])
langchain_experimental.fallacy_removal¶
The Chain runs a self-review of logical fallacies as determined by this paper categorizing and defining logical fallacies https://arxiv.org/pdf/2212.07425.pdf. Modeled after Constitutional AI and in same format, but applying logical fallacies as generalized rules to remove in output
Classes¶
fallacy_removal.base.FallacyChain
Chain for applying logical fallacy evaluations, modeled after Constitutional AI and in same format, but applying logical fallacies as generalized rules to remove in output
fallacy_removal.models.LogicalFallacy
Class for a logical fallacy.
langchain_experimental.generative_agents¶
Generative Agents primitives.
Classes¶
generative_agents.generative_agent.GenerativeAgent
An Agent as a character with memory and innate characteristics.
generative_agents.memory.GenerativeAgentMemory
Memory for the generative agent.
langchain_experimental.graph_transformers¶
Classes¶
graph_transformers.diffbot.DiffbotGraphTransformer([...])
Transforms documents into graph documents using Diffbot's NLP API.
graph_transformers.diffbot.NodesList()
Manages a list of nodes with associated properties.
graph_transformers.diffbot.SimplifiedSchema()
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-6
|
graph_transformers.diffbot.SimplifiedSchema()
Provides functionality for working with a simplified schema mapping.
Functions¶
graph_transformers.diffbot.format_property_key(s)
langchain_experimental.llm_bash¶
Chain that interprets a prompt and executes bash code to perform bash operations.
Classes¶
llm_bash.base.LLMBashChain
Chain that interprets a prompt and executes bash operations.
llm_bash.bash.BashProcess([strip_newlines, ...])
Wrapper class for starting subprocesses.
llm_bash.prompt.BashOutputParser
Parser for bash output.
langchain_experimental.llm_symbolic_math¶
Chain that interprets a prompt and executes python code to do math.
Heavily borrowed from llm_math, wrapper for SymPy
Classes¶
llm_symbolic_math.base.LLMSymbolicMathChain
Chain that interprets a prompt and executes python code to do symbolic math.
langchain_experimental.llms¶
Experimental LLM wrappers.
Classes¶
llms.anthropic_functions.AnthropicFunctions
Create a new model by parsing and validating input data from keyword arguments.
llms.anthropic_functions.TagParser()
A heavy-handed solution, but it's fast for prototyping.
llms.jsonformer_decoder.JsonFormer
Jsonformer wrapped LLM using HuggingFace Pipeline API.
llms.llamaapi.ChatLlamaAPI
Create a new model by parsing and validating input data from keyword arguments.
llms.lmformatenforcer_decoder.LMFormatEnforcer
LMFormatEnforcer wrapped LLM using HuggingFace Pipeline API.
llms.ollama_functions.OllamaFunctions
Create a new model by parsing and validating input data from keyword arguments.
llms.rellm_decoder.RELLM
RELLM wrapped LLM using HuggingFace Pipeline API.
Functions¶
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-7
|
RELLM wrapped LLM using HuggingFace Pipeline API.
Functions¶
llms.jsonformer_decoder.import_jsonformer()
Lazily import jsonformer.
llms.lmformatenforcer_decoder.import_lmformatenforcer()
Lazily import lmformatenforcer.
llms.rellm_decoder.import_rellm()
Lazily import rellm.
langchain_experimental.open_clip¶
Classes¶
open_clip.open_clip.OpenCLIPEmbeddings
Create a new model by parsing and validating input data from keyword arguments.
langchain_experimental.pal_chain¶
Implements Program-Aided Language Models.
As in https://arxiv.org/pdf/2211.10435.pdf.
This is vulnerable to arbitrary code execution:
https://github.com/langchain-ai/langchain/issues/5872
Classes¶
pal_chain.base.PALChain
Implements Program-Aided Language Models (PAL).
pal_chain.base.PALValidation([...])
Initialize a PALValidation instance.
langchain_experimental.plan_and_execute¶
Classes¶
plan_and_execute.agent_executor.PlanAndExecute
Plan and execute a chain of steps.
plan_and_execute.executors.base.BaseExecutor
Base executor.
plan_and_execute.executors.base.ChainExecutor
Chain executor.
plan_and_execute.planners.base.BasePlanner
Base planner.
plan_and_execute.planners.base.LLMPlanner
LLM planner.
plan_and_execute.planners.chat_planner.PlanningOutputParser
Planning output parser.
plan_and_execute.schema.BaseStepContainer
Base step container.
plan_and_execute.schema.ListStepContainer
List step container.
plan_and_execute.schema.Plan
Plan.
plan_and_execute.schema.PlanOutputParser
Plan output parser.
plan_and_execute.schema.Step
Step.
plan_and_execute.schema.StepResponse
Step response.
Functions¶
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-8
|
Step.
plan_and_execute.schema.StepResponse
Step response.
Functions¶
plan_and_execute.executors.agent_executor.load_agent_executor(...)
Load an agent executor.
plan_and_execute.planners.chat_planner.load_chat_planner(llm)
Load a chat planner.
langchain_experimental.prompt_injection_identifier¶
HuggingFace Security toolkit.
Classes¶
prompt_injection_identifier.hugging_face_identifier.HuggingFaceInjectionIdentifier
Tool that uses HF model to detect prompt injection attacks.
prompt_injection_identifier.hugging_face_identifier.PromptInjectionException([...])
Functions¶
langchain_experimental.prompts¶
Functions¶
prompts.load.load_prompt(path)
Unified method for loading a prompt from LangChainHub or local fs.
langchain_experimental.retrievers¶
Classes¶
retrievers.vector_sql_database.VectorSQLDatabaseChainRetriever
Retriever that uses SQLDatabase as Retriever
langchain_experimental.rl_chain¶
Classes¶
rl_chain.base.AutoSelectionScorer
Create a new model by parsing and validating input data from keyword arguments.
rl_chain.base.Embedder(*args, **kwargs)
rl_chain.base.Event(inputs[, selected])
rl_chain.base.Policy(**kwargs)
rl_chain.base.RLChain
The RLChain class leverages the Vowpal Wabbit (VW) model as a learned policy for reinforcement learning.
rl_chain.base.Selected()
rl_chain.base.SelectionScorer
Abstract method to grade the chosen selection or the response of the llm
rl_chain.base.VwPolicy(model_repo, vw_cmd, ...)
rl_chain.metrics.MetricsTrackerAverage(step)
rl_chain.metrics.MetricsTrackerRollingWindow(...)
rl_chain.model_repository.ModelRepository(folder)
rl_chain.pick_best_chain.PickBest
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-9
|
rl_chain.model_repository.ModelRepository(folder)
rl_chain.pick_best_chain.PickBest
PickBest is a class designed to leverage 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(...)
rl_chain.pick_best_chain.PickBestFeatureEmbedder(...)
Text Embedder class that embeds the BasedOn and ToSelectFrom inputs into a format that can be used by the learning policy
rl_chain.pick_best_chain.PickBestRandomPolicy(...)
rl_chain.pick_best_chain.PickBestSelected([...])
rl_chain.vw_logger.VwLogger(path)
Functions¶
rl_chain.base.BasedOn(anything)
rl_chain.base.Embed(anything[, keep])
rl_chain.base.EmbedAndKeep(anything)
rl_chain.base.ToSelectFrom(anything)
rl_chain.base.embed(to_embed, model[, namespace])
Embeds the actions or context using the SentenceTransformer model (or a model that has an encode function)
rl_chain.base.embed_dict_type(item, model)
Helper function to embed a dictionary item.
rl_chain.base.embed_list_type(item, model[, ...])
rl_chain.base.embed_string_type(item, model)
Helper function to embed a string or an _Embed object.
rl_chain.base.get_based_on_and_to_select_from(inputs)
rl_chain.base.is_stringtype_instance(item)
Helper function to check if an item is a string.
rl_chain.base.parse_lines(parser, input_str)
rl_chain.base.prepare_inputs_for_autoembed(inputs)
go over all the inputs and if something is either wrapped in _ToSelectFrom or _BasedOn, and if their inner values are not already _Embed, then wrap them in EmbedAndKeep while retaining their _ToSelectFrom or _BasedOn status
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-10
|
rl_chain.base.stringify_embedding(embedding)
langchain_experimental.smart_llm¶
Generalized implementation of SmartGPT (origin: https://youtu.be/wVzuvf9D9BU)
Classes¶
smart_llm.base.SmartLLMChain
Generalized implementation of SmartGPT (origin: https://youtu.be/wVzuvf9D9BU)
langchain_experimental.sql¶
Chain for interacting with SQL Database.
Classes¶
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 1.
sql.vector_sql.VectorSQLRetrieveAllOutputParser
Based on VectorSQLOutputParser It also modify the SQL to get all columns
Functions¶
sql.vector_sql.get_result_from_sqldb(db, cmd)
langchain_experimental.tabular_synthetic_data¶
Classes¶
tabular_synthetic_data.base.SyntheticDataGenerator
Generates synthetic data using the given LLM and few-shot template.
Functions¶
tabular_synthetic_data.openai.create_openai_data_generator(...)
Create an instance of SyntheticDataGenerator tailored for OpenAI models.
langchain_experimental.tools¶
Classes¶
tools.python.tool.PythonAstREPLTool
A tool for running python code in a REPL.
tools.python.tool.PythonInputs
Create a new model by parsing and validating input data from keyword arguments.
tools.python.tool.PythonREPLTool
A tool for running python code in a REPL.
Functions¶
tools.python.tool.sanitize_input(query)
Sanitize input to the python REPL.
langchain_experimental.tot¶
Classes¶
tot.base.ToTChain
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
58b349b36394-11
|
langchain_experimental.tot¶
Classes¶
tot.base.ToTChain
A 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
tot.prompts.JSONListOutputParser
Class to parse the output of a PROPOSE_PROMPT response.
tot.thought.Thought
Create a new model by parsing and validating input data from keyword arguments.
tot.thought.ThoughtValidity(value[, names, ...])
tot.thought_generation.BaseThoughtGenerationStrategy
Base class for a thought generation strategy.
tot.thought_generation.ProposePromptStrategy
Propose thoughts sequentially using a "propose prompt".
tot.thought_generation.SampleCoTStrategy
Sample thoughts from a Chain-of-Thought (CoT) prompt.
Functions¶
tot.prompts.get_cot_prompt()
tot.prompts.get_propose_prompt()
langchain_experimental.utilities¶
Classes¶
utilities.python.PythonREPL
Simulates a standalone Python REPL.
|
https://api.python.langchain.com/en/latest/experimental_api_reference.html
|
7da3e4f08142-0
|
langchain_nvidia_ai_endpoints 0.0.1¶
langchain_nvidia_ai_endpoints.chat_models¶
Chat Model Components Derived from ChatModel/NVIDIA
Classes¶
chat_models.ChatNVIDIA
NVIDIA chat model.
Functions¶
langchain_nvidia_ai_endpoints.embeddings¶
Embeddings Components Derived from NVEModel/Embeddings
Classes¶
embeddings.NVIDIAEmbeddings
NVIDIA's AI Foundation Retriever Question-Answering Asymmetric Model.
|
https://api.python.langchain.com/en/latest/nvidia_ai_endpoints_api_reference.html
|
8a1c6a1b8548-0
|
langchain_nvidia_trt 0.0.1¶
langchain_nvidia_trt.llms¶
Classes¶
llms.StreamingResponseGenerator(client, ...)
A Generator that provides the inference results from an LLM.
llms.TritonTensorRTError
Base exception for TritonTensorRT.
llms.TritonTensorRTLLM
TRTLLM triton models.
llms.TritonTensorRTRuntimeError
Runtime error for TritonTensorRT.
|
https://api.python.langchain.com/en/latest/nvidia_trt_api_reference.html
|
624ca72d3c63-0
|
langchain_core 0.1.1¶
langchain_core.agents¶
Classes¶
agents.AgentAction
A full description of an action for an ActionAgent to execute.
agents.AgentActionMessageLog
Override init to support instantiation by position for backward compat.
agents.AgentFinish
The final return value of an ActionAgent.
agents.AgentStep
The result of running an AgentAction.
Functions¶
langchain_core.beta¶
Classes¶
beta.runnables.context.Context()
Context for a runnable.
beta.runnables.context.ContextGet
Get a context value.
beta.runnables.context.ContextSet
Set a context value.
beta.runnables.context.PrefixContext([prefix])
Context for a runnable with a prefix.
Functions¶
beta.runnables.context.aconfig_with_context(...)
Asynchronously patch a runnable config with context getters and setters.
beta.runnables.context.config_with_context(...)
Patch a runnable config with context getters and setters.
langchain_core.caches¶
Classes¶
caches.BaseCache()
Base interface for cache.
langchain_core.callbacks¶
Classes¶
callbacks.base.AsyncCallbackHandler()
Async callback handler that handles callbacks from LangChain.
callbacks.base.BaseCallbackHandler()
Base callback handler that handles callbacks from LangChain.
callbacks.base.BaseCallbackManager(handlers)
Base callback manager that handles callbacks from LangChain.
callbacks.base.CallbackManagerMixin()
Mixin for callback manager.
callbacks.base.ChainManagerMixin()
Mixin for chain callbacks.
callbacks.base.LLMManagerMixin()
Mixin for LLM callbacks.
callbacks.base.RetrieverManagerMixin()
Mixin for Retriever callbacks.
callbacks.base.RunManagerMixin()
Mixin for run manager.
callbacks.base.ToolManagerMixin()
Mixin for tool callbacks.
callbacks.manager.AsyncCallbackManager(handlers)
Async callback manager that handles callbacks from LangChain.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-1
|
callbacks.manager.AsyncCallbackManager(handlers)
Async callback manager that handles callbacks from LangChain.
callbacks.manager.AsyncCallbackManagerForChainGroup(...)
Async callback manager for the chain group.
callbacks.manager.AsyncCallbackManagerForChainRun(*, ...)
Async callback manager for chain run.
callbacks.manager.AsyncCallbackManagerForLLMRun(*, ...)
Async callback manager for LLM run.
callbacks.manager.AsyncCallbackManagerForRetrieverRun(*, ...)
Async callback manager for retriever run.
callbacks.manager.AsyncCallbackManagerForToolRun(*, ...)
Async callback manager for tool run.
callbacks.manager.AsyncParentRunManager(*, ...)
Async Parent Run Manager.
callbacks.manager.AsyncRunManager(*, run_id, ...)
Async Run Manager.
callbacks.manager.BaseRunManager(*, run_id, ...)
Base class for run manager (a bound callback manager).
callbacks.manager.CallbackManager(handlers)
Callback manager that handles callbacks from LangChain.
callbacks.manager.CallbackManagerForChainGroup(...)
Callback manager for the chain group.
callbacks.manager.CallbackManagerForChainRun(*, ...)
Callback manager for chain run.
callbacks.manager.CallbackManagerForLLMRun(*, ...)
Callback manager for LLM run.
callbacks.manager.CallbackManagerForRetrieverRun(*, ...)
Callback manager for retriever run.
callbacks.manager.CallbackManagerForToolRun(*, ...)
Callback manager for tool run.
callbacks.manager.ParentRunManager(*, ...[, ...])
Sync Parent Run Manager.
callbacks.manager.RunManager(*, run_id, ...)
Sync Run Manager.
callbacks.stdout.StdOutCallbackHandler([color])
Callback Handler that prints to std out.
callbacks.streaming_stdout.StreamingStdOutCallbackHandler()
Callback handler for streaming.
Functions¶
callbacks.manager.ahandle_event(handlers, ...)
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-2
|
Functions¶
callbacks.manager.ahandle_event(handlers, ...)
Generic event handler for AsyncCallbackManager.
callbacks.manager.atrace_as_chain_group(...)
Get an async callback manager for a chain group in a context manager.
callbacks.manager.handle_event(handlers, ...)
Generic event handler for CallbackManager.
callbacks.manager.trace_as_chain_group(...)
Get a callback manager for a chain group in a context manager.
langchain_core.chat_history¶
Classes¶
chat_history.BaseChatMessageHistory()
Abstract base class for storing chat message history.
langchain_core.chat_sessions¶
Classes¶
chat_sessions.ChatSession
Chat Session represents a single conversation, channel, or other group of messages.
langchain_core.documents¶
Classes¶
documents.base.Document
Class for storing a piece of text and associated metadata.
documents.transformers.BaseDocumentTransformer()
Abstract base class for document transformation systems.
langchain_core.embeddings¶
Classes¶
embeddings.Embeddings()
Interface for embedding models.
langchain_core.example_selectors¶
Logic for selecting examples to include in prompts.
Classes¶
example_selectors.base.BaseExampleSelector()
Interface for selecting examples to include in prompts.
example_selectors.length_based.LengthBasedExampleSelector
Select examples based on length.
example_selectors.semantic_similarity.MaxMarginalRelevanceExampleSelector
ExampleSelector that selects examples based on Max Marginal Relevance.
example_selectors.semantic_similarity.SemanticSimilarityExampleSelector
Example selector that selects examples based on SemanticSimilarity.
Functions¶
example_selectors.semantic_similarity.sorted_values(values)
Return a list of values in dict sorted by key.
langchain_core.exceptions¶
Classes¶
exceptions.LangChainException
General LangChain exception.
exceptions.OutputParserException(error[, ...])
Exception that output parsers should raise to signify a parsing error.
exceptions.TracerException
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-3
|
Exception that output parsers should raise to signify a parsing error.
exceptions.TracerException
Base class for exceptions in tracers module.
langchain_core.language_models¶
Classes¶
language_models.base.BaseLanguageModel
Abstract base class for interfacing with language models.
language_models.chat_models.BaseChatModel
Base class for Chat models.
language_models.chat_models.SimpleChatModel
Simple Chat Model.
language_models.llms.BaseLLM
Base LLM abstract interface.
language_models.llms.LLM
Base LLM abstract class.
Functions¶
language_models.chat_models.agenerate_from_stream(stream)
Async generate from a stream.
language_models.chat_models.generate_from_stream(stream)
Generate from a stream.
language_models.llms.create_base_retry_decorator(...)
Create a retry decorator for a given LLM and provided list of error types.
language_models.llms.get_prompts(params, prompts)
Get prompts that are already cached.
language_models.llms.update_cache(...)
Update the cache and get the LLM output.
langchain_core.load¶
Serialization and deserialization.
Classes¶
load.load.Reviver([secrets_map, ...])
Reviver for JSON objects.
load.serializable.BaseSerialized
Base class for serialized objects.
load.serializable.Serializable
Serializable base class.
load.serializable.SerializedConstructor
Serialized constructor.
load.serializable.SerializedNotImplemented
Serialized not implemented.
load.serializable.SerializedSecret
Serialized secret.
Functions¶
load.dump.default(obj)
Return a default value for a Serializable object or a SerializedNotImplemented object.
load.dump.dumpd(obj)
Return a json dict representation of an object.
load.dump.dumps(obj, *[, pretty])
Return a json string representation of an object.
load.load.load(obj, *[, secrets_map, ...])
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-4
|
load.load.load(obj, *[, secrets_map, ...])
Revive a LangChain class from a JSON object.
load.load.loads(text, *[, secrets_map, ...])
Revive a LangChain class from a JSON string.
load.serializable.to_json_not_implemented(obj)
Serialize a "not implemented" object.
load.serializable.try_neq_default(value, ...)
Try to determine if a value is different from the default.
langchain_core.memory¶
Classes¶
memory.BaseMemory
Abstract base class for memory in Chains.
langchain_core.messages¶
Classes¶
messages.ai.AIMessage
A Message from an AI.
messages.ai.AIMessageChunk
A Message chunk from an AI.
messages.base.BaseMessage
The base abstract Message class.
messages.base.BaseMessageChunk
A Message chunk, which can be concatenated with other Message chunks.
messages.chat.ChatMessage
A Message that can be assigned an arbitrary speaker (i.e.
messages.chat.ChatMessageChunk
A Chat Message chunk.
messages.function.FunctionMessage
A Message for passing the result of executing a function back to a model.
messages.function.FunctionMessageChunk
A Function Message chunk.
messages.human.HumanMessage
A Message from a human.
messages.human.HumanMessageChunk
A Human Message chunk.
messages.system.SystemMessage
A Message for priming AI behavior, usually passed in as the first of a sequence of input messages.
messages.system.SystemMessageChunk
A System Message chunk.
messages.tool.ToolMessage
A Message for passing the result of executing a tool back to a model.
messages.tool.ToolMessageChunk
A Tool Message chunk.
Functions¶
messages.base.merge_content(first_content, ...)
Merge two message contents.
messages.base.message_to_dict(message)
Convert a Message to a dictionary.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-5
|
messages.base.message_to_dict(message)
Convert a Message to a dictionary.
messages.base.messages_to_dict(messages)
Convert a sequence of Messages to a list of dictionaries.
langchain_core.output_parsers¶
Classes¶
output_parsers.base.BaseGenerationOutputParser
Base class to parse the output of an LLM call.
output_parsers.base.BaseLLMOutputParser()
Abstract base class for parsing the outputs of a model.
output_parsers.base.BaseOutputParser
Base class to parse the output of an LLM call.
output_parsers.list.CommaSeparatedListOutputParser
Parse the output of an LLM call to a comma-separated list.
output_parsers.list.ListOutputParser
Parse the output of an LLM call to a list.
output_parsers.list.MarkdownListOutputParser
Parse a markdown list.
output_parsers.list.NumberedListOutputParser
Parse a numbered list.
output_parsers.string.StrOutputParser
OutputParser that parses LLMResult into the top likely string.
output_parsers.transform.BaseCumulativeTransformOutputParser
Base class for an output parser that can handle streaming input.
output_parsers.transform.BaseTransformOutputParser
Base class for an output parser that can handle streaming input.
langchain_core.outputs¶
Classes¶
outputs.chat_generation.ChatGeneration
A single chat generation output.
outputs.chat_generation.ChatGenerationChunk
A ChatGeneration chunk, which can be concatenated with other
outputs.chat_result.ChatResult
Class that contains all results for a single chat model call.
outputs.generation.Generation
A single text generation output.
outputs.generation.GenerationChunk
A Generation chunk, which can be concatenated with other Generation chunks.
outputs.llm_result.LLMResult
Class that contains all results for a batched LLM call.
outputs.run_info.RunInfo
Class that contains metadata for a single execution of a Chain or model.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-6
|
Class that contains metadata for a single execution of a Chain or model.
langchain_core.prompt_values¶
Classes¶
prompt_values.ChatPromptValue
Chat prompt value.
prompt_values.ChatPromptValueConcrete
Chat prompt value which explicitly lists out the message types it accepts.
prompt_values.PromptValue
Base abstract class for inputs to any language model.
prompt_values.StringPromptValue
String prompt value.
langchain_core.prompts¶
Prompt is the input to the model.
Prompt is often constructed
from multiple components. Prompt classes and functions make constructing
and working with prompts easy.
Class hierarchy:
BasePromptTemplate --> PipelinePromptTemplate
StringPromptTemplate --> PromptTemplate
FewShotPromptTemplate
FewShotPromptWithTemplates
BaseChatPromptTemplate --> AutoGPTPrompt
ChatPromptTemplate --> AgentScratchPadChatPromptTemplate
BaseMessagePromptTemplate --> MessagesPlaceholder
BaseStringMessagePromptTemplate --> ChatMessagePromptTemplate
HumanMessagePromptTemplate
AIMessagePromptTemplate
SystemMessagePromptTemplate
Classes¶
prompts.base.BasePromptTemplate
Base class for all prompt templates, returning a prompt.
prompts.chat.AIMessagePromptTemplate
AI message prompt template.
prompts.chat.BaseChatPromptTemplate
Base class for chat prompt templates.
prompts.chat.BaseMessagePromptTemplate
Base class for message prompt templates.
prompts.chat.BaseStringMessagePromptTemplate
Base class for message prompt templates that use a string prompt template.
prompts.chat.ChatMessagePromptTemplate
Chat message prompt template.
prompts.chat.ChatPromptTemplate
A prompt template for chat models.
prompts.chat.HumanMessagePromptTemplate
Human message prompt template.
prompts.chat.MessagesPlaceholder
Prompt template that assumes variable is already list of messages.
prompts.chat.SystemMessagePromptTemplate
System message prompt template.
prompts.few_shot.FewShotChatMessagePromptTemplate
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-7
|
System message prompt template.
prompts.few_shot.FewShotChatMessagePromptTemplate
Chat prompt template that supports few-shot examples.
prompts.few_shot.FewShotPromptTemplate
Prompt template that contains few shot examples.
prompts.few_shot_with_templates.FewShotPromptWithTemplates
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.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-8
|
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.
runnables.base.RunnableBinding
Wrap a runnable with additional functionality.
runnables.base.RunnableBindingBase
A runnable that delegates calls to another runnable with a set of kwargs.
runnables.base.RunnableEach
A runnable that delegates calls to another runnable with each element of the input sequence.
runnables.base.RunnableEachBase
A runnable that delegates calls to another runnable with each element of the input sequence.
runnables.base.RunnableGenerator(transform)
A runnable that runs a generator function.
runnables.base.RunnableLambda(func[, afunc])
RunnableLambda converts a python callable into a Runnable.
runnables.base.RunnableMap
alias of RunnableParallel
runnables.base.RunnableParallel
A runnable that runs a mapping of runnables in parallel, and returns a mapping of their outputs.
runnables.base.RunnableSequence
A sequence of runnables, where the output of each is the input of the next.
runnables.base.RunnableSerializable
A Runnable that can be serialized to JSON.
runnables.branch.RunnableBranch
A Runnable that selects which branch to run based on a condition.
runnables.config.EmptyDict
Empty dict type.
runnables.config.RunnableConfig
Configuration for a Runnable.
runnables.configurable.DynamicRunnable
A Serializable Runnable that can be dynamically configured.
runnables.configurable.RunnableConfigurableAlternatives
A Runnable that can be dynamically configured.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-9
|
A Runnable that can be dynamically configured.
runnables.configurable.RunnableConfigurableFields
A Runnable that can be dynamically configured.
runnables.configurable.StrEnum(value[, ...])
A string enum.
runnables.fallbacks.RunnableWithFallbacks
A Runnable that can fallback to other Runnables if it fails.
runnables.history.RunnableWithMessageHistory
A runnable that manages chat message history for another runnable.
runnables.passthrough.RunnableAssign
A runnable that assigns key-value pairs to Dict[str, Any] inputs.
runnables.passthrough.RunnablePassthrough
A runnable to passthrough inputs unchanged or with additional keys.
runnables.retry.RunnableRetry
Retry a Runnable if it fails.
runnables.router.RouterInput
A Router input.
runnables.router.RouterRunnable
A runnable that routes to a set of runnables based on Input['key'].
runnables.utils.AddableDict
Dictionary that can be added to another dictionary.
runnables.utils.ConfigurableField(id[, ...])
A field that can be configured by the user.
runnables.utils.ConfigurableFieldMultiOption(id, ...)
A field that can be configured by the user with multiple default values.
runnables.utils.ConfigurableFieldSingleOption(id, ...)
A field that can be configured by the user with a default value.
runnables.utils.ConfigurableFieldSpec(id, ...)
A field that can be configured by the user.
runnables.utils.GetLambdaSource()
Get the source code of a lambda function.
runnables.utils.IsFunctionArgDict()
Check if the first argument of a function is a dict.
runnables.utils.IsLocalDict(name, keys)
Check if a name is a local dict.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-10
|
Check if a name is a local dict.
runnables.utils.SupportsAdd(*args, **kwargs)
Protocol for objects that support addition.
Functions¶
runnables.base.coerce_to_runnable(thing)
Coerce a runnable-like object into a Runnable.
runnables.config.acall_func_with_variable_args(...)
Call function that may optionally accept a run_manager and/or config.
runnables.config.call_func_with_variable_args(...)
Call function that may optionally accept a run_manager and/or config.
runnables.config.ensure_config([config])
Ensure that a config is a dict with all keys present.
runnables.config.get_async_callback_manager_for_config(config)
Get an async callback manager for a config.
runnables.config.get_callback_manager_for_config(config)
Get a callback manager for a config.
runnables.config.get_config_list(config, length)
Get a list of configs from a single config or a list of configs.
runnables.config.get_executor_for_config(config)
Get an executor for a config.
runnables.config.merge_configs(*configs)
Merge multiple configs into one.
runnables.config.patch_config(config, *[, ...])
Patch a config with new values.
runnables.configurable.make_options_spec(...)
Make a ConfigurableFieldSpec for a ConfigurableFieldSingleOption or ConfigurableFieldMultiOption.
runnables.configurable.prefix_config_spec(...)
Prefix the id of a ConfigurableFieldSpec.
runnables.passthrough.aidentity(x)
An async identity function
runnables.passthrough.identity(x)
An identity function
runnables.utils.aadd(addables)
Asynchronously add a sequence of addable objects together.
runnables.utils.accepts_config(callable)
Check if a callable accepts a config argument.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-11
|
Check if a callable accepts a config argument.
runnables.utils.accepts_run_manager(callable)
Check if a callable accepts a run_manager argument.
runnables.utils.add(addables)
Add a sequence of addable objects together.
runnables.utils.gated_coro(semaphore, coro)
Run a coroutine with a semaphore.
runnables.utils.gather_with_concurrency(n, ...)
Gather coroutines with a limit on the number of concurrent coroutines.
runnables.utils.get_function_first_arg_dict_keys(func)
Get the keys of the first argument of a function if it is a dict.
runnables.utils.get_lambda_source(func)
Get the source code of a lambda function.
runnables.utils.get_unique_config_specs(specs)
Get the unique config specs from a sequence of config specs.
runnables.utils.indent_lines_after_first(...)
Indent all lines of text after the first line.
langchain_core.stores¶
Classes¶
stores.BaseStore()
Abstract interface for a key-value store.
langchain_core.tools¶
Base implementation for tools or skills.
Classes¶
tools.BaseTool
Interface LangChain tools must implement.
tools.SchemaAnnotationError
Raised when 'args_schema' is missing or has an incorrect type annotation.
tools.StructuredTool
Tool that can operate on any number of inputs.
tools.Tool
Tool that takes in function or coroutine directly.
tools.ToolException
An optional exception that tool throws when execution error occurs.
Functions¶
tools.create_schema_from_function(...)
Create a pydantic schema from a function's signature.
tools.tool(*args[, return_direct, ...])
Make tools out of functions, can be used with or without arguments.
langchain_core.tracers¶
Classes¶
tracers.base.BaseTracer(**kwargs)
Base interface for tracers.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-12
|
Classes¶
tracers.base.BaseTracer(**kwargs)
Base interface for tracers.
tracers.evaluation.EvaluatorCallbackHandler(...)
A tracer that runs a run evaluator whenever a run is persisted.
tracers.langchain.LangChainTracer([...])
An implementation of the SharedTracer that POSTS to the langchain endpoint.
tracers.langchain_v1.LangChainTracerV1(**kwargs)
An implementation of the SharedTracer that POSTS to the langchain endpoint.
tracers.log_stream.LogEntry
A single entry in the run log.
tracers.log_stream.LogStreamCallbackHandler(*)
A tracer that streams run logs to a stream.
tracers.log_stream.RunLog(*ops, state)
A run log.
tracers.log_stream.RunLogPatch(*ops)
A patch to the run log.
tracers.log_stream.RunState
State of the run.
tracers.root_listeners.RootListenersTracer(*, ...)
A tracer that calls listeners on run start, end, and error.
tracers.run_collector.RunCollectorCallbackHandler([...])
A tracer that collects all nested runs in a list.
tracers.schemas.BaseRun
Base class for Run.
tracers.schemas.ChainRun
Class for ChainRun.
tracers.schemas.LLMRun
Class for LLMRun.
tracers.schemas.Run
Run schema for the V2 API in the Tracer.
tracers.schemas.ToolRun
Class for ToolRun.
tracers.schemas.TracerSession
TracerSessionV1 schema for the V2 API.
tracers.schemas.TracerSessionBase
Base class for TracerSession.
tracers.schemas.TracerSessionV1
TracerSessionV1 schema.
tracers.schemas.TracerSessionV1Base
Base class for TracerSessionV1.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-13
|
Base class for TracerSessionV1.
tracers.schemas.TracerSessionV1Create
Create class for TracerSessionV1.
tracers.stdout.ConsoleCallbackHandler(**kwargs)
Tracer that prints to the console.
tracers.stdout.FunctionCallbackHandler(...)
Tracer that calls a function with a single str parameter.
Functions¶
tracers.context.collect_runs()
Collect all run traces in context.
tracers.context.register_configure_hook(...)
Register a configure hook.
tracers.context.tracing_enabled([session_name])
Get the Deprecated LangChainTracer in a context manager.
tracers.context.tracing_v2_enabled([...])
Instruct LangChain to log all runs in context to LangSmith.
tracers.evaluation.wait_for_all_evaluators()
Wait for all tracers to finish.
tracers.langchain.get_client()
Get the client.
tracers.langchain.log_error_once(method, ...)
Log an error once.
tracers.langchain.wait_for_all_tracers()
Wait for all tracers to finish.
tracers.langchain_v1.get_headers()
Get the headers for the LangChain API.
tracers.schemas.RunTypeEnum()
RunTypeEnum.
tracers.stdout.elapsed(run)
Get the elapsed time of a run.
tracers.stdout.try_json_stringify(obj, fallback)
Try to stringify an object to JSON.
langchain_core.utils¶
Utility functions for LangChain.
These functions do not depend on any other LangChain module.
Classes¶
utils.aiter.NoLock()
Dummy lock that provides the proper interface but no protection
utils.aiter.Tee(iterable[, n, lock])
Create n separate asynchronous iterators over iterable
utils.aiter.atee
alias of Tee
utils.formatting.StrictFormatter()
A subclass of formatter that checks for extra keys.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-14
|
utils.formatting.StrictFormatter()
A subclass of formatter that checks for extra keys.
utils.iter.NoLock()
Dummy lock that provides the proper interface but no protection
utils.iter.Tee(iterable[, n, lock])
Create n separate asynchronous iterators over iterable
utils.iter.safetee
alias of Tee
Functions¶
utils.aiter.py_anext(iterator[, default])
Pure-Python implementation of anext() for testing purposes.
utils.aiter.tee_peer(iterator, buffer, ...)
An individual iterator of a tee()
utils.env.env_var_is_set(env_var)
Check if an environment variable is set.
utils.env.get_from_dict_or_env(data, key, ...)
Get a value from a dictionary or an environment variable.
utils.env.get_from_env(key, env_key[, default])
Get a value from a dictionary or an environment variable.
utils.html.extract_sub_links(raw_html, url, *)
Extract all links from a raw html string and convert into absolute paths.
utils.html.find_all_links(raw_html, *[, pattern])
Extract all links from a raw html string.
utils.input.get_bolded_text(text)
Get bolded text.
utils.input.get_color_mapping(items[, ...])
Get mapping for items to a support color.
utils.input.get_colored_text(text, color)
Get colored text.
utils.input.print_text(text[, color, end, file])
Print text with highlighting and no end characters.
utils.iter.batch_iterate(size, iterable)
Utility batching function.
utils.iter.tee_peer(iterator, buffer, peers, ...)
An individual iterator of a tee()
utils.json_schema.dereference_refs(schema_obj, *)
Try to substitute $refs in JSON Schema.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
624ca72d3c63-15
|
Try to substitute $refs in JSON Schema.
utils.loading.try_load_from_hub(path, ...)
Load configuration from hub.
utils.pydantic.get_pydantic_major_version()
Get the major version of Pydantic.
utils.strings.comma_list(items)
Convert a list to a comma-separated string.
utils.strings.stringify_dict(data)
Stringify a dictionary.
utils.strings.stringify_value(val)
Stringify a value.
utils.utils.build_extra_kwargs(extra_kwargs, ...)
Build extra kwargs from values and extra_kwargs.
utils.utils.check_package_version(package[, ...])
Check the version of a package.
utils.utils.convert_to_secret_str(value)
Convert a string to a SecretStr if needed.
utils.utils.get_pydantic_field_names(...)
Get field names, including aliases, for a pydantic class.
utils.utils.guard_import(module_name, *[, ...])
Dynamically imports a module and raises a helpful exception if the module is not installed.
utils.utils.mock_now(dt_value)
Context manager for mocking out datetime.now() in unit tests.
utils.utils.raise_for_status_with_text(response)
Raise an error with the response text.
utils.utils.xor_args(*arg_groups)
Validate specified keyword args are mutually exclusive.
langchain_core.vectorstores¶
Classes¶
vectorstores.VectorStore()
Interface for vector store.
vectorstores.VectorStoreRetriever
Base Retriever class for VectorStore.
|
https://api.python.langchain.com/en/latest/core_api_reference.html
|
9229cb2071a2-0
|
langchain_community 0.0.4¶
langchain_community.adapters¶
Classes¶
adapters.openai.Chat()
adapters.openai.ChatCompletion()
Chat completion.
adapters.openai.ChatCompletionChunk
Create a new model by parsing and validating input data from keyword arguments.
adapters.openai.ChatCompletions
Create a new model by parsing and validating input data from keyword arguments.
adapters.openai.Choice
Create a new model by parsing and validating input data from keyword arguments.
adapters.openai.ChoiceChunk
Create a new model by parsing and validating input data from keyword arguments.
adapters.openai.Completions()
Completion.
adapters.openai.IndexableBaseModel
Allows a BaseModel to return its fields by string variable indexing
Functions¶
adapters.openai.aenumerate(iterable[, start])
Async version of enumerate function.
adapters.openai.convert_dict_to_message(_dict)
Convert a dictionary to a LangChain message.
adapters.openai.convert_message_to_dict(message)
Convert a LangChain message to a dictionary.
adapters.openai.convert_messages_for_finetuning(...)
Convert messages to a list of lists of dictionaries for fine-tuning.
adapters.openai.convert_openai_messages(messages)
Convert dictionaries representing OpenAI messages to LangChain format.
langchain_community.agent_toolkits¶
Agent toolkits contain integrations with various resources and services.
LangChain has a large ecosystem of integrations with various external resources
like local and remote file systems, APIs and databases.
These integrations allow developers to create versatile applications that combine the
power of LLMs with the ability to access, interact with and manipulate external
resources.
When developing an application, developers should inspect the capabilities and
permissions of the tools that underlie the given agent toolkit, and determine
whether permissions of the given toolkit are appropriate for the application.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-1
|
whether permissions of the given toolkit are appropriate for the application.
See [Security](https://python.langchain.com/docs/security) for more information.
Classes¶
agent_toolkits.ainetwork.toolkit.AINetworkToolkit
Toolkit for interacting with AINetwork Blockchain.
agent_toolkits.amadeus.toolkit.AmadeusToolkit
Toolkit for interacting with Amadeus which offers APIs for travel.
agent_toolkits.azure_cognitive_services.AzureCognitiveServicesToolkit
Toolkit for Azure Cognitive Services.
agent_toolkits.base.BaseToolkit
Base Toolkit representing a collection of related tools.
agent_toolkits.clickup.toolkit.ClickupToolkit
Clickup Toolkit.
agent_toolkits.file_management.toolkit.FileManagementToolkit
Toolkit for interacting with local files.
agent_toolkits.github.toolkit.BranchName
Schema for operations that require a branch name as input.
agent_toolkits.github.toolkit.CommentOnIssue
Schema for operations that require a comment as input.
agent_toolkits.github.toolkit.CreateFile
Schema for operations that require a file path and content as input.
agent_toolkits.github.toolkit.CreatePR
Schema for operations that require a PR title and body as input.
agent_toolkits.github.toolkit.CreateReviewRequest
Schema for operations that require a username as input.
agent_toolkits.github.toolkit.DeleteFile
Schema for operations that require a file path as input.
agent_toolkits.github.toolkit.DirectoryPath
Schema for operations that require a directory path as input.
agent_toolkits.github.toolkit.GetIssue
Schema for operations that require an issue number as input.
agent_toolkits.github.toolkit.GetPR
Schema for operations that require a PR number as input.
agent_toolkits.github.toolkit.GitHubToolkit
GitHub Toolkit.
agent_toolkits.github.toolkit.NoInput
Schema for operations that do not require any input.
agent_toolkits.github.toolkit.ReadFile
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-2
|
Schema for operations that do not require any input.
agent_toolkits.github.toolkit.ReadFile
Schema for operations that require a file path as input.
agent_toolkits.github.toolkit.SearchCode
Schema for operations that require a search query as input.
agent_toolkits.github.toolkit.SearchIssuesAndPRs
Schema for operations that require a search query as input.
agent_toolkits.github.toolkit.UpdateFile
Schema for operations that require a file path and content as input.
agent_toolkits.gitlab.toolkit.GitLabToolkit
GitLab Toolkit.
agent_toolkits.gmail.toolkit.GmailToolkit
Toolkit for interacting with Gmail.
agent_toolkits.jira.toolkit.JiraToolkit
Jira Toolkit.
agent_toolkits.json.toolkit.JsonToolkit
Toolkit for interacting with a JSON spec.
agent_toolkits.multion.toolkit.MultionToolkit
Toolkit for interacting with the Browser Agent.
agent_toolkits.nasa.toolkit.NasaToolkit
Nasa Toolkit.
agent_toolkits.nla.tool.NLATool
Natural Language API Tool.
agent_toolkits.nla.toolkit.NLAToolkit
Natural Language API Toolkit.
agent_toolkits.office365.toolkit.O365Toolkit
Toolkit for interacting with Office 365.
agent_toolkits.openapi.planner.RequestsDeleteToolWithParsing
A tool that sends a DELETE request and parses the response.
agent_toolkits.openapi.planner.RequestsGetToolWithParsing
Requests GET tool with LLM-instructed extraction of truncated responses.
agent_toolkits.openapi.planner.RequestsPatchToolWithParsing
Requests PATCH tool with LLM-instructed extraction of truncated responses.
agent_toolkits.openapi.planner.RequestsPostToolWithParsing
Requests POST tool with LLM-instructed extraction of truncated responses.
agent_toolkits.openapi.planner.RequestsPutToolWithParsing
Requests PUT tool with LLM-instructed extraction of truncated responses.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-3
|
Requests PUT tool with LLM-instructed extraction of truncated responses.
agent_toolkits.openapi.spec.ReducedOpenAPISpec(...)
A reduced OpenAPI spec.
agent_toolkits.openapi.toolkit.OpenAPIToolkit
Toolkit for interacting with an OpenAPI API.
agent_toolkits.openapi.toolkit.RequestsToolkit
Toolkit for making REST requests.
agent_toolkits.playwright.toolkit.PlayWrightBrowserToolkit
Toolkit for PlayWright browser tools.
agent_toolkits.powerbi.toolkit.PowerBIToolkit
Toolkit for interacting with Power BI dataset.
agent_toolkits.slack.toolkit.SlackToolkit
Toolkit for interacting with Slack.
agent_toolkits.spark_sql.toolkit.SparkSQLToolkit
Toolkit for interacting with Spark SQL.
agent_toolkits.sql.toolkit.SQLDatabaseToolkit
Toolkit for interacting with SQL databases.
agent_toolkits.steam.toolkit.SteamToolkit
Steam Toolkit.
agent_toolkits.zapier.toolkit.ZapierToolkit
Zapier Toolkit.
Functions¶
agent_toolkits.json.base.create_json_agent(...)
Construct a json agent from an LLM and tools.
agent_toolkits.openapi.base.create_openapi_agent(...)
Construct an OpenAPI agent from an LLM and tools.
agent_toolkits.openapi.planner.create_openapi_agent(...)
Instantiate OpenAI API planner and controller for a given spec.
agent_toolkits.openapi.spec.reduce_openapi_spec(spec)
Simplify/distill/minify a spec somehow.
agent_toolkits.powerbi.base.create_pbi_agent(llm)
Construct a Power BI agent from an LLM and tools.
agent_toolkits.powerbi.chat_base.create_pbi_chat_agent(llm)
Construct a Power BI agent from a Chat LLM and tools.
agent_toolkits.spark_sql.base.create_spark_sql_agent(...)
Construct a Spark SQL agent from an LLM and tools.
agent_toolkits.sql.base.create_sql_agent(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-4
|
agent_toolkits.sql.base.create_sql_agent(...)
Construct an SQL agent from an LLM and tools.
langchain_community.cache¶
Warning
Beta Feature!
Cache provides an optional caching layer for LLMs.
Cache is useful for two reasons:
It can save you money by reducing the number of API calls you make to the LLM
provider if you’re often requesting the same completion multiple times.
It can speed up your application by reducing the number of API calls you make
to the LLM provider.
Cache directly competes with Memory. See documentation for Pros and Cons.
Class hierarchy:
BaseCache --> <name>Cache # Examples: InMemoryCache, RedisCache, GPTCache
Classes¶
cache.AstraDBCache(*[, collection_name, ...])
Cache that uses Astra DB as a backend.
cache.AstraDBSemanticCache(*[, ...])
Cache that uses Astra DB as a vector-store backend for semantic (i.e.
cache.CassandraCache([session, keyspace, ...])
Cache that uses Cassandra / Astra DB as a backend.
cache.CassandraSemanticCache(session, ...[, ...])
Cache that uses Cassandra as a vector-store backend for semantic (i.e.
cache.FullLLMCache(**kwargs)
SQLite table for full LLM Cache (all generations).
cache.FullMd5LLMCache(**kwargs)
SQLite table for full LLM Cache (all generations).
cache.GPTCache([init_func])
Cache that uses GPTCache as a backend.
cache.InMemoryCache()
Cache that stores things in memory.
cache.MomentoCache(cache_client, cache_name, *)
Cache that uses Momento as a backend.
cache.RedisCache(redis_, *[, ttl])
Cache that uses Redis as a backend.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-5
|
Cache that uses Redis as a backend.
cache.RedisSemanticCache(redis_url, embedding)
Cache that uses Redis as a vector-store backend.
cache.SQLAlchemyCache(engine, cache_schema)
Cache that uses SQAlchemy as a backend.
cache.SQLAlchemyMd5Cache(engine, cache_schema)
Cache that uses SQAlchemy as a backend.
cache.SQLiteCache([database_path])
Cache that uses SQLite as a backend.
cache.UpstashRedisCache(redis_, *[, ttl])
Cache that uses Upstash Redis as a backend.
Functions¶
langchain_community.callbacks¶
Callback handlers allow listening to events in LangChain.
Class hierarchy:
BaseCallbackHandler --> <name>CallbackHandler # Example: AimCallbackHandler
Classes¶
callbacks.aim_callback.AimCallbackHandler([...])
Callback Handler that logs to Aim.
callbacks.aim_callback.BaseMetadataCallbackHandler()
This class handles the metadata and associated function states for callbacks.
callbacks.argilla_callback.ArgillaCallbackHandler(...)
Callback Handler that logs into Argilla.
callbacks.arize_callback.ArizeCallbackHandler([...])
Callback Handler that logs to Arize.
callbacks.arthur_callback.ArthurCallbackHandler(...)
Callback Handler that logs to Arthur platform.
callbacks.clearml_callback.ClearMLCallbackHandler([...])
Callback Handler that logs to ClearML.
callbacks.comet_ml_callback.CometCallbackHandler([...])
Callback Handler that logs to Comet.
callbacks.confident_callback.DeepEvalCallbackHandler(metrics)
Callback Handler that logs into deepeval.
callbacks.context_callback.ContextCallbackHandler([...])
Callback Handler that records transcripts to the Context service.
callbacks.flyte_callback.FlyteCallbackHandler()
This callback handler that is used within a Flyte task.
callbacks.human.AsyncHumanApprovalCallbackHandler(...)
Asynchronous callback for manually validating values.
callbacks.human.HumanApprovalCallbackHandler(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-6
|
Asynchronous callback for manually validating values.
callbacks.human.HumanApprovalCallbackHandler(...)
Callback for manually validating values.
callbacks.human.HumanRejectedException
Exception to raise when a person manually review and rejects a value.
callbacks.infino_callback.InfinoCallbackHandler([...])
Callback Handler that logs to Infino.
callbacks.labelstudio_callback.LabelStudioCallbackHandler([...])
Label Studio callback handler.
callbacks.labelstudio_callback.LabelStudioMode(value)
Label Studio mode enumerator.
callbacks.llmonitor_callback.LLMonitorCallbackHandler([...])
Callback Handler for LLMonitor`.
callbacks.llmonitor_callback.UserContextManager(user_id)
Context manager for LLMonitor user context.
callbacks.mlflow_callback.MlflowCallbackHandler([...])
Callback Handler that logs metrics and artifacts to mlflow server.
callbacks.mlflow_callback.MlflowLogger(**kwargs)
Callback Handler that logs metrics and artifacts to mlflow server.
callbacks.openai_info.OpenAICallbackHandler()
Callback Handler that tracks OpenAI info.
callbacks.promptlayer_callback.PromptLayerCallbackHandler([...])
Callback handler for promptlayer.
callbacks.sagemaker_callback.SageMakerCallbackHandler(run)
Callback Handler that logs prompt artifacts and metrics to SageMaker Experiments.
callbacks.streamlit.mutable_expander.ChildRecord(...)
The child record as a NamedTuple.
callbacks.streamlit.mutable_expander.ChildType(value)
The enumerator of the child type.
callbacks.streamlit.mutable_expander.MutableExpander(...)
A Streamlit expander that can be renamed and dynamically expanded/collapsed.
callbacks.streamlit.streamlit_callback_handler.LLMThought(...)
A thought in the LLM's thought stream.
callbacks.streamlit.streamlit_callback_handler.LLMThoughtLabeler()
Generates markdown labels for LLMThought containers.
callbacks.streamlit.streamlit_callback_handler.LLMThoughtState(value)
Enumerator of the LLMThought state.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-7
|
Enumerator of the LLMThought state.
callbacks.streamlit.streamlit_callback_handler.StreamlitCallbackHandler(...)
A callback handler that writes to a Streamlit app.
callbacks.streamlit.streamlit_callback_handler.ToolRecord(...)
The tool record as a NamedTuple.
callbacks.tracers.comet.CometTracer(**kwargs)
Comet Tracer.
callbacks.tracers.wandb.RunProcessor(...)
Handles the conversion of a LangChain Runs into a WBTraceTree.
callbacks.tracers.wandb.WandbRunArgs
Arguments for the WandbTracer.
callbacks.tracers.wandb.WandbTracer([run_args])
Callback Handler that logs to Weights and Biases.
callbacks.trubrics_callback.TrubricsCallbackHandler([...])
Callback handler for Trubrics.
callbacks.utils.BaseMetadataCallbackHandler()
This class handles the metadata and associated function states for callbacks.
callbacks.wandb_callback.WandbCallbackHandler([...])
Callback Handler that logs to Weights and Biases.
callbacks.whylabs_callback.WhyLabsCallbackHandler(...)
Callback Handler for logging to WhyLabs.
Functions¶
callbacks.aim_callback.import_aim()
Import the aim python package and raise an error if it is not installed.
callbacks.clearml_callback.import_clearml()
Import the clearml python package and raise an error if it is not installed.
callbacks.comet_ml_callback.import_comet_ml()
Import comet_ml and raise an error if it is not installed.
callbacks.context_callback.import_context()
Import the getcontext package.
callbacks.flyte_callback.analyze_text(text)
Analyze text using textstat and spacy.
callbacks.flyte_callback.import_flytekit()
Import flytekit and flytekitplugins-deck-standard.
callbacks.infino_callback.get_num_tokens(...)
Calculate num tokens for OpenAI with tiktoken package.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-8
|
Calculate num tokens for OpenAI with tiktoken package.
callbacks.infino_callback.import_infino()
Import the infino client.
callbacks.infino_callback.import_tiktoken()
Import tiktoken for counting tokens for OpenAI models.
callbacks.labelstudio_callback.get_default_label_configs(mode)
Get default Label Studio configs for the given mode.
callbacks.llmonitor_callback.identify(user_id)
Builds an LLMonitor UserContextManager
callbacks.manager.get_openai_callback()
Get the OpenAI callback handler in a context manager.
callbacks.manager.wandb_tracing_enabled([...])
Get the WandbTracer in a context manager.
callbacks.mlflow_callback.analyze_text(text)
Analyze text using textstat and spacy.
callbacks.mlflow_callback.construct_html_from_prompt_and_generation(...)
Construct an html element from a prompt and a generation.
callbacks.mlflow_callback.import_mlflow()
Import the mlflow python package and raise an error if it is not installed.
callbacks.openai_info.get_openai_token_cost_for_model(...)
Get the cost in USD for a given model and number of tokens.
callbacks.openai_info.standardize_model_name(...)
Standardize the model name to a format that can be used in the OpenAI API.
callbacks.sagemaker_callback.save_json(data, ...)
Save dict to local file path.
callbacks.tracers.comet.import_comet_llm_api()
Import comet_llm api and raise an error if it is not installed.
callbacks.utils.flatten_dict(nested_dict[, ...])
Flattens a nested dictionary into a flat dictionary.
callbacks.utils.hash_string(s)
Hash a string using sha1.
callbacks.utils.import_pandas()
Import the pandas python package and raise an error if it is not installed.
callbacks.utils.import_spacy()
Import the spacy python package and raise an error if it is not installed.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-9
|
Import the spacy python package and raise an error if it is not installed.
callbacks.utils.import_textstat()
Import the textstat python package and raise an error if it is not installed.
callbacks.utils.load_json(json_path)
Load json file to a string.
callbacks.wandb_callback.analyze_text(text)
Analyze text using textstat and spacy.
callbacks.wandb_callback.construct_html_from_prompt_and_generation(...)
Construct an html element from a prompt and a generation.
callbacks.wandb_callback.import_wandb()
Import the wandb python package and raise an error if it is not installed.
callbacks.wandb_callback.load_json_to_dict(...)
Load json file to a dictionary.
callbacks.whylabs_callback.import_langkit([...])
Import the langkit python package and raise an error if it is not installed.
langchain_community.chat_loaders¶
Chat Loaders load chat messages from common communications platforms.
Load chat messages from various
communications platforms such as Facebook Messenger, Telegram, and
WhatsApp. The loaded chat messages can be used for fine-tuning models.
Class hierarchy:
BaseChatLoader --> <name>ChatLoader # Examples: WhatsAppChatLoader, IMessageChatLoader
Main helpers:
ChatSession
Classes¶
chat_loaders.base.BaseChatLoader()
Base class for chat loaders.
chat_loaders.facebook_messenger.FolderFacebookMessengerChatLoader(path)
Load Facebook Messenger chat data from a folder.
chat_loaders.facebook_messenger.SingleFileFacebookMessengerChatLoader(path)
Load Facebook Messenger chat data from a single file.
chat_loaders.gmail.GMailLoader(creds[, n, ...])
Load data from GMail.
chat_loaders.imessage.IMessageChatLoader([path])
Load chat sessions from the iMessage chat.db SQLite file.
chat_loaders.langsmith.LangSmithDatasetChatLoader(*, ...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-10
|
chat_loaders.langsmith.LangSmithDatasetChatLoader(*, ...)
Load chat sessions from a LangSmith dataset with the "chat" data type.
chat_loaders.langsmith.LangSmithRunChatLoader(runs)
Load chat sessions from a list of LangSmith "llm" runs.
chat_loaders.slack.SlackChatLoader(path)
Load Slack conversations from a dump zip file.
chat_loaders.telegram.TelegramChatLoader(path)
Load telegram conversations to LangChain chat messages.
chat_loaders.whatsapp.WhatsAppChatLoader(path)
Load WhatsApp conversations from a dump zip file or directory.
Functions¶
chat_loaders.utils.map_ai_messages(...)
Convert messages from the specified 'sender' to AI messages.
chat_loaders.utils.map_ai_messages_in_session(...)
Convert messages from the specified 'sender' to AI messages.
chat_loaders.utils.merge_chat_runs(chat_sessions)
Merge chat runs together.
chat_loaders.utils.merge_chat_runs_in_session(...)
Merge chat runs together in a chat session.
langchain_community.chat_message_histories¶
Classes¶
chat_message_histories.astradb.AstraDBChatMessageHistory(*, ...)
Chat message history that stores history in Astra DB.
chat_message_histories.cassandra.CassandraChatMessageHistory(...)
Chat message history that stores history in Cassandra.
chat_message_histories.cosmos_db.CosmosDBChatMessageHistory(...)
Chat message history backed by Azure CosmosDB.
chat_message_histories.dynamodb.DynamoDBChatMessageHistory(...)
Chat message history that stores history in AWS DynamoDB.
chat_message_histories.elasticsearch.ElasticsearchChatMessageHistory(...)
Chat message history that stores history in Elasticsearch.
chat_message_histories.file.FileChatMessageHistory(...)
Chat message history that stores history in a local file.
chat_message_histories.firestore.FirestoreChatMessageHistory(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-11
|
chat_message_histories.firestore.FirestoreChatMessageHistory(...)
Chat message history backed by Google Firestore.
chat_message_histories.in_memory.ChatMessageHistory
In memory implementation of chat message history.
chat_message_histories.momento.MomentoChatMessageHistory(...)
Chat message history cache that uses Momento as a backend.
chat_message_histories.mongodb.MongoDBChatMessageHistory(...)
Chat message history that stores history in MongoDB.
chat_message_histories.neo4j.Neo4jChatMessageHistory(...)
Chat message history stored in a Neo4j database.
chat_message_histories.postgres.PostgresChatMessageHistory(...)
Chat message history stored in a Postgres database.
chat_message_histories.redis.RedisChatMessageHistory(...)
Chat message history stored in a Redis database.
chat_message_histories.rocksetdb.RocksetChatMessageHistory(...)
Uses Rockset to store chat messages.
chat_message_histories.singlestoredb.SingleStoreDBChatMessageHistory(...)
Chat message history stored in a SingleStoreDB database.
chat_message_histories.sql.BaseMessageConverter()
The class responsible for converting BaseMessage to your SQLAlchemy model.
chat_message_histories.sql.DefaultMessageConverter(...)
The default message converter for SQLChatMessageHistory.
chat_message_histories.sql.SQLChatMessageHistory(...)
Chat message history stored in an SQL database.
chat_message_histories.streamlit.StreamlitChatMessageHistory([key])
Chat message history that stores messages in Streamlit session state.
chat_message_histories.upstash_redis.UpstashRedisChatMessageHistory(...)
Chat message history stored in an Upstash Redis database.
chat_message_histories.xata.XataChatMessageHistory(...)
Chat message history stored in a Xata database.
chat_message_histories.zep.ZepChatMessageHistory(...)
Chat message history that uses Zep as a backend.
Functions¶
chat_message_histories.sql.create_message_model(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-12
|
Functions¶
chat_message_histories.sql.create_message_model(...)
Create a message model for a given table name.
langchain_community.chat_models¶
Chat Models are a variation on language models.
While Chat Models use language models under the hood, the interface they expose
is a bit different. Rather than expose a “text in, text out” API, they expose
an interface where “chat messages” are the inputs and outputs.
Class hierarchy:
BaseLanguageModel --> BaseChatModel --> <name> # Examples: ChatOpenAI, ChatGooglePalm
Main helpers:
AIMessage, BaseMessage, HumanMessage
Classes¶
chat_models.anthropic.ChatAnthropic
Anthropic chat large language models.
chat_models.anyscale.ChatAnyscale
Anyscale Chat large language models.
chat_models.azure_openai.AzureChatOpenAI
Azure OpenAI Chat Completion API.
chat_models.azureml_endpoint.AzureMLChatOnlineEndpoint
AzureML Chat models API.
chat_models.azureml_endpoint.LlamaContentFormatter()
Content formatter for LLaMA.
chat_models.baichuan.ChatBaichuan
Baichuan chat models API by Baichuan Intelligent Technology.
chat_models.baidu_qianfan_endpoint.QianfanChatEndpoint
Baidu Qianfan chat models.
chat_models.bedrock.BedrockChat
A chat model that uses the Bedrock API.
chat_models.bedrock.ChatPromptAdapter()
Adapter class to prepare the inputs from Langchain to prompt format that Chat model expects.
chat_models.cohere.ChatCohere
Cohere chat large language models.
chat_models.databricks.ChatDatabricks
Databricks chat models API.
chat_models.ernie.ErnieBotChat
ERNIE-Bot large language model.
chat_models.everlyai.ChatEverlyAI
EverlyAI Chat large language models.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-13
|
chat_models.everlyai.ChatEverlyAI
EverlyAI Chat large language models.
chat_models.fake.FakeListChatModel
Fake ChatModel for testing purposes.
chat_models.fake.FakeMessagesListChatModel
Fake ChatModel for testing purposes.
chat_models.fireworks.ChatFireworks
Fireworks Chat models.
chat_models.gigachat.GigaChat
GigaChat large language models API.
chat_models.google_palm.ChatGooglePalm
Google PaLM Chat models API.
chat_models.google_palm.ChatGooglePalmError
Error with the Google PaLM API.
chat_models.human.HumanInputChatModel
ChatModel which returns user input as the response.
chat_models.hunyuan.ChatHunyuan
Tencent Hunyuan chat models API by Tencent.
chat_models.javelin_ai_gateway.ChatJavelinAIGateway
Javelin AI Gateway chat models API.
chat_models.javelin_ai_gateway.ChatParams
Parameters for the Javelin AI Gateway LLM.
chat_models.jinachat.JinaChat
Jina AI Chat models API.
chat_models.konko.ChatKonko
ChatKonko Chat large language models API.
chat_models.litellm.ChatLiteLLM
A chat model that uses the LiteLLM API.
chat_models.litellm.ChatLiteLLMException
Error with the LiteLLM I/O library
chat_models.minimax.MiniMaxChat
Wrapper around Minimax large language models.
chat_models.mlflow.ChatMlflow
MLflow chat models API.
chat_models.mlflow_ai_gateway.ChatMLflowAIGateway
MLflow AI Gateway chat models API.
chat_models.mlflow_ai_gateway.ChatParams
Parameters for the MLflow AI Gateway LLM.
chat_models.ollama.ChatOllama
Ollama locally runs large language models.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-14
|
chat_models.ollama.ChatOllama
Ollama locally runs large language models.
chat_models.openai.ChatOpenAI
OpenAI Chat large language models API.
chat_models.pai_eas_endpoint.PaiEasChatEndpoint
Eas LLM Service chat model API.
chat_models.promptlayer_openai.PromptLayerChatOpenAI
PromptLayer and OpenAI Chat large language models API.
chat_models.tongyi.ChatTongyi
Alibaba Tongyi Qwen chat models API.
chat_models.vertexai.ChatVertexAI
Vertex AI Chat large language models API.
chat_models.volcengine_maas.VolcEngineMaasChat
volc engine maas hosts a plethora of models.
chat_models.yandex.ChatYandexGPT
Wrapper around YandexGPT large language models.
Functions¶
chat_models.anthropic.convert_messages_to_prompt_anthropic(...)
Format a list of messages into a full prompt for the Anthropic model
chat_models.baidu_qianfan_endpoint.convert_message_to_dict(message)
Convert a message to a dictionary that can be passed to the API.
chat_models.cohere.get_cohere_chat_request(...)
Get the request for the Cohere chat API.
chat_models.cohere.get_role(message)
Get the role of the message.
chat_models.fireworks.acompletion_with_retry(...)
Use tenacity to retry the async completion call.
chat_models.fireworks.acompletion_with_retry_streaming(...)
Use tenacity to retry the completion call for streaming.
chat_models.fireworks.completion_with_retry(...)
Use tenacity to retry the completion call.
chat_models.fireworks.conditional_decorator(...)
Define conditional decorator.
chat_models.fireworks.convert_dict_to_message(_dict)
Convert a dict response to a message.
chat_models.google_palm.achat_with_retry(...)
Use tenacity to retry the async completion call.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-15
|
Use tenacity to retry the async completion call.
chat_models.google_palm.chat_with_retry(llm, ...)
Use tenacity to retry the completion call.
chat_models.jinachat.acompletion_with_retry(...)
Use tenacity to retry the async completion call.
chat_models.litellm.acompletion_with_retry(llm)
Use tenacity to retry the async completion call.
chat_models.meta.convert_messages_to_prompt_llama(...)
Convert a list of messages to a prompt for llama.
chat_models.openai.acompletion_with_retry(llm)
Use tenacity to retry the async completion call.
chat_models.tongyi.convert_dict_to_message(_dict)
Convert a dict to a message.
chat_models.tongyi.convert_message_to_dict(message)
Convert a message to a dict.
chat_models.volcengine_maas.convert_dict_to_message(_dict)
Convert a dict to a message.
langchain_community.docstore¶
Docstores are classes to store and load Documents.
The Docstore is a simplified version of the Document Loader.
Class hierarchy:
Docstore --> <name> # Examples: InMemoryDocstore, Wikipedia
Main helpers:
Document, AddableMixin
Classes¶
docstore.arbitrary_fn.DocstoreFn(lookup_fn)
Langchain Docstore via arbitrary lookup function.
docstore.base.AddableMixin()
Mixin class that supports adding texts.
docstore.base.Docstore()
Interface to access to place that stores documents.
docstore.in_memory.InMemoryDocstore([_dict])
Simple in memory docstore in the form of a dict.
docstore.wikipedia.Wikipedia()
Wrapper around wikipedia API.
langchain_community.document_loaders¶
Document Loaders are classes to load Documents.
Document Loaders are usually used to load a lot of Documents in a single run.
Class hierarchy:
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-16
|
Class hierarchy:
BaseLoader --> <name>Loader # Examples: TextLoader, UnstructuredFileLoader
Main helpers:
Document, <name>TextSplitter
Classes¶
document_loaders.acreom.AcreomLoader(path[, ...])
Load acreom vault from a directory.
document_loaders.airbyte.AirbyteCDKLoader(...)
Load with an Airbyte source connector implemented using the CDK.
document_loaders.airbyte.AirbyteGongLoader(...)
Load from Gong using an Airbyte source connector.
document_loaders.airbyte.AirbyteHubspotLoader(...)
Load from Hubspot using an Airbyte source connector.
document_loaders.airbyte.AirbyteSalesforceLoader(...)
Load from Salesforce using an Airbyte source connector.
document_loaders.airbyte.AirbyteShopifyLoader(...)
Load from Shopify using an Airbyte source connector.
document_loaders.airbyte.AirbyteStripeLoader(...)
Load from Stripe using an Airbyte source connector.
document_loaders.airbyte.AirbyteTypeformLoader(...)
Load from Typeform using an Airbyte source connector.
document_loaders.airbyte.AirbyteZendeskSupportLoader(...)
Load from Zendesk Support using an Airbyte source connector.
document_loaders.airbyte_json.AirbyteJSONLoader(...)
Load local Airbyte json files.
document_loaders.airtable.AirtableLoader(...)
Load the Airtable tables.
document_loaders.apify_dataset.ApifyDatasetLoader
Load datasets from Apify web scraping, crawling, and data extraction platform.
document_loaders.arcgis_loader.ArcGISLoader(layer)
Load records from an ArcGIS FeatureLayer.
document_loaders.arxiv.ArxivLoader(query[, ...])
Load a query result from Arxiv.
document_loaders.assemblyai.AssemblyAIAudioTranscriptLoader(...)
Loader for AssemblyAI audio transcripts.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-17
|
Loader for AssemblyAI audio transcripts.
document_loaders.assemblyai.TranscriptFormat(value)
Transcript format to use for the document loader.
document_loaders.async_html.AsyncHtmlLoader(...)
Load HTML asynchronously.
document_loaders.azlyrics.AZLyricsLoader([...])
Load AZLyrics webpages.
document_loaders.azure_ai_data.AzureAIDataLoader(url)
Load from Azure AI Data.
document_loaders.azure_blob_storage_container.AzureBlobStorageContainerLoader(...)
Load from Azure Blob Storage container.
document_loaders.azure_blob_storage_file.AzureBlobStorageFileLoader(...)
Load from Azure Blob Storage files.
document_loaders.baiducloud_bos_directory.BaiduBOSDirectoryLoader(...)
Load from Baidu BOS directory.
document_loaders.baiducloud_bos_file.BaiduBOSFileLoader(...)
Load from Baidu Cloud BOS file.
document_loaders.base.BaseBlobParser()
Abstract interface for blob parsers.
document_loaders.base.BaseLoader()
Interface for Document Loader.
document_loaders.base_o365.O365BaseLoader
Base class for all loaders that uses O365 Package
document_loaders.bibtex.BibtexLoader(...[, ...])
Load a bibtex file.
document_loaders.bigquery.BigQueryLoader(query)
Load from the Google Cloud Platform BigQuery.
document_loaders.bilibili.BiliBiliLoader(...)
Load BiliBili video transcripts.
document_loaders.blackboard.BlackboardLoader(...)
Load a Blackboard course.
document_loaders.blob_loaders.file_system.FileSystemBlobLoader(path, *)
Load blobs in the local file system.
document_loaders.blob_loaders.schema.Blob
Blob represents raw data by either reference or value.
document_loaders.blob_loaders.schema.BlobLoader()
Abstract interface for blob loaders implementation.
document_loaders.blob_loaders.youtube_audio.YoutubeAudioLoader(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-18
|
document_loaders.blob_loaders.youtube_audio.YoutubeAudioLoader(...)
Load YouTube urls as audio file(s).
document_loaders.blockchain.BlockchainDocumentLoader(...)
Load elements from a blockchain smart contract.
document_loaders.blockchain.BlockchainType(value)
Enumerator of the supported blockchains.
document_loaders.brave_search.BraveSearchLoader(...)
Load with Brave Search engine.
document_loaders.browserless.BrowserlessLoader(...)
Load webpages with Browserless /content endpoint.
document_loaders.chatgpt.ChatGPTLoader(log_file)
Load conversations from exported ChatGPT data.
document_loaders.chromium.AsyncChromiumLoader(urls)
Scrape HTML pages from URLs using a headless instance of the Chromium.
document_loaders.college_confidential.CollegeConfidentialLoader([...])
Load College Confidential webpages.
document_loaders.concurrent.ConcurrentLoader(...)
Load and pars Documents concurrently.
document_loaders.confluence.ConfluenceLoader(url)
Load Confluence pages.
document_loaders.confluence.ContentFormat(value)
Enumerator of the content formats of Confluence page.
document_loaders.conllu.CoNLLULoader(file_path)
Load CoNLL-U files.
document_loaders.couchbase.CouchbaseLoader(...)
Load documents from Couchbase.
document_loaders.csv_loader.CSVLoader(file_path)
Load a CSV file into a list of Documents.
document_loaders.csv_loader.UnstructuredCSVLoader(...)
Load CSV files using Unstructured.
document_loaders.cube_semantic.CubeSemanticLoader(...)
Load Cube semantic layer metadata.
document_loaders.datadog_logs.DatadogLogsLoader(...)
Load Datadog logs.
document_loaders.dataframe.BaseDataFrameLoader(...)
Initialize with dataframe object.
document_loaders.dataframe.DataFrameLoader(...)
Load Pandas DataFrame.
document_loaders.diffbot.DiffbotLoader(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-19
|
Load Pandas DataFrame.
document_loaders.diffbot.DiffbotLoader(...)
Load Diffbot json file.
document_loaders.directory.DirectoryLoader(...)
Load from a directory.
document_loaders.discord.DiscordChatLoader(...)
Load Discord chat logs.
document_loaders.docugami.DocugamiLoader
Load from Docugami.
document_loaders.docusaurus.DocusaurusLoader(url)
Load from Docusaurus Documentation.
document_loaders.dropbox.DropboxLoader
Load files from Dropbox.
document_loaders.duckdb_loader.DuckDBLoader(query)
Load from DuckDB.
document_loaders.email.OutlookMessageLoader(...)
Loads Outlook Message files using extract_msg.
document_loaders.email.UnstructuredEmailLoader(...)
Load email files using Unstructured.
document_loaders.epub.UnstructuredEPubLoader(...)
Load EPub files using Unstructured.
document_loaders.etherscan.EtherscanLoader(...)
Load transactions from Ethereum mainnet.
document_loaders.evernote.EverNoteLoader(...)
Load from EverNote.
document_loaders.excel.UnstructuredExcelLoader(...)
Load Microsoft Excel files using Unstructured.
document_loaders.facebook_chat.FacebookChatLoader(path)
Load Facebook Chat messages directory dump.
document_loaders.fauna.FaunaLoader(query, ...)
Load from FaunaDB.
document_loaders.figma.FigmaFileLoader(...)
Load Figma file.
document_loaders.gcs_directory.GCSDirectoryLoader(...)
Load from GCS directory.
document_loaders.gcs_file.GCSFileLoader(...)
Load from GCS file.
document_loaders.generic.GenericLoader(...)
Generic Document Loader.
document_loaders.geodataframe.GeoDataFrameLoader(...)
Load geopandas Dataframe.
document_loaders.git.GitLoader(repo_path[, ...])
Load Git repository files.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-20
|
document_loaders.git.GitLoader(repo_path[, ...])
Load Git repository files.
document_loaders.gitbook.GitbookLoader(web_page)
Load GitBook data.
document_loaders.github.BaseGitHubLoader
Load GitHub repository Issues.
document_loaders.github.GitHubIssuesLoader
Load issues of a GitHub repository.
document_loaders.google_speech_to_text.GoogleSpeechToTextLoader(...)
Loader for Google Cloud Speech-to-Text audio transcripts.
document_loaders.googledrive.GoogleDriveLoader
Load Google Docs from Google Drive.
document_loaders.gutenberg.GutenbergLoader(...)
Load from Gutenberg.org.
document_loaders.helpers.FileEncoding(...)
File encoding as the NamedTuple.
document_loaders.hn.HNLoader([web_path, ...])
Load Hacker News data.
document_loaders.html.UnstructuredHTMLLoader(...)
Load HTML files using Unstructured.
document_loaders.html_bs.BSHTMLLoader(file_path)
Load HTML files and parse them with beautiful soup.
document_loaders.hugging_face_dataset.HuggingFaceDatasetLoader(path)
Load from Hugging Face Hub datasets.
document_loaders.ifixit.IFixitLoader(web_path)
Load iFixit repair guides, device wikis and answers.
document_loaders.image.UnstructuredImageLoader(...)
Load PNG and JPG files using Unstructured.
document_loaders.image_captions.ImageCaptionLoader(images)
Load image captions.
document_loaders.imsdb.IMSDbLoader([...])
Load IMSDb webpages.
document_loaders.iugu.IuguLoader(resource[, ...])
Load from IUGU.
document_loaders.joplin.JoplinLoader([...])
Load notes from Joplin.
document_loaders.json_loader.JSONLoader(...)
Load a JSON file using a jq schema.
document_loaders.lakefs.LakeFSClient(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-21
|
document_loaders.lakefs.LakeFSClient(...)
Client for lakeFS.
document_loaders.lakefs.LakeFSLoader(...[, ...])
Load from lakeFS.
document_loaders.lakefs.UnstructuredLakeFSLoader(...)
Load from lakeFS as unstructured data.
document_loaders.larksuite.LarkSuiteDocLoader(...)
Load from LarkSuite (FeiShu).
document_loaders.markdown.UnstructuredMarkdownLoader(...)
Load Markdown files using Unstructured.
document_loaders.mastodon.MastodonTootsLoader(...)
Load the Mastodon 'toots'.
document_loaders.max_compute.MaxComputeLoader(...)
Load from Alibaba Cloud MaxCompute table.
document_loaders.mediawikidump.MWDumpLoader(...)
Load MediaWiki dump from an XML file.
document_loaders.merge.MergedDataLoader(loaders)
Merge documents from a list of loaders
document_loaders.mhtml.MHTMLLoader(file_path)
Parse MHTML files with BeautifulSoup.
document_loaders.modern_treasury.ModernTreasuryLoader(...)
Load from Modern Treasury.
document_loaders.mongodb.MongodbLoader(...)
Load MongoDB documents.
document_loaders.news.NewsURLLoader(urls[, ...])
Load news articles from URLs using Unstructured.
document_loaders.notebook.NotebookLoader(path)
Load Jupyter notebook (.ipynb) files.
document_loaders.notion.NotionDirectoryLoader(path, *)
Load Notion directory dump.
document_loaders.notiondb.NotionDBLoader(...)
Load from Notion DB.
document_loaders.nuclia.NucliaLoader(path, ...)
Load from any file type using Nuclia Understanding API.
document_loaders.obs_directory.OBSDirectoryLoader(...)
Load from Huawei OBS directory.
document_loaders.obs_file.OBSFileLoader(...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-22
|
Load from Huawei OBS directory.
document_loaders.obs_file.OBSFileLoader(...)
Load from the Huawei OBS file.
document_loaders.obsidian.ObsidianLoader(path)
Load Obsidian files from directory.
document_loaders.odt.UnstructuredODTLoader(...)
Load OpenOffice ODT files using Unstructured.
document_loaders.onedrive.OneDriveLoader
Load from Microsoft OneDrive.
document_loaders.onedrive_file.OneDriveFileLoader
Load a file from Microsoft OneDrive.
document_loaders.onenote.OneNoteLoader
Load pages from OneNote notebooks.
document_loaders.open_city_data.OpenCityDataLoader(...)
Load from Open City.
document_loaders.org_mode.UnstructuredOrgModeLoader(...)
Load Org-Mode files using Unstructured.
document_loaders.parsers.audio.OpenAIWhisperParser([...])
Transcribe and parse audio files.
document_loaders.parsers.audio.OpenAIWhisperParserLocal([...])
Transcribe and parse audio files with OpenAI Whisper model.
document_loaders.parsers.audio.YandexSTTParser(*)
Transcribe and parse audio files.
document_loaders.parsers.docai.DocAIParser(*)
Google Cloud Document AI parser.
document_loaders.parsers.docai.DocAIParsingResults(...)
A dataclass to store Document AI parsing results.
document_loaders.parsers.generic.MimeTypeBasedParser(...)
Parser that uses mime-types to parse a blob.
document_loaders.parsers.grobid.GrobidParser(...)
Load article PDF files using Grobid.
document_loaders.parsers.grobid.ServerUnavailableException
Exception raised when the Grobid server is unavailable.
document_loaders.parsers.html.bs4.BS4HTMLParser(*)
Pparse HTML files using Beautiful Soup.
document_loaders.parsers.language.cobol.CobolSegmenter(code)
Code segmenter for COBOL.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-23
|
Code segmenter for COBOL.
document_loaders.parsers.language.code_segmenter.CodeSegmenter(code)
Abstract class for the code segmenter.
document_loaders.parsers.language.javascript.JavaScriptSegmenter(code)
Code segmenter for JavaScript.
document_loaders.parsers.language.language_parser.LanguageParser([...])
Parse using the respective programming language syntax.
document_loaders.parsers.language.python.PythonSegmenter(code)
Code segmenter for Python.
document_loaders.parsers.msword.MsWordParser()
Parse the Microsoft Word documents from a blob.
document_loaders.parsers.pdf.AmazonTextractPDFParser([...])
Send PDF files to Amazon Textract and parse them.
document_loaders.parsers.pdf.DocumentIntelligenceParser(...)
Loads a PDF with Azure Document Intelligence (formerly Forms Recognizer) and chunks at character level.
document_loaders.parsers.pdf.PDFMinerParser([...])
Parse PDF using PDFMiner.
document_loaders.parsers.pdf.PDFPlumberParser([...])
Parse PDF with PDFPlumber.
document_loaders.parsers.pdf.PyMuPDFParser([...])
Parse PDF using PyMuPDF.
document_loaders.parsers.pdf.PyPDFParser([...])
Load PDF using pypdf
document_loaders.parsers.pdf.PyPDFium2Parser([...])
Parse PDF with PyPDFium2.
document_loaders.parsers.txt.TextParser()
Parser for text blobs.
document_loaders.pdf.AmazonTextractPDFLoader(...)
Load PDF files from a local file system, HTTP or S3.
document_loaders.pdf.BasePDFLoader(file_path, *)
Base Loader class for PDF files.
document_loaders.pdf.DocumentIntelligenceLoader(...)
Loads a PDF with Azure Document Intelligence
document_loaders.pdf.MathpixPDFLoader(file_path)
Load PDF files using Mathpix service.
document_loaders.pdf.OnlinePDFLoader(...[, ...])
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-24
|
document_loaders.pdf.OnlinePDFLoader(...[, ...])
Load online PDF.
document_loaders.pdf.PDFMinerLoader(file_path, *)
Load PDF files using PDFMiner.
document_loaders.pdf.PDFMinerPDFasHTMLLoader(...)
Load PDF files as HTML content using PDFMiner.
document_loaders.pdf.PDFPlumberLoader(file_path)
Load PDF files using pdfplumber.
document_loaders.pdf.PyMuPDFLoader(file_path, *)
Load PDF files using PyMuPDF.
document_loaders.pdf.PyPDFDirectoryLoader(path)
Load a directory with PDF files using pypdf and chunks at character level.
document_loaders.pdf.PyPDFLoader(file_path)
Load PDF using pypdf into list of documents.
document_loaders.pdf.PyPDFium2Loader(...[, ...])
Load PDF using pypdfium2 and chunks at character level.
document_loaders.pdf.UnstructuredPDFLoader(...)
Load PDF files using Unstructured.
document_loaders.polars_dataframe.PolarsDataFrameLoader(...)
Load Polars DataFrame.
document_loaders.powerpoint.UnstructuredPowerPointLoader(...)
Load Microsoft PowerPoint files using Unstructured.
document_loaders.psychic.PsychicLoader(...)
Load from Psychic.dev.
document_loaders.pubmed.PubMedLoader(query)
Load from the PubMed biomedical library.
document_loaders.pyspark_dataframe.PySparkDataFrameLoader([...])
Load PySpark DataFrames.
document_loaders.python.PythonLoader(file_path)
Load Python files, respecting any non-default encoding if specified.
document_loaders.quip.QuipLoader(api_url, ...)
Load Quip pages.
document_loaders.readthedocs.ReadTheDocsLoader(path)
Load ReadTheDocs documentation directory.
document_loaders.recursive_url_loader.RecursiveUrlLoader(url)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-25
|
document_loaders.recursive_url_loader.RecursiveUrlLoader(url)
Load all child links from a URL page.
document_loaders.reddit.RedditPostsLoader(...)
Load Reddit posts.
document_loaders.roam.RoamLoader(path)
Load Roam files from a directory.
document_loaders.rocksetdb.ColumnNotFoundError(...)
Column not found error.
document_loaders.rocksetdb.RocksetLoader(...)
Load from a Rockset database.
document_loaders.rspace.RSpaceLoader(global_id)
Load content from RSpace notebooks, folders, documents or PDF Gallery files.
document_loaders.rss.RSSFeedLoader([urls, ...])
Load news articles from RSS feeds using Unstructured.
document_loaders.rst.UnstructuredRSTLoader(...)
Load RST files using Unstructured.
document_loaders.rtf.UnstructuredRTFLoader(...)
Load RTF files using Unstructured.
document_loaders.s3_directory.S3DirectoryLoader(bucket)
Load from Amazon AWS S3 directory.
document_loaders.s3_file.S3FileLoader(...[, ...])
Load from Amazon AWS S3 file.
document_loaders.sharepoint.SharePointLoader
Load from SharePoint.
document_loaders.sitemap.SitemapLoader(web_path)
Load a sitemap and its URLs.
document_loaders.slack_directory.SlackDirectoryLoader(...)
Load from a Slack directory dump.
document_loaders.snowflake_loader.SnowflakeLoader(...)
Load from Snowflake API.
document_loaders.spreedly.SpreedlyLoader(...)
Load from Spreedly API.
document_loaders.srt.SRTLoader(file_path)
Load .srt (subtitle) files.
document_loaders.stripe.StripeLoader(resource)
Load from Stripe API.
document_loaders.telegram.TelegramChatApiLoader([...])
Load Telegram chat json directory dump.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-26
|
document_loaders.telegram.TelegramChatApiLoader([...])
Load Telegram chat json directory dump.
document_loaders.telegram.TelegramChatFileLoader(path)
Load from Telegram chat dump.
document_loaders.tencent_cos_directory.TencentCOSDirectoryLoader(...)
Load from Tencent Cloud COS directory.
document_loaders.tencent_cos_file.TencentCOSFileLoader(...)
Load from Tencent Cloud COS file.
document_loaders.tensorflow_datasets.TensorflowDatasetLoader(...)
Load from TensorFlow Dataset.
document_loaders.text.TextLoader(file_path)
Load text file.
document_loaders.tomarkdown.ToMarkdownLoader(...)
Load HTML using 2markdown API.
document_loaders.toml.TomlLoader(source)
Load TOML files.
document_loaders.trello.TrelloLoader(client, ...)
Load cards from a Trello board.
document_loaders.tsv.UnstructuredTSVLoader(...)
Load TSV files using Unstructured.
document_loaders.twitter.TwitterTweetLoader(...)
Load Twitter tweets.
document_loaders.unstructured.UnstructuredAPIFileIOLoader(file)
Load files using Unstructured API.
document_loaders.unstructured.UnstructuredAPIFileLoader([...])
Load files using Unstructured API.
document_loaders.unstructured.UnstructuredBaseLoader([...])
Base Loader that uses Unstructured.
document_loaders.unstructured.UnstructuredFileIOLoader(file)
Load files using Unstructured.
document_loaders.unstructured.UnstructuredFileLoader(...)
Load files using Unstructured.
document_loaders.url.UnstructuredURLLoader(urls)
Load files from remote URLs using Unstructured.
document_loaders.url_playwright.PlaywrightEvaluator()
Abstract base class for all evaluators.
document_loaders.url_playwright.PlaywrightURLLoader(urls)
Load HTML pages with Playwright and parse with Unstructured.
document_loaders.url_playwright.UnstructuredHtmlEvaluator([...])
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-27
|
document_loaders.url_playwright.UnstructuredHtmlEvaluator([...])
Evaluates the page HTML content using the unstructured library.
document_loaders.url_selenium.SeleniumURLLoader(urls)
Load HTML pages with Selenium and parse with Unstructured.
document_loaders.weather.WeatherDataLoader(...)
Load weather data with Open Weather Map API.
document_loaders.web_base.WebBaseLoader([...])
Load HTML pages using urllib and parse them with `BeautifulSoup'.
document_loaders.whatsapp_chat.WhatsAppChatLoader(path)
Load WhatsApp messages text file.
document_loaders.wikipedia.WikipediaLoader(query)
Load from Wikipedia.
document_loaders.word_document.Docx2txtLoader(...)
Load DOCX file using docx2txt and chunks at character level.
document_loaders.word_document.UnstructuredWordDocumentLoader(...)
Load Microsoft Word file using Unstructured.
document_loaders.xml.UnstructuredXMLLoader(...)
Load XML file using Unstructured.
document_loaders.xorbits.XorbitsLoader(...)
Load Xorbits DataFrame.
document_loaders.youtube.GoogleApiClient([...])
Generic Google API Client.
document_loaders.youtube.GoogleApiYoutubeLoader(...)
Load all Videos from a YouTube Channel.
document_loaders.youtube.YoutubeLoader(video_id)
Load YouTube transcripts.
Functions¶
document_loaders.base_o365.fetch_mime_types(...)
Fetch the mime types for the specified file types.
document_loaders.chatgpt.concatenate_rows(...)
Combine message information in a readable format ready to be used.
document_loaders.facebook_chat.concatenate_rows(row)
Combine message information in a readable format ready to be used.
document_loaders.helpers.detect_file_encodings(...)
Try to detect the file encoding.
document_loaders.notebook.concatenate_cells(...)
Combine cells information in a readable format ready to be used.
document_loaders.notebook.remove_newlines(x)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-28
|
document_loaders.notebook.remove_newlines(x)
Recursively remove newlines, no matter the data structure they are stored in.
document_loaders.parsers.pdf.extract_from_images_with_rapidocr(images)
Extract text from images with RapidOCR.
document_loaders.parsers.registry.get_parser(...)
Get a parser by parser name.
document_loaders.rocksetdb.default_joiner(docs)
Default joiner for content columns.
document_loaders.telegram.concatenate_rows(row)
Combine message information in a readable format ready to be used.
document_loaders.telegram.text_to_docs(text)
Convert a string or list of strings to a list of Documents with metadata.
document_loaders.unstructured.get_elements_from_api([...])
Retrieve a list of elements from the Unstructured API.
document_loaders.unstructured.satisfies_min_unstructured_version(...)
Check if the installed Unstructured version exceeds the minimum version for the feature in question.
document_loaders.unstructured.validate_unstructured_version(...)
Raise an error if the Unstructured version does not exceed the specified minimum.
document_loaders.whatsapp_chat.concatenate_rows(...)
Combine message information in a readable format ready to be used.
langchain_community.document_transformers¶
Document Transformers are classes to transform Documents.
Document Transformers usually used to transform a lot of Documents in a single run.
Class hierarchy:
BaseDocumentTransformer --> <name> # Examples: DoctranQATransformer, DoctranTextTranslator
Main helpers:
Document
Classes¶
document_transformers.beautiful_soup_transformer.BeautifulSoupTransformer()
Transform HTML content by extracting specific tags and removing unwanted ones.
document_transformers.doctran_text_extract.DoctranPropertyExtractor(...)
Extract properties from text documents using doctran.
document_transformers.doctran_text_qa.DoctranQATransformer([...])
Extract QA from text documents using doctran.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-29
|
Extract QA from text documents using doctran.
document_transformers.doctran_text_translate.DoctranTextTranslator([...])
Translate text documents using doctran.
document_transformers.embeddings_redundant_filter.EmbeddingsClusteringFilter
Perform K-means clustering on document vectors.
document_transformers.embeddings_redundant_filter.EmbeddingsRedundantFilter
Filter that drops redundant documents by comparing their embeddings.
document_transformers.google_translate.GoogleTranslateTransformer(...)
Translate text documents using Google Cloud Translation.
document_transformers.html2text.Html2TextTransformer([...])
Replace occurrences of a particular search pattern with a replacement string
document_transformers.long_context_reorder.LongContextReorder
Lost in the middle: Performance degrades when models must access relevant information in the middle of long contexts.
document_transformers.nuclia_text_transform.NucliaTextTransformer(nua)
The Nuclia Understanding API splits into paragraphs and sentences, identifies entities, provides a summary of the text and generates embeddings for all sentences.
document_transformers.openai_functions.OpenAIMetadataTagger
Extract metadata tags from document contents using OpenAI functions.
Functions¶
document_transformers.beautiful_soup_transformer.get_navigable_strings(element)
Get all navigable strings from a BeautifulSoup element.
document_transformers.embeddings_redundant_filter.get_stateful_documents(...)
Convert a list of documents to a list of documents with state.
document_transformers.openai_functions.create_metadata_tagger(...)
Create a DocumentTransformer that uses an OpenAI function chain to automatically
langchain_community.embeddings¶
Embedding models are wrappers around embedding models
from different APIs and services.
Embedding models can be LLMs or not.
Class hierarchy:
Embeddings --> <name>Embeddings # Examples: OpenAIEmbeddings, HuggingFaceEmbeddings
Classes¶
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-30
|
Classes¶
embeddings.aleph_alpha.AlephAlphaAsymmetricSemanticEmbedding
Aleph Alpha's asymmetric semantic embedding.
embeddings.aleph_alpha.AlephAlphaSymmetricSemanticEmbedding
The symmetric version of the Aleph Alpha's semantic embeddings.
embeddings.awa.AwaEmbeddings
Embedding documents and queries with Awa DB.
embeddings.azure_openai.AzureOpenAIEmbeddings
Azure OpenAI Embeddings API.
embeddings.baidu_qianfan_endpoint.QianfanEmbeddingsEndpoint
Baidu Qianfan Embeddings embedding models.
embeddings.bedrock.BedrockEmbeddings
Bedrock embedding models.
embeddings.bookend.BookendEmbeddings
Bookend AI sentence_transformers embedding models.
embeddings.clarifai.ClarifaiEmbeddings
Clarifai embedding models.
embeddings.cloudflare_workersai.CloudflareWorkersAIEmbeddings
Cloudflare Workers AI embedding model.
embeddings.cohere.CohereEmbeddings
Cohere embedding models.
embeddings.dashscope.DashScopeEmbeddings
DashScope embedding models.
embeddings.databricks.DatabricksEmbeddings
Wrapper around embeddings LLMs in Databricks.
embeddings.deepinfra.DeepInfraEmbeddings
Deep Infra's embedding inference service.
embeddings.edenai.EdenAiEmbeddings
EdenAI embedding.
embeddings.elasticsearch.ElasticsearchEmbeddings(...)
Elasticsearch embedding models.
embeddings.embaas.EmbaasEmbeddings
Embaas's embedding service.
embeddings.embaas.EmbaasEmbeddingsPayload
Payload for the Embaas embeddings API.
embeddings.ernie.ErnieEmbeddings
Ernie Embeddings V1 embedding models.
embeddings.fake.DeterministicFakeEmbedding
Fake embedding model that always returns the same embedding vector for the same text.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-31
|
Fake embedding model that always returns the same embedding vector for the same text.
embeddings.fake.FakeEmbeddings
Fake embedding model.
embeddings.fastembed.FastEmbedEmbeddings
Qdrant FastEmbedding models.
embeddings.google_palm.GooglePalmEmbeddings
Google's PaLM Embeddings APIs.
embeddings.gpt4all.GPT4AllEmbeddings
GPT4All embedding models.
embeddings.gradient_ai.GradientEmbeddings
Gradient.ai Embedding models.
embeddings.gradient_ai.TinyAsyncGradientEmbeddingClient([...])
A helper tool to embed Gradient.
embeddings.huggingface.HuggingFaceBgeEmbeddings
HuggingFace BGE sentence_transformers embedding models.
embeddings.huggingface.HuggingFaceEmbeddings
HuggingFace sentence_transformers embedding models.
embeddings.huggingface.HuggingFaceInferenceAPIEmbeddings
Embed texts using the HuggingFace API.
embeddings.huggingface.HuggingFaceInstructEmbeddings
Wrapper around sentence_transformers embedding models.
embeddings.huggingface_hub.HuggingFaceHubEmbeddings
HuggingFaceHub embedding models.
embeddings.infinity.InfinityEmbeddings
Embedding models for self-hosted https://github.com/michaelfeil/infinity This should also work for text-embeddings-inference and other self-hosted openai-compatible servers.
embeddings.infinity.TinyAsyncOpenAIInfinityEmbeddingClient([...])
A helper tool to embed Infinity.
embeddings.javelin_ai_gateway.JavelinAIGatewayEmbeddings
Wrapper around embeddings LLMs in the Javelin AI Gateway.
embeddings.jina.JinaEmbeddings
Jina embedding models.
embeddings.johnsnowlabs.JohnSnowLabsEmbeddings
JohnSnowLabs embedding models
embeddings.llamacpp.LlamaCppEmbeddings
llama.cpp embedding models.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-32
|
embeddings.llamacpp.LlamaCppEmbeddings
llama.cpp embedding models.
embeddings.llm_rails.LLMRailsEmbeddings
LLMRails embedding models.
embeddings.localai.LocalAIEmbeddings
LocalAI embedding models.
embeddings.minimax.MiniMaxEmbeddings
MiniMax's embedding service.
embeddings.mlflow.MlflowEmbeddings
Wrapper around embeddings LLMs in MLflow.
embeddings.mlflow_gateway.MlflowAIGatewayEmbeddings
Wrapper around embeddings LLMs in the MLflow AI Gateway.
embeddings.modelscope_hub.ModelScopeEmbeddings
ModelScopeHub embedding models.
embeddings.mosaicml.MosaicMLInstructorEmbeddings
MosaicML embedding service.
embeddings.nlpcloud.NLPCloudEmbeddings
NLP Cloud embedding models.
embeddings.octoai_embeddings.OctoAIEmbeddings
OctoAI Compute Service embedding models.
embeddings.ollama.OllamaEmbeddings
Ollama locally runs large language models.
embeddings.openai.OpenAIEmbeddings
OpenAI embedding models.
embeddings.sagemaker_endpoint.EmbeddingsContentHandler()
Content handler for LLM class.
embeddings.sagemaker_endpoint.SagemakerEndpointEmbeddings
Custom Sagemaker Inference Endpoints.
embeddings.self_hosted.SelfHostedEmbeddings
Custom embedding models on self-hosted remote hardware.
embeddings.self_hosted_hugging_face.SelfHostedHuggingFaceEmbeddings
HuggingFace embedding models on self-hosted remote hardware.
embeddings.self_hosted_hugging_face.SelfHostedHuggingFaceInstructEmbeddings
HuggingFace InstructEmbedding models on self-hosted remote hardware.
embeddings.spacy_embeddings.SpacyEmbeddings
Embeddings by SpaCy models.
embeddings.tensorflow_hub.TensorflowHubEmbeddings
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-33
|
Embeddings by SpaCy models.
embeddings.tensorflow_hub.TensorflowHubEmbeddings
TensorflowHub embedding models.
embeddings.vertexai.VertexAIEmbeddings
Google Cloud VertexAI embedding models.
embeddings.voyageai.VoyageEmbeddings
Voyage embedding models.
embeddings.xinference.XinferenceEmbeddings([...])
Xinference embedding models.
Functions¶
embeddings.dashscope.embed_with_retry(...)
Use tenacity to retry the embedding call.
embeddings.google_palm.embed_with_retry(...)
Use tenacity to retry the completion call.
embeddings.localai.async_embed_with_retry(...)
Use tenacity to retry the embedding call.
embeddings.localai.embed_with_retry(...)
Use tenacity to retry the embedding call.
embeddings.minimax.embed_with_retry(...)
Use tenacity to retry the completion call.
embeddings.openai.async_embed_with_retry(...)
Use tenacity to retry the embedding call.
embeddings.openai.embed_with_retry(...)
Use tenacity to retry the embedding call.
embeddings.self_hosted_hugging_face.load_embedding_model(...)
Load the embedding model.
embeddings.voyageai.embed_with_retry(...)
Use tenacity to retry the embedding call.
langchain_community.graphs¶
Graphs provide a natural language interface to graph databases.
Classes¶
graphs.arangodb_graph.ArangoGraph(db)
ArangoDB wrapper for graph operations.
graphs.falkordb_graph.FalkorDBGraph(database)
FalkorDB wrapper for graph operations.
graphs.graph_document.GraphDocument
Represents a graph document consisting of nodes and relationships.
graphs.graph_document.Node
Represents a node in a graph with associated properties.
graphs.graph_document.Relationship
Represents a directed relationship between two nodes in a graph.
graphs.graph_store.GraphStore()
An abstract class wrapper for graph operations.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-34
|
graphs.graph_store.GraphStore()
An abstract class wrapper for graph operations.
graphs.hugegraph.HugeGraph([username, ...])
HugeGraph wrapper for graph operations.
graphs.kuzu_graph.KuzuGraph(db[, database])
Kùzu wrapper for graph operations.
graphs.memgraph_graph.MemgraphGraph(url, ...)
Memgraph wrapper for graph operations.
graphs.nebula_graph.NebulaGraph(space[, ...])
NebulaGraph wrapper for graph operations.
graphs.neo4j_graph.Neo4jGraph([url, ...])
Neo4j wrapper for graph operations.
graphs.neptune_graph.NeptuneGraph(host[, ...])
Neptune wrapper for graph operations.
graphs.neptune_graph.NeptuneQueryException(...)
A class to handle queries that fail to execute
graphs.networkx_graph.KnowledgeTriple(...)
A triple in the graph.
graphs.networkx_graph.NetworkxEntityGraph([graph])
Networkx wrapper for entity graph operations.
graphs.rdf_graph.RdfGraph([source_file, ...])
RDFlib wrapper for graph operations.
Functions¶
graphs.arangodb_graph.get_arangodb_client([...])
Get the Arango DB client from credentials.
graphs.networkx_graph.get_entities(entity_str)
Extract entities from entity string.
graphs.networkx_graph.parse_triples(...)
Parse knowledge triples from the knowledge string.
langchain_community.indexes¶
Classes¶
indexes.base.RecordManager(namespace)
An abstract base class representing the interface for a record manager.
langchain_community.llms¶
LLM classes provide
access to the large language model (LLM) APIs and services.
Class hierarchy:
BaseLanguageModel --> BaseLLM --> LLM --> <name> # Examples: AI21, HuggingFaceHub, OpenAI
Main helpers:
LLMResult, PromptValue,
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-35
|
Main helpers:
LLMResult, PromptValue,
CallbackManagerForLLMRun, AsyncCallbackManagerForLLMRun,
CallbackManager, AsyncCallbackManager,
AIMessage, BaseMessage
Classes¶
llms.ai21.AI21
AI21 large language models.
llms.ai21.AI21PenaltyData
Parameters for AI21 penalty data.
llms.aleph_alpha.AlephAlpha
Aleph Alpha large language models.
llms.amazon_api_gateway.AmazonAPIGateway
Amazon API Gateway to access LLM models hosted on AWS.
llms.amazon_api_gateway.ContentHandlerAmazonAPIGateway()
Adapter to prepare the inputs from Langchain to a format that LLM model expects.
llms.anthropic.Anthropic
Anthropic large language models.
llms.anyscale.Anyscale
Anyscale large language models.
llms.arcee.Arcee
Arcee's Domain Adapted Language Models (DALMs).
llms.aviary.Aviary
Aviary hosted models.
llms.aviary.AviaryBackend(backend_url, bearer)
Aviary backend.
llms.azureml_endpoint.AzureMLEndpointClient(...)
AzureML Managed Endpoint client.
llms.azureml_endpoint.AzureMLOnlineEndpoint
Azure ML Online Endpoint models.
llms.azureml_endpoint.ContentFormatterBase()
Transform request and response of AzureML endpoint to match with required schema.
llms.azureml_endpoint.DollyContentFormatter()
Content handler for the Dolly-v2-12b model
llms.azureml_endpoint.GPT2ContentFormatter()
Content handler for GPT2
llms.azureml_endpoint.HFContentFormatter()
Content handler for LLMs from the HuggingFace catalog.
llms.azureml_endpoint.LlamaContentFormatter()
Content formatter for LLaMa
llms.azureml_endpoint.OSSContentFormatter()
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-36
|
Content formatter for LLaMa
llms.azureml_endpoint.OSSContentFormatter()
Deprecated: Kept for backwards compatibility
llms.baidu_qianfan_endpoint.QianfanLLMEndpoint
Baidu Qianfan hosted open source or customized models.
llms.bananadev.Banana
Banana large language models.
llms.baseten.Baseten
Baseten models.
llms.beam.Beam
Beam API for gpt2 large language model.
llms.bedrock.Bedrock
Bedrock models.
llms.bedrock.BedrockBase
Base class for Bedrock models.
llms.bedrock.LLMInputOutputAdapter()
Adapter class to prepare the inputs from Langchain to a format that LLM model expects.
llms.bittensor.NIBittensorLLM
NIBittensor LLMs
llms.cerebriumai.CerebriumAI
CerebriumAI large language models.
llms.chatglm.ChatGLM
ChatGLM LLM service.
llms.clarifai.Clarifai
Clarifai large language models.
llms.cloudflare_workersai.CloudflareWorkersAI
Langchain LLM class to help to access Cloudflare Workers AI service.
llms.cohere.BaseCohere
Base class for Cohere models.
llms.cohere.Cohere
Cohere large language models.
llms.ctransformers.CTransformers
C Transformers LLM models.
llms.ctranslate2.CTranslate2
CTranslate2 language model.
llms.databricks.Databricks
Databricks serving endpoint or a cluster driver proxy app for LLM.
llms.deepinfra.DeepInfra
DeepInfra models.
llms.deepsparse.DeepSparse
Neural Magic DeepSparse LLM interface.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-37
|
llms.deepsparse.DeepSparse
Neural Magic DeepSparse LLM interface.
llms.edenai.EdenAI
Wrapper around edenai models.
llms.fake.FakeListLLM
Fake LLM for testing purposes.
llms.fake.FakeStreamingListLLM
Fake streaming list LLM for testing purposes.
llms.fireworks.Fireworks
Fireworks models.
llms.forefrontai.ForefrontAI
ForefrontAI large language models.
llms.gigachat.GigaChat
GigaChat large language models API.
llms.google_palm.GooglePalm
[Deprecated] DEPRECATED: Use langchain_google_genai.GoogleGenerativeAI instead.
llms.gooseai.GooseAI
GooseAI large language models.
llms.gpt4all.GPT4All
GPT4All language models.
llms.gradient_ai.GradientLLM
Gradient.ai LLM Endpoints.
llms.gradient_ai.TrainResult
Train result.
llms.huggingface_endpoint.HuggingFaceEndpoint
HuggingFace Endpoint models.
llms.huggingface_hub.HuggingFaceHub
HuggingFaceHub models.
llms.huggingface_pipeline.HuggingFacePipeline
HuggingFace Pipeline API.
llms.huggingface_text_gen_inference.HuggingFaceTextGenInference
HuggingFace text generation API.
llms.human.HumanInputLLM
It returns user input as the response.
llms.javelin_ai_gateway.JavelinAIGateway
Javelin AI Gateway LLMs.
llms.javelin_ai_gateway.Params
Parameters for the Javelin AI Gateway LLM.
llms.koboldai.KoboldApiLLM
Kobold API language model.
llms.llamacpp.LlamaCpp
llama.cpp model.
llms.manifest.ManifestWrapper
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-38
|
llama.cpp model.
llms.manifest.ManifestWrapper
HazyResearch's Manifest library.
llms.minimax.Minimax
Wrapper around Minimax large language models.
llms.minimax.MinimaxCommon
Common parameters for Minimax large language models.
llms.mlflow.Mlflow
Wrapper around completions LLMs in MLflow.
llms.mlflow.Params
Parameters for MLflow
llms.mlflow_ai_gateway.MlflowAIGateway
Wrapper around completions LLMs in the MLflow AI Gateway.
llms.mlflow_ai_gateway.Params
Parameters for the MLflow AI Gateway LLM.
llms.modal.Modal
Modal large language models.
llms.mosaicml.MosaicML
MosaicML LLM service.
llms.nlpcloud.NLPCloud
NLPCloud large language models.
llms.octoai_endpoint.OctoAIEndpoint
OctoAI LLM Endpoints.
llms.ollama.Ollama
Ollama locally runs large language models.
llms.ollama.OllamaEndpointNotFoundError
Raised when the Ollama endpoint is not found.
llms.opaqueprompts.OpaquePrompts
An LLM wrapper that uses OpaquePrompts to sanitize prompts.
llms.openai.AzureOpenAI
Azure-specific OpenAI large language models.
llms.openai.BaseOpenAI
Base OpenAI large language model class.
llms.openai.OpenAI
OpenAI large language models.
llms.openai.OpenAIChat
OpenAI Chat large language models.
llms.openllm.IdentifyingParams
Parameters for identifying a model as a typed dict.
llms.openllm.OpenLLM
OpenLLM, supporting both in-process model instance and remote OpenLLM servers.
llms.openlm.OpenLM
OpenLM models.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-39
|
llms.openlm.OpenLM
OpenLM models.
llms.pai_eas_endpoint.PaiEasEndpoint
Langchain LLM class to help to access eass llm service.
llms.petals.Petals
Petals Bloom models.
llms.pipelineai.PipelineAI
PipelineAI large language models.
llms.predibase.Predibase
Use your Predibase models with Langchain.
llms.predictionguard.PredictionGuard
Prediction Guard large language models.
llms.promptlayer_openai.PromptLayerOpenAI
PromptLayer OpenAI large language models.
llms.promptlayer_openai.PromptLayerOpenAIChat
Wrapper around OpenAI large language models.
llms.replicate.Replicate
Replicate models.
llms.rwkv.RWKV
RWKV language models.
llms.sagemaker_endpoint.ContentHandlerBase()
A handler class to transform input from LLM to a format that SageMaker endpoint expects.
llms.sagemaker_endpoint.LLMContentHandler()
Content handler for LLM class.
llms.sagemaker_endpoint.LineIterator(stream)
A helper class for parsing the byte stream input.
llms.sagemaker_endpoint.SagemakerEndpoint
Sagemaker Inference Endpoint models.
llms.self_hosted.SelfHostedPipeline
Model inference on self-hosted remote hardware.
llms.self_hosted_hugging_face.SelfHostedHuggingFaceLLM
HuggingFace Pipeline API to run on self-hosted remote hardware.
llms.stochasticai.StochasticAI
StochasticAI large language models.
llms.symblai_nebula.Nebula
Nebula Service models.
llms.textgen.TextGen
Text generation models from WebUI.
llms.titan_takeoff.TitanTakeoff
Wrapper around Titan Takeoff APIs.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-40
|
llms.titan_takeoff.TitanTakeoff
Wrapper around Titan Takeoff APIs.
llms.titan_takeoff_pro.TitanTakeoffPro
Titan Takeoff Pro is a language model that can be used to generate text.
llms.together.Together
LLM models from Together.
llms.tongyi.Tongyi
Tongyi Qwen large language models.
llms.vertexai.VertexAI
Google Vertex AI large language models.
llms.vertexai.VertexAIModelGarden
Large language models served from Vertex AI Model Garden.
llms.vllm.VLLM
VLLM language model.
llms.vllm.VLLMOpenAI
vLLM OpenAI-compatible API client
llms.volcengine_maas.VolcEngineMaasBase
Base class for VolcEngineMaas models.
llms.volcengine_maas.VolcEngineMaasLLM
volc engine maas hosts a plethora of models.
llms.watsonxllm.WatsonxLLM
IBM watsonx.ai large language models.
llms.writer.Writer
Writer large language models.
llms.xinference.Xinference
Xinference large-scale model inference service.
llms.yandex.YandexGPT
Yandex large language models.
Functions¶
llms.anyscale.create_llm_result(choices, ...)
Create the LLMResult from the choices and prompts.
llms.anyscale.update_token_usage(keys, ...)
Update token usage.
llms.aviary.get_completions(model, prompt[, ...])
Get completions from Aviary models.
llms.aviary.get_models()
List available models
llms.cohere.acompletion_with_retry(llm, **kwargs)
Use tenacity to retry the completion call.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-41
|
Use tenacity to retry the completion call.
llms.cohere.completion_with_retry(llm, **kwargs)
Use tenacity to retry the completion call.
llms.databricks.get_default_api_token()
Gets the default Databricks personal access token.
llms.databricks.get_default_host()
Gets the default Databricks workspace hostname.
llms.databricks.get_repl_context()
Gets the notebook REPL context if running inside a Databricks notebook.
llms.fireworks.acompletion_with_retry(llm, ...)
Use tenacity to retry the completion call.
llms.fireworks.acompletion_with_retry_batching(...)
Use tenacity to retry the completion call.
llms.fireworks.acompletion_with_retry_streaming(...)
Use tenacity to retry the completion call for streaming.
llms.fireworks.completion_with_retry(llm, ...)
Use tenacity to retry the completion call.
llms.fireworks.completion_with_retry_batching(...)
Use tenacity to retry the completion call.
llms.fireworks.conditional_decorator(...)
Conditionally apply a decorator.
llms.google_palm.completion_with_retry(llm, ...)
Use tenacity to retry the completion call.
llms.koboldai.clean_url(url)
Remove trailing slash and /api from url if present.
llms.loading.load_llm(file)
Load LLM from file.
llms.loading.load_llm_from_config(config)
Load LLM from Config Dict.
llms.openai.acompletion_with_retry(llm[, ...])
Use tenacity to retry the async completion call.
llms.openai.completion_with_retry(llm[, ...])
Use tenacity to retry the completion call.
llms.openai.update_token_usage(keys, ...)
Update token usage.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-42
|
llms.openai.update_token_usage(keys, ...)
Update token usage.
llms.symblai_nebula.completion_with_retry(...)
Use tenacity to retry the completion call.
llms.symblai_nebula.make_request(self, prompt)
Generate text from the model.
llms.tongyi.generate_with_retry(llm, **kwargs)
Use tenacity to retry the completion call.
llms.tongyi.stream_generate_with_retry(llm, ...)
Use tenacity to retry the completion call.
llms.utils.enforce_stop_tokens(text, stop)
Cut off the text as soon as any stop words occur.
llms.vertexai.acompletion_with_retry(llm, prompt)
Use tenacity to retry the completion call.
llms.vertexai.completion_with_retry(llm, prompt)
Use tenacity to retry the completion call.
llms.vertexai.is_codey_model(model_name)
Returns True if the model name is a Codey model.
llms.vertexai.is_gemini_model(model_name)
Returns True if the model name is a Gemini model.
langchain_community.retrievers¶
Retriever class returns Documents given a text query.
It is more general than a vector store. A retriever does not need to be able to
store documents, only to return (or retrieve) it. Vector stores can be used as
the backbone of a retriever, but there are other types of retrievers as well.
Class hierarchy:
BaseRetriever --> <name>Retriever # Examples: ArxivRetriever, MergerRetriever
Main helpers:
Document, Serializable, Callbacks,
CallbackManagerForRetrieverRun, AsyncCallbackManagerForRetrieverRun
Classes¶
retrievers.arcee.ArceeRetriever
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-43
|
Classes¶
retrievers.arcee.ArceeRetriever
Document retriever for Arcee's Domain Adapted Language Models (DALMs).
retrievers.arxiv.ArxivRetriever
Arxiv retriever.
retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever
Azure Cognitive Search service retriever.
retrievers.bedrock.AmazonKnowledgeBasesRetriever
Amazon Bedrock Knowledge Bases retrieval.
retrievers.bedrock.RetrievalConfig
Configuration for retrieval.
retrievers.bedrock.VectorSearchConfig
Configuration for vector search.
retrievers.bm25.BM25Retriever
BM25 retriever without Elasticsearch.
retrievers.chaindesk.ChaindeskRetriever
Chaindesk API retriever.
retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever
ChatGPT plugin retriever.
retrievers.cohere_rag_retriever.CohereRagRetriever
Cohere Chat API with RAG.
retrievers.databerry.DataberryRetriever
Databerry API retriever.
retrievers.docarray.DocArrayRetriever
DocArray Document Indices retriever.
retrievers.docarray.SearchType(value[, ...])
Enumerator of the types of search to perform.
retrievers.elastic_search_bm25.ElasticSearchBM25Retriever
Elasticsearch retriever that uses BM25.
retrievers.embedchain.EmbedchainRetriever
Embedchain retriever.
retrievers.google_cloud_documentai_warehouse.GoogleDocumentAIWarehouseRetriever
A retriever based on Document AI Warehouse.
retrievers.google_vertex_ai_search.GoogleCloudEnterpriseSearchRetriever
Google Vertex Search API retriever alias for backwards compatibility.
retrievers.google_vertex_ai_search.GoogleVertexAIMultiTurnSearchRetriever
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-44
|
retrievers.google_vertex_ai_search.GoogleVertexAIMultiTurnSearchRetriever
Google Vertex AI Search retriever for multi-turn conversations.
retrievers.google_vertex_ai_search.GoogleVertexAISearchRetriever
Google Vertex AI Search retriever.
retrievers.kay.KayAiRetriever
Retriever for Kay.ai datasets.
retrievers.kendra.AdditionalResultAttribute
Additional result attribute.
retrievers.kendra.AdditionalResultAttributeValue
Value of an additional result attribute.
retrievers.kendra.AmazonKendraRetriever
Amazon Kendra Index retriever.
retrievers.kendra.DocumentAttribute
Document attribute.
retrievers.kendra.DocumentAttributeValue
Value of a document attribute.
retrievers.kendra.Highlight
Information that highlights the keywords in the excerpt.
retrievers.kendra.QueryResult
Amazon Kendra Query API search result.
retrievers.kendra.QueryResultItem
Query API result item.
retrievers.kendra.ResultItem
Base class of a result item.
retrievers.kendra.RetrieveResult
Amazon Kendra Retrieve API search result.
retrievers.kendra.RetrieveResultItem
Retrieve API result item.
retrievers.kendra.TextWithHighLights
Text with highlights.
retrievers.knn.KNNRetriever
KNN retriever.
retrievers.llama_index.LlamaIndexGraphRetriever
LlamaIndex graph data structure retriever.
retrievers.llama_index.LlamaIndexRetriever
LlamaIndex retriever.
retrievers.metal.MetalRetriever
Metal API retriever.
retrievers.milvus.MilvusRetriever
Milvus API retriever.
retrievers.outline.OutlineRetriever
Retriever for Outline API.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-45
|
retrievers.outline.OutlineRetriever
Retriever for Outline API.
retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever
Pinecone Hybrid Search retriever.
retrievers.pubmed.PubMedRetriever
PubMed API retriever.
retrievers.remote_retriever.RemoteLangChainRetriever
LangChain API retriever.
retrievers.svm.SVMRetriever
SVM retriever.
retrievers.tavily_search_api.SearchDepth(value)
Search depth as enumerator.
retrievers.tavily_search_api.TavilySearchAPIRetriever
Tavily Search API retriever.
retrievers.tfidf.TFIDFRetriever
TF-IDF retriever.
retrievers.vespa_retriever.VespaRetriever
Vespa retriever.
retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever
Weaviate hybrid search retriever.
retrievers.wikipedia.WikipediaRetriever
Wikipedia API retriever.
retrievers.you.YouRetriever
You retriever that uses You.com's search API.
retrievers.zep.SearchScope(value[, names, ...])
Which documents to search.
retrievers.zep.SearchType(value[, names, ...])
Enumerator of the types of search to perform.
retrievers.zep.ZepRetriever
Zep MemoryStore Retriever.
retrievers.zilliz.ZillizRetriever
Zilliz API retriever.
Functions¶
retrievers.bm25.default_preprocessing_func(text)
retrievers.kendra.clean_excerpt(excerpt)
Clean an excerpt from Kendra.
retrievers.kendra.combined_text(item)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-46
|
Clean an excerpt from Kendra.
retrievers.kendra.combined_text(item)
Combine a ResultItem title and excerpt into a single string.
retrievers.knn.create_index(contexts, embeddings)
Create an index of embeddings for a list of contexts.
retrievers.milvus.MilvusRetreiver(*args, ...)
Deprecated MilvusRetreiver.
retrievers.pinecone_hybrid_search.create_index(...)
Create an index from a list of contexts.
retrievers.pinecone_hybrid_search.hash_text(text)
Hash a text using SHA256.
retrievers.svm.create_index(contexts, embeddings)
Create an index of embeddings for a list of contexts.
retrievers.zilliz.ZillizRetreiver(*args, ...)
Deprecated ZillizRetreiver.
langchain_community.storage¶
Implementations of key-value stores and storage helpers.
Module provides implementations of various key-value stores that conform
to a simple key-value interface.
The primary goal of these storages is to support implementation of caching.
Classes¶
storage.exceptions.InvalidKeyException
Raised when a key is invalid; e.g., uses incorrect characters.
storage.redis.RedisStore(*[, client, ...])
BaseStore implementation using Redis as the underlying store.
storage.upstash_redis.UpstashRedisByteStore(*)
BaseStore implementation using Upstash Redis as the underlying store to store raw bytes.
storage.upstash_redis.UpstashRedisStore(*[, ...])
[Deprecated] BaseStore implementation using Upstash Redis as the underlying store to store strings.
langchain_community.tools¶
Tools are classes that an Agent uses to interact with the world.
Each tool has a description. Agent uses the description to choose the right
tool for the job.
Class hierarchy:
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-47
|
tool for the job.
Class hierarchy:
ToolMetaclass --> BaseTool --> <name>Tool # Examples: AIPluginTool, BaseGraphQLTool
<name> # Examples: BraveSearch, HumanInputRun
Main helpers:
CallbackManagerForToolRun, AsyncCallbackManagerForToolRun
Classes¶
tools.ainetwork.app.AINAppOps
Tool for app operations.
tools.ainetwork.app.AppOperationType(value)
Type of app operation as enumerator.
tools.ainetwork.app.AppSchema
Schema for app operations.
tools.ainetwork.base.AINBaseTool
Base class for the AINetwork tools.
tools.ainetwork.base.OperationType(value[, ...])
Type of operation as enumerator.
tools.ainetwork.owner.AINOwnerOps
Tool for owner operations.
tools.ainetwork.owner.RuleSchema
Schema for owner operations.
tools.ainetwork.rule.AINRuleOps
Tool for owner operations.
tools.ainetwork.rule.RuleSchema
Schema for owner operations.
tools.ainetwork.transfer.AINTransfer
Tool for transfer operations.
tools.ainetwork.transfer.TransferSchema
Schema for transfer operations.
tools.ainetwork.value.AINValueOps
Tool for value operations.
tools.ainetwork.value.ValueSchema
Schema for value operations.
tools.amadeus.base.AmadeusBaseTool
Base Tool for Amadeus.
tools.amadeus.closest_airport.AmadeusClosestAirport
Tool for finding the closest airport to a particular location.
tools.amadeus.closest_airport.ClosestAirportSchema
Schema for the AmadeusClosestAirport tool.
tools.amadeus.flight_search.AmadeusFlightSearch
Tool for searching for a single flight between two airports.
tools.amadeus.flight_search.FlightSearchSchema
Schema for the AmadeusFlightSearch tool.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-48
|
Schema for the AmadeusFlightSearch tool.
tools.arxiv.tool.ArxivInput
Input for the Arxiv tool.
tools.arxiv.tool.ArxivQueryRun
Tool that searches the Arxiv API.
tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool
Tool that queries the Azure Cognitive Services Form Recognizer API.
tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool
Tool that queries the Azure Cognitive Services Image Analysis API.
tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool
Tool that queries the Azure Cognitive Services Speech2Text API.
tools.azure_cognitive_services.text2speech.AzureCogsText2SpeechTool
Tool that queries the Azure Cognitive Services Text2Speech API.
tools.azure_cognitive_services.text_analytics_health.AzureCogsTextAnalyticsHealthTool
Tool that queries the Azure Cognitive Services Text Analytics for Health API.
tools.bearly.tool.BearlyInterpreterTool(api_key)
Tool for evaluating python code in a sandbox environment.
tools.bearly.tool.BearlyInterpreterToolArguments
Arguments for the BearlyInterpreterTool.
tools.bearly.tool.FileInfo
Information about a file to be uploaded.
tools.bing_search.tool.BingSearchResults
Tool that queries the Bing Search API and gets back json.
tools.bing_search.tool.BingSearchRun
Tool that queries the Bing search API.
tools.brave_search.tool.BraveSearch
Tool that queries the BraveSearch.
tools.clickup.tool.ClickupAction
Tool that queries the Clickup API.
tools.dataforseo_api_search.tool.DataForSeoAPISearchResults
Tool that queries the DataForSeo Google Search API and get back json.
tools.dataforseo_api_search.tool.DataForSeoAPISearchRun
Tool that queries the DataForSeo Google search API.
tools.ddg_search.tool.DDGInput
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-49
|
tools.ddg_search.tool.DDGInput
Input for the DuckDuckGo search tool.
tools.ddg_search.tool.DuckDuckGoSearchResults
Tool that queries the DuckDuckGo search API and gets back json.
tools.ddg_search.tool.DuckDuckGoSearchRun
Tool that queries the DuckDuckGo search API.
tools.e2b_data_analysis.tool.E2BDataAnalysisTool
Tool for running python code in a sandboxed environment for data analysis.
tools.e2b_data_analysis.tool.E2BDataAnalysisToolArguments
Arguments for the E2BDataAnalysisTool.
tools.e2b_data_analysis.tool.UploadedFile
Description of the uploaded path with its remote path.
tools.e2b_data_analysis.unparse.Unparser(tree)
Methods in this class recursively traverse an AST and output source code for the abstract syntax; original formatting is disregarded.
tools.edenai.audio_speech_to_text.EdenAiSpeechToTextTool
Tool that queries the Eden AI Speech To Text API.
tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool
Tool that queries the Eden AI Text to speech API.
tools.edenai.edenai_base_tool.EdenaiTool
the base tool for all the EdenAI Tools .
tools.edenai.image_explicitcontent.EdenAiExplicitImageTool
Tool that queries the Eden AI Explicit image detection.
tools.edenai.image_objectdetection.EdenAiObjectDetectionTool
Tool that queries the Eden AI Object detection API.
tools.edenai.ocr_identityparser.EdenAiParsingIDTool
Tool that queries the Eden AI Identity parsing API.
tools.edenai.ocr_invoiceparser.EdenAiParsingInvoiceTool
Tool that queries the Eden AI Invoice parsing API.
tools.edenai.text_moderation.EdenAiTextModerationTool
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-50
|
tools.edenai.text_moderation.EdenAiTextModerationTool
Tool that queries the Eden AI Explicit text detection.
tools.eleven_labs.models.ElevenLabsModel(value)
Models available for Eleven Labs Text2Speech.
tools.eleven_labs.text2speech.ElevenLabsModel(value)
Models available for Eleven Labs Text2Speech.
tools.eleven_labs.text2speech.ElevenLabsText2SpeechTool
Tool that queries the Eleven Labs Text2Speech API.
tools.file_management.copy.CopyFileTool
Tool that copies a file.
tools.file_management.copy.FileCopyInput
Input for CopyFileTool.
tools.file_management.delete.DeleteFileTool
Tool that deletes a file.
tools.file_management.delete.FileDeleteInput
Input for DeleteFileTool.
tools.file_management.file_search.FileSearchInput
Input for FileSearchTool.
tools.file_management.file_search.FileSearchTool
Tool that searches for files in a subdirectory that match a regex pattern.
tools.file_management.list_dir.DirectoryListingInput
Input for ListDirectoryTool.
tools.file_management.list_dir.ListDirectoryTool
Tool that lists files and directories in a specified folder.
tools.file_management.move.FileMoveInput
Input for MoveFileTool.
tools.file_management.move.MoveFileTool
Tool that moves a file.
tools.file_management.read.ReadFileInput
Input for ReadFileTool.
tools.file_management.read.ReadFileTool
Tool that reads a file.
tools.file_management.utils.BaseFileToolMixin
Mixin for file system tools.
tools.file_management.utils.FileValidationError
Error for paths outside the root directory.
tools.file_management.write.WriteFileInput
Input for WriteFileTool.
tools.file_management.write.WriteFileTool
Tool that writes a file to disk.
tools.github.tool.GitHubAction
Tool for interacting with the GitHub API.
tools.gitlab.tool.GitLabAction
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-51
|
Tool for interacting with the GitHub API.
tools.gitlab.tool.GitLabAction
Tool for interacting with the GitLab API.
tools.gmail.base.GmailBaseTool
Base class for Gmail tools.
tools.gmail.create_draft.CreateDraftSchema
Input for CreateDraftTool.
tools.gmail.create_draft.GmailCreateDraft
Tool that creates a draft email for Gmail.
tools.gmail.get_message.GmailGetMessage
Tool that gets a message by ID from Gmail.
tools.gmail.get_message.SearchArgsSchema
Input for GetMessageTool.
tools.gmail.get_thread.GetThreadSchema
Input for GetMessageTool.
tools.gmail.get_thread.GmailGetThread
Tool that gets a thread by ID from Gmail.
tools.gmail.search.GmailSearch
Tool that searches for messages or threads in Gmail.
tools.gmail.search.Resource(value[, names, ...])
Enumerator of Resources to search.
tools.gmail.search.SearchArgsSchema
Input for SearchGmailTool.
tools.gmail.send_message.GmailSendMessage
Tool that sends a message to Gmail.
tools.gmail.send_message.SendMessageSchema
Input for SendMessageTool.
tools.golden_query.tool.GoldenQueryRun
Tool that adds the capability to query using the Golden API and get back JSON.
tools.google_cloud.texttospeech.GoogleCloudTextToSpeechTool
Tool that queries the Google Cloud Text to Speech API.
tools.google_finance.tool.GoogleFinanceQueryRun
Tool that queries the Google Finance API.
tools.google_jobs.tool.GoogleJobsQueryRun
Tool that queries the Google Jobs API.
tools.google_lens.tool.GoogleLensQueryRun
Tool that queries the Google Lens API.
tools.google_places.tool.GooglePlacesSchema
Input for GooglePlacesTool.
tools.google_places.tool.GooglePlacesTool
Tool that queries the Google places API.
tools.google_scholar.tool.GoogleScholarQueryRun
Tool that queries the Google search API.
tools.google_search.tool.GoogleSearchResults
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-52
|
Tool that queries the Google search API.
tools.google_search.tool.GoogleSearchResults
Tool that queries the Google Search API and gets back json.
tools.google_search.tool.GoogleSearchRun
Tool that queries the Google search API.
tools.google_serper.tool.GoogleSerperResults
Tool that queries the Serper.dev Google Search API and get back json.
tools.google_serper.tool.GoogleSerperRun
Tool that queries the Serper.dev Google search API.
tools.google_trends.tool.GoogleTrendsQueryRun
Tool that queries the Google trends API.
tools.graphql.tool.BaseGraphQLTool
Base tool for querying a GraphQL API.
tools.human.tool.HumanInputRun
Tool that asks user for input.
tools.ifttt.IFTTTWebhook
IFTTT Webhook.
tools.jira.tool.JiraAction
Tool that queries the Atlassian Jira API.
tools.json.tool.JsonGetValueTool
Tool for getting a value in a JSON spec.
tools.json.tool.JsonListKeysTool
Tool for listing keys in a JSON spec.
tools.json.tool.JsonSpec
Base class for JSON spec.
tools.memorize.tool.Memorize
Tool that trains a language model.
tools.memorize.tool.TrainableLLM(*args, **kwargs)
Protocol for trainable language models.
tools.merriam_webster.tool.MerriamWebsterQueryRun
Tool that searches the Merriam-Webster API.
tools.metaphor_search.tool.MetaphorSearchResults
Tool that queries the Metaphor Search API and gets back json.
tools.multion.close_session.CloseSessionSchema
Input for UpdateSessionTool.
tools.multion.close_session.MultionCloseSession
Tool that closes an existing Multion Browser Window with provided fields.
tools.multion.create_session.CreateSessionSchema
Input for CreateSessionTool.
tools.multion.create_session.MultionCreateSession
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-53
|
Input for CreateSessionTool.
tools.multion.create_session.MultionCreateSession
Tool that creates a new Multion Browser Window with provided fields.
tools.multion.update_session.MultionUpdateSession
Tool that updates an existing Multion Browser Window with provided fields.
tools.multion.update_session.UpdateSessionSchema
Input for UpdateSessionTool.
tools.nasa.tool.NasaAction
Tool that queries the Atlassian Jira API.
tools.nuclia.tool.NUASchema
Input for Nuclia Understanding API.
tools.nuclia.tool.NucliaUnderstandingAPI
Tool to process files with the Nuclia Understanding API.
tools.office365.base.O365BaseTool
Base class for the Office 365 tools.
tools.office365.create_draft_message.CreateDraftMessageSchema
Input for SendMessageTool.
tools.office365.create_draft_message.O365CreateDraftMessage
Tool for creating a draft email in Office 365.
tools.office365.events_search.O365SearchEvents
Class for searching calendar events in Office 365
tools.office365.events_search.SearchEventsInput
Input for SearchEmails Tool.
tools.office365.messages_search.O365SearchEmails
Class for searching email messages in Office 365
tools.office365.messages_search.SearchEmailsInput
Input for SearchEmails Tool.
tools.office365.send_event.O365SendEvent
Tool for sending calendar events in Office 365.
tools.office365.send_event.SendEventSchema
Input for CreateEvent Tool.
tools.office365.send_message.O365SendMessage
Tool for sending an email in Office 365.
tools.office365.send_message.SendMessageSchema
Input for SendMessageTool.
tools.openapi.utils.api_models.APIOperation
A model for a single API operation.
tools.openapi.utils.api_models.APIProperty
A model for a property in the query, path, header, or cookie params.
tools.openapi.utils.api_models.APIPropertyBase
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-54
|
tools.openapi.utils.api_models.APIPropertyBase
Base model for an API property.
tools.openapi.utils.api_models.APIPropertyLocation(value)
The location of the property.
tools.openapi.utils.api_models.APIRequestBody
A model for a request body.
tools.openapi.utils.api_models.APIRequestBodyProperty
A model for a request body property.
tools.openweathermap.tool.OpenWeatherMapQueryRun
Tool that queries the OpenWeatherMap API.
tools.playwright.base.BaseBrowserTool
Base class for browser tools.
tools.playwright.click.ClickTool
Tool for clicking on an element with the given CSS selector.
tools.playwright.click.ClickToolInput
Input for ClickTool.
tools.playwright.current_page.CurrentWebPageTool
Tool for getting the URL of the current webpage.
tools.playwright.extract_hyperlinks.ExtractHyperlinksTool
Extract all hyperlinks on the page.
tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput
Input for ExtractHyperlinksTool.
tools.playwright.extract_text.ExtractTextTool
Tool for extracting all the text on the current webpage.
tools.playwright.get_elements.GetElementsTool
Tool for getting elements in the current web page matching a CSS selector.
tools.playwright.get_elements.GetElementsToolInput
Input for GetElementsTool.
tools.playwright.navigate.NavigateTool
Tool for navigating a browser to a URL.
tools.playwright.navigate.NavigateToolInput
Input for NavigateToolInput.
tools.playwright.navigate_back.NavigateBackTool
Navigate back to the previous page in the browser history.
tools.plugin.AIPlugin
AI Plugin Definition.
tools.plugin.AIPluginTool
Tool for getting the OpenAPI spec for an AI Plugin.
tools.plugin.AIPluginToolSchema
Schema for AIPluginTool.
tools.plugin.ApiConfig
API Configuration.
tools.powerbi.tool.InfoPowerBITool
Tool for getting metadata about a PowerBI Dataset.
tools.powerbi.tool.ListPowerBITool
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-55
|
Tool for getting metadata about a PowerBI Dataset.
tools.powerbi.tool.ListPowerBITool
Tool for getting tables names.
tools.powerbi.tool.QueryPowerBITool
Tool for querying a Power BI Dataset.
tools.pubmed.tool.PubmedQueryRun
Tool that searches the PubMed API.
tools.reddit_search.tool.RedditSearchRun
Tool that queries for posts on a subreddit.
tools.reddit_search.tool.RedditSearchSchema
Input for Reddit search.
tools.requests.tool.BaseRequestsTool
Base class for requests tools.
tools.requests.tool.RequestsDeleteTool
Tool for making a DELETE request to an API endpoint.
tools.requests.tool.RequestsGetTool
Tool for making a GET request to an API endpoint.
tools.requests.tool.RequestsPatchTool
Tool for making a PATCH request to an API endpoint.
tools.requests.tool.RequestsPostTool
Tool for making a POST request to an API endpoint.
tools.requests.tool.RequestsPutTool
Tool for making a PUT request to an API endpoint.
tools.scenexplain.tool.SceneXplainInput
Input for SceneXplain.
tools.scenexplain.tool.SceneXplainTool
Tool that explains images.
tools.searchapi.tool.SearchAPIResults
Tool that queries the SearchApi.io search API and returns JSON.
tools.searchapi.tool.SearchAPIRun
Tool that queries the SearchApi.io search API.
tools.searx_search.tool.SearxSearchResults
Tool that queries a Searx instance and gets back json.
tools.searx_search.tool.SearxSearchRun
Tool that queries a Searx instance.
tools.shell.tool.ShellInput
Commands for the Bash Shell tool.
tools.shell.tool.ShellTool
Tool to run shell commands.
tools.slack.base.SlackBaseTool
Base class for Slack tools.
tools.slack.get_channel.SlackGetChannel
Tool that gets Slack channel information.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-56
|
tools.slack.get_channel.SlackGetChannel
Tool that gets Slack channel information.
tools.slack.get_message.SlackGetMessage
Tool that gets Slack messages.
tools.slack.get_message.SlackGetMessageSchema
Input schema for SlackGetMessages.
tools.slack.schedule_message.ScheduleMessageSchema
Input for ScheduleMessageTool.
tools.slack.schedule_message.SlackScheduleMessage
Tool for scheduling a message in Slack.
tools.slack.send_message.SendMessageSchema
Input for SendMessageTool.
tools.slack.send_message.SlackSendMessage
Tool for sending a message in Slack.
tools.sleep.tool.SleepInput
Input for CopyFileTool.
tools.sleep.tool.SleepTool
Tool that adds the capability to sleep.
tools.spark_sql.tool.BaseSparkSQLTool
Base tool for interacting with Spark SQL.
tools.spark_sql.tool.InfoSparkSQLTool
Tool for getting metadata about a Spark SQL.
tools.spark_sql.tool.ListSparkSQLTool
Tool for getting tables names.
tools.spark_sql.tool.QueryCheckerTool
Use an LLM to check if a query is correct.
tools.spark_sql.tool.QuerySparkSQLTool
Tool for querying a Spark SQL.
tools.sql_database.tool.BaseSQLDatabaseTool
Base tool for interacting with a SQL database.
tools.sql_database.tool.InfoSQLDatabaseTool
Tool for getting metadata about a SQL database.
tools.sql_database.tool.ListSQLDatabaseTool
Tool for getting tables names.
tools.sql_database.tool.QuerySQLCheckerTool
Use an LLM to check if a query is correct.
tools.sql_database.tool.QuerySQLDataBaseTool
Tool for querying a SQL database.
tools.stackexchange.tool.StackExchangeTool
Tool that uses StackExchange
tools.steam.tool.SteamWebAPIQueryRun
Tool that searches the Steam Web API.
tools.steamship_image_generation.tool.ModelName(value)
Supported Image Models for generation.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-57
|
tools.steamship_image_generation.tool.ModelName(value)
Supported Image Models for generation.
tools.steamship_image_generation.tool.SteamshipImageGenerationTool
Tool used to generate images from a text-prompt.
tools.tavily_search.tool.TavilyAnswer
Tool that queries the Tavily Search API and gets back an answer.
tools.tavily_search.tool.TavilyInput
Input for the Tavily tool.
tools.tavily_search.tool.TavilySearchResults
Tool that queries the Tavily Search API and gets back json.
tools.vectorstore.tool.BaseVectorStoreTool
Base class for tools that use a VectorStore.
tools.vectorstore.tool.VectorStoreQATool
Tool for the VectorDBQA chain.
tools.vectorstore.tool.VectorStoreQAWithSourcesTool
Tool for the VectorDBQAWithSources chain.
tools.wikipedia.tool.WikipediaQueryRun
Tool that searches the Wikipedia API.
tools.wolfram_alpha.tool.WolframAlphaQueryRun
Tool that queries using the Wolfram Alpha SDK.
tools.yahoo_finance_news.YahooFinanceNewsTool
Tool that searches financial news on Yahoo Finance.
tools.youtube.search.YouTubeSearchTool
Tool that queries YouTube.
tools.zapier.tool.ZapierNLAListActions
Returns a list of all exposed (enabled) actions associated with
tools.zapier.tool.ZapierNLARunAction
Executes an action that is identified by action_id, must be exposed
Functions¶
tools.ainetwork.utils.authenticate([network])
Authenticate using the AIN Blockchain
tools.amadeus.utils.authenticate()
Authenticate using the Amadeus API
tools.azure_cognitive_services.utils.detect_file_src_type(...)
Detect if the file is local or remote.
tools.azure_cognitive_services.utils.download_audio_from_url(...)
Download audio from url to local.
tools.bearly.tool.file_to_base64(path)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-58
|
Download audio from url to local.
tools.bearly.tool.file_to_base64(path)
Convert a file to base64.
tools.bearly.tool.head_file(path, n)
Get the first n lines of a file.
tools.bearly.tool.strip_markdown_code(md_string)
Strip markdown code from a string.
tools.convert_to_openai.format_tool_to_openai_function(tool)
Format tool into the OpenAI function API.
tools.convert_to_openai.format_tool_to_openai_tool(tool)
Format tool into the OpenAI function API.
tools.ddg_search.tool.DuckDuckGoSearchTool(...)
Deprecated.
tools.e2b_data_analysis.tool.add_last_line_print(code)
Add print statement to the last line if it's missing.
tools.e2b_data_analysis.unparse.interleave(...)
Call f on each item in seq, calling inter() in between.
tools.e2b_data_analysis.unparse.roundtrip(...)
Parse a file and pretty-print it to output.
tools.file_management.utils.get_validated_relative_path(...)
Resolve a relative path, raising an error if not within the root directory.
tools.file_management.utils.is_relative_to(...)
Check if path is relative to root.
tools.gmail.utils.build_resource_service([...])
Build a Gmail service.
tools.gmail.utils.clean_email_body(body)
Clean email body.
tools.gmail.utils.get_gmail_credentials([...])
Get credentials.
tools.gmail.utils.import_google()
Import google libraries.
tools.gmail.utils.import_googleapiclient_resource_builder()
Import googleapiclient.discovery.build function.
tools.gmail.utils.import_installed_app_flow()
Import InstalledAppFlow class.
tools.interaction.tool.StdInInquireTool(...)
Tool for asking the user for input.
tools.office365.utils.authenticate()
Authenticate using the Microsoft Grah API
tools.office365.utils.clean_body(body)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-59
|
Authenticate using the Microsoft Grah API
tools.office365.utils.clean_body(body)
Clean body of a message or event.
tools.playwright.base.lazy_import_playwright_browsers()
Lazy import playwright browsers.
tools.playwright.utils.aget_current_page(browser)
Asynchronously get the current page of the browser.
tools.playwright.utils.create_async_playwright_browser([...])
Create an async playwright browser.
tools.playwright.utils.create_sync_playwright_browser([...])
Create a playwright browser.
tools.playwright.utils.get_current_page(browser)
Get the current page of the browser.
tools.playwright.utils.run_async(coro)
Run an async coroutine.
tools.plugin.marshal_spec(txt)
Convert the yaml or json serialized spec to a dict.
tools.render.format_tool_to_openai_function(tool)
Format tool into the OpenAI function API.
tools.render.format_tool_to_openai_tool(tool)
Format tool into the OpenAI function API.
tools.slack.utils.login()
Authenticate using the Slack API.
tools.steamship_image_generation.utils.make_image_public(...)
Upload a block to a signed URL and return the public URL.
langchain_community.utilities¶
Utilities are the integrations with third-part systems and packages.
Other LangChain classes use Utilities to interact with third-part systems
and packages.
Classes¶
utilities.alpha_vantage.AlphaVantageAPIWrapper
Wrapper for AlphaVantage API for Currency Exchange Rate.
utilities.apify.ApifyWrapper
Wrapper around Apify.
utilities.arcee.ArceeDocument
Arcee document.
utilities.arcee.ArceeDocumentAdapter()
Adapter for Arcee documents
utilities.arcee.ArceeDocumentSource
Source of an Arcee document.
utilities.arcee.ArceeRoute(value[, names, ...])
Routes available for the Arcee API as enumerator.
utilities.arcee.ArceeWrapper(arcee_api_key, ...)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-60
|
utilities.arcee.ArceeWrapper(arcee_api_key, ...)
Wrapper for Arcee API.
utilities.arcee.DALMFilter
Filters available for a DALM retrieval and generation.
utilities.arcee.DALMFilterType(value[, ...])
Filter types available for a DALM retrieval as enumerator.
utilities.arxiv.ArxivAPIWrapper
Wrapper around ArxivAPI.
utilities.awslambda.LambdaWrapper
Wrapper for AWS Lambda SDK.
utilities.bibtex.BibtexparserWrapper
Wrapper around bibtexparser.
utilities.bing_search.BingSearchAPIWrapper
Wrapper for Bing Search API.
utilities.brave_search.BraveSearchWrapper
Wrapper around the Brave search engine.
utilities.clickup.CUList(folder_id, name[, ...])
Component class for a list.
utilities.clickup.ClickupAPIWrapper
Wrapper for Clickup API.
utilities.clickup.Component()
Base class for all components.
utilities.clickup.Member(id, username, ...)
Component class for a member.
utilities.clickup.Space(id, name, private, ...)
Component class for a space.
utilities.clickup.Task(id, name, ...)
Class for a task.
utilities.clickup.Team(id, name, members)
Component class for a team.
utilities.dalle_image_generator.DallEAPIWrapper
Wrapper for OpenAI's DALL-E Image Generator.
utilities.dataforseo_api_search.DataForSeoAPIWrapper
Wrapper around the DataForSeo API.
utilities.duckduckgo_search.DuckDuckGoSearchAPIWrapper
Wrapper for DuckDuckGo Search API.
utilities.github.GitHubAPIWrapper
Wrapper for GitHub API.
utilities.gitlab.GitLabAPIWrapper
Wrapper for GitLab API.
utilities.golden_query.GoldenQueryAPIWrapper
Wrapper for Golden.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-61
|
utilities.golden_query.GoldenQueryAPIWrapper
Wrapper for Golden.
utilities.google_finance.GoogleFinanceAPIWrapper
Wrapper for SerpApi's Google Finance API
utilities.google_jobs.GoogleJobsAPIWrapper
Wrapper for SerpApi's Google Scholar API
utilities.google_lens.GoogleLensAPIWrapper
Wrapper for SerpApi's Google Lens API
utilities.google_places_api.GooglePlacesAPIWrapper
Wrapper around Google Places API.
utilities.google_scholar.GoogleScholarAPIWrapper
Wrapper for Google Scholar API
utilities.google_search.GoogleSearchAPIWrapper
Wrapper for Google Search API.
utilities.google_serper.GoogleSerperAPIWrapper
Wrapper around the Serper.dev Google Search API.
utilities.google_trends.GoogleTrendsAPIWrapper
Wrapper for SerpApi's Google Scholar API
utilities.graphql.GraphQLAPIWrapper
Wrapper around GraphQL API.
utilities.jira.JiraAPIWrapper
Wrapper for Jira API.
utilities.max_compute.MaxComputeAPIWrapper(client)
Interface for querying Alibaba Cloud MaxCompute tables.
utilities.merriam_webster.MerriamWebsterAPIWrapper
Wrapper for Merriam-Webster.
utilities.metaphor_search.MetaphorSearchAPIWrapper
Wrapper for Metaphor Search API.
utilities.nasa.NasaAPIWrapper
Wrapper for NASA API.
utilities.openapi.HTTPVerb(value[, names, ...])
Enumerator of the HTTP verbs.
utilities.openapi.OpenAPISpec()
OpenAPI Model that removes mis-formatted parts of the spec.
utilities.openweathermap.OpenWeatherMapAPIWrapper
Wrapper for OpenWeatherMap API using PyOWM.
utilities.outline.OutlineAPIWrapper
Wrapper around OutlineAPI.
utilities.portkey.Portkey()
Portkey configuration.
utilities.powerbi.PowerBIDataset
Create PowerBI engine from dataset ID and credential or token.
utilities.pubmed.PubMedAPIWrapper
Wrapper around PubMed API.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-62
|
utilities.pubmed.PubMedAPIWrapper
Wrapper around PubMed API.
utilities.python.PythonREPL
Simulates a standalone Python REPL.
utilities.reddit_search.RedditSearchAPIWrapper
Wrapper for Reddit API
utilities.redis.TokenEscaper([escape_chars_re])
Escape punctuation within an input string.
utilities.requests.Requests
Wrapper around requests to handle auth and async.
utilities.requests.RequestsWrapper
alias of TextRequestsWrapper
utilities.requests.TextRequestsWrapper
Lightweight wrapper around requests library.
utilities.scenexplain.SceneXplainAPIWrapper
Wrapper for SceneXplain API.
utilities.searchapi.SearchApiAPIWrapper
Wrapper around SearchApi API.
utilities.searx_search.SearxResults(data)
Dict like wrapper around search api results.
utilities.searx_search.SearxSearchWrapper
Wrapper for Searx API.
utilities.serpapi.HiddenPrints()
Context manager to hide prints.
utilities.serpapi.SerpAPIWrapper
Wrapper around SerpAPI.
utilities.spark_sql.SparkSQL([...])
SparkSQL is a utility class for interacting with Spark SQL.
utilities.sql_database.SQLDatabase(engine[, ...])
SQLAlchemy wrapper around a database.
utilities.stackexchange.StackExchangeAPIWrapper
Wrapper for Stack Exchange API.
utilities.steam.SteamWebAPIWrapper
Wrapper for Steam API.
utilities.tavily_search.TavilySearchAPIWrapper
Wrapper for Tavily Search API.
utilities.tensorflow_datasets.TensorflowDatasets
Access to the TensorFlow Datasets.
utilities.twilio.TwilioAPIWrapper
Messaging Client using Twilio.
utilities.wikipedia.WikipediaAPIWrapper
Wrapper around WikipediaAPI.
utilities.wolfram_alpha.WolframAlphaAPIWrapper
Wrapper for Wolfram Alpha.
utilities.zapier.ZapierNLAWrapper
Wrapper for Zapier NLA.
Functions¶
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-63
|
Wrapper for Zapier NLA.
Functions¶
utilities.anthropic.get_num_tokens_anthropic(text)
Get the number of tokens in a string of text.
utilities.anthropic.get_token_ids_anthropic(text)
Get the token ids for a string of text.
utilities.clickup.extract_dict_elements_from_component_fields(...)
Extract elements from a dictionary.
utilities.clickup.fetch_data(url, access_token)
Fetch data from a URL.
utilities.clickup.fetch_first_id(data, key)
Fetch the first id from a dictionary.
utilities.clickup.fetch_folder_id(space_id, ...)
Fetch the folder id.
utilities.clickup.fetch_list_id(space_id, ...)
Fetch the list id.
utilities.clickup.fetch_space_id(team_id, ...)
Fetch the space id.
utilities.clickup.fetch_team_id(access_token)
Fetch the team id.
utilities.clickup.load_query(query[, ...])
Attempts to parse a JSON string and return the parsed object.
utilities.clickup.parse_dict_through_component(...)
Parse a dictionary by creating a component and then turning it back into a dictionary.
utilities.opaqueprompts.desanitize(...)
Restore the original sensitive data from the sanitized text.
utilities.opaqueprompts.sanitize(input)
Sanitize input string or dict of strings by replacing sensitive data with placeholders.
utilities.powerbi.fix_table_name(table)
Add single quotes around table names that contain spaces.
utilities.powerbi.json_to_md(json_contents)
Converts a JSON object to a markdown table.
utilities.redis.check_redis_module_exist(...)
Check if the correct Redis modules are installed.
utilities.redis.get_client(redis_url, **kwargs)
Get a redis client from the connection url given.
utilities.sql_database.truncate_word(...[, ...])
Truncate a string to a certain number of words, based on the max string length.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-64
|
Truncate a string to a certain number of words, based on the max string length.
utilities.vertexai.create_retry_decorator(llm, *)
Creates a retry decorator for Vertex / Palm LLMs.
utilities.vertexai.get_client_info([module])
Returns a custom user agent header.
utilities.vertexai.init_vertexai([project, ...])
Init vertexai.
utilities.vertexai.load_image_from_gcs(path)
Loads im Image from GCS.
utilities.vertexai.raise_vertex_import_error([...])
Raise ImportError related to Vertex SDK being not available.
langchain_community.utils¶
Classes¶
utils.openai_functions.FunctionDescription
Representation of a callable function to the OpenAI API.
utils.openai_functions.ToolDescription
Representation of a callable function to the OpenAI API.
Functions¶
utils.math.cosine_similarity(X, Y)
Row-wise cosine similarity between two equal-width matrices.
utils.math.cosine_similarity_top_k(X, Y[, ...])
Row-wise cosine similarity with optional top-k and score threshold filtering.
utils.openai.is_openai_v1()
Return whether OpenAI API is v1 or more.
utils.openai_functions.convert_pydantic_to_openai_function(...)
Converts a Pydantic model to a function description for the OpenAI API.
utils.openai_functions.convert_pydantic_to_openai_tool(...)
Converts a Pydantic model to a function description for the OpenAI API.
langchain_community.vectorstores¶
Vector store stores embedded data and performs vector search.
One of the most common ways to store and search over unstructured data is to
embed it and store the resulting embedding vectors, and then query the store
and retrieve the data that are ‘most similar’ to the embedded query.
Class hierarchy:
VectorStore --> <name> # Examples: Annoy, FAISS, Milvus
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-65
|
BaseRetriever --> VectorStoreRetriever --> <name>Retriever # Example: VespaRetriever
Main helpers:
Embeddings, Document
Classes¶
vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch(...)
Alibaba Cloud OpenSearch vector store.
vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearchSettings(...)
Alibaba Cloud Opensearch` client configuration.
vectorstores.analyticdb.AnalyticDB(...[, ...])
AnalyticDB (distributed PostgreSQL) vector store.
vectorstores.annoy.Annoy(embedding_function, ...)
Annoy vector store.
vectorstores.astradb.AstraDB(*, embedding, ...)
Wrapper around DataStax Astra DB for vector-store workloads.
vectorstores.atlas.AtlasDB(name[, ...])
Atlas vector store.
vectorstores.awadb.AwaDB([table_name, ...])
AwaDB vector store.
vectorstores.azure_cosmos_db.AzureCosmosDBVectorSearch(...)
Azure Cosmos DB for MongoDB vCore vector store.
vectorstores.azure_cosmos_db.CosmosDBSimilarityType(value)
Cosmos DB Similarity Type as enumerator.
vectorstores.azuresearch.AzureSearch(...[, ...])
Azure Cognitive Search vector store.
vectorstores.azuresearch.AzureSearchVectorStoreRetriever
Retriever that uses Azure Cognitive Search.
vectorstores.bageldb.Bagel([cluster_name, ...])
BagelDB.ai vector store.
vectorstores.baiducloud_vector_search.BESVectorStore(...)
Baidu Elasticsearch vector store.
vectorstores.cassandra.Cassandra(embedding, ...)
Wrapper around Apache Cassandra(R) for vector-store workloads.
vectorstores.chroma.Chroma([...])
ChromaDB vector store.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-66
|
vectorstores.chroma.Chroma([...])
ChromaDB vector store.
vectorstores.clarifai.Clarifai([user_id, ...])
Clarifai AI vector store.
vectorstores.clickhouse.Clickhouse(embedding)
ClickHouse VectorSearch vector store.
vectorstores.clickhouse.ClickhouseSettings
ClickHouse client configuration.
vectorstores.dashvector.DashVector(...)
DashVector vector store.
vectorstores.databricks_vector_search.DatabricksVectorSearch(...)
Databricks Vector Search vector store.
vectorstores.deeplake.DeepLake([...])
Activeloop Deep Lake vector store.
vectorstores.dingo.Dingo(embedding, text_key, *)
Dingo vector store.
vectorstores.docarray.base.DocArrayIndex(...)
Base class for DocArray based vector stores.
vectorstores.docarray.hnsw.DocArrayHnswSearch(...)
HnswLib storage using DocArray package.
vectorstores.docarray.in_memory.DocArrayInMemorySearch(...)
In-memory DocArray storage for exact search.
vectorstores.elastic_vector_search.ElasticKnnSearch(...)
[Deprecated] [DEPRECATED] Elasticsearch with k-nearest neighbor search (k-NN) vector store.
vectorstores.elastic_vector_search.ElasticVectorSearch(...)
ElasticVectorSearch uses the brute force method of searching on vectors.
vectorstores.elasticsearch.ApproxRetrievalStrategy([...])
Approximate retrieval strategy using the HNSW algorithm.
vectorstores.elasticsearch.BaseRetrievalStrategy()
Base class for Elasticsearch retrieval strategies.
vectorstores.elasticsearch.ElasticsearchStore(...)
Elasticsearch vector store.
vectorstores.elasticsearch.ExactRetrievalStrategy()
Exact retrieval strategy using the script_score query.
vectorstores.elasticsearch.SparseRetrievalStrategy([...])
Sparse retrieval strategy using the text_expansion processor.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-67
|
Sparse retrieval strategy using the text_expansion processor.
vectorstores.epsilla.Epsilla(client, embeddings)
Wrapper around Epsilla vector database.
vectorstores.faiss.FAISS(embedding_function, ...)
Meta Faiss vector store.
vectorstores.hippo.Hippo(embedding_function)
Hippo vector store.
vectorstores.hologres.Hologres(...[, ndims, ...])
Hologres API vector store.
vectorstores.lancedb.LanceDB(connection, ...)
LanceDB vector store.
vectorstores.llm_rails.LLMRails([...])
Implementation of Vector Store using LLMRails.
vectorstores.llm_rails.LLMRailsRetriever
Retriever for LLMRails.
vectorstores.marqo.Marqo(client, index_name)
Marqo vector store.
vectorstores.matching_engine.MatchingEngine(...)
Google Vertex AI Vector Search (previously Matching Engine) vector store.
vectorstores.meilisearch.Meilisearch(embedding)
Meilisearch vector store.
vectorstores.milvus.Milvus(embedding_function)
Milvus vector store.
vectorstores.momento_vector_index.MomentoVectorIndex(...)
Momento Vector Index (MVI) vector store.
vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch(...)
MongoDB Atlas Vector Search vector store.
vectorstores.myscale.MyScale(embedding[, config])
MyScale vector store.
vectorstores.myscale.MyScaleSettings
MyScale client configuration.
vectorstores.myscale.MyScaleWithoutJSON(...)
MyScale vector store without metadata column
vectorstores.neo4j_vector.Neo4jVector(...[, ...])
Neo4j vector index.
vectorstores.neo4j_vector.SearchType(value)
Enumerator of the Distance strategies.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-68
|
vectorstores.neo4j_vector.SearchType(value)
Enumerator of the Distance strategies.
vectorstores.nucliadb.NucliaDB(...[, ...])
NucliaDB vector store.
vectorstores.opensearch_vector_search.OpenSearchVectorSearch(...)
Amazon OpenSearch Vector Engine vector store.
vectorstores.pgembedding.BaseModel(**kwargs)
Base model for all SQL stores.
vectorstores.pgembedding.CollectionStore(...)
Collection store.
vectorstores.pgembedding.EmbeddingStore(**kwargs)
Embedding store.
vectorstores.pgembedding.PGEmbedding(...[, ...])
Postgres with the pg_embedding extension as a vector store.
vectorstores.pgembedding.QueryResult()
Result from a query.
vectorstores.pgvecto_rs.PGVecto_rs(...[, ...])
VectorStore backed by pgvecto_rs.
vectorstores.pgvector.BaseModel(**kwargs)
Base model for the SQL stores.
vectorstores.pgvector.DistanceStrategy(value)
Enumerator of the Distance strategies.
vectorstores.pgvector.PGVector(...[, ...])
Postgres/PGVector vector store.
vectorstores.pinecone.Pinecone(index, ...[, ...])
Pinecone vector store.
vectorstores.qdrant.Qdrant(client, ...[, ...])
Qdrant vector store.
vectorstores.qdrant.QdrantException
Qdrant related exceptions.
vectorstores.redis.base.Redis(redis_url, ...)
Redis vector database.
vectorstores.redis.base.RedisVectorStoreRetriever
Retriever for Redis VectorStore.
vectorstores.redis.filters.RedisFilter()
Collection of RedisFilterFields.
vectorstores.redis.filters.RedisFilterExpression([...])
A logical expression of RedisFilterFields.
vectorstores.redis.filters.RedisFilterField(field)
Base class for RedisFilterFields.
vectorstores.redis.filters.RedisFilterOperator(value)
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
9229cb2071a2-69
|
Base class for RedisFilterFields.
vectorstores.redis.filters.RedisFilterOperator(value)
RedisFilterOperator enumerator is used to create RedisFilterExpressions.
vectorstores.redis.filters.RedisNum(field)
A RedisFilterField representing a numeric field in a Redis index.
vectorstores.redis.filters.RedisTag(field)
A RedisFilterField representing a tag in a Redis index.
vectorstores.redis.filters.RedisText(field)
A RedisFilterField representing a text field in a Redis index.
vectorstores.redis.schema.FlatVectorField
Schema for flat vector fields in Redis.
vectorstores.redis.schema.HNSWVectorField
Schema for HNSW vector fields in Redis.
vectorstores.redis.schema.NumericFieldSchema
Schema for numeric fields in Redis.
vectorstores.redis.schema.RedisDistanceMetric(value)
Distance metrics for Redis vector fields.
vectorstores.redis.schema.RedisField
Base class for Redis fields.
vectorstores.redis.schema.RedisModel
Schema for Redis index.
vectorstores.redis.schema.RedisVectorField
Base class for Redis vector fields.
vectorstores.redis.schema.TagFieldSchema
Schema for tag fields in Redis.
vectorstores.redis.schema.TextFieldSchema
Schema for text fields in Redis.
vectorstores.rocksetdb.Rockset(client, ...)
Rockset vector store.
vectorstores.scann.ScaNN(embedding, index, ...)
ScaNN vector store.
vectorstores.semadb.SemaDB(collection_name, ...)
SemaDB vector store.
vectorstores.singlestoredb.SingleStoreDB(...)
SingleStore DB vector store.
vectorstores.sklearn.BaseSerializer(persist_path)
Base class for serializing data.
vectorstores.sklearn.BsonSerializer(persist_path)
Serializes data in binary json using the bson python package.
vectorstores.sklearn.JsonSerializer(persist_path)
Serializes data in json using the json package from python standard library.
|
https://api.python.langchain.com/en/latest/community_api_reference.html
|
End of preview. Expand
in Data Studio
No dataset card yet
- Downloads last month
- 2