(langchain.utilities.WikipediaAPIWrapper method)
load_agent() (in module langchain.agents)
load_all_available_meta (langchain.utilities.ArxivAPIWrapper attribute)
(langchain.utilities.PubMedAPIWrapper attribute)
(langchain.utilities.WikipediaAPIWrapper attribute)
load_all_recursively (langchain.document_loaders.BlackboardLoader attribute)
load_chain() (in module langchain.chains)
load_comments() (langchain.document_loaders.HNLoader method)
load_device() (langchain.document_loaders.IFixitLoader method)
load_docs() (langchain.utilities.PubMedAPIWrapper method)
load_file() (langchain.document_loaders.DirectoryLoader method)
load_fn_kwargs (langchain.embeddings.SelfHostedHuggingFaceEmbeddings attribute)
(langchain.llms.SelfHostedHuggingFaceLLM attribute)
(langchain.llms.SelfHostedPipeline attribute)
load_guide() (langchain.document_loaders.IFixitLoader method)
load_huggingface_tool() (in module langchain.agents)
load_local() (langchain.vectorstores.Annoy class method)
(langchain.vectorstores.AwaDB method)
(langchain.vectorstores.FAISS class method)
load_max_docs (langchain.utilities.ArxivAPIWrapper attribute)
(langchain.utilities.PubMedAPIWrapper attribute)
load_memory_variables() (langchain.experimental.GenerativeAgentMemory method)
(langchain.memory.CombinedMemory method)
(langchain.memory.ConversationBufferMemory method)
(langchain.memory.ConversationBufferWindowMemory method)
(langchain.memory.ConversationEntityMemory method)
(langchain.memory.ConversationKGMemory method)
(langchain.memory.ConversationStringBufferMemory method)
(langchain.memory.ConversationSummaryBufferMemory method)
(langchain.memory.ConversationSummaryMemory method)
(langchain.memory.ConversationTokenBufferMemory method)


