id stringlengths 14 16 | text stringlengths 13 2.7k | source stringlengths 57 178 |
|---|---|---|
1a93eb904d6b-0 | langchain API Reference¶
langchain.adapters¶
Classes¶
adapters.openai.ChatCompletion()
Chat completion.
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_messag... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-1 | Tool that just returns the query.
agents.agent.LLMSingleActionAgent
Base class for single action agents.
agents.agent.MultiActionAgentOutputParser
Base class for parsing agent output into agent actions/finish.
agents.agent.RunnableAgent
Agent powered by runnables.
agents.agent.RunnableMultiActionAgent
Agent powered by ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-2 | Natural Language API Toolkit.
agents.agent_toolkits.office365.toolkit.O365Toolkit
Toolkit for interacting with Office 365.
agents.agent_toolkits.openapi.planner.RequestsDeleteToolWithParsing
A tool that sends a DELETE request and parses the response.
agents.agent_toolkits.openapi.planner.RequestsGetToolWithParsing
Requ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-3 | agents.agent_toolkits.zapier.toolkit.ZapierToolkit
Zapier Toolkit.
agents.agent_types.AgentType(value[, names, ...])
An enum for agent types.
agents.chat.base.ChatAgent
Chat Agent.
agents.chat.output_parser.ChatOutputParser
Output parser for the chat agent.
agents.conversational.base.ConversationalAgent
An agent that h... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-4 | agents.output_parsers.json.JSONAgentOutputParser
Parses tool invocations and final answers in JSON format.
agents.output_parsers.openai_functions.OpenAIFunctionsAgentOutputParser
Parses a message into agent action/finish.
agents.output_parsers.openai_tools.OpenAIToolAgentAction
Override init to support instantiation by... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-5 | agents.structured_chat.base.StructuredChatAgent
Structured Chat Agent.
agents.structured_chat.output_parser.StructuredChatOutputParser
Output parser for the structured chat agent.
agents.structured_chat.output_parser.StructuredChatOutputParserWithRetries
Output parser with retries for the structured chat agent.
agents.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-6 | agents.agent_toolkits.vectorstore.base.create_vectorstore_router_agent(...)
Construct a VectorStore router agent from an LLM and tools.
agents.format_scratchpad.log.format_log_to_str(...)
Construct the scratchpad that lets the agent continue its thought process.
agents.format_scratchpad.log_to_messages.format_log_to_me... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-7 | Intermediate steps refers to the list of (AgentAction, observation) tuples
that result from previous iterations of the agent.
Depending on the prompting strategy you are using, you may want to format these
differently before passing them into the LLM.
Functions¶
agents.format_scratchpad.log.format_log_to_str(...)
Const... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-8 | Parses a message into agent action/finish.
agents.output_parsers.openai_tools.OpenAIToolAgentAction
Override init to support instantiation by position for backward compat.
agents.output_parsers.openai_tools.OpenAIToolsAgentOutputParser
Parses a message into agent actions/finish.
agents.output_parsers.react_json_single_... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-9 | 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... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-10 | 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.De... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-11 | Callback Handler that logs prompt artifacts and metrics to SageMaker Experiments.
callbacks.streaming_aiter.AsyncIteratorCallbackHandler()
Callback handler that returns an async iterator.
callbacks.streaming_aiter_final_only.AsyncFinalIteratorCallbackHandler(*)
Callback handler that returns an async iterator.
callbacks... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-12 | 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_ai... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-13 | 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 f... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-14 | other Chains, etc., and provide a simple interface to this sequence.
The Chain interface makes it easy to create apps that are:
Stateful: add Memory to any Chain to give it state,
Observable: pass Callbacks to a Chain to execute additional functionality,
like logging, outside the main sequence of component calls,
Compo... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-15 | Combine documents by recursively reducing them.
chains.combine_documents.refine.RefineDocumentsChain
Combine documents by doing a first pass and then refining on more documents.
chains.combine_documents.stuff.StuffDocumentsChain
Chain that combines documents by stuffing into context.
chains.constitutional_ai.base.Const... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-16 | Used to correct relationship direction in generated Cypher statements.
chains.graph_qa.cypher_utils.Schema(...)
Create new instance of Schema(left_node, relation, right_node)
chains.graph_qa.falkordb.FalkorDBQAChain
Chain for question-answering against a graph by generating Cypher statements.
chains.graph_qa.hugegraph.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-17 | Map-reduce chain.
chains.moderation.OpenAIModerationChain
Pass input through a moderation endpoint.
chains.natbot.base.NatBotChain
Implement an LLM driven browser.
chains.natbot.crawler.Crawler()
A crawler for web pages.
chains.natbot.crawler.ElementInViewPort
A typed dictionary containing information about elements in... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-18 | chains.query_constructor.ir.Comparison
A comparison to a value.
chains.query_constructor.ir.Expr
Base class for all expressions.
chains.query_constructor.ir.FilterDirective
A filtering expression.
chains.query_constructor.ir.Operation
A logical operation over other directives.
chains.query_constructor.ir.Operator(value... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-19 | A multi-route chain that uses an LLM router chain to choose amongst retrieval qa chains.
chains.sequential.SequentialChain
Chain where the outputs of one chain feed directly into next.
chains.sequential.SimpleSequentialChain
Simple chain where the outputs of one step feed directly into next.
chains.sql_database.query.S... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-20 | chains.openai_functions.base.convert_python_function_to_openai_function(...)
Convert a Python function to an OpenAI function-calling API compatible dict.
chains.openai_functions.base.convert_to_openai_function(...)
Convert a raw function/class to an OpenAI function.
chains.openai_functions.base.create_openai_fn_chain(.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-21 | chains.openai_functions.tagging.create_tagging_chain(...)
Creates a chain that extracts information from a passage
chains.openai_functions.tagging.create_tagging_chain_pydantic(...)
Creates a chain that extracts information from a passage
chains.openai_functions.utils.get_llm_kwargs(...)
Returns the kwargs for the LLMC... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-22 | 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 fi... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-23 | 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.anyscal... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-24 | 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.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-25 | Alibaba Tongyi Qwen chat models API.
chat_models.vertexai.ChatVertexAI
Vertex AI Chat large language models API.
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 th... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-26 | chat_models.tongyi.convert_message_to_dict(message)
langchain.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.arbi... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-27 | 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(...)
L... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-28 | 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.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-29 | 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 CoN... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-30 | Base loader for Embaas document extraction API.
document_loaders.embaas.EmbaasBlobLoader
Load Embaas blob.
document_loaders.embaas.EmbaasDocumentExtractionParameters
Parameters for the embaas document extraction API.
document_loaders.embaas.EmbaasDocumentExtractionPayload
Payload for the Embaas document extraction API.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-31 | 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... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-32 | 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(...)
Lo... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-33 | Load a file from Microsoft OneDrive.
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.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-34 | 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([... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-35 | 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.
doc... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-36 | 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(buck... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-37 | 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... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-38 | 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.Unst... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-39 | 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 minimu... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-40 | 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.NucliaTextTransform... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-41 | embeddings.bedrock.BedrockEmbeddings
Bedrock embedding models.
embeddings.cache.CacheBackedEmbeddings(...)
Interface for caching results from embedding models.
embeddings.clarifai.ClarifaiEmbeddings
Clarifai embedding models.
embeddings.cohere.CohereEmbeddings
Cohere embedding models.
embeddings.dashscope.DashScopeEmbe... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-42 | 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
HuggingFaceH... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-43 | 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.SelfHostedHugging... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-44 | langchain.evaluation¶
Evaluation chains for grading LLM and Chain outputs.
This module contains off-the-shelf evaluation chains for grading the output of
LangChain primitives such as language models and chains.
Loading an evaluator
To load an evaluator, you can use the load_evaluators or
load_evaluator functions with t... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-45 | StringEvaluator: Evaluate a prediction string against a reference label and/or input context.
PairwiseStringEvaluator: Evaluate two prediction strings against each other. Useful for scoring preferences, measuring similarity between two chain or llm agents, or comparing outputs on similar inputs.
AgentTrajectoryEvaluato... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-46 | Compute an exact match between the prediction and the reference.
evaluation.parsing.base.JsonEqualityEvaluator([...])
Evaluates whether the prediction is equal to the reference after
evaluation.parsing.base.JsonValidityEvaluator(...)
Evaluates whether the prediction is valid JSON.
evaluation.parsing.json_distance.JsonE... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-47 | evaluation.scoring.eval_chain.ScoreStringResultOutputParser
A parser for the output of the ScoreStringEvalChain.
evaluation.string_distance.base.PairwiseStringDistanceEvalChain
Compute string edit distances between two predictions.
evaluation.string_distance.base.StringDistance(value)
Distance metric to use.
evaluation... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-48 | 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 gr... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-49 | into the vectostore and to avoid over-writing content if it’s unchanged.
Importantly, this keeps on working even if the content being written is derived
via a set of transformations from some source content (e.g., indexing children
documents that were derived from parent documents by chunking.)
Classes¶
indexes.base.Re... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-50 | 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 re... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-51 | 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.cohere.BaseCohere
Base class for Cohere models.
llms.cohere.Cohere
Cohere large language models.
llms.ctran... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-52 | 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.
ll... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-53 | 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.Identify... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-54 | 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
Stochas... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-55 | Get completions from Aviary models.
llms.aviary.get_models()
List available models
llms.base.create_base_retry_decorator(...[, ...])
Create a retry decorator for a given LLM and provided list of error types.
llms.base.get_prompts(params, prompts)
Get prompts that are already cached.
llms.base.update_cache(existing_prom... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-56 | 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... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-57 | 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 SerializedNotImple... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-58 | Chat message history that stores history in Cassandra.
memory.chat_message_histories.cosmos_db.CosmosDBChatMessageHistory(...)
Chat message history backed by Azure CosmosDB.
memory.chat_message_histories.dynamodb.DynamoDBChatMessageHistory(...)
Chat message history that stores history in AWS DynamoDB.
memory.chat_messa... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-59 | memory.chat_message_histories.sql.SQLChatMessageHistory(...)
Chat message history stored in an SQL database.
memory.chat_message_histories.streamlit.StreamlitChatMessageHistory([key])
Chat message history that stores messages in Streamlit session state.
memory.chat_message_histories.upstash_redis.UpstashRedisChatMessag... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-60 | VectorStoreRetriever-backed memory.
memory.zep_memory.ZepMemory
Persist your chain history to the Zep MemoryStore.
Functions¶
memory.chat_message_histories.sql.create_message_model(...)
Create a message model for a given table name.
memory.utils.get_prompt_input_key(inputs, ...)
Get the prompt input key.
langchain.mode... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-61 | Parse a numbered list.
output_parsers.openai_functions.JsonKeyOutputFunctionsParser
Parse an output as the element of the Json object.
output_parsers.openai_functions.JsonOutputFunctionsParser
Parse an output as the Json object.
output_parsers.openai_functions.OutputFunctionsParser
Parse an output that is one of sets o... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-62 | Functions¶
output_parsers.json.parse_and_check_json_markdown(...)
Parse a JSON string from a Markdown string and check that it contains the expected keys.
output_parsers.json.parse_json_markdown(...)
Parse a JSON string from a Markdown string.
output_parsers.json.parse_partial_json(s, *)
Parse a JSON string that may be... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-63 | prompts.chat.ChatPromptValue
Chat prompt value.
prompts.chat.ChatPromptValueConcrete
Chat prompt value which explicitly lists out the message types it accepts.
prompts.chat.HumanMessagePromptTemplate
Human message prompt template.
prompts.chat.MessagesPlaceholder
Prompt template that assumes variable is already list of... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-64 | Validate that the input variables are valid for the template.
prompts.example_selector.ngram_overlap.ngram_overlap_score(...)
Compute ngram overlap score of source and example as sentence_bleu score.
prompts.example_selector.semantic_similarity.sorted_values(values)
Return a list of values in dict sorted by key.
prompt... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-65 | retrievers.cohere_rag_retriever.CohereRagRetriever
Cohere Chat API with RAG.
retrievers.contextual_compression.ContextualCompressionRetriever
Retriever that wraps a base retriever and compresses the results.
retrievers.databerry.DataberryRetriever
Databerry API retriever.
retrievers.docarray.DocArrayRetriever
DocArray ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-66 | retrievers.google_vertex_ai_search.GoogleCloudEnterpriseSearchRetriever
Google Vertex Search API retriever alias for backwards compatibility.
retrievers.google_vertex_ai_search.GoogleVertexAIMultiTurnSearchRetriever
Google Vertex AI Search retriever for multi-turn conversations.
retrievers.google_vertex_ai_search.Googl... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-67 | retrievers.metal.MetalRetriever
Metal API retriever.
retrievers.milvus.MilvusRetriever
Milvus API retriever.
retrievers.multi_query.LineList
List of lines.
retrievers.multi_query.LineListOutputParser
Output parser for a list of lines.
retrievers.multi_query.MultiQueryRetriever
Given a query, use an LLM to write a set o... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-68 | retrievers.self_query.milvus.MilvusTranslator()
Translate Milvus internal query language elements to valid filters.
retrievers.self_query.myscale.MyScaleTranslator([...])
Translate MyScale internal query language elements to valid filters.
retrievers.self_query.opensearch.OpenSearchTranslator()
Translate OpenSearch int... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-69 | Vespa retriever.
retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever
Weaviate hybrid search retriever.
retrievers.web_research.LineList
List of questions.
retrievers.web_research.QuestionListOutputParser
Output parser for a list of numbered questions.
retrievers.web_research.SearchQueries
Search queries to ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-70 | 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.self_query.deeplake.can_cast_to_float(string)
Check if a string can be cast to a float.
retrievers.self_query.mi... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-71 | schema.callbacks.base.BaseCallbackHandler()
Base callback handler that handles callbacks from LangChain.
schema.callbacks.base.BaseCallbackManager(...)
Base callback manager that handles callbacks from LangChain.
schema.callbacks.base.CallbackManagerMixin()
Mixin for callback manager.
schema.callbacks.base.ChainManager... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-72 | Callback manager for LLM run.
schema.callbacks.manager.CallbackManagerForRetrieverRun(*, ...)
Callback manager for retriever run.
schema.callbacks.manager.CallbackManagerForToolRun(*, ...)
Callback manager for tool run.
schema.callbacks.manager.ParentRunManager(*, ...)
Sync Parent Run Manager.
schema.callbacks.manager.... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-73 | schema.callbacks.tracers.schemas.ChainRun
Class for ChainRun.
schema.callbacks.tracers.schemas.LLMRun
Class for LLMRun.
schema.callbacks.tracers.schemas.Run
Run schema for the V2 API in the Tracer.
schema.callbacks.tracers.schemas.ToolRun
Class for ToolRun.
schema.callbacks.tracers.schemas.TracerSession
TracerSessionV1... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-74 | schema.messages.BaseMessage
The base abstract Message class.
schema.messages.BaseMessageChunk
A Message chunk, which can be concatenated with other Message chunks.
schema.messages.ChatMessage
A Message that can be assigned an arbitrary speaker (i.e.
schema.messages.ChatMessageChunk
A Chat Message chunk.
schema.messages... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-75 | schema.output_parser.BaseOutputParser
Base class to parse the output of an LLM call.
schema.output_parser.BaseTransformOutputParser
Base class for an output parser that can handle streaming input.
schema.output_parser.NoOpOutputParser
alias of StrOutputParser
schema.output_parser.OutputParserException(error)
Exception ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-76 | schema.runnable.base.RunnableSerializable
A Runnable that can be serialized to JSON.
schema.runnable.branch.RunnableBranch
A Runnable that selects which branch to run based on a condition.
schema.runnable.config.EmptyDict
Empty dict type.
schema.runnable.config.RunnableConfig
Configuration for a Runnable.
schema.runnab... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-77 | A field that can be configured by the user with a default value.
schema.runnable.utils.ConfigurableFieldSpec(id, ...)
A field that can be configured by the user.
schema.runnable.utils.GetLambdaSource()
Get the source code of a lambda function.
schema.runnable.utils.IsFunctionArgDict()
Check if the first argument of a f... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-78 | Get the client.
schema.callbacks.tracers.langchain.log_error_once(...)
Log an error once.
schema.callbacks.tracers.langchain.wait_for_all_tracers()
Wait for all tracers to finish.
schema.callbacks.tracers.langchain_v1.get_headers()
Get the headers for the LangChain API.
schema.callbacks.tracers.schemas.RunTypeEnum()
Ru... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-79 | schema.runnable.config.get_executor_for_config(config)
Get an executor for a config.
schema.runnable.config.merge_configs(*configs)
Merge multiple configs into one.
schema.runnable.config.patch_config(config, *)
Patch a config with new values.
schema.runnable.configurable.make_options_spec(...)
Make a ConfigurableField... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-80 | production-grade programs that harness the power of LLMs.
Programs created using LCEL and LangChain Runnables inherently support
synchronous, asynchronous, batch, and streaming operations.
Support for async allows servers hosting LCEL based programs to scale better
for higher concurrent loads.
Streaming of intermediate... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-81 | schema.runnable.config.EmptyDict
Empty dict type.
schema.runnable.config.RunnableConfig
Configuration for a Runnable.
schema.runnable.configurable.DynamicRunnable
A Serializable Runnable that can be dynamically configured.
schema.runnable.configurable.RunnableConfigurableAlternatives
A Runnable that can be dynamically ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-82 | schema.runnable.utils.GetLambdaSource()
Get the source code of a lambda function.
schema.runnable.utils.IsFunctionArgDict()
Check if the first argument of a function is a dict.
schema.runnable.utils.IsLocalDict(name, keys)
Check if a name is a local dict.
schema.runnable.utils.SupportsAdd(*args, ...)
Protocol for objec... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-83 | Asynchronously add a sequence of addable objects together.
schema.runnable.utils.accepts_config(callable)
Check if a callable accepts a config argument.
schema.runnable.utils.accepts_run_manager(...)
Check if a callable accepts a run_manager argument.
schema.runnable.utils.add(addables)
Add a sequence of addable object... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-84 | chain = LLMChain.from_string(
llm,
"What's the answer to {your_input_key}"
)
return chain
# Load off-the-shelf evaluators via config or the EvaluatorType (string or enum)
evaluation_config = RunEvalConfig(
evaluators=[
"qa", # "Correctness" against a reference answer
"embedd... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-85 | run_on_dataset: Function to evaluate a chain, agent, or other LangChain component over a dataset.
RunEvalConfig: Class representing the configuration for running evaluation. You can select evaluators by EvaluatorType or config, or you can pass in custom_evaluators
Classes¶
smith.evaluation.config.EvalConfig
Configurati... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-86 | langchain.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.encoder_backed.EncoderBackedStore(...)
Wraps ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-87 | Enum of the programming languages.
text_splitter.LatexTextSplitter(**kwargs)
Attempts to split the text along Latex-formatted layout elements.
text_splitter.LineType
Line type as typed dict.
text_splitter.MarkdownHeaderTextSplitter(...)
Splitting markdown files based on specified headers.
text_splitter.MarkdownTextSpli... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-88 | 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 fo... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-89 | 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 S... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-90 | tools.dataforseo_api_search.tool.DataForSeoAPISearchRun
Tool that queries the DataForSeo Google search API.
tools.ddg_search.tool.DDGInput
Create a new model by parsing and validating input data from keyword arguments.
tools.ddg_search.tool.DuckDuckGoSearchResults
Tool that queries the DuckDuckGo search API and gets ba... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-91 | tools.edenai.ocr_invoiceparser.EdenAiParsingInvoiceTool
Tool that queries the Eden AI Invoice parsing API.
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.elev... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-92 | 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
Tool for interacting with the GitLab API.
tools.gmail.base.GmailBaseTool
Base class for Gmail tools.
tools.gmail.create_draft.CreateDraftSche... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-93 | 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.graphql.tool.BaseGraphQL... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-94 | 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... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-95 | 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.
t... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-96 | 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.
too... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-97 | 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.QuerySQ... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-98 | 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 th... | lang/api.python.langchain.com/en/latest/api_reference.html |
1a93eb904d6b-99 | 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 ... | lang/api.python.langchain.com/en/latest/api_reference.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.