(langchain.memory.ConversationTokenBufferMemory method)
(langchain.memory.ReadOnlySharedMemory method)
(langchain.memory.SimpleMemory method)
(langchain.memory.VectorStoreRetrieverMemory method)
load_messages() (langchain.memory.CosmosDBChatMessageHistory method)
load_page() (langchain.document_loaders.NotionDBLoader method)
load_prompt() (in module langchain.prompts)
load_questions_and_answers() (langchain.document_loaders.IFixitLoader method)
load_results() (langchain.document_loaders.HNLoader method)
load_suggestions() (langchain.document_loaders.IFixitLoader static method)
load_tools() (in module langchain.agents)
load_trashed_files (langchain.document_loaders.GoogleDriveLoader attribute)
locals (langchain.python.PythonREPL attribute)
(langchain.utilities.PythonREPL attribute)
location (langchain.llms.VertexAI attribute)
log_probs (langchain.llms.AlephAlpha attribute)
logit_bias (langchain.llms.AlephAlpha attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenLM attribute)
logitBias (langchain.llms.AI21 attribute)
logits_all (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
logprobs (langchain.llms.LlamaCpp attribute)
(langchain.llms.Writer attribute)
lookup_tool() (langchain.agents.AgentExecutor method)
lora_base (langchain.llms.LlamaCpp attribute)
lora_path (langchain.llms.LlamaCpp attribute)
M
MARKDOWN (langchain.text_splitter.Language attribute)


M
MARKDOWN (langchain.text_splitter.Language attribute)
MarkdownTextSplitter (class in langchain.text_splitter)
MastodonTootsLoader (class in langchain.document_loaders)
MatchingEngine (class in langchain.vectorstores)
MathpixPDFLoader (class in langchain.document_loaders)
max_checks (langchain.chains.LLMSummarizationCheckerChain attribute)
max_execution_time (langchain.agents.AgentExecutor attribute)
max_iter (langchain.chains.FlareChain attribute)
max_iterations (langchain.agents.agent_toolkits.PowerBIToolkit attribute)
(langchain.agents.AgentExecutor attribute)
(langchain.tools.QueryPowerBITool attribute)
max_length (langchain.llms.NLPCloud attribute)
(langchain.llms.Petals attribute)
(langchain.prompts.example_selector.LengthBasedExampleSelector attribute)
max_marginal_relevance_search() (langchain.vectorstores.Annoy method)
(langchain.vectorstores.Chroma method)
(langchain.vectorstores.DeepLake method)
(langchain.vectorstores.FAISS method)
(langchain.vectorstores.Milvus method)
(langchain.vectorstores.Qdrant method)
(langchain.vectorstores.SKLearnVectorStore method)
(langchain.vectorstores.SupabaseVectorStore method)
(langchain.vectorstores.VectorStore method)
(langchain.vectorstores.Weaviate method)
max_marginal_relevance_search_by_vector() (langchain.vectorstores.Annoy method)
(langchain.vectorstores.Chroma method)
(langchain.vectorstores.DeepLake method)
(langchain.vectorstores.FAISS method)
(langchain.vectorstores.Milvus method)
(langchain.vectorstores.SKLearnVectorStore method)
(langchain.vectorstores.SupabaseVectorStore method)
(langchain.vectorstores.VectorStore method)
(langchain.vectorstores.Weaviate method)


(langchain.vectorstores.VectorStore method)
(langchain.vectorstores.Weaviate method)
max_new_tokens (langchain.llms.Petals attribute)
max_output_tokens (langchain.llms.GooglePalm attribute)
(langchain.llms.VertexAI attribute)
max_results (langchain.utilities.DuckDuckGoSearchAPIWrapper attribute)
max_retries (langchain.chat_models.ChatOpenAI attribute)
(langchain.embeddings.OpenAIEmbeddings attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.Cohere attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenAIChat attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.PromptLayerOpenAIChat attribute)
max_token_limit (langchain.memory.ConversationSummaryBufferMemory attribute)
(langchain.memory.ConversationTokenBufferMemory attribute)
max_tokens (langchain.chat_models.ChatOpenAI attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.Cohere attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.LlamaCpp attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.PredictionGuard attribute)
(langchain.llms.Writer attribute)
max_tokens_for_prompt() (langchain.llms.AzureOpenAI method)
(langchain.llms.OpenAI method)
(langchain.llms.OpenLM method)
(langchain.llms.PromptLayerOpenAI method)
max_tokens_limit (langchain.chains.ConversationalRetrievalChain attribute)
(langchain.chains.RetrievalQAWithSourcesChain attribute)
(langchain.chains.VectorDBQAWithSourcesChain attribute)
max_tokens_per_generation (langchain.llms.RWKV attribute)
max_tokens_to_sample (langchain.llms.Anthropic attribute)


max_tokens_to_sample (langchain.llms.Anthropic attribute)
MaxComputeLoader (class in langchain.document_loaders)
maximum_tokens (langchain.llms.AlephAlpha attribute)
maxTokens (langchain.llms.AI21 attribute)
memories (langchain.memory.CombinedMemory attribute)
(langchain.memory.SimpleMemory attribute)
memory (langchain.chains.ConversationChain attribute)
(langchain.experimental.GenerativeAgent attribute)
(langchain.memory.ReadOnlySharedMemory attribute)
memory_key (langchain.memory.ConversationSummaryBufferMemory attribute)
(langchain.memory.ConversationTokenBufferMemory attribute)
(langchain.memory.VectorStoreRetrieverMemory attribute)
memory_retriever (langchain.experimental.GenerativeAgentMemory attribute)
memory_stream (langchain.retrievers.TimeWeightedVectorStoreRetriever attribute)
memory_variables (langchain.experimental.GenerativeAgentMemory property)
(langchain.memory.CombinedMemory property)
(langchain.memory.ConversationStringBufferMemory property)
(langchain.memory.ReadOnlySharedMemory property)
(langchain.memory.SimpleMemory property)
(langchain.memory.VectorStoreRetrieverMemory property)
mentioned (langchain.document_loaders.GitHubIssuesLoader attribute)
merge_documents() (langchain.retrievers.MergerRetriever method)
merge_from() (langchain.vectorstores.FAISS method)
MergerRetriever (class in langchain.retrievers)
messages (langchain.memory.CassandraChatMessageHistory property)
(langchain.memory.ChatMessageHistory attribute)
(langchain.memory.DynamoDBChatMessageHistory property)
(langchain.memory.FileChatMessageHistory property)
(langchain.memory.MomentoChatMessageHistory property)
(langchain.memory.MongoDBChatMessageHistory property)
(langchain.memory.PostgresChatMessageHistory property)
(langchain.memory.RedisChatMessageHistory property)


(langchain.memory.RedisChatMessageHistory property)
metadata_column (langchain.vectorstores.Clickhouse property)
(langchain.vectorstores.MyScale property)
metadata_fields (langchain.document_loaders.FaunaLoader attribute)
metadata_key (langchain.retrievers.RemoteLangChainRetriever attribute)
METADATA_KEY (langchain.vectorstores.Qdrant attribute)
MetalRetriever (class in langchain.retrievers)
metaphor_api_key (langchain.utilities.MetaphorSearchAPIWrapper attribute)
method (langchain.tools.APIOperation attribute)
metric (langchain.vectorstores.ClickhouseSettings attribute)
(langchain.vectorstores.MyScaleSettings attribute)
milestone (langchain.document_loaders.GitHubIssuesLoader attribute)
Milvus (class in langchain.vectorstores)
min_chunk_size (langchain.document_loaders.DocugamiLoader attribute)
min_length (langchain.llms.NLPCloud attribute)
min_prob (langchain.chains.FlareChain attribute)
min_token_gap (langchain.chains.FlareChain attribute)
min_tokens (langchain.llms.GooseAI attribute)
(langchain.llms.Writer attribute)
minimax_api_key (langchain.embeddings.MiniMaxEmbeddings attribute)
minimax_group_id (langchain.embeddings.MiniMaxEmbeddings attribute)
minimum_tokens (langchain.llms.AlephAlpha attribute)
minTokens (langchain.llms.AI21 attribute)
model (langchain.embeddings.AlephAlphaAsymmetricSemanticEmbedding attribute)
(langchain.embeddings.CohereEmbeddings attribute)
(langchain.embeddings.MiniMaxEmbeddings attribute)
(langchain.llms.AI21 attribute)
(langchain.llms.AlephAlpha attribute)
(langchain.llms.Anthropic attribute)
(langchain.llms.Cohere attribute)
(langchain.llms.CTransformers attribute)


(langchain.llms.Cohere attribute)
(langchain.llms.CTransformers attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.PredictionGuard attribute)
(langchain.llms.RWKV attribute)
(langchain.retrievers.document_compressors.CohereRerank attribute)
model_file (langchain.llms.CTransformers attribute)
model_id (langchain.embeddings.BedrockEmbeddings attribute)
(langchain.embeddings.DeepInfraEmbeddings attribute)
(langchain.embeddings.ModelScopeEmbeddings attribute)
(langchain.embeddings.SelfHostedHuggingFaceEmbeddings attribute)
(langchain.embeddings.SelfHostedHuggingFaceInstructEmbeddings attribute)
(langchain.llms.Bedrock attribute)
(langchain.llms.HuggingFacePipeline attribute)
(langchain.llms.SelfHostedHuggingFaceLLM attribute)
(langchain.llms.Writer attribute)
model_key (langchain.llms.Banana attribute)
model_kwargs (langchain.chat_models.ChatOpenAI attribute)
(langchain.embeddings.BedrockEmbeddings attribute)
(langchain.embeddings.DeepInfraEmbeddings attribute)
(langchain.embeddings.HuggingFaceEmbeddings attribute)
(langchain.embeddings.HuggingFaceHubEmbeddings attribute)
(langchain.embeddings.HuggingFaceInstructEmbeddings attribute)
(langchain.embeddings.SagemakerEndpointEmbeddings attribute)
(langchain.llms.Anyscale attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.Banana attribute)
(langchain.llms.Beam attribute)
(langchain.llms.Bedrock attribute)
(langchain.llms.CerebriumAI attribute)
(langchain.llms.Databricks attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.HuggingFaceEndpoint attribute)


(langchain.llms.HuggingFaceEndpoint attribute)
(langchain.llms.HuggingFaceHub attribute)
(langchain.llms.HuggingFacePipeline attribute)
(langchain.llms.Modal attribute)
(langchain.llms.MosaicML attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenAIChat attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.Petals attribute)
(langchain.llms.PromptLayerOpenAIChat attribute)
(langchain.llms.SagemakerEndpoint attribute)
(langchain.llms.SelfHostedHuggingFaceLLM attribute)
(langchain.llms.StochasticAI attribute)
model_load_fn (langchain.embeddings.SelfHostedHuggingFaceEmbeddings attribute)
(langchain.llms.SelfHostedHuggingFaceLLM attribute)
(langchain.llms.SelfHostedPipeline attribute)
model_name (langchain.chains.OpenAIModerationChain attribute)
(langchain.chat_models.ChatGooglePalm attribute)
(langchain.chat_models.ChatOpenAI attribute)
(langchain.chat_models.ChatVertexAI attribute)
(langchain.embeddings.HuggingFaceEmbeddings attribute)
(langchain.embeddings.HuggingFaceInstructEmbeddings attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.GooglePalm attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.NLPCloud attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenAIChat attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.Petals attribute)
(langchain.llms.PromptLayerOpenAIChat attribute)
(langchain.tools.SteamshipImageGenerationTool attribute)
model_path (langchain.llms.LlamaCpp attribute)
model_reqs (langchain.embeddings.SelfHostedHuggingFaceEmbeddings attribute)


model_reqs (langchain.embeddings.SelfHostedHuggingFaceEmbeddings attribute)
(langchain.embeddings.SelfHostedHuggingFaceInstructEmbeddings attribute)
(langchain.llms.SelfHostedHuggingFaceLLM attribute)
(langchain.llms.SelfHostedPipeline attribute)
model_type (langchain.llms.CTransformers attribute)
model_url (langchain.embeddings.TensorflowHubEmbeddings attribute)
modelname_to_contextsize() (langchain.llms.AzureOpenAI method)
(langchain.llms.OpenAI method)
(langchain.llms.OpenLM method)
(langchain.llms.PromptLayerOpenAI method)
ModernTreasuryLoader (class in langchain.document_loaders)
    module

langchain.agents
langchain.agents.agent_toolkits
langchain.chains
langchain.chat_models
langchain.docstore
langchain.document_loaders
langchain.document_transformers
langchain.embeddings
langchain.llms
langchain.memory
langchain.output_parsers
langchain.prompts
langchain.prompts.example_selector
langchain.python
langchain.retrievers
langchain.retrievers.document_compressors
langchain.serpapi
langchain.text_splitter
langchain.tools
langchain.utilities
langchain.utilities.searx_search
langchain.vectorstores
MomentoChatMessageHistory (class in langchain.memory)
MongoDBAtlasVectorSearch (class in langchain.vectorstores)
MongoDBChatMessageHistory (class in langchain.memory)
moving_summary_buffer (langchain.memory.ConversationSummaryBufferMemory attribute)
MWDumpLoader (class in langchain.document_loaders)
MyScale (class in langchain.vectorstores)
N
n (langchain.chat_models.ChatGooglePalm attribute)
(langchain.chat_models.ChatOpenAI attribute)
(langchain.llms.AlephAlpha attribute)


(langchain.llms.AlephAlpha attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.GooglePalm attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.Writer attribute)
n_batch (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
n_ctx (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
n_gpu_layers (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.LlamaCpp attribute)
n_parts (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
n_predict (langchain.llms.GPT4All attribute)
n_threads (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
name (langchain.agents.agent_toolkits.VectorStoreInfo attribute)
(langchain.experimental.GenerativeAgent attribute)
(langchain.output_parsers.ResponseSchema attribute)
(langchain.tools.BaseTool attribute)
(langchain.tools.ClickTool attribute)
(langchain.tools.CopyFileTool attribute)
(langchain.tools.CurrentWebPageTool attribute)
(langchain.tools.DeleteFileTool attribute)
(langchain.tools.ExtractHyperlinksTool attribute)
(langchain.tools.ExtractTextTool attribute)
(langchain.tools.FileSearchTool attribute)
(langchain.tools.GetElementsTool attribute)
(langchain.tools.GmailCreateDraft attribute)
(langchain.tools.GmailGetMessage attribute)
(langchain.tools.GmailGetThread attribute)


(langchain.tools.GmailGetMessage attribute)
(langchain.tools.GmailGetThread attribute)
(langchain.tools.GmailSearch attribute)
(langchain.tools.GmailSendMessage attribute)
(langchain.tools.ListDirectoryTool attribute)
(langchain.tools.MoveFileTool attribute)
(langchain.tools.NavigateBackTool attribute)
(langchain.tools.NavigateTool attribute)
(langchain.tools.ReadFileTool attribute)
(langchain.tools.ShellTool attribute)
(langchain.tools.Tool attribute)
(langchain.tools.WriteFileTool attribute)
ngql_generation_chain (langchain.chains.NebulaGraphQAChain attribute)
nla_tools (langchain.agents.agent_toolkits.NLAToolkit attribute)
NLTKTextSplitter (class in langchain.text_splitter)
no_update_value (langchain.output_parsers.RegexDictParser attribute)
normalize (langchain.embeddings.AlephAlphaAsymmetricSemanticEmbedding attribute)
(langchain.embeddings.DeepInfraEmbeddings attribute)
NotebookLoader (class in langchain.document_loaders)
NotionDBLoader (class in langchain.document_loaders)
NotionDirectoryLoader (class in langchain.document_loaders)
num_beams (langchain.llms.NLPCloud attribute)
num_pad_tokens (langchain.chains.FlareChain attribute)
num_results (langchain.tools.BingSearchResults attribute)
(langchain.tools.DuckDuckGoSearchResults attribute)
(langchain.tools.GoogleSearchResults attribute)
num_return_sequences (langchain.llms.NLPCloud attribute)
numResults (langchain.llms.AI21 attribute)
O
object_ids (langchain.document_loaders.OneDriveLoader attribute)
observation_prefix (langchain.agents.Agent property)
(langchain.agents.ConversationalAgent property)
(langchain.agents.ConversationalChatAgent property)
(langchain.agents.StructuredChatAgent property)


(langchain.agents.StructuredChatAgent property)
(langchain.agents.ZeroShotAgent property)
ObsidianLoader (class in langchain.document_loaders)
OnlinePDFLoader (class in langchain.document_loaders)
openai_api_base (langchain.chat_models.AzureChatOpenAI attribute)
(langchain.chat_models.ChatOpenAI attribute)
openai_api_key (langchain.chains.OpenAIModerationChain attribute)
(langchain.chat_models.AzureChatOpenAI attribute)
(langchain.chat_models.ChatOpenAI attribute)
openai_api_type (langchain.chat_models.AzureChatOpenAI attribute)
openai_api_version (langchain.chat_models.AzureChatOpenAI attribute)
openai_organization (langchain.chains.OpenAIModerationChain attribute)
(langchain.chat_models.AzureChatOpenAI attribute)
(langchain.chat_models.ChatOpenAI attribute)
openai_proxy (langchain.chat_models.AzureChatOpenAI attribute)
(langchain.chat_models.ChatOpenAI attribute)
OpenSearchVectorSearch (class in langchain.vectorstores)
openweathermap_api_key (langchain.utilities.OpenWeatherMapAPIWrapper attribute)
operation_id (langchain.tools.APIOperation attribute)
other_score_keys (langchain.retrievers.TimeWeightedVectorStoreRetriever attribute)
OutlookMessageLoader (class in langchain.document_loaders)
output (langchain.llms.PredictionGuard attribute)
output_key (langchain.chains.QAGenerationChain attribute)
(langchain.memory.ConversationStringBufferMemory attribute)
output_key_to_format (langchain.output_parsers.RegexDictParser attribute)
output_keys (langchain.chains.ConstitutionalChain property)
(langchain.chains.FlareChain property)
(langchain.chains.HypotheticalDocumentEmbedder property)
(langchain.chains.QAGenerationChain property)
(langchain.experimental.BabyAGI property)


(langchain.experimental.BabyAGI property)
(langchain.output_parsers.RegexParser attribute)
output_parser (langchain.agents.Agent attribute)
(langchain.agents.ConversationalAgent attribute)
(langchain.agents.ConversationalChatAgent attribute)
(langchain.agents.LLMSingleActionAgent attribute)
(langchain.agents.StructuredChatAgent attribute)
(langchain.agents.ZeroShotAgent attribute)
(langchain.chains.FlareChain attribute)
(langchain.prompts.BasePromptTemplate attribute)
output_variables (langchain.chains.TransformChain attribute)
owm (langchain.utilities.OpenWeatherMapAPIWrapper attribute)
P
p (langchain.llms.Cohere attribute)
page_content_field (langchain.document_loaders.FaunaLoader attribute)
page_content_key (langchain.retrievers.RemoteLangChainRetriever attribute)
PagedPDFSplitter (in module langchain.document_loaders)
paginate_request() (langchain.document_loaders.ConfluenceLoader method)
param_mapping (langchain.chains.OpenAPIEndpointChain attribute)
params (langchain.serpapi.SerpAPIWrapper attribute)
(langchain.tools.ZapierNLARunAction attribute)
(langchain.utilities.searx_search.SearxSearchWrapper attribute)
(langchain.utilities.SearxSearchWrapper attribute)
(langchain.utilities.SerpAPIWrapper attribute)
params_schema (langchain.tools.ZapierNLARunAction attribute)
parse() (langchain.agents.AgentOutputParser method)
(langchain.output_parsers.CommaSeparatedListOutputParser method)
(langchain.output_parsers.DatetimeOutputParser method)
(langchain.output_parsers.GuardrailsOutputParser method)
(langchain.output_parsers.ListOutputParser method)
(langchain.output_parsers.OutputFixingParser method)
(langchain.output_parsers.PydanticOutputParser method)


(langchain.output_parsers.PydanticOutputParser method)
(langchain.output_parsers.RegexDictParser method)
(langchain.output_parsers.RegexParser method)
(langchain.output_parsers.RetryOutputParser method)
(langchain.output_parsers.RetryWithErrorOutputParser method)
(langchain.output_parsers.StructuredOutputParser method)
parse_filename() (langchain.document_loaders.BlackboardLoader method)
parse_issue() (langchain.document_loaders.GitHubIssuesLoader method)
parse_obj() (langchain.tools.OpenAPISpec class method)
parse_sitemap() (langchain.document_loaders.SitemapLoader method)
parse_with_prompt() (langchain.output_parsers.RetryOutputParser method)
(langchain.output_parsers.RetryWithErrorOutputParser method)
parser (langchain.output_parsers.OutputFixingParser attribute)
(langchain.output_parsers.RetryOutputParser attribute)
(langchain.output_parsers.RetryWithErrorOutputParser attribute)
partial() (langchain.prompts.BasePromptTemplate method)
(langchain.prompts.ChatPromptTemplate method)
password (langchain.vectorstores.ClickhouseSettings attribute)
(langchain.vectorstores.MyScaleSettings attribute)
patch() (langchain.utilities.TextRequestsWrapper method)
path (langchain.tools.APIOperation attribute)
path_params (langchain.tools.APIOperation property)
pause_to_reflect() (langchain.experimental.GenerativeAgentMemory method)
PDFMinerLoader (class in langchain.document_loaders)
PDFMinerPDFasHTMLLoader (class in langchain.document_loaders)
PDFPlumberLoader (class in langchain.document_loaders)
penalty_alpha_frequency (langchain.llms.RWKV attribute)
penalty_alpha_presence (langchain.llms.RWKV attribute)
penalty_bias (langchain.llms.AlephAlpha attribute)


penalty_bias (langchain.llms.AlephAlpha attribute)
penalty_exceptions (langchain.llms.AlephAlpha attribute)
penalty_exceptions_include_stop_sequences (langchain.llms.AlephAlpha attribute)
persist() (langchain.vectorstores.Chroma method)
(langchain.vectorstores.DeepLake method)
(langchain.vectorstores.SKLearnVectorStore method)
PHP (langchain.text_splitter.Language attribute)
Pinecone (class in langchain.vectorstores)
pipeline_key (langchain.llms.PipelineAI attribute)
pipeline_kwargs (langchain.llms.HuggingFacePipeline attribute)
(langchain.llms.PipelineAI attribute)
pl_tags (langchain.chat_models.PromptLayerChatOpenAI attribute)
plan() (langchain.agents.Agent method)
(langchain.agents.BaseMultiActionAgent method)
(langchain.agents.BaseSingleActionAgent method)
(langchain.agents.LLMSingleActionAgent method)
playwright_strict (langchain.tools.ClickTool attribute)
playwright_timeout (langchain.tools.ClickTool attribute)
PlaywrightURLLoader (class in langchain.document_loaders)
plugin (langchain.tools.AIPluginTool attribute)
port (langchain.vectorstores.ClickhouseSettings attribute)
(langchain.vectorstores.MyScaleSettings attribute)
post() (langchain.utilities.TextRequestsWrapper method)
PostgresChatMessageHistory (class in langchain.memory)
powerbi (langchain.agents.agent_toolkits.PowerBIToolkit attribute)
(langchain.tools.InfoPowerBITool attribute)
(langchain.tools.ListPowerBITool attribute)
(langchain.tools.QueryPowerBITool attribute)
predict() (langchain.chains.LLMChain method)
(langchain.llms.AI21 method)
(langchain.llms.AlephAlpha method)
(langchain.llms.Anthropic method)
(langchain.llms.Anyscale method)


(langchain.llms.Anthropic method)
(langchain.llms.Anyscale method)
(langchain.llms.Aviary method)
(langchain.llms.AzureOpenAI method)
(langchain.llms.Banana method)
(langchain.llms.Baseten method)
(langchain.llms.Beam method)
(langchain.llms.Bedrock method)
(langchain.llms.CerebriumAI method)
(langchain.llms.Cohere method)
(langchain.llms.CTransformers method)
(langchain.llms.Databricks method)
(langchain.llms.DeepInfra method)
(langchain.llms.FakeListLLM method)
(langchain.llms.ForefrontAI method)
(langchain.llms.GooglePalm method)
(langchain.llms.GooseAI method)
(langchain.llms.GPT4All method)
(langchain.llms.HuggingFaceEndpoint method)
(langchain.llms.HuggingFaceHub method)
(langchain.llms.HuggingFacePipeline method)
(langchain.llms.HuggingFaceTextGenInference method)
(langchain.llms.HumanInputLLM method)
(langchain.llms.LlamaCpp method)
(langchain.llms.Modal method)
(langchain.llms.MosaicML method)
(langchain.llms.NLPCloud method)
(langchain.llms.OpenAI method)
(langchain.llms.OpenAIChat method)
(langchain.llms.OpenLM method)
(langchain.llms.Petals method)
(langchain.llms.PipelineAI method)
(langchain.llms.PredictionGuard method)
(langchain.llms.PromptLayerOpenAI method)
(langchain.llms.PromptLayerOpenAIChat method)
(langchain.llms.Replicate method)
(langchain.llms.RWKV method)
(langchain.llms.SagemakerEndpoint method)


(langchain.llms.SagemakerEndpoint method)
(langchain.llms.SelfHostedHuggingFaceLLM method)
(langchain.llms.SelfHostedPipeline method)
(langchain.llms.StochasticAI method)
(langchain.llms.VertexAI method)
(langchain.llms.Writer method)
predict_and_parse() (langchain.chains.LLMChain method)
predict_messages() (langchain.llms.AI21 method)
(langchain.llms.AlephAlpha method)
(langchain.llms.Anthropic method)
(langchain.llms.Anyscale method)
(langchain.llms.Aviary method)
(langchain.llms.AzureOpenAI method)
(langchain.llms.Banana method)
(langchain.llms.Baseten method)
(langchain.llms.Beam method)
(langchain.llms.Bedrock method)
(langchain.llms.CerebriumAI method)
(langchain.llms.Cohere method)
(langchain.llms.CTransformers method)
(langchain.llms.Databricks method)
(langchain.llms.DeepInfra method)
(langchain.llms.FakeListLLM method)
(langchain.llms.ForefrontAI method)
(langchain.llms.GooglePalm method)
(langchain.llms.GooseAI method)
(langchain.llms.GPT4All method)
(langchain.llms.HuggingFaceEndpoint method)
(langchain.llms.HuggingFaceHub method)
(langchain.llms.HuggingFacePipeline method)
(langchain.llms.HuggingFaceTextGenInference method)
(langchain.llms.HumanInputLLM method)
(langchain.llms.LlamaCpp method)
(langchain.llms.Modal method)
(langchain.llms.MosaicML method)
(langchain.llms.NLPCloud method)
(langchain.llms.OpenAI method)


(langchain.llms.NLPCloud method)
(langchain.llms.OpenAI method)
(langchain.llms.OpenAIChat method)
(langchain.llms.OpenLM method)
(langchain.llms.Petals method)
(langchain.llms.PipelineAI method)
(langchain.llms.PredictionGuard method)
(langchain.llms.PromptLayerOpenAI method)
(langchain.llms.PromptLayerOpenAIChat method)
(langchain.llms.Replicate method)
(langchain.llms.RWKV method)
(langchain.llms.SagemakerEndpoint method)
(langchain.llms.SelfHostedHuggingFaceLLM method)
(langchain.llms.SelfHostedPipeline method)
(langchain.llms.StochasticAI method)
(langchain.llms.VertexAI method)
(langchain.llms.Writer method)
prefix (langchain.prompts.FewShotPromptTemplate attribute)
(langchain.prompts.FewShotPromptWithTemplates attribute)
prefix_messages (langchain.llms.OpenAIChat attribute)
(langchain.llms.PromptLayerOpenAIChat attribute)
prep_prompts() (langchain.chains.LLMChain method)
prep_streaming_params() (langchain.llms.AzureOpenAI method)
(langchain.llms.OpenAI method)
(langchain.llms.OpenLM method)
(langchain.llms.PromptLayerOpenAI method)
prepare_cosmos() (langchain.memory.CosmosDBChatMessageHistory method)
presence_penalty (langchain.llms.AlephAlpha attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.Cohere attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.Writer attribute)
presencePenalty (langchain.llms.AI21 attribute)


presencePenalty (langchain.llms.AI21 attribute)
prioritize_tasks() (langchain.experimental.BabyAGI method)
process (langchain.tools.ShellTool attribute)
process_attachment() (langchain.document_loaders.ConfluenceLoader method)
process_doc() (langchain.document_loaders.ConfluenceLoader method)
process_image() (langchain.document_loaders.ConfluenceLoader method)
process_index_results() (langchain.vectorstores.Annoy method)
process_output() (langchain.utilities.BashProcess method)
process_page() (langchain.document_loaders.ConfluenceLoader method)
process_pages() (langchain.document_loaders.ConfluenceLoader method)
process_pdf() (langchain.document_loaders.ConfluenceLoader method)
process_svg() (langchain.document_loaders.ConfluenceLoader method)
process_xls() (langchain.document_loaders.ConfluenceLoader method)
project (langchain.llms.VertexAI attribute)
Prompt (in module langchain.prompts)
prompt (langchain.chains.ConversationChain attribute)
(langchain.chains.LLMBashChain attribute)
(langchain.chains.LLMChain attribute)
(langchain.chains.LLMMathChain attribute)
(langchain.chains.PALChain attribute)
(langchain.chains.SQLDatabaseChain attribute)
prompt_func (langchain.tools.HumanInputRun attribute)
properties (langchain.tools.APIOperation attribute)
PROTO (langchain.text_splitter.Language attribute)
prune() (langchain.memory.ConversationSummaryBufferMemory method)
PsychicLoader (class in langchain.document_loaders)
put() (langchain.utilities.TextRequestsWrapper method)
pydantic_object (langchain.output_parsers.PydanticOutputParser attribute)
PyMuPDFLoader (class in langchain.document_loaders)
PyPDFDirectoryLoader (class in langchain.document_loaders)


PyPDFDirectoryLoader (class in langchain.document_loaders)
PyPDFium2Loader (class in langchain.document_loaders)
PyPDFLoader (class in langchain.document_loaders)
PySparkDataFrameLoader (class in langchain.document_loaders)
PYTHON (langchain.text_splitter.Language attribute)
python_globals (langchain.chains.PALChain attribute)
python_locals (langchain.chains.PALChain attribute)
PythonCodeTextSplitter (class in langchain.text_splitter)
PythonLoader (class in langchain.document_loaders)
Q
qa_chain (langchain.chains.GraphCypherQAChain attribute)
(langchain.chains.GraphQAChain attribute)
(langchain.chains.NebulaGraphQAChain attribute)
Qdrant (class in langchain.vectorstores)
query (langchain.document_loaders.FaunaLoader attribute)
query_checker_prompt (langchain.chains.SQLDatabaseChain attribute)
query_instruction (langchain.embeddings.DeepInfraEmbeddings attribute)
(langchain.embeddings.HuggingFaceInstructEmbeddings attribute)
(langchain.embeddings.MosaicMLInstructorEmbeddings attribute)
(langchain.embeddings.SelfHostedHuggingFaceInstructEmbeddings attribute)
query_name (langchain.vectorstores.SupabaseVectorStore attribute)
query_params (langchain.document_loaders.GitHubIssuesLoader property)
(langchain.tools.APIOperation property)
query_suffix (langchain.utilities.searx_search.SearxSearchWrapper attribute)
(langchain.utilities.SearxSearchWrapper attribute)
question_generator_chain (langchain.chains.FlareChain attribute)
question_to_checked_assertions_chain (langchain.chains.LLMCheckerChain attribute)
R
raw_completion (langchain.llms.AlephAlpha attribute)
REACT_DOCSTORE (langchain.agents.AgentType attribute)


REACT_DOCSTORE (langchain.agents.AgentType attribute)
ReadTheDocsLoader (class in langchain.document_loaders)
recall_ttl (langchain.memory.RedisEntityStore attribute)
recursive (langchain.document_loaders.GoogleDriveLoader attribute)
RecursiveCharacterTextSplitter (class in langchain.text_splitter)
RedditPostsLoader (class in langchain.document_loaders)
Redis (class in langchain.vectorstores)
redis_client (langchain.memory.RedisEntityStore attribute)
RedisChatMessageHistory (class in langchain.memory)
reduce_k_below_max_tokens (langchain.chains.RetrievalQAWithSourcesChain attribute)
(langchain.chains.VectorDBQAWithSourcesChain attribute)
reflection_threshold (langchain.experimental.GenerativeAgentMemory attribute)
regex (langchain.output_parsers.RegexParser attribute)
regex_pattern (langchain.output_parsers.RegexDictParser attribute)
region (langchain.utilities.DuckDuckGoSearchAPIWrapper attribute)
region_name (langchain.embeddings.BedrockEmbeddings attribute)
(langchain.embeddings.SagemakerEndpointEmbeddings attribute)
(langchain.llms.Bedrock attribute)
(langchain.llms.SagemakerEndpoint attribute)
relevancy_threshold (langchain.retrievers.KNNRetriever attribute)
(langchain.retrievers.SVMRetriever attribute)
remove_end_sequence (langchain.llms.NLPCloud attribute)
remove_input (langchain.llms.NLPCloud attribute)
repeat_last_n (langchain.llms.GPT4All attribute)
repeat_penalty (langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
repetition_penalties_include_completion (langchain.llms.AlephAlpha attribute)
repetition_penalties_include_prompt (langchain.llms.AlephAlpha attribute)


repetition_penalties_include_prompt (langchain.llms.AlephAlpha attribute)
repetition_penalty (langchain.llms.ForefrontAI attribute)
(langchain.llms.NLPCloud attribute)
(langchain.llms.Writer attribute)
repo_id (langchain.embeddings.HuggingFaceHubEmbeddings attribute)
(langchain.llms.HuggingFaceHub attribute)
request_body (langchain.tools.APIOperation attribute)
request_timeout (langchain.chat_models.ChatOpenAI attribute)
(langchain.embeddings.OpenAIEmbeddings attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenLM attribute)
request_url (langchain.utilities.PowerBIDataset property)
requests (langchain.chains.OpenAPIEndpointChain attribute)
(langchain.utilities.TextRequestsWrapper property)
requests_kwargs (langchain.document_loaders.WebBaseLoader attribute)
requests_per_second (langchain.document_loaders.WebBaseLoader attribute)
requests_wrapper (langchain.agents.agent_toolkits.OpenAPIToolkit attribute)
(langchain.chains.APIChain attribute)
(langchain.chains.LLMRequestsChain attribute)
response_chain (langchain.chains.FlareChain attribute)
response_key (langchain.retrievers.RemoteLangChainRetriever attribute)
response_schemas (langchain.output_parsers.StructuredOutputParser attribute)
results() (langchain.serpapi.SerpAPIWrapper method)
(langchain.utilities.BingSearchAPIWrapper method)
(langchain.utilities.DuckDuckGoSearchAPIWrapper method)
(langchain.utilities.GoogleSearchAPIWrapper method)
(langchain.utilities.GoogleSerperAPIWrapper method)
(langchain.utilities.MetaphorSearchAPIWrapper method)
(langchain.utilities.searx_search.SearxSearchWrapper method)
(langchain.utilities.SearxSearchWrapper method)
(langchain.utilities.SerpAPIWrapper method)


(langchain.utilities.SerpAPIWrapper method)
results_async() (langchain.utilities.MetaphorSearchAPIWrapper method)
retrieve_article() (langchain.utilities.PubMedAPIWrapper method)
retriever (langchain.chains.ConversationalRetrievalChain attribute)
(langchain.chains.FlareChain attribute)
(langchain.chains.RetrievalQA attribute)
(langchain.chains.RetrievalQAWithSourcesChain attribute)
(langchain.memory.VectorStoreRetrieverMemory attribute)
retry_chain (langchain.output_parsers.OutputFixingParser attribute)
(langchain.output_parsers.RetryOutputParser attribute)
(langchain.output_parsers.RetryWithErrorOutputParser attribute)
retry_sleep (langchain.embeddings.MosaicMLInstructorEmbeddings attribute)
(langchain.llms.MosaicML attribute)
return_all (langchain.chains.SequentialChain attribute)
return_direct (langchain.chains.GraphCypherQAChain attribute)
(langchain.chains.SQLDatabaseChain attribute)
(langchain.tools.BaseTool attribute)
(langchain.tools.Tool attribute)
return_docs (langchain.memory.VectorStoreRetrieverMemory attribute)
return_intermediate_steps (langchain.agents.AgentExecutor attribute)
(langchain.chains.ConstitutionalChain attribute)
(langchain.chains.GraphCypherQAChain attribute)
(langchain.chains.OpenAPIEndpointChain attribute)
(langchain.chains.PALChain attribute)
(langchain.chains.SQLDatabaseChain attribute)
(langchain.chains.SQLDatabaseSequentialChain attribute)
return_pl_id (langchain.chat_models.PromptLayerChatOpenAI attribute)
return_stopped_response() (langchain.agents.Agent method)
(langchain.agents.BaseMultiActionAgent method)
(langchain.agents.BaseSingleActionAgent method)
return_urls (langchain.tools.SteamshipImageGenerationTool attribute)
return_values (langchain.agents.Agent property)


return_values (langchain.agents.Agent property)
(langchain.agents.BaseMultiActionAgent property)
(langchain.agents.BaseSingleActionAgent property)
revised_answer_prompt (langchain.chains.LLMCheckerChain attribute)
revised_summary_prompt (langchain.chains.LLMSummarizationCheckerChain attribute)
revision_chain (langchain.chains.ConstitutionalChain attribute)
RoamLoader (class in langchain.document_loaders)
root_dir (langchain.agents.agent_toolkits.FileManagementToolkit attribute)
RST (langchain.text_splitter.Language attribute)
RUBY (langchain.text_splitter.Language attribute)
run() (langchain.python.PythonREPL method)
(langchain.serpapi.SerpAPIWrapper method)
(langchain.tools.BaseTool method)
(langchain.utilities.ArxivAPIWrapper method)
(langchain.utilities.BashProcess method)
(langchain.utilities.BingSearchAPIWrapper method)
(langchain.utilities.DuckDuckGoSearchAPIWrapper method)
(langchain.utilities.GooglePlacesAPIWrapper method)
(langchain.utilities.GoogleSearchAPIWrapper method)
(langchain.utilities.GoogleSerperAPIWrapper method)
(langchain.utilities.GraphQLAPIWrapper method)
(langchain.utilities.LambdaWrapper method)
(langchain.utilities.OpenWeatherMapAPIWrapper method)
(langchain.utilities.PowerBIDataset method)
(langchain.utilities.PubMedAPIWrapper method)
(langchain.utilities.PythonREPL method)
(langchain.utilities.searx_search.SearxSearchWrapper method)
(langchain.utilities.SearxSearchWrapper method)
(langchain.utilities.SerpAPIWrapper method)
(langchain.utilities.SparkSQL method)
(langchain.utilities.TwilioAPIWrapper method)
(langchain.utilities.WikipediaAPIWrapper method)
(langchain.utilities.WolframAlphaAPIWrapper method)
run_creation() (langchain.llms.Beam method)


run_creation() (langchain.llms.Beam method)
run_no_throw() (langchain.utilities.SparkSQL method)
RUST (langchain.text_splitter.Language attribute)
rwkv_verbose (langchain.llms.RWKV attribute)
S
S3DirectoryLoader (class in langchain.document_loaders)
S3FileLoader (class in langchain.document_loaders)
safesearch (langchain.utilities.DuckDuckGoSearchAPIWrapper attribute)
sample_rows_in_table_info (langchain.utilities.PowerBIDataset attribute)
save() (langchain.agents.AgentExecutor method)
(langchain.agents.BaseMultiActionAgent method)
(langchain.agents.BaseSingleActionAgent method)
(langchain.llms.AI21 method)
(langchain.llms.AlephAlpha method)
(langchain.llms.Anthropic method)
(langchain.llms.Anyscale method)
(langchain.llms.Aviary method)
(langchain.llms.AzureOpenAI method)
(langchain.llms.Banana method)
(langchain.llms.Baseten method)
(langchain.llms.Beam method)
(langchain.llms.Bedrock method)
(langchain.llms.CerebriumAI method)
(langchain.llms.Cohere method)
(langchain.llms.CTransformers method)
(langchain.llms.Databricks method)
(langchain.llms.DeepInfra method)
(langchain.llms.FakeListLLM method)
(langchain.llms.ForefrontAI method)
(langchain.llms.GooglePalm method)
(langchain.llms.GooseAI method)
(langchain.llms.GPT4All method)
(langchain.llms.HuggingFaceEndpoint method)
(langchain.llms.HuggingFaceHub method)
(langchain.llms.HuggingFacePipeline method)


(langchain.llms.HuggingFacePipeline method)
(langchain.llms.HuggingFaceTextGenInference method)
(langchain.llms.HumanInputLLM method)
(langchain.llms.LlamaCpp method)
(langchain.llms.Modal method)
(langchain.llms.MosaicML method)
(langchain.llms.NLPCloud method)
(langchain.llms.OpenAI method)
(langchain.llms.OpenAIChat method)
(langchain.llms.OpenLM method)
(langchain.llms.Petals method)
(langchain.llms.PipelineAI method)
(langchain.llms.PredictionGuard method)
(langchain.llms.PromptLayerOpenAI method)
(langchain.llms.PromptLayerOpenAIChat method)
(langchain.llms.Replicate method)
(langchain.llms.RWKV method)
(langchain.llms.SagemakerEndpoint method)
(langchain.llms.SelfHostedHuggingFaceLLM method)
(langchain.llms.SelfHostedPipeline method)
(langchain.llms.StochasticAI method)
(langchain.llms.VertexAI method)
(langchain.llms.Writer method)
(langchain.prompts.BasePromptTemplate method)
(langchain.prompts.ChatPromptTemplate method)
save_agent() (langchain.agents.AgentExecutor method)
save_context() (langchain.experimental.GenerativeAgentMemory method)
(langchain.memory.CombinedMemory method)
(langchain.memory.ConversationEntityMemory method)
(langchain.memory.ConversationKGMemory method)
(langchain.memory.ConversationStringBufferMemory method)
(langchain.memory.ConversationSummaryBufferMemory method)
(langchain.memory.ConversationSummaryMemory method)
(langchain.memory.ConversationTokenBufferMemory method)
(langchain.memory.ReadOnlySharedMemory method)
(langchain.memory.SimpleMemory method)
(langchain.memory.VectorStoreRetrieverMemory method)


(langchain.memory.SimpleMemory method)
(langchain.memory.VectorStoreRetrieverMemory method)
save_local() (langchain.vectorstores.Annoy method)
(langchain.vectorstores.FAISS method)
SCALA (langchain.text_splitter.Language attribute)
schemas (langchain.utilities.PowerBIDataset attribute)
scrape() (langchain.document_loaders.WebBaseLoader method)
scrape_all() (langchain.document_loaders.WebBaseLoader method)
scrape_page() (langchain.tools.ExtractHyperlinksTool static method)
search() (langchain.docstore.InMemoryDocstore method)
(langchain.docstore.Wikipedia method)
(langchain.vectorstores.VectorStore method)
search_index (langchain.vectorstores.Tigris property)
search_kwargs (langchain.chains.ChatVectorDBChain attribute)
(langchain.chains.VectorDBQA attribute)
(langchain.chains.VectorDBQAWithSourcesChain attribute)
(langchain.retrievers.SelfQueryRetriever attribute)
(langchain.retrievers.TimeWeightedVectorStoreRetriever attribute)
search_type (langchain.chains.VectorDBQA attribute)
(langchain.retrievers.SelfQueryRetriever attribute)
search_wrapper (langchain.tools.BraveSearch attribute)
searx_host (langchain.utilities.searx_search.SearxSearchWrapper attribute)
(langchain.utilities.SearxSearchWrapper attribute)
SearxResults (class in langchain.utilities.searx_search)
secret (langchain.document_loaders.FaunaLoader attribute)
seed (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
select_examples() (langchain.prompts.example_selector.LengthBasedExampleSelector method)
(langchain.prompts.example_selector.MaxMarginalRelevanceExampleSelector method)


(langchain.prompts.example_selector.MaxMarginalRelevanceExampleSelector method)
(langchain.prompts.example_selector.SemanticSimilarityExampleSelector method)
selected_tools (langchain.agents.agent_toolkits.FileManagementToolkit attribute)
SeleniumURLLoader (class in langchain.document_loaders)
SELF_ASK_WITH_SEARCH (langchain.agents.AgentType attribute)
send_pdf() (langchain.document_loaders.MathpixPDFLoader method)
SentenceTransformerEmbeddings (in module langchain.embeddings)
SentenceTransformersTokenTextSplitter (class in langchain.text_splitter)
sequential_chain (langchain.chains.LLMSummarizationCheckerChain attribute)
serpapi_api_key (langchain.serpapi.SerpAPIWrapper attribute)
(langchain.utilities.SerpAPIWrapper attribute)
serper_api_key (langchain.utilities.GoogleSerperAPIWrapper attribute)
service_account_key (langchain.document_loaders.GoogleDriveLoader attribute)
service_account_path (langchain.document_loaders.GoogleApiClient attribute)
service_name (langchain.retrievers.AzureCognitiveSearchRetriever attribute)
session_cache (langchain.tools.QueryPowerBITool attribute)
session_id (langchain.memory.RedisEntityStore attribute)
(langchain.memory.SQLiteEntityStore attribute)
set() (langchain.memory.InMemoryEntityStore method)
(langchain.memory.RedisEntityStore method)
(langchain.memory.SQLiteEntityStore method)
settings (langchain.document_loaders.OneDriveLoader attribute)
similarity_fn (langchain.document_transformers.EmbeddingsRedundantFilter attribute)
(langchain.retrievers.document_compressors.EmbeddingsFilter attribute)
similarity_search() (langchain.vectorstores.AnalyticDB method)
(langchain.vectorstores.Annoy method)
(langchain.vectorstores.AtlasDB method)
(langchain.vectorstores.AwaDB method)
(langchain.vectorstores.Chroma method)


(langchain.vectorstores.AwaDB method)
(langchain.vectorstores.Chroma method)
(langchain.vectorstores.Clickhouse method)
(langchain.vectorstores.DeepLake method)
(langchain.vectorstores.ElasticVectorSearch method)
(langchain.vectorstores.FAISS method)
(langchain.vectorstores.LanceDB method)
(langchain.vectorstores.MatchingEngine method)
(langchain.vectorstores.Milvus method)
(langchain.vectorstores.MongoDBAtlasVectorSearch method)
(langchain.vectorstores.MyScale method)
(langchain.vectorstores.OpenSearchVectorSearch method)
(langchain.vectorstores.Pinecone method)
(langchain.vectorstores.Qdrant method)
(langchain.vectorstores.Redis method)
(langchain.vectorstores.SingleStoreDB method)
(langchain.vectorstores.SKLearnVectorStore method)
(langchain.vectorstores.SupabaseVectorStore method)
(langchain.vectorstores.Tair method)
(langchain.vectorstores.Tigris method)
(langchain.vectorstores.Typesense method)
(langchain.vectorstores.Vectara method)
(langchain.vectorstores.VectorStore method)
(langchain.vectorstores.Weaviate method)
similarity_search_by_index() (langchain.vectorstores.Annoy method)
similarity_search_by_text() (langchain.vectorstores.Weaviate method)
similarity_search_by_vector() (langchain.vectorstores.AnalyticDB method)
(langchain.vectorstores.Annoy method)
(langchain.vectorstores.AwaDB method)
(langchain.vectorstores.Chroma method)
(langchain.vectorstores.Clickhouse method)
(langchain.vectorstores.DeepLake method)
(langchain.vectorstores.FAISS method)
(langchain.vectorstores.Milvus method)
(langchain.vectorstores.MyScale method)
(langchain.vectorstores.SupabaseVectorStore method)
(langchain.vectorstores.VectorStore method)
(langchain.vectorstores.Weaviate method)


(langchain.vectorstores.VectorStore method)
(langchain.vectorstores.Weaviate method)
similarity_search_by_vector_returning_embeddings() (langchain.vectorstores.SupabaseVectorStore method)
similarity_search_by_vector_with_relevance_scores() (langchain.vectorstores.SupabaseVectorStore method)
similarity_search_limit_score() (langchain.vectorstores.Redis method)
similarity_search_with_relevance_scores() (langchain.vectorstores.AwaDB method)
(langchain.vectorstores.Clickhouse method)
(langchain.vectorstores.MyScale method)
(langchain.vectorstores.SupabaseVectorStore method)
(langchain.vectorstores.VectorStore method)
similarity_search_with_score() (langchain.vectorstores.AnalyticDB method)
(langchain.vectorstores.Annoy method)
(langchain.vectorstores.AwaDB method)
(langchain.vectorstores.Chroma method)
(langchain.vectorstores.DeepLake method)
(langchain.vectorstores.ElasticVectorSearch method)
(langchain.vectorstores.FAISS method)
(langchain.vectorstores.Milvus method)
(langchain.vectorstores.MongoDBAtlasVectorSearch method)
(langchain.vectorstores.OpenSearchVectorSearch method)
(langchain.vectorstores.Pinecone method)
(langchain.vectorstores.Qdrant method)
(langchain.vectorstores.Redis method)
(langchain.vectorstores.SingleStoreDB method)
(langchain.vectorstores.SKLearnVectorStore method)
(langchain.vectorstores.Tigris method)
(langchain.vectorstores.Typesense method)
(langchain.vectorstores.Vectara method)
(langchain.vectorstores.Weaviate method)
similarity_search_with_score_by_index() (langchain.vectorstores.Annoy method)
similarity_search_with_score_by_vector() (langchain.vectorstores.AnalyticDB method)
(langchain.vectorstores.Annoy method)
(langchain.vectorstores.FAISS method)


(langchain.vectorstores.Annoy method)
(langchain.vectorstores.FAISS method)
(langchain.vectorstores.Milvus method)
similarity_threshold (langchain.document_transformers.EmbeddingsRedundantFilter attribute)
(langchain.retrievers.document_compressors.EmbeddingsFilter attribute)
since (langchain.document_loaders.GitHubIssuesLoader attribute)
SingleStoreDB (class in langchain.vectorstores)
SitemapLoader (class in langchain.document_loaders)
siterestrict (langchain.utilities.GoogleSearchAPIWrapper attribute)
size (langchain.tools.SteamshipImageGenerationTool attribute)
SKLearnVectorStore (class in langchain.vectorstores)
SlackDirectoryLoader (class in langchain.document_loaders)
SnowflakeLoader (class in langchain.document_loaders)
sort (langchain.document_loaders.GitHubIssuesLoader attribute)
SpacyTextSplitter (class in langchain.text_splitter)
SparkSQL (class in langchain.utilities)
sparse_encoder (langchain.retrievers.PineconeHybridSearchRetriever attribute)
spec (langchain.agents.agent_toolkits.JsonToolkit attribute)
split_documents() (langchain.text_splitter.TextSplitter method)
split_text() (langchain.text_splitter.CharacterTextSplitter method)
(langchain.text_splitter.NLTKTextSplitter method)
(langchain.text_splitter.RecursiveCharacterTextSplitter method)
(langchain.text_splitter.SentenceTransformersTokenTextSplitter method)
(langchain.text_splitter.SpacyTextSplitter method)
(langchain.text_splitter.TextSplitter method)
(langchain.text_splitter.TokenTextSplitter method)
split_text_on_tokens() (in module langchain.text_splitter)
SpreedlyLoader (class in langchain.document_loaders)
sql_chain (langchain.chains.SQLDatabaseSequentialChain attribute)


sql_chain (langchain.chains.SQLDatabaseSequentialChain attribute)
SRTLoader (class in langchain.document_loaders)
start_with_retrieval (langchain.chains.FlareChain attribute)
state (langchain.document_loaders.GitHubIssuesLoader attribute)
status (langchain.experimental.GenerativeAgent attribute)
steamship (langchain.tools.SteamshipImageGenerationTool attribute)
stop (langchain.agents.LLMSingleActionAgent attribute)
(langchain.chains.PALChain attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
(langchain.llms.VertexAI attribute)
(langchain.llms.Writer attribute)
stop_sequences (langchain.llms.AlephAlpha attribute)
store (langchain.memory.InMemoryEntityStore attribute)
strategy (langchain.llms.RWKV attribute)
stream() (langchain.llms.Anthropic method)
(langchain.llms.AzureOpenAI method)
(langchain.llms.LlamaCpp method)
(langchain.llms.OpenAI method)
(langchain.llms.OpenLM method)
(langchain.llms.PromptLayerOpenAI method)
streaming (langchain.chat_models.ChatOpenAI attribute)
(langchain.llms.Anthropic attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenAIChat attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.PromptLayerOpenAIChat attribute)
strip_outputs (langchain.chains.SimpleSequentialChain attribute)
StripeLoader (class in langchain.document_loaders)
STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION (langchain.agents.AgentType attribute)


STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION (langchain.agents.AgentType attribute)
structured_query_translator (langchain.retrievers.SelfQueryRetriever attribute)
suffix (langchain.llms.LlamaCpp attribute)
(langchain.prompts.FewShotPromptTemplate attribute)
(langchain.prompts.FewShotPromptWithTemplates attribute)
summarize_related_memories() (langchain.experimental.GenerativeAgent method)
summary (langchain.experimental.GenerativeAgent attribute)
summary_message_cls (langchain.memory.ConversationKGMemory attribute)
summary_refresh_seconds (langchain.experimental.GenerativeAgent attribute)
SupabaseVectorStore (class in langchain.vectorstores)
SWIFT (langchain.text_splitter.Language attribute)
sync_browser (langchain.agents.agent_toolkits.PlayWrightBrowserToolkit attribute)
T
table (langchain.vectorstores.ClickhouseSettings attribute)
(langchain.vectorstores.MyScaleSettings attribute)
table_info (langchain.utilities.PowerBIDataset property)
table_name (langchain.memory.SQLiteEntityStore attribute)
(langchain.vectorstores.SupabaseVectorStore attribute)
table_names (langchain.utilities.PowerBIDataset attribute)
Tair (class in langchain.vectorstores)
task (langchain.embeddings.HuggingFaceHubEmbeddings attribute)
(langchain.llms.HuggingFaceEndpoint attribute)
(langchain.llms.HuggingFaceHub attribute)
(langchain.llms.SelfHostedHuggingFaceLLM attribute)
tbs (langchain.utilities.GoogleSerperAPIWrapper attribute)
TelegramChatApiLoader (class in langchain.document_loaders)
TelegramChatFileLoader (class in langchain.document_loaders)
TelegramChatLoader (in module langchain.document_loaders)
temp (langchain.llms.GPT4All attribute)
temperature (langchain.chat_models.ChatGooglePalm attribute)


temperature (langchain.chat_models.ChatGooglePalm attribute)
(langchain.chat_models.ChatOpenAI attribute)
(langchain.llms.AI21 attribute)
(langchain.llms.AlephAlpha attribute)
(langchain.llms.Anthropic attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.Cohere attribute)
(langchain.llms.ForefrontAI attribute)
(langchain.llms.GooglePalm attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.LlamaCpp attribute)
(langchain.llms.NLPCloud attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.Petals attribute)
(langchain.llms.PredictionGuard attribute)
(langchain.llms.RWKV attribute)
(langchain.llms.VertexAI attribute)
(langchain.llms.Writer attribute)
template (langchain.prompts.PromptTemplate attribute)
(langchain.tools.QueryPowerBITool attribute)
template_format (langchain.prompts.FewShotPromptTemplate attribute)
(langchain.prompts.FewShotPromptWithTemplates attribute)
(langchain.prompts.PromptTemplate attribute)
template_tool_response (langchain.agents.ConversationalChatAgent attribute)
text_length (langchain.chains.LLMRequestsChain attribute)
text_splitter (langchain.chains.AnalyzeDocumentChain attribute)
(langchain.chains.MapReduceChain attribute)
(langchain.chains.QAGenerationChain attribute)
TextLoader (class in langchain.document_loaders)
texts (langchain.retrievers.KNNRetriever attribute)
(langchain.retrievers.SVMRetriever attribute)
TextSplitter (class in langchain.text_splitter)
tfidf_array (langchain.retrievers.TFIDFRetriever attribute)
Tigris (class in langchain.vectorstores)


Tigris (class in langchain.vectorstores)
time (langchain.utilities.DuckDuckGoSearchAPIWrapper attribute)
to_typescript() (langchain.tools.APIOperation method)
token (langchain.llms.PredictionGuard attribute)
(langchain.utilities.PowerBIDataset attribute)
token_path (langchain.document_loaders.GoogleApiClient attribute)
(langchain.document_loaders.GoogleDriveLoader attribute)
Tokenizer (class in langchain.text_splitter)
tokenizer (langchain.llms.Petals attribute)
tokens (langchain.llms.AlephAlpha attribute)
tokens_path (langchain.llms.RWKV attribute)
tokens_per_chunk (langchain.text_splitter.Tokenizer attribute)
TokenTextSplitter (class in langchain.text_splitter)
ToMarkdownLoader (class in langchain.document_loaders)
TomlLoader (class in langchain.document_loaders)
tool() (in module langchain.agents)
(in module langchain.tools)
tool_run_logging_kwargs() (langchain.agents.Agent method)
(langchain.agents.BaseMultiActionAgent method)
(langchain.agents.BaseSingleActionAgent method)
(langchain.agents.LLMSingleActionAgent method)
tools (langchain.agents.agent_toolkits.JiraToolkit attribute)
(langchain.agents.agent_toolkits.ZapierToolkit attribute)
(langchain.agents.AgentExecutor attribute)
top_k (langchain.chains.GraphCypherQAChain attribute)
(langchain.chains.SQLDatabaseChain attribute)
(langchain.chat_models.ChatGooglePalm attribute)
(langchain.llms.AlephAlpha attribute)
(langchain.llms.Anthropic attribute)
(langchain.llms.ForefrontAI attribute)
(langchain.llms.GooglePalm attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)


(langchain.llms.LlamaCpp attribute)
(langchain.llms.NLPCloud attribute)
(langchain.llms.Petals attribute)
(langchain.llms.VertexAI attribute)
(langchain.retrievers.ChatGPTPluginRetriever attribute)
(langchain.retrievers.DataberryRetriever attribute)
(langchain.retrievers.PineconeHybridSearchRetriever attribute)
top_k_docs_for_context (langchain.chains.ChatVectorDBChain attribute)
top_k_results (langchain.utilities.ArxivAPIWrapper attribute)
(langchain.utilities.GooglePlacesAPIWrapper attribute)
(langchain.utilities.PubMedAPIWrapper attribute)
(langchain.utilities.WikipediaAPIWrapper attribute)
top_n (langchain.retrievers.document_compressors.CohereRerank attribute)
top_p (langchain.chat_models.ChatGooglePalm attribute)
(langchain.llms.AlephAlpha attribute)
(langchain.llms.Anthropic attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.ForefrontAI attribute)
(langchain.llms.GooglePalm attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
(langchain.llms.NLPCloud attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.Petals attribute)
(langchain.llms.RWKV attribute)
(langchain.llms.VertexAI attribute)
(langchain.llms.Writer attribute)
topP (langchain.llms.AI21 attribute)
traits (langchain.experimental.GenerativeAgent attribute)
transform (langchain.chains.TransformChain attribute)
transform_documents() (langchain.document_transformers.EmbeddingsRedundantFilter method)
(langchain.text_splitter.TextSplitter method)


(langchain.text_splitter.TextSplitter method)
transform_input_fn (langchain.llms.Databricks attribute)
transform_output_fn (langchain.llms.Databricks attribute)
transformers (langchain.retrievers.document_compressors.DocumentCompressorPipeline attribute)
TrelloLoader (class in langchain.document_loaders)
truncate (langchain.embeddings.CohereEmbeddings attribute)
(langchain.llms.Cohere attribute)
ts_type_from_python() (langchain.tools.APIOperation static method)
ttl (langchain.memory.RedisEntityStore attribute)
tuned_model_name (langchain.llms.VertexAI attribute)
TwitterTweetLoader (class in langchain.document_loaders)
type (langchain.output_parsers.ResponseSchema attribute)
(langchain.utilities.GoogleSerperAPIWrapper attribute)
Typesense (class in langchain.vectorstores)
U
unsecure (langchain.utilities.searx_search.SearxSearchWrapper attribute)
(langchain.utilities.SearxSearchWrapper attribute)
UnstructuredAPIFileIOLoader (class in langchain.document_loaders)
UnstructuredAPIFileLoader (class in langchain.document_loaders)
UnstructuredCSVLoader (class in langchain.document_loaders)
UnstructuredEmailLoader (class in langchain.document_loaders)
UnstructuredEPubLoader (class in langchain.document_loaders)
UnstructuredExcelLoader (class in langchain.document_loaders)
UnstructuredFileIOLoader (class in langchain.document_loaders)
UnstructuredFileLoader (class in langchain.document_loaders)
UnstructuredHTMLLoader (class in langchain.document_loaders)
UnstructuredImageLoader (class in langchain.document_loaders)
UnstructuredMarkdownLoader (class in langchain.document_loaders)
UnstructuredODTLoader (class in langchain.document_loaders)


UnstructuredODTLoader (class in langchain.document_loaders)
UnstructuredPDFLoader (class in langchain.document_loaders)
UnstructuredPowerPointLoader (class in langchain.document_loaders)
UnstructuredRTFLoader (class in langchain.document_loaders)
UnstructuredURLLoader (class in langchain.document_loaders)
UnstructuredWordDocumentLoader (class in langchain.document_loaders)
UnstructuredXMLLoader (class in langchain.document_loaders)
update_document() (langchain.vectorstores.Chroma method)
update_forward_refs() (langchain.llms.AI21 class method)
(langchain.llms.AlephAlpha class method)
(langchain.llms.Anthropic class method)
(langchain.llms.Anyscale class method)
(langchain.llms.Aviary class method)
(langchain.llms.AzureOpenAI class method)
(langchain.llms.Banana class method)
(langchain.llms.Baseten class method)
(langchain.llms.Beam class method)
(langchain.llms.Bedrock class method)
(langchain.llms.CerebriumAI class method)
(langchain.llms.Cohere class method)
(langchain.llms.CTransformers class method)
(langchain.llms.Databricks class method)
(langchain.llms.DeepInfra class method)
(langchain.llms.FakeListLLM class method)
(langchain.llms.ForefrontAI class method)
(langchain.llms.GooglePalm class method)
(langchain.llms.GooseAI class method)
(langchain.llms.GPT4All class method)
(langchain.llms.HuggingFaceEndpoint class method)
(langchain.llms.HuggingFaceHub class method)
(langchain.llms.HuggingFacePipeline class method)
(langchain.llms.HuggingFaceTextGenInference class method)


(langchain.llms.HuggingFaceTextGenInference class method)
(langchain.llms.HumanInputLLM class method)
(langchain.llms.LlamaCpp class method)
(langchain.llms.Modal class method)
(langchain.llms.MosaicML class method)
(langchain.llms.NLPCloud class method)
(langchain.llms.OpenAI class method)
(langchain.llms.OpenAIChat class method)
(langchain.llms.OpenLM class method)
(langchain.llms.Petals class method)
(langchain.llms.PipelineAI class method)
(langchain.llms.PredictionGuard class method)
(langchain.llms.PromptLayerOpenAI class method)
(langchain.llms.PromptLayerOpenAIChat class method)
(langchain.llms.Replicate class method)
(langchain.llms.RWKV class method)
(langchain.llms.SagemakerEndpoint class method)
(langchain.llms.SelfHostedHuggingFaceLLM class method)
(langchain.llms.SelfHostedPipeline class method)
(langchain.llms.StochasticAI class method)
(langchain.llms.VertexAI class method)
(langchain.llms.Writer class method)
upsert_messages() (langchain.memory.CosmosDBChatMessageHistory method)
url (langchain.document_loaders.GitHubIssuesLoader property)
(langchain.document_loaders.MathpixPDFLoader property)
(langchain.llms.Beam attribute)
(langchain.retrievers.ChatGPTPluginRetriever attribute)
(langchain.retrievers.RemoteLangChainRetriever attribute)
(langchain.tools.IFTTTWebhook attribute)
urls (langchain.document_loaders.PlaywrightURLLoader attribute)
(langchain.document_loaders.SeleniumURLLoader attribute)
use_mlock (langchain.embeddings.LlamaCppEmbeddings attribute)


use_mlock (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
use_mmap (langchain.llms.LlamaCpp attribute)
use_multiplicative_presence_penalty (langchain.llms.AlephAlpha attribute)
use_query_checker (langchain.chains.SQLDatabaseChain attribute)
username (langchain.vectorstores.ClickhouseSettings attribute)
(langchain.vectorstores.MyScaleSettings attribute)
V
validate_channel_or_videoIds_is_set() (langchain.document_loaders.GoogleApiClient class method)
(langchain.document_loaders.GoogleApiYoutubeLoader class method)
validate_init_args() (langchain.document_loaders.ConfluenceLoader static method)
validate_template (langchain.prompts.FewShotPromptTemplate attribute)
(langchain.prompts.FewShotPromptWithTemplates attribute)
(langchain.prompts.PromptTemplate attribute)
Vectara (class in langchain.vectorstores)
vector_field (langchain.vectorstores.SingleStoreDB attribute)
vectorizer (langchain.retrievers.TFIDFRetriever attribute)
VectorStore (class in langchain.vectorstores)
vectorstore (langchain.agents.agent_toolkits.VectorStoreInfo attribute)
(langchain.chains.ChatVectorDBChain attribute)
(langchain.chains.VectorDBQA attribute)
(langchain.chains.VectorDBQAWithSourcesChain attribute)
(langchain.prompts.example_selector.SemanticSimilarityExampleSelector attribute)
(langchain.retrievers.SelfQueryRetriever attribute)
(langchain.retrievers.TimeWeightedVectorStoreRetriever attribute)
vectorstore_info (langchain.agents.agent_toolkits.VectorStoreToolkit attribute)
vectorstores (langchain.agents.agent_toolkits.VectorStoreRouterToolkit attribute)
verbose (langchain.llms.AI21 attribute)
(langchain.llms.AlephAlpha attribute)


(langchain.llms.AlephAlpha attribute)
(langchain.llms.Anthropic attribute)
(langchain.llms.Anyscale attribute)
(langchain.llms.Aviary attribute)
(langchain.llms.AzureOpenAI attribute)
(langchain.llms.Banana attribute)
(langchain.llms.Baseten attribute)
(langchain.llms.Beam attribute)
(langchain.llms.Bedrock attribute)
(langchain.llms.CerebriumAI attribute)
(langchain.llms.Cohere attribute)
(langchain.llms.CTransformers attribute)
(langchain.llms.Databricks attribute)
(langchain.llms.DeepInfra attribute)
(langchain.llms.FakeListLLM attribute)
(langchain.llms.ForefrontAI attribute)
(langchain.llms.GooglePalm attribute)
(langchain.llms.GooseAI attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.HuggingFaceEndpoint attribute)
(langchain.llms.HuggingFaceHub attribute)
(langchain.llms.HuggingFacePipeline attribute)
(langchain.llms.HuggingFaceTextGenInference attribute)
(langchain.llms.HumanInputLLM attribute)
(langchain.llms.LlamaCpp attribute)
(langchain.llms.Modal attribute)
(langchain.llms.MosaicML attribute)
(langchain.llms.NLPCloud attribute)
(langchain.llms.OpenAI attribute)
(langchain.llms.OpenAIChat attribute)
(langchain.llms.OpenLM attribute)
(langchain.llms.Petals attribute)
(langchain.llms.PipelineAI attribute)
(langchain.llms.PredictionGuard attribute)
(langchain.llms.Replicate attribute)
(langchain.llms.RWKV attribute)
(langchain.llms.SagemakerEndpoint attribute)
(langchain.llms.SelfHostedHuggingFaceLLM attribute)


(langchain.llms.SelfHostedHuggingFaceLLM attribute)
(langchain.llms.SelfHostedPipeline attribute)
(langchain.llms.StochasticAI attribute)
(langchain.llms.VertexAI attribute)
(langchain.llms.Writer attribute)
(langchain.retrievers.SelfQueryRetriever attribute)
(langchain.tools.BaseTool attribute)
(langchain.tools.Tool attribute)
VespaRetriever (class in langchain.retrievers)
video_ids (langchain.document_loaders.GoogleApiYoutubeLoader attribute)
visible_only (langchain.tools.ClickTool attribute)
vocab_only (langchain.embeddings.LlamaCppEmbeddings attribute)
(langchain.llms.GPT4All attribute)
(langchain.llms.LlamaCpp attribute)
W
wait_for_processing() (langchain.document_loaders.MathpixPDFLoader method)
WeatherDataLoader (class in langchain.document_loaders)
Weaviate (class in langchain.vectorstores)
WeaviateHybridSearchRetriever (class in langchain.retrievers)
WeaviateHybridSearchRetriever.Config (class in langchain.retrievers)
web_path (langchain.document_loaders.WebBaseLoader property)
web_paths (langchain.document_loaders.WebBaseLoader attribute)
WebBaseLoader (class in langchain.document_loaders)
WhatsAppChatLoader (class in langchain.document_loaders)
Wikipedia (class in langchain.docstore)
WikipediaLoader (class in langchain.document_loaders)
wolfram_alpha_appid (langchain.utilities.WolframAlphaAPIWrapper attribute)
writer_api_key (langchain.llms.Writer attribute)
writer_org_id (langchain.llms.Writer attribute)
Y
YoutubeLoader (class in langchain.document_loaders)
Z
zapier_description (langchain.tools.ZapierNLARunAction attribute)


Z
zapier_description (langchain.tools.ZapierNLARunAction attribute)
ZepRetriever (class in langchain.retrievers)
ZERO_SHOT_REACT_DESCRIPTION (langchain.agents.AgentType attribute)
Zilliz (class in langchain.vectorstores)
By Harrison Chase

      © Copyright 2023, Harrison Chase.

  Last updated on Jun 11, 2023.


.rst
.pdf
Welcome to LangChain
 Contents
Getting Started
Modules
Use Cases
Reference Docs
Ecosystem
Additional Resources
Welcome to LangChain#
LangChain is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call out to a language model, but will also be:
Data-aware: connect a language model to other sources of data
Agentic: allow a language model to interact with its environment
The LangChain framework is designed around these principles.
This is the Python specific portion of the documentation. For a purely conceptual guide to LangChain, see here. For the JavaScript documentation, see here.
Getting Started#
How to get started using LangChain to create an Language Model application.
Quickstart Guide
Concepts and terminology.
Concepts and terminology
Tutorials created by community experts and presented on YouTube.
Tutorials
Modules#
These modules are the core abstractions which we view as the building blocks of any LLM-powered application.
For each module LangChain provides standard, extendable interfaces. LangChain also provides external integrations and even end-to-end implementations for off-the-shelf use.
The docs for each module contain quickstart examples, how-to guides, reference docs, and conceptual guides.
The modules are (from least to most complex):
Models: Supported model types and integrations.
Prompts: Prompt management, optimization, and serialization.
Memory: Memory refers to state that is persisted between calls of a chain/agent.
Indexes: Language models become much more powerful when combined with application-specific data - this module contains interfaces and integrations for loading, querying and updating external data.
Chains: Chains are structured sequences of calls (to an LLM or to a different utility).


Agents: An agent is a Chain in which an LLM, given a high-level directive and a set of tools, repeatedly decides an action, executes the action and observes the outcome until the high-level directive is complete.
Callbacks: Callbacks let you log and stream the intermediate steps of any chain, making it easy to observe, debug, and evaluate the internals of an application.
Use Cases#
Best practices and built-in implementations for common LangChain use cases:
Autonomous Agents: Autonomous agents are long-running agents that take many steps in an attempt to accomplish an objective. Examples include AutoGPT and BabyAGI.
Agent Simulations: Putting agents in a sandbox and observing how they interact with each other and react to events can be an effective way to evaluate their long-range reasoning and planning abilities.
Personal Assistants: One of the primary LangChain use cases. Personal assistants need to take actions, remember interactions, and have knowledge about your data.
Question Answering: Another common LangChain use case. Answering questions over specific documents, only utilizing the information in those documents to construct an answer.
Chatbots: Language models love to chat, making this a very natural use of them.
Querying Tabular Data: Recommended reading if you want to use language models to query structured data (CSVs, SQL, dataframes, etc).
Code Understanding: Recommended reading if you want to use language models to analyze code.
Interacting with APIs: Enabling language models to interact with APIs is extremely powerful. It gives them access to up-to-date information and allows them to take actions.
Extraction: Extract structured information from text.
Summarization: Compressing longer documents. A type of Data-Augmented Generation.
Evaluation: Generative models are hard to evaluate with traditional metrics. One promising approach is to use language models themselves to do the evaluation.
Reference Docs#


Reference Docs#
Full documentation on all methods, classes, installation methods, and integration setups for LangChain.
LangChain Installation
Reference Documentation
Ecosystem#
LangChain integrates a lot of different LLMs, systems, and products.
From the other side, many systems and products depend on LangChain.
It creates a vibrant and thriving ecosystem.
Integrations: Guides for how other products can be used with LangChain.
Dependents: List of repositories that use LangChain.
Deployments: A collection of instructions, code snippets, and template repositories for deploying LangChain apps.
Additional Resources#
Additional resources we think may be useful as you develop your application!
LangChainHub: The LangChainHub is a place to share and explore other prompts, chains, and agents.
Gallery: A collection of great projects that use Langchain, compiled by the folks at Kyrolabs. Useful for finding inspiration and example implementations.
Deploying LLMs in Production: A collection of best practices and tutorials for deploying LLMs in production.
Tracing: A guide on using tracing in LangChain to visualize the execution of chains and agents.
Model Laboratory: Experimenting with different prompts, models, and chains is a big part of developing the best possible application. The ModelLaboratory makes it easy to do so.
Discord: Join us on our Discord to discuss all things LangChain!
YouTube: A collection of the LangChain tutorials and videos.
Production Support: As you move your LangChains into production, we’d love to offer more comprehensive support. Please fill out this form and we’ll set up a dedicated support Slack channel.
next
Quickstart Guide
 Contents

Getting Started
Modules
Use Cases
Reference Docs
Ecosystem
Additional Resources
By Harrison Chase

      © Copyright 2023, Harrison Chase.


By Harrison Chase

      © Copyright 2023, Harrison Chase.

  Last updated on Jun 11, 2023.


.rst
.pdf
Integrations
 Contents
Integrations by Module
Dependencies
All Integrations
Integrations#
LangChain integrates with many LLMs, systems, and products.
Integrations by Module#
Integrations grouped by the core LangChain module they map to:
LLM Providers
Chat Model Providers
Text Embedding Model Providers
Document Loader Integrations
Text Splitter Integrations
Vectorstore Providers
Retriever Providers
Tool Providers
Toolkit Integrations
Dependencies#
LangChain depends on several hungered Python packages.
All Integrations#
A comprehensive list of LLMs, systems, and products integrated with LangChain:
Tracing Walkthrough
AI21 Labs
Aim
Airbyte
Aleph Alpha
Amazon Bedrock
AnalyticDB
Annoy
Anthropic
Anyscale
Apify
Argilla
Arxiv
AtlasDB
AwaDB
AWS S3 Directory
AZLyrics
Azure Blob Storage
Azure Cognitive Search
Azure OpenAI
Banana
Beam
BiliBili
Blackboard
Cassandra
CerebriumAI
Chroma
ClearML
ClickHouse
Cohere
College Confidential
Comet
Confluence
C Transformers
Databerry
Databricks
DeepInfra
Deep Lake
Diffbot
Discord
Docugami
DuckDB
Elasticsearch
EverNote
Facebook Chat
Figma
ForefrontAI
Git
GitBook
Google BigQuery
Google Cloud Storage
Google Drive
Google Search
Google Serper
Google Vertex AI
GooseAI
GPT4All
Graphsignal
Gutenberg
Hacker News
Hazy Research
Helicone
Hugging Face
iFixit
IMSDb
Jina
LanceDB
Llama.cpp
MediaWikiDump
Metal
Microsoft OneDrive
Microsoft PowerPoint


Llama.cpp
MediaWikiDump
Metal
Microsoft OneDrive
Microsoft PowerPoint
Microsoft Word
Milvus
MLflow
Modal
Modern Treasury
Momento
MyScale
NLPCloud
Notion DB
Obsidian
OpenAI
OpenSearch
OpenWeatherMap
Petals
PGVector
Pinecone
PipelineAI
Prediction Guard
PromptLayer
Psychic
Qdrant
Ray Serve
Rebuff
Reddit
Redis
Replicate
Roam
Runhouse
RWKV-4
SageMaker Endpoint
SearxNG Search API
SerpAPI
Shale Protocol
scikit-learn
Slack
spaCy
Spreedly
StochasticAI
Stripe
Tair
Telegram
Tensorflow Hub
2Markdown
Trello
Twitter
Unstructured
Vectara
Vespa
Weights & Biases
Weather
Weaviate
WhatsApp
WhyLabs
Wikipedia
Wolfram Alpha
Writer
Yeager.ai
YouTube
Zep
Zilliz
previous
Experimental Modules
next
Tracing Walkthrough
 Contents

Integrations by Module
Dependencies
All Integrations
By Harrison Chase

      © Copyright 2023, Harrison Chase.

  Last updated on Jun 11, 2023.


.md
.pdf
Dependents
Dependents#
Dependents stats for hwchase17/langchain
[update: 2023-06-05; only dependent repositories with Stars > 100]
Repository
Stars
openai/openai-cookbook
38024
LAION-AI/Open-Assistant
33609
microsoft/TaskMatrix
33136
hpcaitech/ColossalAI
30032
imartinez/privateGPT
28094
reworkd/AgentGPT
23430
openai/chatgpt-retrieval-plugin
17942
jerryjliu/llama_index
16697
mindsdb/mindsdb
16410
mlflow/mlflow
14517
GaiZhenbiao/ChuanhuChatGPT
10793
databrickslabs/dolly
10155
openai/evals
10076
AIGC-Audio/AudioGPT
8619
logspace-ai/langflow
8211
imClumsyPanda/langchain-ChatGLM
8154
PromtEngineer/localGPT
6853
StanGirard/quivr
6830
PipedreamHQ/pipedream
6520
go-skynet/LocalAI
6018
arc53/DocsGPT
5643
e2b-dev/e2b
5075
langgenius/dify
4281
nsarrazin/serge
4228
zauberzeug/nicegui
4084
madawei2699/myGPTReader
4039
wenda-LLM/wenda
3871
GreyDGL/PentestGPT
3837
zilliztech/GPTCache
3625
csunny/DB-GPT
3545
gkamradt/langchain-tutorials
3404


3545
gkamradt/langchain-tutorials
3404
mmabrouk/chatgpt-wrapper
3303
postgresml/postgresml
3052
marqo-ai/marqo
3014
MineDojo/Voyager
2945
PrefectHQ/marvin
2761
project-baize/baize-chatbot
2673
hwchase17/chat-langchain
2589
whitead/paper-qa
2572
Azure-Samples/azure-search-openai-demo
2366
GerevAI/gerev
2330
OpenGVLab/InternGPT
2289
ParisNeo/gpt4all-ui
2159
OpenBMB/BMTools
2158
guangzhengli/ChatFiles
2005
h2oai/h2ogpt
1939
Farama-Foundation/PettingZoo
1845
OpenGVLab/Ask-Anything
1749
IntelligenzaArtificiale/Free-Auto-GPT
1740
Unstructured-IO/unstructured
1628
hwchase17/notion-qa
1607
NVIDIA/NeMo-Guardrails
1544
SamurAIGPT/privateGPT
1543
paulpierre/RasaGPT
1526
yanqiangmiffy/Chinese-LangChain
1485
Kav-K/GPTDiscord
1402
vocodedev/vocode-python
1387
Chainlit/chainlit
1336
lunasec-io/lunasec
1323
psychic-api/psychic
1248
agiresearch/OpenAGI
1208
jina-ai/thinkgpt
1193
thomas-yanxin/LangChain-ChatGLM-Webui
1182


thomas-yanxin/LangChain-ChatGLM-Webui
1182
ttengwang/Caption-Anything
1137
jina-ai/dev-gpt
1135
greshake/llm-security
1086
keephq/keep
1063
juncongmoo/chatllama
1037
richardyc/Chrome-GPT
1035
visual-openllm/visual-openllm
997
mmz-001/knowledge_gpt
995
jina-ai/langchain-serve
949
irgolic/AutoPR
936
microsoft/X-Decoder
908
poe-platform/api-bot-tutorial
902
peterw/Chat-with-Github-Repo
875
cirediatpl/FigmaChain
822
homanp/superagent
806
seanpixel/Teenage-AGI
800
chatarena/chatarena
796
hashintel/hash
795
SamurAIGPT/Camel-AutoGPT
786
rlancemartin/auto-evaluator
770
corca-ai/EVAL
769
101dotxyz/GPTeam
755
noahshinn024/reflexion
706
eyurtsev/kor
695
cheshire-cat-ai/core
681
e-johnstonn/BriefGPT
656
run-llama/llama-lab
635
griptape-ai/griptape
583
namuan/dr-doc-search
555
getmetal/motorhead
550
kreneskyp/ix
543
hwchase17/chat-your-data
510
Anil-matcha/ChatPDF
501
whyiyhw/chatgpt-wechat
497
SamurAIGPT/ChatGPT-Developer-Plugins
496
microsoft/PodcastCopilot
492
debanjum/khoj


496
microsoft/PodcastCopilot
492
debanjum/khoj
485
akshata29/chatpdf
485
langchain-ai/langchain-aiplugin
462
jina-ai/agentchain
460
alexanderatallah/window.ai
457
yeagerai/yeagerai-agent
451
mckaywrigley/repo-chat
446
michaelthwan/searchGPT
446
mpaepper/content-chatbot
441
freddyaboulton/gradio-tools
439
ruoccofabrizio/azure-open-ai-embeddings-qna
429
StevenGrove/GPT4Tools
422
jonra1993/fastapi-alembic-sqlmodel-async
407
msoedov/langcorn
405
amosjyng/langchain-visualizer
395
ajndkr/lanarky
384
mtenenholtz/chat-twitter
376
steamship-core/steamship-langchain
371
langchain-ai/auto-evaluator
365
xuwenhao/geektime-ai-course
358
continuum-llms/chatgpt-memory
357
opentensor/bittensor
347
showlab/VLog
345
daodao97/chatdoc
345
logan-markewich/llama_index_starter_pack
332
poe-platform/poe-protocol
320
explosion/spacy-llm
312
andylokandy/gpt-4-search
311
alejandro-ao/langchain-ask-pdf
310
jupyterlab/jupyter-ai
294
BlackHC/llm-strategy
283
itamargol/openai
281
momegas/megabots
279
personoids/personoids-lite
277
yvann-hub/Robby-chatbot
267
Anil-matcha/Website-to-Chatbot


267
Anil-matcha/Website-to-Chatbot
266
Cheems-Seminar/grounded-segment-any-parts
260
sullivan-sean/chat-langchainjs
248
bborn/howdoi.ai
245
daveebbelaar/langchain-experiments
240
MagnivOrg/prompt-layer-library
237
ur-whitelab/exmol
234
conceptofmind/toolformer
234
recalign/RecAlign
226
OpenBMB/AgentVerse
220
alvarosevilla95/autolang
219
JohnSnowLabs/nlptest
216
kaleido-lab/dolphin
215
truera/trulens
208
NimbleBoxAI/ChainFury
208
airobotlab/KoChatGPT
207
monarch-initiative/ontogpt
200
paolorechia/learn-langchain
195
shaman-ai/agent-actors
185
Haste171/langchain-chatbot
184
plchld/InsightFlow
182
su77ungr/CASALIOY
180
jbrukh/gpt-jargon
177
benthecoder/ClassGPT
174
billxbf/ReWOO
170
filip-michalsky/SalesGPT
168
hwchase17/langchain-streamlit-template
168
radi-cho/datasetGPT
164
hardbyte/qabot
164
gia-guar/JARVIS-ChatGPT
158
plastic-labs/tutor-gpt
154
yasyf/compress-gpt
154
fengyuli-dev/multimedia-gpt
154
ethanyanjiali/minChatGPT
153
hwchase17/chroma-langchain
153
edreisMD/plugnplai
148
chakkaradeep/pyCodeAGI
145


148
chakkaradeep/pyCodeAGI
145
ccurme/yolopandas
145
shamspias/customizable-gpt-chatbot
144
realminchoi/babyagi-ui
143
PradipNichite/Youtube-Tutorials
140
gustavz/DataChad
140
Klingefjord/chatgpt-telegram
140
Jaseci-Labs/jaseci
139
handrew/browserpilot
137
jmpaz/promptlib
137
SamPink/dev-gpt
135
menloparklab/langchain-cohere-qdrant-doc-retrieval
135
hirokidaichi/wanna
135
steamship-core/vercel-examples
134
pablomarin/GPT-Azure-Search-Engine
133
ibiscp/LLM-IMDB
133
shauryr/S2QA
133
jerlendds/osintbuddy
132
yuanjie-ai/ChatLLM
132
yasyf/summ
132
WongSaang/chatgpt-ui-server
130
peterw/StoryStorm
127
Teahouse-Studios/akari-bot
126
vaibkumr/prompt-optimizer
125
preset-io/promptimize
124
homanp/vercel-langchain
124
petehunt/langchain-github-bot
123
eunomia-bpf/GPTtrace
118
nicknochnack/LangchainDocuments
116
jiran214/GPT-vup
112
rsaryev/talk-codebase
112
zenml-io/zenml-projects
112
microsoft/azure-openai-in-a-day-workshop
112
davila7/file-gpt
112
prof-frink-lab/slangchain
111
aurelio-labs/arxiv-bot
110


111
aurelio-labs/arxiv-bot
110
fixie-ai/fixie-examples
108
miaoshouai/miaoshouai-assistant
105
flurb18/AgentOoba
103
solana-labs/chatgpt-plugin
102
Significant-Gravitas/Auto-GPT-Benchmarks
102
kaarthik108/snowChat
100
Generated by github-dependents-info
github-dependents-info --repo hwchase17/langchain --markdownfile dependents.md --minstars 100 --sort stars
previous
Zilliz
next
Deployments
By Harrison Chase

      © Copyright 2023, Harrison Chase.

  Last updated on Jun 11, 2023.


Source code for langchain.requests
"""Lightweight wrapper around requests library, with async support."""
from contextlib import asynccontextmanager
from typing import Any, AsyncGenerator, Dict, Optional
import aiohttp
import requests
from pydantic import BaseModel, Extra
class Requests(BaseModel):
    """Wrapper around requests to handle auth and async.
    The main purpose of this wrapper is to handle authentication (by saving
    headers) and enable easy async methods on the same base object.
    """
    headers: Optional[Dict[str, str]] = None
    aiosession: Optional[aiohttp.ClientSession] = None
    class Config:
        """Configuration for this pydantic object."""
        extra = Extra.forbid
        arbitrary_types_allowed = True
    def get(self, url: str, **kwargs: Any) -> requests.Response:
        """GET the URL and return the text."""
        return requests.get(url, headers=self.headers, **kwargs)
    def post(self, url: str, data: Dict[str, Any], **kwargs: Any) -> requests.Response:
        """POST to the URL and return the text."""
        return requests.post(url, json=data, headers=self.headers, **kwargs)
    def patch(self, url: str, data: Dict[str, Any], **kwargs: Any) -> requests.Response:
        """PATCH the URL and return the text."""
        return requests.patch(url, json=data, headers=self.headers, **kwargs)
    def put(self, url: str, data: Dict[str, Any], **kwargs: Any) -> requests.Response:
        """PUT the URL and return the text."""
        return requests.put(url, json=data, headers=self.headers, **kwargs)
    def delete(self, url: str, **kwargs: Any) -> requests.Response:


def delete(self, url: str, **kwargs: Any) -> requests.Response:
        """DELETE the URL and return the text."""
        return requests.delete(url, headers=self.headers, **kwargs)
    @asynccontextmanager
    async def _arequest(
        self, method: str, url: str, **kwargs: Any
    ) -> AsyncGenerator[aiohttp.ClientResponse, None]:
        """Make an async request."""
        if not self.aiosession:
            async with aiohttp.ClientSession() as session:
                async with session.request(
                    method, url, headers=self.headers, **kwargs
                ) as response:
                    yield response
        else:
            async with self.aiosession.request(
                method, url, headers=self.headers, **kwargs
            ) as response:
                yield response
    @asynccontextmanager
    async def aget(
        self, url: str, **kwargs: Any
    ) -> AsyncGenerator[aiohttp.ClientResponse, None]:
        """GET the URL and return the text asynchronously."""
        async with self._arequest("GET", url, **kwargs) as response:
            yield response
    @asynccontextmanager
    async def apost(
        self, url: str, data: Dict[str, Any], **kwargs: Any
    ) -> AsyncGenerator[aiohttp.ClientResponse, None]:
        """POST to the URL and return the text asynchronously."""
        async with self._arequest("POST", url, **kwargs) as response:
            yield response
    @asynccontextmanager
    async def apatch(
        self, url: str, data: Dict[str, Any], **kwargs: Any
    ) -> AsyncGenerator[aiohttp.ClientResponse, None]:
        """PATCH the URL and return the text asynchronously."""


"""PATCH the URL and return the text asynchronously."""
        async with self._arequest("PATCH", url, **kwargs) as response:
            yield response
    @asynccontextmanager
    async def aput(
        self, url: str, data: Dict[str, Any], **kwargs: Any
    ) -> AsyncGenerator[aiohttp.ClientResponse, None]:
        """PUT the URL and return the text asynchronously."""
        async with self._arequest("PUT", url, **kwargs) as response:
            yield response
    @asynccontextmanager
    async def adelete(
        self, url: str, **kwargs: Any
    ) -> AsyncGenerator[aiohttp.ClientResponse, None]:
        """DELETE the URL and return the text asynchronously."""
        async with self._arequest("DELETE", url, **kwargs) as response:
            yield response
[docs]class TextRequestsWrapper(BaseModel):
    """Lightweight wrapper around requests library.
    The main purpose of this wrapper is to always return a text output.
    """
    headers: Optional[Dict[str, str]] = None
    aiosession: Optional[aiohttp.ClientSession] = None
    class Config:
        """Configuration for this pydantic object."""
        extra = Extra.forbid
        arbitrary_types_allowed = True
    @property
    def requests(self) -> Requests:
        return Requests(headers=self.headers, aiosession=self.aiosession)
[docs]    def get(self, url: str, **kwargs: Any) -> str:
        """GET the URL and return the text."""
        return self.requests.get(url, **kwargs).text
[docs]    def post(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:


"""POST to the URL and return the text."""
        return self.requests.post(url, data, **kwargs).text
[docs]    def patch(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:
        """PATCH the URL and return the text."""
        return self.requests.patch(url, data, **kwargs).text
[docs]    def put(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:
        """PUT the URL and return the text."""
        return self.requests.put(url, data, **kwargs).text
[docs]    def delete(self, url: str, **kwargs: Any) -> str:
        """DELETE the URL and return the text."""
        return self.requests.delete(url, **kwargs).text
[docs]    async def aget(self, url: str, **kwargs: Any) -> str:
        """GET the URL and return the text asynchronously."""
        async with self.requests.aget(url, **kwargs) as response:
            return await response.text()
[docs]    async def apost(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:
        """POST to the URL and return the text asynchronously."""
        async with self.requests.apost(url, **kwargs) as response:
            return await response.text()
[docs]    async def apatch(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:
        """PATCH the URL and return the text asynchronously."""
        async with self.requests.apatch(url, **kwargs) as response:
            return await response.text()
[docs]    async def aput(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:


"""PUT the URL and return the text asynchronously."""
        async with self.requests.aput(url, **kwargs) as response:
            return await response.text()
[docs]    async def adelete(self, url: str, **kwargs: Any) -> str:
        """DELETE the URL and return the text asynchronously."""
        async with self.requests.adelete(url, **kwargs) as response:
            return await response.text()
# For backwards compatibility
RequestsWrapper = TextRequestsWrapper
By Harrison Chase

      © Copyright 2023, Harrison Chase.

  Last updated on Jun 11, 2023.


Source code for langchain.text_splitter
"""Functionality for splitting text."""
from __future__ import annotations
import copy
import logging
import re
from abc import ABC, abstractmethod
from dataclasses import dataclass
from enum import Enum
from typing import (
    AbstractSet,
    Any,
    Callable,
    Collection,
    Iterable,
    List,
    Literal,
    Optional,
    Sequence,
    Type,
    TypeVar,
    Union,
    cast,
)
from langchain.docstore.document import Document
from langchain.schema import BaseDocumentTransformer
logger = logging.getLogger(__name__)
TS = TypeVar("TS", bound="TextSplitter")
def _split_text_with_regex(
    text: str, separator: str, keep_separator: bool
) -> List[str]:
    # Now that we have the separator, split the text
    if separator:
        if keep_separator:
            # The parentheses in the pattern keep the delimiters in the result.
            _splits = re.split(f"({separator})", text)
            splits = [_splits[i] + _splits[i + 1] for i in range(1, len(_splits), 2)]
            if len(_splits) % 2 == 0:
                splits += _splits[-1:]
            splits = [_splits[0]] + splits
        else:
            splits = text.split(separator)
    else:
        splits = list(text)
    return [s for s in splits if s != ""]
[docs]class TextSplitter(BaseDocumentTransformer, ABC):
    """Interface for splitting text into chunks."""
    def __init__(
        self,
        chunk_size: int = 4000,
        chunk_overlap: int = 200,


chunk_overlap: int = 200,
        length_function: Callable[[str], int] = len,
        keep_separator: bool = False,
        add_start_index: bool = False,
    ) -> None:
        """Create a new TextSplitter.
        Args:
            chunk_size: Maximum size of chunks to return
            chunk_overlap: Overlap in characters between chunks
            length_function: Function that measures the length of given chunks
            keep_separator: Whether or not to keep the separator in the chunks
            add_start_index: If `True`, includes chunk's start index in metadata
        """
        if chunk_overlap > chunk_size:
            raise ValueError(
                f"Got a larger chunk overlap ({chunk_overlap}) than chunk size "
                f"({chunk_size}), should be smaller."
            )
        self._chunk_size = chunk_size
        self._chunk_overlap = chunk_overlap
        self._length_function = length_function
        self._keep_separator = keep_separator
        self._add_start_index = add_start_index
[docs]    @abstractmethod
    def split_text(self, text: str) -> List[str]:
        """Split text into multiple components."""
[docs]    def create_documents(
        self, texts: List[str], metadatas: Optional[List[dict]] = None
    ) -> List[Document]:
        """Create documents from a list of texts."""
        _metadatas = metadatas or [{}] * len(texts)
        documents = []
        for i, text in enumerate(texts):
            index = -1
            for chunk in self.split_text(text):
                metadata = copy.deepcopy(_metadatas[i])
                if self._add_start_index:
                    index = text.find(chunk, index + 1)
                    metadata["start_index"] = index


metadata["start_index"] = index
                new_doc = Document(page_content=chunk, metadata=metadata)
                documents.append(new_doc)
        return documents
[docs]    def split_documents(self, documents: Iterable[Document]) -> List[Document]:
        """Split documents."""
        texts, metadatas = [], []
        for doc in documents:
            texts.append(doc.page_content)
            metadatas.append(doc.metadata)
        return self.create_documents(texts, metadatas=metadatas)
    def _join_docs(self, docs: List[str], separator: str) -> Optional[str]:
        text = separator.join(docs)
        text = text.strip()
        if text == "":
            return None
        else:
            return text
    def _merge_splits(self, splits: Iterable[str], separator: str) -> List[str]:
        # We now want to combine these smaller pieces into medium size
        # chunks to send to the LLM.
        separator_len = self._length_function(separator)
        docs = []
        current_doc: List[str] = []
        total = 0
        for d in splits:
            _len = self._length_function(d)
            if (
                total + _len + (separator_len if len(current_doc) > 0 else 0)
                > self._chunk_size
            ):
                if total > self._chunk_size:
                    logger.warning(
                        f"Created a chunk of size {total}, "
                        f"which is longer than the specified {self._chunk_size}"
                    )
                if len(current_doc) > 0:
                    doc = self._join_docs(current_doc, separator)
                    if doc is not None:
                        docs.append(doc)
                    # Keep on popping if:


docs.append(doc)
                    # Keep on popping if:
                    # - we have a larger chunk than in the chunk overlap
                    # - or if we still have any chunks and the length is long
                    while total > self._chunk_overlap or (
                        total + _len + (separator_len if len(current_doc) > 0 else 0)
                        > self._chunk_size
                        and total > 0
                    ):
                        total -= self._length_function(current_doc[0]) + (
                            separator_len if len(current_doc) > 1 else 0
                        )
                        current_doc = current_doc[1:]
            current_doc.append(d)
            total += _len + (separator_len if len(current_doc) > 1 else 0)
        doc = self._join_docs(current_doc, separator)
        if doc is not None:
            docs.append(doc)
        return docs
[docs]    @classmethod
    def from_huggingface_tokenizer(cls, tokenizer: Any, **kwargs: Any) -> TextSplitter:
        """Text splitter that uses HuggingFace tokenizer to count length."""
        try:
            from transformers import PreTrainedTokenizerBase
            if not isinstance(tokenizer, PreTrainedTokenizerBase):
                raise ValueError(
                    "Tokenizer received was not an instance of PreTrainedTokenizerBase"
                )
            def _huggingface_tokenizer_length(text: str) -> int:
                return len(tokenizer.encode(text))
        except ImportError:
            raise ValueError(
                "Could not import transformers python package. "
                "Please install it with `pip install transformers`."
            )
        return cls(length_function=_huggingface_tokenizer_length, **kwargs)
[docs]    @classmethod
    def from_tiktoken_encoder(
        cls: Type[TS],


def from_tiktoken_encoder(
        cls: Type[TS],
        encoding_name: str = "gpt2",
        model_name: Optional[str] = None,
        allowed_special: Union[Literal["all"], AbstractSet[str]] = set(),
        disallowed_special: Union[Literal["all"], Collection[str]] = "all",
        **kwargs: Any,
    ) -> TS:
        """Text splitter that uses tiktoken encoder to count length."""
        try:
            import tiktoken
        except ImportError:
            raise ImportError(
                "Could not import tiktoken python package. "
                "This is needed in order to calculate max_tokens_for_prompt. "
                "Please install it with `pip install tiktoken`."
            )
        if model_name is not None:
            enc = tiktoken.encoding_for_model(model_name)
        else:
            enc = tiktoken.get_encoding(encoding_name)
        def _tiktoken_encoder(text: str) -> int:
            return len(
                enc.encode(
                    text,
                    allowed_special=allowed_special,
                    disallowed_special=disallowed_special,
                )
            )
        if issubclass(cls, TokenTextSplitter):
            extra_kwargs = {
                "encoding_name": encoding_name,
                "model_name": model_name,
                "allowed_special": allowed_special,
                "disallowed_special": disallowed_special,
            }
            kwargs = {**kwargs, **extra_kwargs}
        return cls(length_function=_tiktoken_encoder, **kwargs)
[docs]    def transform_documents(
        self, documents: Sequence[Document], **kwargs: Any
    ) -> Sequence[Document]:
        """Transform sequence of documents by splitting them."""
        return self.split_documents(list(documents))


return self.split_documents(list(documents))
[docs]    async def atransform_documents(
        self, documents: Sequence[Document], **kwargs: Any
    ) -> Sequence[Document]:
        """Asynchronously transform a sequence of documents by splitting them."""
        raise NotImplementedError
[docs]class CharacterTextSplitter(TextSplitter):
    """Implementation of splitting text that looks at characters."""
    def __init__(self, separator: str = "\n\n", **kwargs: Any) -> None:
        """Create a new TextSplitter."""
        super().__init__(**kwargs)
        self._separator = separator
[docs]    def split_text(self, text: str) -> List[str]:
        """Split incoming text and return chunks."""
        # First we naively split the large input into a bunch of smaller ones.
        splits = _split_text_with_regex(text, self._separator, self._keep_separator)
        _separator = "" if self._keep_separator else self._separator
        return self._merge_splits(splits, _separator)
# should be in newer Python versions (3.10+)
# @dataclass(frozen=True, kw_only=True, slots=True)
[docs]@dataclass(frozen=True)
class Tokenizer:
    chunk_overlap: int
    tokens_per_chunk: int
    decode: Callable[[list[int]], str]
    encode: Callable[[str], List[int]]
[docs]def split_text_on_tokens(*, text: str, tokenizer: Tokenizer) -> List[str]:
    """Split incoming text and return chunks."""
    splits: List[str] = []
    input_ids = tokenizer.encode(text)
    start_idx = 0
    cur_idx = min(start_idx + tokenizer.tokens_per_chunk, len(input_ids))
    chunk_ids = input_ids[start_idx:cur_idx]