id
stringlengths
14
16
text
stringlengths
31
2.41k
source
stringlengths
53
121
a1409c1b5e0f-126
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) project() (langchain.utilities.JiraAPIWrapper method) Prompt (in module langchain.prompts) prompt (langchain.agents.OpenAIFunctionsAgent attribute) (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) prompt_length() (langchain.chains.MapReduceDocumentsChain method) (langchain.chains.MapRerankDocumentsChain method) (langchain.chains.RefineDocumentsChain method) (langchain.chains.StuffDocumentsChain method) prompt_tokens (langchain.callbacks.OpenAICallbackHandler 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-127
put() (langchain.utilities.TextRequestsWrapper method) pydantic_object (langchain.output_parsers.PydanticOutputParser attribute) PyMuPDFLoader (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) python_repl (langchain.tools.PythonREPLTool 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.KuzuQAChain attribute) (langchain.chains.NebulaGraphQAChain attribute) Qdrant (class in langchain.vectorstores) query (langchain.document_loaders.FaunaLoader attribute) query() (langchain.utilities.MaxComputeAPIWrapper method) query_checker_prompt (langchain.chains.SQLDatabaseChain attribute) query_configs (langchain.retrievers.LlamaIndexGraphRetriever attribute) query_instruction (langchain.embeddings.DeepInfraEmbeddings attribute) (langchain.embeddings.HuggingFaceInstructEmbeddings attribute) (langchain.embeddings.MosaicMLInstructorEmbeddings attribute) (langchain.embeddings.SelfHostedHuggingFaceInstructEmbeddings attribute) query_kwargs (langchain.retrievers.LlamaIndexRetriever attribute) query_name (langchain.vectorstores.SupabaseVectorStore attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-128
query_name (langchain.vectorstores.SupabaseVectorStore attribute) query_params (langchain.document_loaders.GitHubIssuesLoader property) (langchain.tools.APIOperation property) query_suffix (langchain.utilities.SearxSearchWrapper attribute) question_generator (langchain.chains.ChatVectorDBChain attribute) (langchain.chains.ConversationalRetrievalChain attribute) question_generator_chain (langchain.chains.FlareChain attribute) question_to_checked_assertions_chain (langchain.chains.LLMCheckerChain attribute) queue (langchain.callbacks.AsyncIteratorCallbackHandler attribute) R raise_error (langchain.callbacks.HumanApprovalCallbackHandler attribute) raise_for_status (langchain.document_loaders.WebBaseLoader attribute) rank_key (langchain.chains.MapRerankDocumentsChain attribute) raw_completion (langchain.llms.AlephAlpha 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) RecursiveUrlLoader (class in langchain.document_loaders) 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) refine_llm_chain (langchain.chains.RefineDocumentsChain attribute) reflection_threshold (langchain.experimental.GenerativeAgentMemory attribute) regex (langchain.output_parsers.RegexParser attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-129
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_penalty (langchain.llms.ForefrontAI attribute) (langchain.llms.NLPCloud attribute) (langchain.llms.TextGen attribute) (langchain.llms.Writer attribute) repo_id (langchain.embeddings.HuggingFaceHubEmbeddings attribute) (langchain.llms.HuggingFaceHub attribute) request_body (langchain.tools.APIOperation attribute) request_parallelism (langchain.llms.VertexAI 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-130
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) (langchain.tools.BaseRequestsTool attribute) response_chain (langchain.chains.FlareChain attribute) response_key (langchain.retrievers.RemoteLangChainRetriever attribute) response_schemas (langchain.output_parsers.StructuredOutputParser attribute) responses (langchain.chat_models.FakeListChatModel attribute) results() (langchain.utilities.BingSearchAPIWrapper method) (langchain.utilities.DuckDuckGoSearchAPIWrapper method) (langchain.utilities.GoogleSearchAPIWrapper method) (langchain.utilities.GoogleSerperAPIWrapper method) (langchain.utilities.MetaphorSearchAPIWrapper method) (langchain.utilities.SearxSearchWrapper method) (langchain.utilities.SerpAPIWrapper method) results_async() (langchain.utilities.MetaphorSearchAPIWrapper method) retrieve_article() (langchain.utilities.PubMedAPIWrapper method) retrieve_documents() (langchain.retrievers.MultiQueryRetriever 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-131
(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_final_only (langchain.chains.ConversationChain attribute) (langchain.chains.LLMChain attribute) return_generated_question (langchain.chains.ChatVectorDBChain attribute) (langchain.chains.ConversationalRetrievalChain attribute) return_intermediate_steps (langchain.agents.AgentExecutor attribute) (langchain.chains.ConstitutionalChain attribute) (langchain.chains.GraphCypherQAChain attribute) (langchain.chains.MapReduceDocumentsChain attribute) (langchain.chains.MapRerankDocumentsChain attribute) (langchain.chains.OpenAPIEndpointChain attribute) (langchain.chains.PALChain attribute) (langchain.chains.RefineDocumentsChain attribute) (langchain.chains.SQLDatabaseChain attribute) (langchain.chains.SQLDatabaseSequentialChain attribute) return_pl_id (langchain.chat_models.PromptLayerChatOpenAI attribute) return_source_documents (langchain.chains.ChatVectorDBChain attribute) (langchain.chains.ConversationalRetrievalChain attribute) (langchain.chains.QAWithSourcesChain attribute) (langchain.chains.RetrievalQA attribute) (langchain.chains.RetrievalQAWithSourcesChain attribute) (langchain.chains.VectorDBQA attribute) (langchain.chains.VectorDBQAWithSourcesChain attribute) return_stopped_response() (langchain.agents.Agent method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-132
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) (langchain.agents.BaseMultiActionAgent property) (langchain.agents.BaseSingleActionAgent property) (langchain.schema.AgentFinish attribute) 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) Rockset (class in langchain.vectorstores) Rockset.DistanceFunction (class in langchain.vectorstores) role (langchain.prompts.ChatMessagePromptTemplate attribute) root_dir (langchain.agents.agent_toolkits.FileManagementToolkit attribute) route() (langchain.chains.LLMRouterChain method) (langchain.chains.RouterChain method) router_chain (langchain.chains.MultiPromptChain attribute) (langchain.chains.MultiRetrievalQAChain attribute) (langchain.chains.MultiRouteChain attribute) RST (langchain.text_splitter.Language attribute) RUBY (langchain.text_splitter.Language attribute) run (langchain.schema.LLMResult attribute) run() (langchain.chains.AnalyzeDocumentChain method) (langchain.chains.APIChain method) (langchain.chains.ChatVectorDBChain method) (langchain.chains.ConstitutionalChain method) (langchain.chains.ConversationalRetrievalChain method) (langchain.chains.ConversationChain method) (langchain.chains.FlareChain method) (langchain.chains.GraphCypherQAChain method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-133
(langchain.chains.GraphCypherQAChain method) (langchain.chains.GraphQAChain method) (langchain.chains.HypotheticalDocumentEmbedder method) (langchain.chains.KuzuQAChain method) (langchain.chains.LLMBashChain method) (langchain.chains.LLMChain method) (langchain.chains.LLMCheckerChain method) (langchain.chains.LLMMathChain method) (langchain.chains.LLMRequestsChain method) (langchain.chains.LLMRouterChain method) (langchain.chains.LLMSummarizationCheckerChain method) (langchain.chains.MapReduceChain method) (langchain.chains.MapReduceDocumentsChain method) (langchain.chains.MapRerankDocumentsChain method) (langchain.chains.MultiPromptChain method) (langchain.chains.MultiRetrievalQAChain method) (langchain.chains.MultiRouteChain method) (langchain.chains.NatBotChain method) (langchain.chains.NebulaGraphQAChain method) (langchain.chains.OpenAIModerationChain method) (langchain.chains.OpenAPIEndpointChain method) (langchain.chains.PALChain method) (langchain.chains.QAGenerationChain method) (langchain.chains.QAWithSourcesChain method) (langchain.chains.RefineDocumentsChain method) (langchain.chains.RetrievalQA method) (langchain.chains.RetrievalQAWithSourcesChain method) (langchain.chains.RouterChain method) (langchain.chains.SequentialChain method) (langchain.chains.SimpleSequentialChain method) (langchain.chains.SQLDatabaseChain method) (langchain.chains.SQLDatabaseSequentialChain method) (langchain.chains.StuffDocumentsChain method) (langchain.chains.TransformChain method) (langchain.chains.VectorDBQA method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-134
(langchain.chains.TransformChain method) (langchain.chains.VectorDBQA method) (langchain.chains.VectorDBQAWithSourcesChain method) (langchain.tools.BaseTool method) (langchain.utilities.ArxivAPIWrapper method) (langchain.utilities.BashProcess method) (langchain.utilities.BingSearchAPIWrapper method) (langchain.utilities.BraveSearchWrapper method) (langchain.utilities.DuckDuckGoSearchAPIWrapper method) (langchain.utilities.GooglePlacesAPIWrapper method) (langchain.utilities.GoogleSearchAPIWrapper method) (langchain.utilities.GoogleSerperAPIWrapper method) (langchain.utilities.GraphQLAPIWrapper method) (langchain.utilities.JiraAPIWrapper method) (langchain.utilities.LambdaWrapper method) (langchain.utilities.OpenWeatherMapAPIWrapper method) (langchain.utilities.PowerBIDataset method) (langchain.utilities.PubMedAPIWrapper method) (langchain.utilities.PythonREPL method) (langchain.utilities.SceneXplainAPIWrapper 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) (langchain.utilities.ZapierNLAWrapper method) run_as_str() (langchain.utilities.ZapierNLAWrapper method) run_creation() (langchain.llms.Beam method) run_no_throw() (langchain.utilities.SparkSQL method) runner (langchain.llms.OpenLLM property) 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-135
S3FileLoader (class in langchain.document_loaders) safesearch (langchain.utilities.DuckDuckGoSearchAPIWrapper attribute) sample_rows_in_table_info (langchain.utilities.PowerBIDataset attribute) sanitize_input (langchain.tools.PythonAstREPLTool attribute) (langchain.tools.PythonREPLTool attribute) save() (langchain.agents.AgentExecutor method) (langchain.agents.BaseMultiActionAgent method) (langchain.agents.BaseSingleActionAgent method) (langchain.chains.AnalyzeDocumentChain method) (langchain.chains.APIChain method) (langchain.chains.ChatVectorDBChain method) (langchain.chains.ConstitutionalChain method) (langchain.chains.ConversationalRetrievalChain method) (langchain.chains.ConversationChain method) (langchain.chains.FlareChain method) (langchain.chains.GraphCypherQAChain method) (langchain.chains.GraphQAChain method) (langchain.chains.HypotheticalDocumentEmbedder method) (langchain.chains.KuzuQAChain method) (langchain.chains.LLMBashChain method) (langchain.chains.LLMChain method) (langchain.chains.LLMCheckerChain method) (langchain.chains.LLMMathChain method) (langchain.chains.LLMRequestsChain method) (langchain.chains.LLMRouterChain method) (langchain.chains.LLMSummarizationCheckerChain method) (langchain.chains.MapReduceChain method) (langchain.chains.MapReduceDocumentsChain method) (langchain.chains.MapRerankDocumentsChain method) (langchain.chains.MultiPromptChain method) (langchain.chains.MultiRetrievalQAChain method) (langchain.chains.MultiRouteChain method) (langchain.chains.NatBotChain method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-136
(langchain.chains.NatBotChain method) (langchain.chains.NebulaGraphQAChain method) (langchain.chains.OpenAIModerationChain method) (langchain.chains.OpenAPIEndpointChain method) (langchain.chains.PALChain method) (langchain.chains.QAGenerationChain method) (langchain.chains.QAWithSourcesChain method) (langchain.chains.RefineDocumentsChain method) (langchain.chains.RetrievalQA method) (langchain.chains.RetrievalQAWithSourcesChain method) (langchain.chains.RouterChain method) (langchain.chains.SequentialChain method) (langchain.chains.SimpleSequentialChain method) (langchain.chains.SQLDatabaseChain method) (langchain.chains.SQLDatabaseSequentialChain method) (langchain.chains.StuffDocumentsChain method) (langchain.chains.TransformChain method) (langchain.chains.VectorDBQA method) (langchain.chains.VectorDBQAWithSourcesChain method) (langchain.llms.AI21 method) (langchain.llms.AlephAlpha method) (langchain.llms.AmazonAPIGateway method) (langchain.llms.Anthropic method) (langchain.llms.Anyscale method) (langchain.llms.Aviary method) (langchain.llms.AzureMLOnlineEndpoint 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.Clarifai method) (langchain.llms.Cohere method) (langchain.llms.CTransformers method) (langchain.llms.Databricks method) (langchain.llms.DeepInfra method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-137
(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.ManifestWrapper method) (langchain.llms.Modal method) (langchain.llms.MosaicML method) (langchain.llms.NLPCloud method) (langchain.llms.OctoAIEndpoint method) (langchain.llms.OpenAI method) (langchain.llms.OpenAIChat method) (langchain.llms.OpenLLM 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.TextGen method) (langchain.llms.VertexAI method) (langchain.llms.Writer method) (langchain.prompts.BasePromptTemplate method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-138
(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.MotorheadMemory method) (langchain.memory.ReadOnlySharedMemory method) (langchain.memory.SimpleMemory method) (langchain.memory.VectorStoreRetrieverMemory method) (langchain.schema.BaseMemory method) save_local() (langchain.vectorstores.Annoy method) (langchain.vectorstores.FAISS method) SCALA (langchain.text_splitter.Language attribute) scenex_api_key (langchain.utilities.SceneXplainAPIWrapper attribute) scenex_api_url (langchain.utilities.SceneXplainAPIWrapper 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.memory.ZepChatMessageHistory method) (langchain.utilities.JiraAPIWrapper method) (langchain.vectorstores.VectorStore method) search_field (langchain.retrievers.DocArrayRetriever attribute), [1] search_index (langchain.vectorstores.Tigris property) search_kwargs (langchain.chains.ChatVectorDBChain attribute) (langchain.chains.VectorDBQA attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-139
(langchain.chains.VectorDBQA attribute) (langchain.chains.VectorDBQAWithSourcesChain attribute) (langchain.retrievers.SelfQueryRetriever attribute) (langchain.retrievers.TimeWeightedVectorStoreRetriever attribute) (langchain.utilities.BraveSearchWrapper attribute) search_type (langchain.chains.VectorDBQA attribute) (langchain.retrievers.DocArrayRetriever attribute), [1] (langchain.retrievers.SelfQueryRetriever attribute) search_wrapper (langchain.tools.BraveSearch attribute) searx_host (langchain.utilities.SearxSearchWrapper attribute) secret (langchain.document_loaders.FaunaLoader attribute) seed (langchain.embeddings.LlamaCppEmbeddings attribute) (langchain.llms.GPT4All attribute) (langchain.llms.LlamaCpp attribute) (langchain.llms.TextGen attribute) select_examples() (langchain.prompts.example_selector.LengthBasedExampleSelector method) (langchain.prompts.example_selector.MaxMarginalRelevanceExampleSelector method) (langchain.prompts.example_selector.NGramOverlapExampleSelector method) (langchain.prompts.example_selector.SemanticSimilarityExampleSelector method) (langchain.prompts.LengthBasedExampleSelector method) (langchain.prompts.MaxMarginalRelevanceExampleSelector method) (langchain.prompts.NGramOverlapExampleSelector method) (langchain.prompts.SemanticSimilarityExampleSelector method) selected_tools (langchain.agents.agent_toolkits.FileManagementToolkit attribute) SeleniumURLLoader (class in langchain.document_loaders) SELF_ASK_WITH_SEARCH (langchain.agents.AgentType attribute) semantic_hybrid_search() (langchain.vectorstores.AzureSearch method) semantic_hybrid_search_with_score() (langchain.vectorstores.AzureSearch method) send_pdf() (langchain.document_loaders.MathpixPDFLoader method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-140
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.utilities.SerpAPIWrapper attribute) serper_api_key (langchain.utilities.GoogleSerperAPIWrapper attribute) server_type (langchain.llms.OpenLLM attribute) server_url (langchain.llms.OpenLLM 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.MotorheadMemory attribute) (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) setup() (langchain.callbacks.AimCallbackHandler method) silent_errors (langchain.chains.MultiPromptChain attribute) (langchain.chains.MultiRetrievalQAChain attribute) (langchain.chains.MultiRouteChain attribute) similarity_fn (langchain.document_transformers.EmbeddingsRedundantFilter attribute) (langchain.retrievers.document_compressors.EmbeddingsFilter attribute) similarity_search() (langchain.vectorstores.AlibabaCloudOpenSearch method) (langchain.vectorstores.AnalyticDB method) (langchain.vectorstores.Annoy method) (langchain.vectorstores.AtlasDB method) (langchain.vectorstores.AwaDB method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-141
(langchain.vectorstores.AwaDB method) (langchain.vectorstores.AzureSearch method) (langchain.vectorstores.Cassandra method) (langchain.vectorstores.Chroma method) (langchain.vectorstores.Clarifai method) (langchain.vectorstores.Clickhouse method) (langchain.vectorstores.DeepLake method) (langchain.vectorstores.ElasticVectorSearch method) (langchain.vectorstores.FAISS method) (langchain.vectorstores.Hologres 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.Rockset method) (langchain.vectorstores.SingleStoreDB method) (langchain.vectorstores.SKLearnVectorStore method) (langchain.vectorstores.StarRocks 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.AlibabaCloudOpenSearch method) (langchain.vectorstores.AnalyticDB method) (langchain.vectorstores.Annoy method) (langchain.vectorstores.AwaDB method) (langchain.vectorstores.Cassandra method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-142
(langchain.vectorstores.AwaDB method) (langchain.vectorstores.Cassandra method) (langchain.vectorstores.Chroma method) (langchain.vectorstores.Clickhouse method) (langchain.vectorstores.DeepLake method) (langchain.vectorstores.FAISS method) (langchain.vectorstores.Hologres method) (langchain.vectorstores.Milvus method) (langchain.vectorstores.MyScale method) (langchain.vectorstores.Qdrant method) (langchain.vectorstores.Rockset method) (langchain.vectorstores.StarRocks method) (langchain.vectorstores.SupabaseVectorStore 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.Rockset method) (langchain.vectorstores.SupabaseVectorStore method) similarity_search_limit_score() (langchain.vectorstores.Redis method) similarity_search_with_relevance_scores() (langchain.vectorstores.AlibabaCloudOpenSearch method) (langchain.vectorstores.AwaDB method) (langchain.vectorstores.Clickhouse method) (langchain.vectorstores.MyScale method) (langchain.vectorstores.Rockset method) (langchain.vectorstores.StarRocks 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.Cassandra method) (langchain.vectorstores.Chroma method) (langchain.vectorstores.Clarifai method) (langchain.vectorstores.DeepLake method) (langchain.vectorstores.ElasticVectorSearch method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-143
(langchain.vectorstores.DeepLake method) (langchain.vectorstores.ElasticVectorSearch method) (langchain.vectorstores.FAISS method) (langchain.vectorstores.Hologres 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.Cassandra method) (langchain.vectorstores.FAISS method) (langchain.vectorstores.Hologres method) (langchain.vectorstores.Milvus method) (langchain.vectorstores.Qdrant method) similarity_search_with_score_id() (langchain.vectorstores.Cassandra method) similarity_search_with_score_id_by_vector() (langchain.vectorstores.Cassandra 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-144
size (langchain.tools.SteamshipImageGenerationTool attribute) skip_special_tokens (langchain.llms.TextGen attribute) SKLearnVectorStore (class in langchain.vectorstores) SlackDirectoryLoader (class in langchain.document_loaders) SnowflakeLoader (class in langchain.document_loaders) SOL (langchain.text_splitter.Language attribute) sort (langchain.document_loaders.GitHubIssuesLoader attribute) source (langchain.document_loaders.Blob property) SpacyTextSplitter (class in langchain.text_splitter) SparkSQL (class in langchain.utilities) sparse_encoder (langchain.retrievers.PineconeHybridSearchRetriever attribute) spec (langchain.agents.agent_toolkits.JsonToolkit attribute) (langchain.tools.JsonGetValueTool attribute) (langchain.tools.JsonListKeysTool attribute) split_documents() (langchain.text_splitter.TextSplitter method) split_text() (langchain.text_splitter.CharacterTextSplitter method) (langchain.text_splitter.MarkdownHeaderTextSplitter 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) SQLChatMessageHistory (class in langchain.memory) SRTLoader (class in langchain.document_loaders) StarRocks (class in langchain.vectorstores)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-145
StarRocks (class in langchain.vectorstores) start_with_retrieval (langchain.chains.FlareChain attribute) state (langchain.document_loaders.GitHubIssuesLoader attribute) status (langchain.experimental.GenerativeAgent attribute) StdInInquireTool() (in module langchain.tools) StdOutCallbackHandler (class in langchain.callbacks) 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) stopping_strings (langchain.llms.TextGen 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) (langchain.llms.TextGen attribute) StreamingStdOutCallbackHandler (class in langchain.callbacks)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-146
StreamingStdOutCallbackHandler (class in langchain.callbacks) StreamlitCallbackHandler() (in module langchain.callbacks) strip_outputs (langchain.chains.SimpleSequentialChain attribute) StripeLoader (class in langchain.document_loaders) STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION (langchain.agents.AgentType attribute) structured_query_translator (langchain.retrievers.SelfQueryRetriever attribute) successful_requests (langchain.callbacks.OpenAICallbackHandler 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) tags (langchain.chains.AnalyzeDocumentChain attribute) (langchain.chains.APIChain attribute) (langchain.chains.ChatVectorDBChain attribute) (langchain.chains.ConstitutionalChain attribute) (langchain.chains.ConversationalRetrievalChain attribute) (langchain.chains.ConversationChain attribute) (langchain.chains.FlareChain attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-147
(langchain.chains.ConversationChain attribute) (langchain.chains.FlareChain attribute) (langchain.chains.GraphCypherQAChain attribute) (langchain.chains.GraphQAChain attribute) (langchain.chains.HypotheticalDocumentEmbedder attribute) (langchain.chains.KuzuQAChain attribute) (langchain.chains.LLMBashChain attribute) (langchain.chains.LLMChain attribute) (langchain.chains.LLMCheckerChain attribute) (langchain.chains.LLMMathChain attribute) (langchain.chains.LLMRequestsChain attribute) (langchain.chains.LLMRouterChain attribute) (langchain.chains.LLMSummarizationCheckerChain attribute) (langchain.chains.MapReduceChain attribute) (langchain.chains.MapReduceDocumentsChain attribute) (langchain.chains.MapRerankDocumentsChain attribute) (langchain.chains.MultiPromptChain attribute) (langchain.chains.MultiRetrievalQAChain attribute) (langchain.chains.MultiRouteChain attribute) (langchain.chains.NatBotChain attribute) (langchain.chains.NebulaGraphQAChain attribute) (langchain.chains.OpenAIModerationChain attribute) (langchain.chains.OpenAPIEndpointChain attribute) (langchain.chains.PALChain attribute) (langchain.chains.QAGenerationChain attribute) (langchain.chains.QAWithSourcesChain attribute) (langchain.chains.RefineDocumentsChain attribute) (langchain.chains.RetrievalQA attribute) (langchain.chains.RetrievalQAWithSourcesChain attribute) (langchain.chains.RouterChain attribute) (langchain.chains.SequentialChain attribute) (langchain.chains.SimpleSequentialChain attribute) (langchain.chains.SQLDatabaseChain attribute) (langchain.chains.SQLDatabaseSequentialChain attribute) (langchain.chains.StuffDocumentsChain attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-148
(langchain.chains.StuffDocumentsChain attribute) (langchain.chains.TransformChain attribute) (langchain.chains.VectorDBQA attribute) (langchain.chains.VectorDBQAWithSourcesChain attribute) (langchain.llms.AI21 attribute) (langchain.llms.AlephAlpha attribute) (langchain.llms.AmazonAPIGateway attribute) (langchain.llms.Anthropic attribute) (langchain.llms.Anyscale attribute) (langchain.llms.Aviary attribute) (langchain.llms.AzureMLOnlineEndpoint 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.Clarifai 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.ManifestWrapper attribute) (langchain.llms.Modal attribute) (langchain.llms.MosaicML attribute) (langchain.llms.NLPCloud attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-149
(langchain.llms.NLPCloud attribute) (langchain.llms.OctoAIEndpoint attribute) (langchain.llms.OpenAI attribute) (langchain.llms.OpenAIChat attribute) (langchain.llms.OpenLLM 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.SelfHostedPipeline attribute) (langchain.llms.StochasticAI attribute) (langchain.llms.TextGen attribute) (langchain.llms.VertexAI attribute) (langchain.llms.Writer 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) (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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-150
(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.TextGen attribute) (langchain.llms.VertexAI attribute) (langchain.llms.Writer attribute) template (langchain.prompts.PromptTemplate attribute) (langchain.tools.QueryCheckerTool attribute) (langchain.tools.QueryPowerBITool attribute) (langchain.tools.QuerySQLCheckerTool attribute) template_format (langchain.prompts.FewShotPromptTemplate attribute) (langchain.prompts.FewShotPromptWithTemplates attribute) (langchain.prompts.PromptTemplate attribute) template_tool_response (langchain.agents.ConversationalChatAgent attribute) TencentCOSDirectoryLoader (class in langchain.document_loaders) TencentCOSFileLoader (class in langchain.document_loaders) text (langchain.schema.ChatGeneration attribute) (langchain.schema.Generation 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-151
TextSplitter (class in langchain.text_splitter) tfidf_array (langchain.retrievers.TFIDFRetriever attribute) threshold (langchain.prompts.example_selector.NGramOverlapExampleSelector attribute) (langchain.prompts.NGramOverlapExampleSelector attribute) Tigris (class in langchain.vectorstores) tiktoken_model_name (langchain.chat_models.ChatOpenAI attribute) (langchain.embeddings.OpenAIEmbeddings attribute) (langchain.llms.AzureOpenAI attribute) (langchain.llms.OpenAI attribute) (langchain.llms.OpenLM attribute) time (langchain.utilities.DuckDuckGoSearchAPIWrapper attribute) to_json() (langchain.chains.AnalyzeDocumentChain method) (langchain.chains.APIChain method) (langchain.chains.ChatVectorDBChain method) (langchain.chains.ConstitutionalChain method) (langchain.chains.ConversationalRetrievalChain method) (langchain.chains.ConversationChain method) (langchain.chains.FlareChain method) (langchain.chains.GraphCypherQAChain method) (langchain.chains.GraphQAChain method) (langchain.chains.HypotheticalDocumentEmbedder method) (langchain.chains.KuzuQAChain method) (langchain.chains.LLMBashChain method) (langchain.chains.LLMChain method) (langchain.chains.LLMCheckerChain method) (langchain.chains.LLMMathChain method) (langchain.chains.LLMRequestsChain method) (langchain.chains.LLMRouterChain method) (langchain.chains.LLMSummarizationCheckerChain method) (langchain.chains.MapReduceChain method) (langchain.chains.MapReduceDocumentsChain method) (langchain.chains.MapRerankDocumentsChain method) (langchain.chains.MultiPromptChain method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-152
(langchain.chains.MultiPromptChain method) (langchain.chains.MultiRetrievalQAChain method) (langchain.chains.MultiRouteChain method) (langchain.chains.NatBotChain method) (langchain.chains.NebulaGraphQAChain method) (langchain.chains.OpenAIModerationChain method) (langchain.chains.OpenAPIEndpointChain method) (langchain.chains.PALChain method) (langchain.chains.QAGenerationChain method) (langchain.chains.QAWithSourcesChain method) (langchain.chains.RefineDocumentsChain method) (langchain.chains.RetrievalQA method) (langchain.chains.RetrievalQAWithSourcesChain method) (langchain.chains.RouterChain method) (langchain.chains.SequentialChain method) (langchain.chains.SimpleSequentialChain method) (langchain.chains.SQLDatabaseChain method) (langchain.chains.SQLDatabaseSequentialChain method) (langchain.chains.StuffDocumentsChain method) (langchain.chains.TransformChain method) (langchain.chains.VectorDBQA method) (langchain.chains.VectorDBQAWithSourcesChain method) to_json_not_implemented() (langchain.chains.AnalyzeDocumentChain method) (langchain.chains.APIChain method) (langchain.chains.ChatVectorDBChain method) (langchain.chains.ConstitutionalChain method) (langchain.chains.ConversationalRetrievalChain method) (langchain.chains.ConversationChain method) (langchain.chains.FlareChain method) (langchain.chains.GraphCypherQAChain method) (langchain.chains.GraphQAChain method) (langchain.chains.HypotheticalDocumentEmbedder method) (langchain.chains.KuzuQAChain method) (langchain.chains.LLMBashChain method) (langchain.chains.LLMChain method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-153
(langchain.chains.LLMChain method) (langchain.chains.LLMCheckerChain method) (langchain.chains.LLMMathChain method) (langchain.chains.LLMRequestsChain method) (langchain.chains.LLMRouterChain method) (langchain.chains.LLMSummarizationCheckerChain method) (langchain.chains.MapReduceChain method) (langchain.chains.MapReduceDocumentsChain method) (langchain.chains.MapRerankDocumentsChain method) (langchain.chains.MultiPromptChain method) (langchain.chains.MultiRetrievalQAChain method) (langchain.chains.MultiRouteChain method) (langchain.chains.NatBotChain method) (langchain.chains.NebulaGraphQAChain method) (langchain.chains.OpenAIModerationChain method) (langchain.chains.OpenAPIEndpointChain method) (langchain.chains.PALChain method) (langchain.chains.QAGenerationChain method) (langchain.chains.QAWithSourcesChain method) (langchain.chains.RefineDocumentsChain method) (langchain.chains.RetrievalQA method) (langchain.chains.RetrievalQAWithSourcesChain method) (langchain.chains.RouterChain method) (langchain.chains.SequentialChain method) (langchain.chains.SimpleSequentialChain method) (langchain.chains.SQLDatabaseChain method) (langchain.chains.SQLDatabaseSequentialChain method) (langchain.chains.StuffDocumentsChain method) (langchain.chains.TransformChain method) (langchain.chains.VectorDBQA method) (langchain.chains.VectorDBQAWithSourcesChain method) to_messages() (langchain.schema.PromptValue method) to_string() (langchain.schema.PromptValue method) to_typescript() (langchain.tools.APIOperation method) token (langchain.llms.PredictionGuard attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-154
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) (langchain.agents.OpenAIFunctionsAgent 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.NLPCloud attribute) (langchain.llms.Petals attribute) (langchain.llms.TextGen attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-155
(langchain.llms.Petals attribute) (langchain.llms.TextGen attribute) (langchain.llms.VertexAI attribute) (langchain.retrievers.ChatGPTPluginRetriever attribute) (langchain.retrievers.DataberryRetriever attribute) (langchain.retrievers.DocArrayRetriever attribute), [1] (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.TextGen attribute) (langchain.llms.VertexAI attribute) (langchain.llms.Writer attribute) topP (langchain.llms.AI21 attribute) total_cost (langchain.callbacks.OpenAICallbackHandler attribute) total_tokens (langchain.callbacks.OpenAICallbackHandler attribute) tracing_enabled() (in module langchain.callbacks)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-156
tracing_enabled() (in module langchain.callbacks) traits (langchain.experimental.GenerativeAgent attribute) transform (langchain.chains.TransformChain attribute) transform_documents() (langchain.document_transformers.EmbeddingsRedundantFilter method) (langchain.schema.BaseDocumentTransformer 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) true_val (langchain.output_parsers.BooleanOutputParser attribute) truncate (langchain.embeddings.CohereEmbeddings attribute) (langchain.llms.Cohere attribute) truncation_length (langchain.llms.TextGen 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.schema.AIMessage property) (langchain.schema.BaseMessage property) (langchain.schema.ChatMessage property) (langchain.schema.FunctionMessage property) (langchain.schema.HumanMessage property) (langchain.schema.SystemMessage property) (langchain.utilities.GoogleSerperAPIWrapper attribute) Typesense (class in langchain.vectorstores) typical_p (langchain.llms.TextGen attribute) U unique_union() (langchain.retrievers.MultiQueryRetriever method) unsecure (langchain.utilities.SearxSearchWrapper attribute) UnstructuredAPIFileIOLoader (class in langchain.document_loaders) UnstructuredAPIFileLoader (class in langchain.document_loaders)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-157
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) UnstructuredOrgModeLoader (class in langchain.document_loaders) UnstructuredPDFLoader (class in langchain.document_loaders) UnstructuredPowerPointLoader (class in langchain.document_loaders) UnstructuredRSTLoader (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.AmazonAPIGateway class method) (langchain.llms.Anthropic class method) (langchain.llms.Anyscale class method) (langchain.llms.Aviary class method) (langchain.llms.AzureMLOnlineEndpoint class method) (langchain.llms.AzureOpenAI class method) (langchain.llms.Banana class method)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-158
(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.Clarifai 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.HumanInputLLM class method) (langchain.llms.LlamaCpp class method) (langchain.llms.ManifestWrapper class method) (langchain.llms.Modal class method) (langchain.llms.MosaicML class method) (langchain.llms.NLPCloud class method) (langchain.llms.OctoAIEndpoint class method) (langchain.llms.OpenAI class method) (langchain.llms.OpenAIChat class method) (langchain.llms.OpenLLM 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-159
(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.TextGen class method) (langchain.llms.VertexAI class method) (langchain.llms.Writer class method) (langchain.schema.AIMessage class method) (langchain.schema.BaseLLMOutputParser class method) (langchain.schema.BaseMemory class method) (langchain.schema.BaseMessage class method) (langchain.schema.BaseOutputParser class method) (langchain.schema.ChatGeneration class method) (langchain.schema.ChatMessage class method) (langchain.schema.ChatResult class method) (langchain.schema.Document class method) (langchain.schema.FunctionMessage class method) (langchain.schema.Generation class method) (langchain.schema.HumanMessage class method) (langchain.schema.LLMResult class method) (langchain.schema.NoOpOutputParser class method) (langchain.schema.PromptValue class method) (langchain.schema.RunInfo class method) (langchain.schema.SystemMessage class method) upsert_messages() (langchain.memory.CosmosDBChatMessageHistory method) url (langchain.document_loaders.GitHubIssuesLoader property) (langchain.document_loaders.MathpixPDFLoader property) (langchain.llms.Beam attribute) (langchain.memory.MotorheadMemory attribute) (langchain.retrievers.ChatGPTPluginRetriever attribute) (langchain.retrievers.RemoteLangChainRetriever attribute) (langchain.tools.IFTTTWebhook attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-160
(langchain.tools.IFTTTWebhook attribute) urls (langchain.document_loaders.PlaywrightURLLoader attribute) (langchain.document_loaders.SeleniumURLLoader attribute) use() (langchain.vectorstores.AwaDB method) 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_original_query (langchain.retrievers.SelfQueryRetriever attribute) use_query_checker (langchain.chains.SQLDatabaseChain attribute) user_id (langchain.llms.Clarifai attribute) username (langchain.vectorstores.AlibabaCloudOpenSearchSettings attribute) (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_environment() (langchain.utilities.SceneXplainAPIWrapper 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) variable_name (langchain.prompts.MessagesPlaceholder attribute) Vectara (class in langchain.vectorstores) vector_field (langchain.vectorstores.SingleStoreDB attribute) vector_search() (langchain.vectorstores.AzureSearch method) vector_search_with_score() (langchain.vectorstores.AzureSearch method) vectorizer (langchain.retrievers.TFIDFRetriever attribute) VectorStore (class in langchain.vectorstores)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-161
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.prompts.MaxMarginalRelevanceExampleSelector attribute) (langchain.prompts.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.chains.AnalyzeDocumentChain attribute) (langchain.chains.APIChain attribute) (langchain.chains.ChatVectorDBChain attribute) (langchain.chains.ConstitutionalChain attribute) (langchain.chains.ConversationalRetrievalChain attribute) (langchain.chains.ConversationChain attribute) (langchain.chains.FlareChain attribute) (langchain.chains.GraphCypherQAChain attribute) (langchain.chains.GraphQAChain attribute) (langchain.chains.HypotheticalDocumentEmbedder attribute) (langchain.chains.KuzuQAChain attribute) (langchain.chains.LLMBashChain attribute) (langchain.chains.LLMChain attribute) (langchain.chains.LLMCheckerChain attribute) (langchain.chains.LLMMathChain attribute) (langchain.chains.LLMRequestsChain attribute) (langchain.chains.LLMRouterChain attribute) (langchain.chains.LLMSummarizationCheckerChain attribute) (langchain.chains.MapReduceChain attribute) (langchain.chains.MapReduceDocumentsChain attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-162
(langchain.chains.MapReduceDocumentsChain attribute) (langchain.chains.MapRerankDocumentsChain attribute) (langchain.chains.MultiPromptChain attribute) (langchain.chains.MultiRetrievalQAChain attribute) (langchain.chains.MultiRouteChain attribute) (langchain.chains.NatBotChain attribute) (langchain.chains.NebulaGraphQAChain attribute) (langchain.chains.OpenAIModerationChain attribute) (langchain.chains.OpenAPIEndpointChain attribute) (langchain.chains.PALChain attribute) (langchain.chains.QAGenerationChain attribute) (langchain.chains.QAWithSourcesChain attribute) (langchain.chains.RefineDocumentsChain attribute) (langchain.chains.RetrievalQA attribute) (langchain.chains.RetrievalQAWithSourcesChain attribute) (langchain.chains.RouterChain attribute) (langchain.chains.SequentialChain attribute) (langchain.chains.SimpleSequentialChain attribute) (langchain.chains.SQLDatabaseChain attribute) (langchain.chains.SQLDatabaseSequentialChain attribute) (langchain.chains.StuffDocumentsChain attribute) (langchain.chains.TransformChain attribute) (langchain.chains.VectorDBQA attribute) (langchain.chains.VectorDBQAWithSourcesChain attribute) (langchain.llms.AI21 attribute) (langchain.llms.AlephAlpha attribute) (langchain.llms.AmazonAPIGateway attribute) (langchain.llms.Anthropic attribute) (langchain.llms.Anyscale attribute) (langchain.llms.Aviary attribute) (langchain.llms.AzureMLOnlineEndpoint 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)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-163
(langchain.llms.CerebriumAI attribute) (langchain.llms.Clarifai 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.ManifestWrapper attribute) (langchain.llms.Modal attribute) (langchain.llms.MosaicML attribute) (langchain.llms.NLPCloud attribute) (langchain.llms.OctoAIEndpoint attribute) (langchain.llms.OpenAI attribute) (langchain.llms.OpenAIChat attribute) (langchain.llms.OpenLLM 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.SelfHostedPipeline attribute) (langchain.llms.StochasticAI attribute) (langchain.llms.TextGen attribute) (langchain.llms.VertexAI attribute) (langchain.llms.Writer attribute)
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-164
(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) wandb_tracing_enabled() (in module langchain.callbacks) WandbCallbackHandler (class in langchain.callbacks) 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) WhyLabsCallbackHandler (class in langchain.callbacks) WikipediaLoader (class in langchain.document_loaders) with_traceback() (langchain.schema.OutputParserException method) wolfram_alpha_appid (langchain.utilities.WolframAlphaAPIWrapper attribute) wrapper (langchain.tools.SearxSearchResults attribute) (langchain.tools.SearxSearchRun attribute) writer_api_key (langchain.llms.Writer attribute) writer_org_id (langchain.llms.Writer attribute) Y
https://api.python.langchain.com/en/stable/genindex.html
a1409c1b5e0f-165
writer_org_id (langchain.llms.Writer attribute) Y yield_blobs() (langchain.document_loaders.BlobLoader method) (langchain.document_loaders.FileSystemBlobLoader method) (langchain.document_loaders.YoutubeAudioLoader method) YoutubeAudioLoader (class in langchain.document_loaders) YoutubeLoader (class in langchain.document_loaders) Z zapier_description (langchain.tools.ZapierNLARunAction attribute) zapier_nla_api_base (langchain.utilities.ZapierNLAWrapper attribute) zapier_nla_api_key (langchain.utilities.ZapierNLAWrapper attribute) zapier_nla_oauth_access_token (langchain.utilities.ZapierNLAWrapper attribute) zep_messages (langchain.memory.ZepChatMessageHistory property) zep_summary (langchain.memory.ZepChatMessageHistory property) ZepChatMessageHistory (class in langchain.memory) ZepRetriever (class in langchain.retrievers) ZERO_SHOT_REACT_DESCRIPTION (langchain.agents.AgentType attribute) Zilliz (class in langchain.vectorstores) ZillizRetriever (class in langchain.retrievers)
https://api.python.langchain.com/en/stable/genindex.html
17154dc0c4bf-0
Agents Reference guide for Agents and associated abstractions. Agents Tools Agent Toolkits
https://api.python.langchain.com/en/stable/agents.html
c73826eb6edd-0
Memory class langchain.memory.CassandraChatMessageHistory(contact_points, session_id, port=9042, username='cassandra', password='cassandra', keyspace_name='chat_history', table_name='message_store')[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history that stores history in Cassandra. Parameters contact_points (List[str]) – list of ips to connect to Cassandra cluster session_id (str) – arbitrary key that is used to store the messages of a single chat session. port (int) – port to connect to Cassandra cluster username (str) – username to connect to Cassandra cluster password (str) – password to connect to Cassandra cluster keyspace_name (str) – name of the keyspace to use table_name (str) – name of the table to use property messages: List[langchain.schema.BaseMessage] Retrieve the messages from Cassandra add_message(message)[source] Append the message to the record in Cassandra Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Clear session memory from Cassandra Return type None class langchain.memory.ChatMessageHistory(*, messages=[])[source] Bases: langchain.schema.BaseChatMessageHistory, pydantic.main.BaseModel Parameters messages (List[langchain.schema.BaseMessage]) – Return type None attribute messages: List[langchain.schema.BaseMessage] = [] add_message(message)[source] Add a self-created message to the store Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Remove all messages from the store Return type None class langchain.memory.CombinedMemory(*, memories)[source]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-1
None class langchain.memory.CombinedMemory(*, memories)[source] Bases: langchain.schema.BaseMemory Class for combining multiple memories’ data together. Parameters memories (List[langchain.schema.BaseMemory]) – Return type None attribute memories: List[langchain.schema.BaseMemory] [Required] For tracking all the memories that should be accessed. clear()[source] Clear context from this session for every memory. Return type None load_memory_variables(inputs)[source] Load all vars from sub-memories. Parameters inputs (Dict[str, Any]) – Return type Dict[str, str] save_context(inputs, outputs)[source] Save context from this session for every memory. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property memory_variables: List[str] All the memory variables that this instance provides. class langchain.memory.ConversationBufferMemory(*, chat_memory=None, output_key=None, input_key=None, return_messages=False, human_prefix='Human', ai_prefix='AI', memory_key='history')[source] Bases: langchain.memory.chat_memory.BaseChatMemory Buffer for storing conversation memory. Parameters chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) – human_prefix (str) – ai_prefix (str) – memory_key (str) – Return type None attribute ai_prefix: str = 'AI' attribute human_prefix: str = 'Human' load_memory_variables(inputs)[source] Return history buffer. Parameters
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-2
load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, Any] property buffer: Any String buffer of memory. class langchain.memory.ConversationBufferWindowMemory(*, chat_memory=None, output_key=None, input_key=None, return_messages=False, human_prefix='Human', ai_prefix='AI', memory_key='history', k=5)[source] Bases: langchain.memory.chat_memory.BaseChatMemory Buffer for storing conversation memory. Parameters chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) – human_prefix (str) – ai_prefix (str) – memory_key (str) – k (int) – Return type None attribute ai_prefix: str = 'AI' attribute human_prefix: str = 'Human' attribute k: int = 5 load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, str] property buffer: List[langchain.schema.BaseMessage] String buffer of memory.
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-3
class langchain.memory.ConversationEntityMemory(*, chat_memory=None, output_key=None, input_key=None, return_messages=False, human_prefix='Human', ai_prefix='AI', llm, entity_extraction_prompt=PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\n\nThe conversation history is provided just in case of a coreference (e.g. "What do you know about him" where "him" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\n\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-4
"That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I\'m working with Person #2.\nOutput: Langchain, Person #2\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:', template_format='f-string', validate_template=True), entity_summarization_prompt=PromptTemplate(input_variables=['entity', 'summary', 'history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update the summary of the provided entity in the "Entity" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\n\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), return the existing summary unchanged.\n\nFull conversation history (for context):\n{history}\n\nEntity to summarize:\n{entity}\n\nExisting summary of {entity}:\n{summary}\n\nLast line of conversation:\nHuman: {input}\nUpdated summary:', template_format='f-string', validate_template=True), entity_cache=[], k=3, chat_history_key='history', entity_store=None)[source]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-5
Bases: langchain.memory.chat_memory.BaseChatMemory Entity extractor & summarizer memory. Extracts named entities from the recent chat history and generates summaries. With a swapable entity store, persisting entities across conversations. Defaults to an in-memory entity store, and can be swapped out for a Redis, SQLite, or other entity store. Parameters chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) – human_prefix (str) – ai_prefix (str) – llm (langchain.base_language.BaseLanguageModel) – entity_extraction_prompt (langchain.prompts.base.BasePromptTemplate) – entity_summarization_prompt (langchain.prompts.base.BasePromptTemplate) – entity_cache (List[str]) – k (int) – chat_history_key (str) – entity_store (langchain.memory.entity.BaseEntityStore) – Return type None attribute ai_prefix: str = 'AI' attribute chat_history_key: str = 'history' attribute entity_cache: List[str] = []
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-6
attribute entity_extraction_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\n\nThe conversation history is provided just in case of a coreference (e.g. "What do you know about him" where "him" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\n\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-7
line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I\'m working with Person #2.\nOutput: Langchain, Person #2\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:', template_format='f-string', validate_template=True)
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-8
attribute entity_store: langchain.memory.entity.BaseEntityStore [Optional] attribute entity_summarization_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['entity', 'summary', 'history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update the summary of the provided entity in the "Entity" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\n\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), return the existing summary unchanged.\n\nFull conversation history (for context):\n{history}\n\nEntity to summarize:\n{entity}\n\nExisting summary of {entity}:\n{summary}\n\nLast line of conversation:\nHuman: {input}\nUpdated summary:', template_format='f-string', validate_template=True) attribute human_prefix: str = 'Human' attribute k: int = 3 attribute llm: langchain.base_language.BaseLanguageModel [Required] clear()[source] Clear memory contents. Return type None load_memory_variables(inputs)[source] Returns chat history and all generated entities with summaries if available, and updates or clears the recent entity cache. New entity name can be found when calling this method, before the entity summaries are generated, so the entity cache values may be empty if no entity descriptions are generated yet. Parameters inputs (Dict[str, Any]) – Return type
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-9
Parameters inputs (Dict[str, Any]) – Return type Dict[str, Any] save_context(inputs, outputs)[source] Save context from this conversation history to the entity store. Generates a summary for each entity in the entity cache by prompting the model, and saves these summaries to the entity store. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property buffer: List[langchain.schema.BaseMessage] Access chat memory messages.
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-10
class langchain.memory.ConversationKGMemory(*, chat_memory=None, output_key=None, input_key=None, return_messages=False, k=2, human_prefix='Human', ai_prefix='AI', kg=None, knowledge_extraction_prompt=PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template="You are a networked intelligence helping a human track knowledge triples about all relevant people, things, concepts, etc. and integrating them with your knowledge stored within your weights as well as that stored in a knowledge graph. Extract all of the knowledge triples from the last line of conversation. A knowledge triple is a clause that contains a subject, a predicate, and an object. The subject is the entity being described, the predicate is the property of the subject that is being described, and the object is the value of the property.\n\nEXAMPLE\nConversation history:\nPerson #1: Did you hear aliens landed in Area 51?\nAI: No, I didn't hear that. What do you know about Area 51?\nPerson #1: It's a secret military base in Nevada.\nAI: What do you know about Nevada?\nLast line of conversation:\nPerson #1: It's a state in the US. It's also the number 1 producer of gold in the US.\n\nOutput: (Nevada, is a, state)<|>(Nevada, is in, US)<|>(Nevada, is the number 1 producer of, gold)\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: Hello.\nAI: Hi! How are you?\nPerson #1: I'm good. How are you?\nAI: I'm good too.\nLast line of conversation:\nPerson #1: I'm going to the store.\n\nOutput: NONE\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: What
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-11
NONE\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: What do you know about Descartes?\nAI: Descartes was a French philosopher, mathematician, and scientist who lived in the 17th century.\nPerson #1: The Descartes I'm referring to is a standup comedian and interior designer from Montreal.\nAI: Oh yes, He is a comedian and an interior designer. He has been in the industry for 30 years. His favorite food is baked bean pie.\nLast line of conversation:\nPerson #1: Oh huh. I know Descartes likes to drive antique scooters and play the mandolin.\nOutput: (Descartes, likes to drive, antique scooters)<|>(Descartes, plays, mandolin)\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:", template_format='f-string', validate_template=True), entity_extraction_prompt=PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\n\nThe conversation history is provided just in case of a coreference (e.g. "What do you know about him" where "him" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\n\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI:
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-12
history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I\'m working with Person #2.\nOutput: Langchain, Person #2\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:', template_format='f-string', validate_template=True), llm, summary_message_cls=<class 'langchain.schema.SystemMessage'>, memory_key='history')[source]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-13
Bases: langchain.memory.chat_memory.BaseChatMemory Knowledge graph memory for storing conversation memory. Integrates with external knowledge graph to store and retrieve information about knowledge triples in the conversation. Parameters chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) – k (int) – human_prefix (str) – ai_prefix (str) – kg (langchain.graphs.networkx_graph.NetworkxEntityGraph) – knowledge_extraction_prompt (langchain.prompts.base.BasePromptTemplate) – entity_extraction_prompt (langchain.prompts.base.BasePromptTemplate) – llm (langchain.base_language.BaseLanguageModel) – summary_message_cls (Type[langchain.schema.BaseMessage]) – memory_key (str) – Return type None attribute ai_prefix: str = 'AI'
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-14
attribute entity_extraction_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\n\nThe conversation history is provided just in case of a coreference (e.g. "What do you know about him" where "him" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\n\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how\'s it going today?\nAI: "It\'s going great! How about you?"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: "That sounds like a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-15
line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I\'m working with Person #2.\nOutput: Langchain, Person #2\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:', template_format='f-string', validate_template=True)
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-16
attribute human_prefix: str = 'Human' attribute k: int = 2 attribute kg: langchain.graphs.networkx_graph.NetworkxEntityGraph [Optional]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-17
attribute knowledge_extraction_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template="You are a networked intelligence helping a human track knowledge triples about all relevant people, things, concepts, etc. and integrating them with your knowledge stored within your weights as well as that stored in a knowledge graph. Extract all of the knowledge triples from the last line of conversation. A knowledge triple is a clause that contains a subject, a predicate, and an object. The subject is the entity being described, the predicate is the property of the subject that is being described, and the object is the value of the property.\n\nEXAMPLE\nConversation history:\nPerson #1: Did you hear aliens landed in Area 51?\nAI: No, I didn't hear that. What do you know about Area 51?\nPerson #1: It's a secret military base in Nevada.\nAI: What do you know about Nevada?\nLast line of conversation:\nPerson #1: It's a state in the US. It's also the number 1 producer of gold in the US.\n\nOutput: (Nevada, is a, state)<|>(Nevada, is in, US)<|>(Nevada, is the number 1 producer of, gold)\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: Hello.\nAI: Hi! How are you?\nPerson #1: I'm good. How are you?\nAI: I'm good too.\nLast line of conversation:\nPerson #1: I'm going to the store.\n\nOutput: NONE\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: What do you know about Descartes?\nAI: Descartes was a French philosopher, mathematician, and scientist who lived in the 17th
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-18
Descartes was a French philosopher, mathematician, and scientist who lived in the 17th century.\nPerson #1: The Descartes I'm referring to is a standup comedian and interior designer from Montreal.\nAI: Oh yes, He is a comedian and an interior designer. He has been in the industry for 30 years. His favorite food is baked bean pie.\nLast line of conversation:\nPerson #1: Oh huh. I know Descartes likes to drive antique scooters and play the mandolin.\nOutput: (Descartes, likes to drive, antique scooters)<|>(Descartes, plays, mandolin)\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:", template_format='f-string', validate_template=True)
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-19
attribute llm: langchain.base_language.BaseLanguageModel [Required] attribute summary_message_cls: Type[langchain.schema.BaseMessage] = <class 'langchain.schema.SystemMessage'> Number of previous utterances to include in the context. clear()[source] Clear memory contents. Return type None get_current_entities(input_string)[source] Parameters input_string (str) – Return type List[str] get_knowledge_triplets(input_string)[source] Parameters input_string (str) – Return type List[langchain.graphs.networkx_graph.KnowledgeTriple] load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, Any] save_context(inputs, outputs)[source] Save context from this conversation to buffer. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None class langchain.memory.ConversationStringBufferMemory(*, human_prefix='Human', ai_prefix='AI', buffer='', output_key=None, input_key=None, memory_key='history')[source] Bases: langchain.schema.BaseMemory Buffer for storing conversation memory. Parameters human_prefix (str) – ai_prefix (str) – buffer (str) – output_key (Optional[str]) – input_key (Optional[str]) – memory_key (str) – Return type None attribute ai_prefix: str = 'AI' Prefix to use for AI generated responses. attribute buffer: str = '' attribute human_prefix: str = 'Human' attribute input_key: Optional[str] = None
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-20
attribute input_key: Optional[str] = None attribute output_key: Optional[str] = None clear()[source] Clear memory contents. Return type None load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, str] save_context(inputs, outputs)[source] Save context from this conversation to buffer. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property memory_variables: List[str] Will always return list of memory variables. :meta private:
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-21
Will always return list of memory variables. :meta private: class langchain.memory.ConversationSummaryBufferMemory(*, human_prefix='Human', ai_prefix='AI', llm, prompt=PromptTemplate(input_variables=['summary', 'new_lines'], output_parser=None, partial_variables={}, template='Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial intelligence is a force for good?\nAI: Because artificial intelligence will help humans reach their full potential.\n\nNew summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND OF EXAMPLE\n\nCurrent summary:\n{summary}\n\nNew lines of conversation:\n{new_lines}\n\nNew summary:', template_format='f-string', validate_template=True), summary_message_cls=<class 'langchain.schema.SystemMessage'>, chat_memory=None, output_key=None, input_key=None, return_messages=False, max_token_limit=2000, moving_summary_buffer='', memory_key='history')[source] Bases: langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin Buffer with summarizer for storing conversation memory. Parameters human_prefix (str) – ai_prefix (str) – llm (langchain.base_language.BaseLanguageModel) – prompt (langchain.prompts.base.BasePromptTemplate) – summary_message_cls (Type[langchain.schema.BaseMessage]) – chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) –
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-22
output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) – max_token_limit (int) – moving_summary_buffer (str) – memory_key (str) – Return type None attribute max_token_limit: int = 2000 attribute memory_key: str = 'history' attribute moving_summary_buffer: str = '' clear()[source] Clear memory contents. Return type None load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, Any] prune()[source] Prune buffer if it exceeds max token limit Return type None save_context(inputs, outputs)[source] Save context from this conversation to buffer. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property buffer: List[langchain.schema.BaseMessage]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-23
Return type None property buffer: List[langchain.schema.BaseMessage] class langchain.memory.ConversationSummaryMemory(*, human_prefix='Human', ai_prefix='AI', llm, prompt=PromptTemplate(input_variables=['summary', 'new_lines'], output_parser=None, partial_variables={}, template='Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial intelligence is a force for good?\nAI: Because artificial intelligence will help humans reach their full potential.\n\nNew summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND OF EXAMPLE\n\nCurrent summary:\n{summary}\n\nNew lines of conversation:\n{new_lines}\n\nNew summary:', template_format='f-string', validate_template=True), summary_message_cls=<class 'langchain.schema.SystemMessage'>, chat_memory=None, output_key=None, input_key=None, return_messages=False, buffer='', memory_key='history')[source] Bases: langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin Conversation summarizer to memory. Parameters human_prefix (str) – ai_prefix (str) – llm (langchain.base_language.BaseLanguageModel) – prompt (langchain.prompts.base.BasePromptTemplate) – summary_message_cls (Type[langchain.schema.BaseMessage]) – chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) –
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-24
input_key (Optional[str]) – return_messages (bool) – buffer (str) – memory_key (str) – Return type None attribute buffer: str = '' clear()[source] Clear memory contents. Return type None classmethod from_messages(llm, chat_memory, *, summarize_step=2, **kwargs)[source] Parameters llm (langchain.base_language.BaseLanguageModel) – chat_memory (langchain.schema.BaseChatMessageHistory) – summarize_step (int) – kwargs (Any) – Return type langchain.memory.summary.ConversationSummaryMemory load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, Any] save_context(inputs, outputs)[source] Save context from this conversation to buffer. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None class langchain.memory.ConversationTokenBufferMemory(*, chat_memory=None, output_key=None, input_key=None, return_messages=False, human_prefix='Human', ai_prefix='AI', llm, memory_key='history', max_token_limit=2000)[source] Bases: langchain.memory.chat_memory.BaseChatMemory Buffer for storing conversation memory. Parameters chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) – human_prefix (str) – ai_prefix (str) – llm (langchain.base_language.BaseLanguageModel) – memory_key (str) – max_token_limit (int) – Return type None
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-25
max_token_limit (int) – Return type None attribute ai_prefix: str = 'AI' attribute human_prefix: str = 'Human' attribute llm: langchain.base_language.BaseLanguageModel [Required] attribute max_token_limit: int = 2000 attribute memory_key: str = 'history' load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, Any] save_context(inputs, outputs)[source] Save context from this conversation to buffer. Pruned. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property buffer: List[langchain.schema.BaseMessage] String buffer of memory. class langchain.memory.CosmosDBChatMessageHistory(cosmos_endpoint, cosmos_database, cosmos_container, session_id, user_id, credential=None, connection_string=None, ttl=None, cosmos_client_kwargs=None)[source] Bases: langchain.schema.BaseChatMessageHistory Chat history backed by Azure CosmosDB. Parameters cosmos_endpoint (str) – cosmos_database (str) – cosmos_container (str) – session_id (str) – user_id (str) – credential (Any) – connection_string (Optional[str]) – ttl (Optional[int]) – cosmos_client_kwargs (Optional[dict]) – prepare_cosmos()[source] Prepare the CosmosDB client. Use this function or the context manager to make sure your database is ready. Return type None load_messages()[source] Retrieve the messages from Cosmos Return type None add_message(message)[source]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-26
Retrieve the messages from Cosmos Return type None add_message(message)[source] Add a self-created message to the store Parameters message (langchain.schema.BaseMessage) – Return type None upsert_messages()[source] Update the cosmosdb item. Return type None clear()[source] Clear session memory from this memory and cosmos. Return type None class langchain.memory.DynamoDBChatMessageHistory(table_name, session_id, endpoint_url=None)[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history that stores history in AWS DynamoDB. This class expects that a DynamoDB table with name table_name and a partition Key of SessionId is present. Parameters table_name (str) – name of the DynamoDB table session_id (str) – arbitrary key that is used to store the messages of a single chat session. endpoint_url (Optional[str]) – URL of the AWS endpoint to connect to. This argument is optional and useful for test purposes, like using Localstack. If you plan to use AWS cloud service, you normally don’t have to worry about setting the endpoint_url. property messages: List[langchain.schema.BaseMessage] Retrieve the messages from DynamoDB add_message(message)[source] Append the message to the record in DynamoDB Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Clear session memory from DynamoDB Return type None class langchain.memory.FileChatMessageHistory(file_path)[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history that stores history in a local file. Parameters file_path (str) – path of the local file to store the messages.
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-27
Parameters file_path (str) – path of the local file to store the messages. property messages: List[langchain.schema.BaseMessage] Retrieve the messages from the local file add_message(message)[source] Append the message to the record in the local file Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Clear session memory from the local file Return type None class langchain.memory.InMemoryEntityStore(*, store={})[source] Bases: langchain.memory.entity.BaseEntityStore Basic in-memory entity store. Parameters store (Dict[str, Optional[str]]) – Return type None attribute store: Dict[str, Optional[str]] = {} clear()[source] Delete all entities from store. Return type None delete(key)[source] Delete entity value from store. Parameters key (str) – Return type None exists(key)[source] Check if entity exists in store. Parameters key (str) – Return type bool get(key, default=None)[source] Get entity value from store. Parameters key (str) – default (Optional[str]) – Return type Optional[str] set(key, value)[source] Set entity value in store. Parameters key (str) – value (Optional[str]) – Return type None class langchain.memory.MomentoChatMessageHistory(session_id, cache_client, cache_name, *, key_prefix='message_store:', ttl=None, ensure_cache_exists=True)[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history cache that uses Momento as a backend. See https://gomomento.com/
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-28
See https://gomomento.com/ Parameters session_id (str) – cache_client (momento.CacheClient) – cache_name (str) – key_prefix (str) – ttl (Optional[timedelta]) – ensure_cache_exists (bool) – classmethod from_client_params(session_id, cache_name, ttl, *, configuration=None, auth_token=None, **kwargs)[source] Construct cache from CacheClient parameters. Parameters session_id (str) – cache_name (str) – ttl (timedelta) – configuration (Optional[momento.config.Configuration]) – auth_token (Optional[str]) – kwargs (Any) – Return type MomentoChatMessageHistory property messages: list[langchain.schema.BaseMessage] Retrieve the messages from Momento. Raises SdkException – Momento service or network error Exception – Unexpected response Returns List of cached messages Return type list[BaseMessage] add_message(message)[source] Store a message in the cache. Parameters message (BaseMessage) – The message object to store. Raises SdkException – Momento service or network error. Exception – Unexpected response. Return type None clear()[source] Remove the session’s messages from the cache. Raises SdkException – Momento service or network error. Exception – Unexpected response. Return type None class langchain.memory.MongoDBChatMessageHistory(connection_string, session_id, database_name='chat_history', collection_name='message_store')[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history that stores history in MongoDB. Parameters connection_string (str) – connection string to connect to MongoDB session_id (str) – arbitrary key that is used to store the messages
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-29
session_id (str) – arbitrary key that is used to store the messages of a single chat session. database_name (str) – name of the database to use collection_name (str) – name of the collection to use property messages: List[langchain.schema.BaseMessage] Retrieve the messages from MongoDB add_message(message)[source] Append the message to the record in MongoDB Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Clear session memory from MongoDB Return type None class langchain.memory.MotorheadMemory(*, chat_memory=None, output_key=None, input_key=None, return_messages=False, url='https://api.getmetal.io/v1/motorhead', session_id, context=None, api_key=None, client_id=None, timeout=3000, memory_key='history')[source] Bases: langchain.memory.chat_memory.BaseChatMemory Parameters chat_memory (langchain.schema.BaseChatMessageHistory) – output_key (Optional[str]) – input_key (Optional[str]) – return_messages (bool) – url (str) – session_id (str) – context (Optional[str]) – api_key (Optional[str]) – client_id (Optional[str]) – timeout (int) – memory_key (str) – Return type None attribute api_key: Optional[str] = None attribute client_id: Optional[str] = None attribute context: Optional[str] = None attribute session_id: str [Required] attribute url: str = 'https://api.getmetal.io/v1/motorhead' delete_session()[source] Delete a session Return type None async init()[source]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-30
Delete a session Return type None async init()[source] Return type None load_memory_variables(values)[source] Return key-value pairs given the text input to the chain. If None, return all memories Parameters values (Dict[str, Any]) – Return type Dict[str, Any] save_context(inputs, outputs)[source] Save context from this conversation to buffer. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property memory_variables: List[str] Input keys this memory class will load dynamically. class langchain.memory.PostgresChatMessageHistory(session_id, connection_string='postgresql://postgres:mypassword@localhost/chat_history', table_name='message_store')[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history stored in a Postgres database. Parameters session_id (str) – connection_string (str) – table_name (str) – property messages: List[langchain.schema.BaseMessage] Retrieve the messages from PostgreSQL add_message(message)[source] Append the message to the record in PostgreSQL Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Clear session memory from PostgreSQL Return type None class langchain.memory.ReadOnlySharedMemory(*, memory)[source] Bases: langchain.schema.BaseMemory A memory wrapper that is read-only and cannot be changed. Parameters memory (langchain.schema.BaseMemory) – Return type None attribute memory: langchain.schema.BaseMemory [Required] clear()[source] Nothing to clear, got a memory like a vault. Return type None
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-31
Nothing to clear, got a memory like a vault. Return type None load_memory_variables(inputs)[source] Load memory variables from memory. Parameters inputs (Dict[str, Any]) – Return type Dict[str, str] save_context(inputs, outputs)[source] Nothing should be saved or changed Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property memory_variables: List[str] Return memory variables. class langchain.memory.RedisChatMessageHistory(session_id, url='redis://localhost:6379/0', key_prefix='message_store:', ttl=None)[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history stored in a Redis database. Parameters session_id (str) – url (str) – key_prefix (str) – ttl (Optional[int]) – property key: str Construct the record key to use property messages: List[langchain.schema.BaseMessage] Retrieve the messages from Redis add_message(message)[source] Append the message to the record in Redis Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Clear session memory from Redis Return type None class langchain.memory.RedisEntityStore(session_id='default', url='redis://localhost:6379/0', key_prefix='memory_store', ttl=86400, recall_ttl=259200, *args, redis_client=None)[source] Bases: langchain.memory.entity.BaseEntityStore Redis-backed Entity store. Entities get a TTL of 1 day by default, and that TTL is extended by 3 days every time the entity is read back. Parameters
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-32
that TTL is extended by 3 days every time the entity is read back. Parameters session_id (str) – url (str) – key_prefix (str) – ttl (Optional[int]) – recall_ttl (Optional[int]) – args (Any) – redis_client (Any) – Return type None attribute key_prefix: str = 'memory_store' attribute recall_ttl: Optional[int] = 259200 attribute redis_client: Any = None attribute session_id: str = 'default' attribute ttl: Optional[int] = 86400 clear()[source] Delete all entities from store. Return type None delete(key)[source] Delete entity value from store. Parameters key (str) – Return type None exists(key)[source] Check if entity exists in store. Parameters key (str) – Return type bool get(key, default=None)[source] Get entity value from store. Parameters key (str) – default (Optional[str]) – Return type Optional[str] set(key, value)[source] Set entity value in store. Parameters key (str) – value (Optional[str]) – Return type None property full_key_prefix: str class langchain.memory.SQLChatMessageHistory(session_id, connection_string, table_name='message_store')[source] Bases: langchain.schema.BaseChatMessageHistory Chat message history stored in an SQL database. Parameters session_id (str) – connection_string (str) – table_name (str) – property messages: List[langchain.schema.BaseMessage]
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-33
property messages: List[langchain.schema.BaseMessage] Retrieve all messages from db add_message(message)[source] Append the message to the record in db Parameters message (langchain.schema.BaseMessage) – Return type None clear()[source] Clear session memory from db Return type None class langchain.memory.SQLiteEntityStore(session_id='default', db_file='entities.db', table_name='memory_store', *args)[source] Bases: langchain.memory.entity.BaseEntityStore SQLite-backed Entity store Parameters session_id (str) – db_file (str) – table_name (str) – args (Any) – Return type None attribute session_id: str = 'default' attribute table_name: str = 'memory_store' clear()[source] Delete all entities from store. Return type None delete(key)[source] Delete entity value from store. Parameters key (str) – Return type None exists(key)[source] Check if entity exists in store. Parameters key (str) – Return type bool get(key, default=None)[source] Get entity value from store. Parameters key (str) – default (Optional[str]) – Return type Optional[str] set(key, value)[source] Set entity value in store. Parameters key (str) – value (Optional[str]) – Return type None property full_table_name: str class langchain.memory.SimpleMemory(*, memories={})[source] Bases: langchain.schema.BaseMemory Simple memory for storing context or other bits of information that shouldn’t ever change between prompts.
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-34
Simple memory for storing context or other bits of information that shouldn’t ever change between prompts. Parameters memories (Dict[str, Any]) – Return type None attribute memories: Dict[str, Any] = {} clear()[source] Nothing to clear, got a memory like a vault. Return type None load_memory_variables(inputs)[source] Return key-value pairs given the text input to the chain. If None, return all memories Parameters inputs (Dict[str, Any]) – Return type Dict[str, str] save_context(inputs, outputs)[source] Nothing should be saved or changed, my memory is set in stone. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property memory_variables: List[str] Input keys this memory class will load dynamically. class langchain.memory.VectorStoreRetrieverMemory(*, retriever, memory_key='history', input_key=None, return_docs=False)[source] Bases: langchain.schema.BaseMemory Class for a VectorStore-backed memory object. Parameters retriever (langchain.vectorstores.base.VectorStoreRetriever) – memory_key (str) – input_key (Optional[str]) – return_docs (bool) – Return type None attribute input_key: Optional[str] = None Key name to index the inputs to load_memory_variables. attribute memory_key: str = 'history' Key name to locate the memories in the result of load_memory_variables. attribute retriever: langchain.vectorstores.base.VectorStoreRetriever [Required] VectorStoreRetriever object to connect to. attribute return_docs: bool = False
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-35
attribute return_docs: bool = False Whether or not to return the result of querying the database directly. clear()[source] Nothing to clear. Return type None load_memory_variables(inputs)[source] Return history buffer. Parameters inputs (Dict[str, Any]) – Return type Dict[str, Union[List[langchain.schema.Document], str]] save_context(inputs, outputs)[source] Save context from this conversation to buffer. Parameters inputs (Dict[str, Any]) – outputs (Dict[str, str]) – Return type None property memory_variables: List[str] The list of keys emitted from the load_memory_variables method. class langchain.memory.ZepChatMessageHistory(session_id, url='http://localhost:8000')[source] Bases: langchain.schema.BaseChatMessageHistory A ChatMessageHistory implementation that uses Zep as a backend. Recommended usage: # Set up Zep Chat History zep_chat_history = ZepChatMessageHistory( session_id=session_id, url=ZEP_API_URL, ) # Use a standard ConversationBufferMemory to encapsulate the Zep chat history memory = ConversationBufferMemory( memory_key="chat_history", chat_memory=zep_chat_history ) Zep provides long-term conversation storage for LLM apps. The server stores, summarizes, embeds, indexes, and enriches conversational AI chat histories, and exposes them via simple, low-latency APIs. For server installation instructions and more, see: https://getzep.github.io/ This class is a thin wrapper around the zep-python package. Additional Zep functionality is exposed via the zep_summary and zep_messages properties. For more information on the zep-python package, see:
https://api.python.langchain.com/en/stable/modules/memory.html
c73826eb6edd-36
properties. For more information on the zep-python package, see: https://github.com/getzep/zep-python Parameters session_id (str) – url (str) – Return type None property messages: List[langchain.schema.BaseMessage] Retrieve messages from Zep memory property zep_messages: List[Message] Retrieve summary from Zep memory property zep_summary: Optional[str] Retrieve summary from Zep memory add_message(message)[source] Append the message to the Zep memory history Parameters message (langchain.schema.BaseMessage) – Return type None search(query, metadata=None, limit=None)[source] Search Zep memory for messages matching the query Parameters query (str) – metadata (Optional[Dict]) – limit (Optional[int]) – Return type List[MemorySearchResult] clear()[source] Clear session memory from Zep. Note that Zep is long-term storage for memory and this is not advised unless you have specific data retention requirements. Return type None
https://api.python.langchain.com/en/stable/modules/memory.html
2b28b54605b7-0
Vector Stores Wrappers on top of vector stores. class langchain.vectorstores.AlibabaCloudOpenSearch(embedding, config, **kwargs)[source] Bases: langchain.vectorstores.base.VectorStore Alibaba Cloud OpenSearch Vector Store Parameters embedding (langchain.embeddings.base.Embeddings) – config (langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearchSettings) – kwargs (Any) – Return type None add_texts(texts, metadatas=None, **kwargs)[source] Run more texts through the embeddings and add to the vectorstore. Parameters texts (Iterable[str]) – Iterable of strings to add to the vectorstore. metadatas (Optional[List[dict]]) – Optional list of metadatas associated with the texts. kwargs (Any) – vectorstore specific parameters Returns List of ids from adding the texts into the vectorstore. Return type List[str] similarity_search(query, k=4, search_filter=None, **kwargs)[source] Return docs most similar to query. Parameters query (str) – k (int) – search_filter (Optional[Dict[str, Any]]) – kwargs (Any) – Return type List[langchain.schema.Document] similarity_search_with_relevance_scores(query, k=4, search_filter=None, **kwargs)[source] Return docs and relevance scores in the range [0, 1]. 0 is dissimilar, 1 is most similar. Parameters query (str) – input text k (int) – Number of Documents to return. Defaults to 4. **kwargs – kwargs to be passed to similarity search. Should include: score_threshold: Optional, a floating point value between 0 to 1 to
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-1
score_threshold: Optional, a floating point value between 0 to 1 to filter the resulting set of retrieved docs search_filter (Optional[dict]) – kwargs (Any) – Returns List of Tuples of (doc, similarity_score) Return type List[Tuple[langchain.schema.Document, float]] similarity_search_by_vector(embedding, k=4, search_filter=None, **kwargs)[source] Return docs most similar to embedding vector. Parameters embedding (List[float]) – Embedding to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. search_filter (Optional[dict]) – kwargs (Any) – Returns List of Documents most similar to the query vector. Return type List[langchain.schema.Document] inner_embedding_query(embedding, search_filter=None, k=4)[source] Parameters embedding (List[float]) – search_filter (Optional[Dict[str, Any]]) – k (int) – Return type Dict[str, Any] create_results(json_result)[source] Parameters json_result (Dict[str, Any]) – Return type List[langchain.schema.Document] create_results_with_score(json_result)[source] Parameters json_result (Dict[str, Any]) – Return type List[Tuple[langchain.schema.Document, float]] classmethod from_texts(texts, embedding, metadatas=None, config=None, **kwargs)[source] Return VectorStore initialized from texts and embeddings. Parameters texts (List[str]) – embedding (langchain.embeddings.base.Embeddings) – metadatas (Optional[List[dict]]) –
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-2
metadatas (Optional[List[dict]]) – config (Optional[langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearchSettings]) – kwargs (Any) – Return type langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch classmethod from_documents(documents, embedding, ids=None, config=None, **kwargs)[source] Return VectorStore initialized from documents and embeddings. Parameters documents (List[langchain.schema.Document]) – embedding (langchain.embeddings.base.Embeddings) – ids (Optional[List[str]]) – config (Optional[langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearchSettings]) – kwargs (Any) – Return type langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch class langchain.vectorstores.AlibabaCloudOpenSearchSettings(endpoint, instance_id, username, password, datasource_name, embedding_index_name, field_name_mapping)[source] Bases: object Opensearch Client Configuration Attribute: endpoint (str) : The endpoint of opensearch instance, You can find it from the console of Alibaba Cloud OpenSearch. instance_id (str) : The identify of opensearch instance, You can find it from the console of Alibaba Cloud OpenSearch. datasource_name (str): The name of the data source specified when creating it. username (str) : The username specified when purchasing the instance. password (str) : The password specified when purchasing the instance. embedding_index_name (str) : The name of the vector attribute specified when configuring the instance attributes. field_name_mapping (Dict) : Using field name mapping between opensearch vector store and opensearch instance configuration table field names: {
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-3
vector store and opensearch instance configuration table field names: { β€˜id’: β€˜The id field name map of index document.’, β€˜document’: β€˜The text field name map of index document.’, β€˜embedding’: β€˜In the embedding field of the opensearch instance, the values must be in float16 multivalue type and separated by commas.’, β€˜metadata_field_x’: β€˜Metadata field mapping includes the mapped field name and operator in the mapping value, separated by a comma between the mapped field name and the operator.’, } Parameters endpoint (str) – instance_id (str) – username (str) – password (str) – datasource_name (str) – embedding_index_name (str) – field_name_mapping (Dict[str, str]) – Return type None endpoint: str instance_id: str username: str password: str datasource_name: str embedding_index_name: str field_name_mapping: Dict[str, str] = {'document': 'document', 'embedding': 'embedding', 'id': 'id', 'metadata_field_x': 'metadata_field_x,operator'} class langchain.vectorstores.AnalyticDB(connection_string, embedding_function, embedding_dimension=1536, collection_name='langchain_document', pre_delete_collection=False, logger=None)[source] Bases: langchain.vectorstores.base.VectorStore VectorStore implementation using AnalyticDB. AnalyticDB is a distributed full PostgresSQL syntax cloud-native database. - connection_string is a postgres connection string. - embedding_function any embedding function implementing langchain.embeddings.base.Embeddings interface. collection_name is the name of the collection to use. (default: langchain)
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-4
collection_name is the name of the collection to use. (default: langchain) NOTE: This is not the name of the table, but the name of the collection.The tables will be created when initializing the store (if not exists) So, make sure the user has the right permissions to create tables. pre_delete_collection if True, will delete the collection if it exists.(default: False) - Useful for testing. Parameters connection_string (str) – embedding_function (Embeddings) – embedding_dimension (int) – collection_name (str) – pre_delete_collection (bool) – logger (Optional[logging.Logger]) – Return type None create_table_if_not_exists()[source] Return type None create_collection()[source] Return type None delete_collection()[source] Return type None add_texts(texts, metadatas=None, ids=None, batch_size=500, **kwargs)[source] Run more texts through the embeddings and add to the vectorstore. Parameters texts (Iterable[str]) – Iterable of strings to add to the vectorstore. metadatas (Optional[List[dict]]) – Optional list of metadatas associated with the texts. kwargs (Any) – vectorstore specific parameters ids (Optional[List[str]]) – batch_size (int) – Returns List of ids from adding the texts into the vectorstore. Return type List[str] similarity_search(query, k=4, filter=None, **kwargs)[source] Run similarity search with AnalyticDB with distance. Parameters query (str) – Query text to search for. k (int) – Number of results to return. Defaults to 4.
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-5
k (int) – Number of results to return. Defaults to 4. filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. kwargs (Any) – Returns List of Documents most similar to the query. Return type List[langchain.schema.Document] similarity_search_with_score(query, k=4, filter=None)[source] Return docs most similar to query. Parameters query (str) – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. Returns List of Documents most similar to the query and score for each Return type List[Tuple[langchain.schema.Document, float]] similarity_search_with_score_by_vector(embedding, k=4, filter=None)[source] Parameters embedding (List[float]) – k (int) – filter (Optional[dict]) – Return type List[Tuple[langchain.schema.Document, float]] similarity_search_by_vector(embedding, k=4, filter=None, **kwargs)[source] Return docs most similar to embedding vector. Parameters embedding (List[float]) – Embedding to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. kwargs (Any) – Returns List of Documents most similar to the query vector. Return type List[langchain.schema.Document] classmethod from_texts(texts, embedding, metadatas=None, embedding_dimension=1536, collection_name='langchain_document', ids=None, pre_delete_collection=False, **kwargs)[source]
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-6
Return VectorStore initialized from texts and embeddings. Postgres Connection string is required Either pass it as a parameter or set the PG_CONNECTION_STRING environment variable. Parameters texts (List[str]) – embedding (langchain.embeddings.base.Embeddings) – metadatas (Optional[List[dict]]) – embedding_dimension (int) – collection_name (str) – ids (Optional[List[str]]) – pre_delete_collection (bool) – kwargs (Any) – Return type langchain.vectorstores.analyticdb.AnalyticDB classmethod get_connection_string(kwargs)[source] Parameters kwargs (Dict[str, Any]) – Return type str classmethod from_documents(documents, embedding, embedding_dimension=1536, collection_name='langchain_document', ids=None, pre_delete_collection=False, **kwargs)[source] Return VectorStore initialized from documents and embeddings. Postgres Connection string is required Either pass it as a parameter or set the PG_CONNECTION_STRING environment variable. Parameters documents (List[langchain.schema.Document]) – embedding (langchain.embeddings.base.Embeddings) – embedding_dimension (int) – collection_name (str) – ids (Optional[List[str]]) – pre_delete_collection (bool) – kwargs (Any) – Return type langchain.vectorstores.analyticdb.AnalyticDB classmethod connection_string_from_db_params(driver, host, port, database, user, password)[source] Return connection string from database parameters. Parameters driver (str) – host (str) – port (int) – database (str) – user (str) – password (str) – Return type str
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-7
user (str) – password (str) – Return type str class langchain.vectorstores.Annoy(embedding_function, index, metric, docstore, index_to_docstore_id)[source] Bases: langchain.vectorstores.base.VectorStore Wrapper around Annoy vector database. To use, you should have the annoy python package installed. Example from langchain import Annoy db = Annoy(embedding_function, index, docstore, index_to_docstore_id) Parameters embedding_function (Callable) – index (Any) – metric (str) – docstore (Docstore) – index_to_docstore_id (Dict[int, str]) – add_texts(texts, metadatas=None, **kwargs)[source] Run more texts through the embeddings and add to the vectorstore. Parameters texts (Iterable[str]) – Iterable of strings to add to the vectorstore. metadatas (Optional[List[dict]]) – Optional list of metadatas associated with the texts. kwargs (Any) – vectorstore specific parameters Returns List of ids from adding the texts into the vectorstore. Return type List[str] process_index_results(idxs, dists)[source] Turns annoy results into a list of documents and scores. Parameters idxs (List[int]) – List of indices of the documents in the index. dists (List[float]) – List of distances of the documents in the index. Returns List of Documents and scores. Return type List[Tuple[langchain.schema.Document, float]] similarity_search_with_score_by_vector(embedding, k=4, search_k=- 1)[source] Return docs most similar to query. Parameters query – Text to look up documents similar to.
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-8
Parameters query – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. search_k (int) – inspect up to search_k nodes which defaults to n_trees * n if not provided embedding (List[float]) – Returns List of Documents most similar to the query and score for each Return type List[Tuple[langchain.schema.Document, float]] similarity_search_with_score_by_index(docstore_index, k=4, search_k=- 1)[source] Return docs most similar to query. Parameters query – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. search_k (int) – inspect up to search_k nodes which defaults to n_trees * n if not provided docstore_index (int) – Returns List of Documents most similar to the query and score for each Return type List[Tuple[langchain.schema.Document, float]] similarity_search_with_score(query, k=4, search_k=- 1)[source] Return docs most similar to query. Parameters query (str) – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. search_k (int) – inspect up to search_k nodes which defaults to n_trees * n if not provided Returns List of Documents most similar to the query and score for each Return type List[Tuple[langchain.schema.Document, float]] similarity_search_by_vector(embedding, k=4, search_k=- 1, **kwargs)[source] Return docs most similar to embedding vector. Parameters embedding (List[float]) – Embedding to look up documents similar to.
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-9
Parameters embedding (List[float]) – Embedding to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. search_k (int) – inspect up to search_k nodes which defaults to n_trees * n if not provided kwargs (Any) – Returns List of Documents most similar to the embedding. Return type List[langchain.schema.Document] similarity_search_by_index(docstore_index, k=4, search_k=- 1, **kwargs)[source] Return docs most similar to docstore_index. Parameters docstore_index (int) – Index of document in docstore k (int) – Number of Documents to return. Defaults to 4. search_k (int) – inspect up to search_k nodes which defaults to n_trees * n if not provided kwargs (Any) – Returns List of Documents most similar to the embedding. Return type List[langchain.schema.Document] similarity_search(query, k=4, search_k=- 1, **kwargs)[source] Return docs most similar to query. Parameters query (str) – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. search_k (int) – inspect up to search_k nodes which defaults to n_trees * n if not provided kwargs (Any) – Returns List of Documents most similar to the query. Return type List[langchain.schema.Document] max_marginal_relevance_search_by_vector(embedding, k=4, fetch_k=20, lambda_mult=0.5, **kwargs)[source] Return docs selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-10
Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters embedding (List[float]) – Embedding to look up documents similar to. fetch_k (int) – Number of Documents to fetch to pass to MMR algorithm. k (int) – Number of Documents to return. Defaults to 4. lambda_mult (float) – Number between 0 and 1 that determines the degree of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5. kwargs (Any) – Returns List of Documents selected by maximal marginal relevance. Return type List[langchain.schema.Document] max_marginal_relevance_search(query, k=4, fetch_k=20, lambda_mult=0.5, **kwargs)[source] Return docs selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters query (str) – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. fetch_k (int) – Number of Documents to fetch to pass to MMR algorithm. lambda_mult (float) – Number between 0 and 1 that determines the degree of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5. kwargs (Any) – Returns List of Documents selected by maximal marginal relevance. Return type List[langchain.schema.Document] classmethod from_texts(texts, embedding, metadatas=None, metric='angular', trees=100, n_jobs=- 1, **kwargs)[source] Construct Annoy wrapper from raw documents. Parameters texts (List[str]) – List of documents to index.
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-11
Parameters texts (List[str]) – List of documents to index. embedding (langchain.embeddings.base.Embeddings) – Embedding function to use. metadatas (Optional[List[dict]]) – List of metadata dictionaries to associate with documents. metric (str) – Metric to use for indexing. Defaults to β€œangular”. trees (int) – Number of trees to use for indexing. Defaults to 100. n_jobs (int) – Number of jobs to use for indexing. Defaults to -1. kwargs (Any) – Return type langchain.vectorstores.annoy.Annoy This is a user friendly interface that: Embeds documents. Creates an in memory docstore Initializes the Annoy database This is intended to be a quick way to get started. Example from langchain import Annoy from langchain.embeddings import OpenAIEmbeddings embeddings = OpenAIEmbeddings() index = Annoy.from_texts(texts, embeddings) classmethod from_embeddings(text_embeddings, embedding, metadatas=None, metric='angular', trees=100, n_jobs=- 1, **kwargs)[source] Construct Annoy wrapper from embeddings. Parameters text_embeddings (List[Tuple[str, List[float]]]) – List of tuples of (text, embedding) embedding (langchain.embeddings.base.Embeddings) – Embedding function to use. metadatas (Optional[List[dict]]) – List of metadata dictionaries to associate with documents. metric (str) – Metric to use for indexing. Defaults to β€œangular”. trees (int) – Number of trees to use for indexing. Defaults to 100. n_jobs (int) – Number of jobs to use for indexing. Defaults to -1 kwargs (Any) – Return type langchain.vectorstores.annoy.Annoy
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-12
Return type langchain.vectorstores.annoy.Annoy This is a user friendly interface that: Creates an in memory docstore with provided embeddings Initializes the Annoy database This is intended to be a quick way to get started. Example from langchain import Annoy from langchain.embeddings import OpenAIEmbeddings embeddings = OpenAIEmbeddings() text_embeddings = embeddings.embed_documents(texts) text_embedding_pairs = list(zip(texts, text_embeddings)) db = Annoy.from_embeddings(text_embedding_pairs, embeddings) save_local(folder_path, prefault=False)[source] Save Annoy index, docstore, and index_to_docstore_id to disk. Parameters folder_path (str) – folder path to save index, docstore, and index_to_docstore_id to. prefault (bool) – Whether to pre-load the index into memory. Return type None classmethod load_local(folder_path, embeddings)[source] Load Annoy index, docstore, and index_to_docstore_id to disk. Parameters folder_path (str) – folder path to load index, docstore, and index_to_docstore_id from. embeddings (langchain.embeddings.base.Embeddings) – Embeddings to use when generating queries. Return type langchain.vectorstores.annoy.Annoy class langchain.vectorstores.AtlasDB(name, embedding_function=None, api_key=None, description='A description for your project', is_public=True, reset_project_if_exists=False)[source] Bases: langchain.vectorstores.base.VectorStore Wrapper around Atlas: Nomic’s neural database and rhizomatic instrument. To use, you should have the nomic python package installed. Example from langchain.vectorstores import AtlasDB
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-13
Example from langchain.vectorstores import AtlasDB from langchain.embeddings.openai import OpenAIEmbeddings embeddings = OpenAIEmbeddings() vectorstore = AtlasDB("my_project", embeddings.embed_query) Parameters name (str) – embedding_function (Optional[Embeddings]) – api_key (Optional[str]) – description (str) – is_public (bool) – reset_project_if_exists (bool) – Return type None add_texts(texts, metadatas=None, ids=None, refresh=True, **kwargs)[source] Run more texts through the embeddings and add to the vectorstore. Parameters texts (Iterable[str]) – Texts to add to the vectorstore. metadatas (Optional[List[dict]], optional) – Optional list of metadatas. ids (Optional[List[str]]) – An optional list of ids. refresh (bool) – Whether or not to refresh indices with the updated data. Default True. kwargs (Any) – Returns List of IDs of the added texts. Return type List[str] create_index(**kwargs)[source] Creates an index in your project. See https://docs.nomic.ai/atlas_api.html#nomic.project.AtlasProject.create_index for full detail. Parameters kwargs (Any) – Return type Any similarity_search(query, k=4, **kwargs)[source] Run similarity search with AtlasDB Parameters query (str) – Query text to search for. k (int) – Number of results to return. Defaults to 4. kwargs (Any) – Returns List of documents most similar to the query text. Return type List[Document]
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-14
List of documents most similar to the query text. Return type List[Document] classmethod from_texts(texts, embedding=None, metadatas=None, ids=None, name=None, api_key=None, description='A description for your project', is_public=True, reset_project_if_exists=False, index_kwargs=None, **kwargs)[source] Create an AtlasDB vectorstore from a raw documents. Parameters texts (List[str]) – The list of texts to ingest. name (str) – Name of the project to create. api_key (str) – Your nomic API key, embedding (Optional[Embeddings]) – Embedding function. Defaults to None. metadatas (Optional[List[dict]]) – List of metadatas. Defaults to None. ids (Optional[List[str]]) – Optional list of document IDs. If None, ids will be auto created description (str) – A description for your project. is_public (bool) – Whether your project is publicly accessible. True by default. reset_project_if_exists (bool) – Whether to reset this project if it already exists. Default False. Generally userful during development and testing. index_kwargs (Optional[dict]) – Dict of kwargs for index creation. See https://docs.nomic.ai/atlas_api.html kwargs (Any) – Returns Nomic’s neural database and finest rhizomatic instrument Return type AtlasDB classmethod from_documents(documents, embedding=None, ids=None, name=None, api_key=None, persist_directory=None, description='A description for your project', is_public=True, reset_project_if_exists=False, index_kwargs=None, **kwargs)[source] Create an AtlasDB vectorstore from a list of documents. Parameters name (str) – Name of the collection to create. api_key (str) – Your nomic API key,
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-15
api_key (str) – Your nomic API key, documents (List[Document]) – List of documents to add to the vectorstore. embedding (Optional[Embeddings]) – Embedding function. Defaults to None. ids (Optional[List[str]]) – Optional list of document IDs. If None, ids will be auto created description (str) – A description for your project. is_public (bool) – Whether your project is publicly accessible. True by default. reset_project_if_exists (bool) – Whether to reset this project if it already exists. Default False. Generally userful during development and testing. index_kwargs (Optional[dict]) – Dict of kwargs for index creation. See https://docs.nomic.ai/atlas_api.html persist_directory (Optional[str]) – kwargs (Any) – Returns Nomic’s neural database and finest rhizomatic instrument Return type AtlasDB class langchain.vectorstores.AwaDB(table_name='langchain_awadb', embedding=None, log_and_data_dir=None, client=None)[source] Bases: langchain.vectorstores.base.VectorStore Interface implemented by AwaDB vector stores. Parameters table_name (str) – embedding (Optional[Embeddings]) – log_and_data_dir (Optional[str]) – client (Optional[awadb.Client]) – Return type None add_texts(texts, metadatas=None, is_duplicate_texts=None, **kwargs)[source] Run more texts through the embeddings and add to the vectorstore. :param texts: Iterable of strings to add to the vectorstore. :param metadatas: Optional list of metadatas associated with the texts. :param is_duplicate_texts: Optional whether to duplicate texts. :param kwargs: vectorstore specific parameters. Returns
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-16
:param kwargs: vectorstore specific parameters. Returns List of ids from adding the texts into the vectorstore. Parameters texts (Iterable[str]) – metadatas (Optional[List[dict]]) – is_duplicate_texts (Optional[bool]) – kwargs (Any) – Return type List[str] load_local(table_name, **kwargs)[source] Parameters table_name (str) – kwargs (Any) – Return type bool similarity_search(query, k=4, **kwargs)[source] Return docs most similar to query. Parameters query (str) – k (int) – kwargs (Any) – Return type List[langchain.schema.Document] similarity_search_with_score(query, k=4, **kwargs)[source] Return docs and relevance scores, normalized on a scale from 0 to 1. 0 is dissimilar, 1 is most similar. Parameters query (str) – k (int) – kwargs (Any) – Return type List[Tuple[langchain.schema.Document, float]] similarity_search_with_relevance_scores(query, k=4, **kwargs)[source] Return docs and relevance scores, normalized on a scale from 0 to 1. 0 is dissimilar, 1 is most similar. Parameters query (str) – k (int) – kwargs (Any) – Return type List[Tuple[langchain.schema.Document, float]] similarity_search_by_vector(embedding=None, k=4, scores=None, **kwargs)[source] Return docs most similar to embedding vector. Parameters embedding (Optional[List[float]]) – Embedding to look up documents similar to.
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-17
Parameters embedding (Optional[List[float]]) – Embedding to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. scores (Optional[list]) – kwargs (Any) – Returns List of Documents most similar to the query vector. Return type List[langchain.schema.Document] create_table(table_name, **kwargs)[source] Create a new table. Parameters table_name (str) – kwargs (Any) – Return type bool use(table_name, **kwargs)[source] Use the specified table. Don’t know the tables, please invoke list_tables. Parameters table_name (str) – kwargs (Any) – Return type bool list_tables(**kwargs)[source] List all the tables created by the client. Parameters kwargs (Any) – Return type List[str] get_current_table(**kwargs)[source] Get the current table. Parameters kwargs (Any) – Return type str classmethod from_texts(texts, embedding=None, metadatas=None, table_name='langchain_awadb', log_and_data_dir=None, client=None, **kwargs)[source] Create an AwaDB vectorstore from a raw documents. Parameters texts (List[str]) – List of texts to add to the table. embedding (Optional[Embeddings]) – Embedding function. Defaults to None. metadatas (Optional[List[dict]]) – List of metadatas. Defaults to None. table_name (str) – Name of the table to create. log_and_data_dir (Optional[str]) – Directory of logging and persistence. client (Optional[awadb.Client]) – AwaDB client kwargs (Any) – Returns
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-18
kwargs (Any) – Returns AwaDB vectorstore. Return type AwaDB classmethod from_documents(documents, embedding=None, table_name='langchain_awadb', log_and_data_dir=None, client=None, **kwargs)[source] Create an AwaDB vectorstore from a list of documents. If a log_and_data_dir specified, the table will be persisted there. Parameters documents (List[Document]) – List of documents to add to the vectorstore. embedding (Optional[Embeddings]) – Embedding function. Defaults to None. table_name (str) – Name of the table to create. log_and_data_dir (Optional[str]) – Directory to persist the table. client (Optional[awadb.Client]) – AwaDB client kwargs (Any) – Returns AwaDB vectorstore. Return type AwaDB class langchain.vectorstores.AzureSearch(azure_search_endpoint, azure_search_key, index_name, embedding_function, search_type='hybrid', semantic_configuration_name=None, semantic_query_language='en-us', **kwargs)[source] Bases: langchain.vectorstores.base.VectorStore Parameters azure_search_endpoint (str) – azure_search_key (str) – index_name (str) – embedding_function (Callable) – search_type (str) – semantic_configuration_name (Optional[str]) – semantic_query_language (str) – kwargs (Any) – add_texts(texts, metadatas=None, **kwargs)[source] Add texts data to an existing index. Parameters texts (Iterable[str]) – metadatas (Optional[List[dict]]) – kwargs (Any) – Return type List[str] similarity_search(query, k=4, **kwargs)[source]
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-19
similarity_search(query, k=4, **kwargs)[source] Return docs most similar to query. Parameters query (str) – k (int) – kwargs (Any) – Return type List[langchain.schema.Document] vector_search(query, k=4, **kwargs)[source] Returns the most similar indexed documents to the query text. Parameters query (str) – The query text for which to find similar documents. k (int) – The number of documents to return. Default is 4. kwargs (Any) – Returns A list of documents that are most similar to the query text. Return type List[Document] vector_search_with_score(query, k=4, filters=None)[source] Return docs most similar to query. Parameters query (str) – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. filters (Optional[str]) – Returns List of Documents most similar to the query and score for each Return type List[Tuple[langchain.schema.Document, float]] hybrid_search(query, k=4, **kwargs)[source] Returns the most similar indexed documents to the query text. Parameters query (str) – The query text for which to find similar documents. k (int) – The number of documents to return. Default is 4. kwargs (Any) – Returns A list of documents that are most similar to the query text. Return type List[Document] hybrid_search_with_score(query, k=4, filters=None)[source] Return docs most similar to query with an hybrid query. Parameters query (str) – Text to look up documents similar to.
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-20
Parameters query (str) – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. filters (Optional[str]) – Returns List of Documents most similar to the query and score for each Return type List[Tuple[langchain.schema.Document, float]] semantic_hybrid_search(query, k=4, **kwargs)[source] Returns the most similar indexed documents to the query text. Parameters query (str) – The query text for which to find similar documents. k (int) – The number of documents to return. Default is 4. kwargs (Any) – Returns A list of documents that are most similar to the query text. Return type List[Document] semantic_hybrid_search_with_score(query, k=4, filters=None)[source] Return docs most similar to query with an hybrid query. Parameters query (str) – Text to look up documents similar to. k (int) – Number of Documents to return. Defaults to 4. filters (Optional[str]) – Returns List of Documents most similar to the query and score for each Return type List[Tuple[langchain.schema.Document, float]] classmethod from_texts(texts, embedding, metadatas=None, azure_search_endpoint='', azure_search_key='', index_name='langchain-index', **kwargs)[source] Return VectorStore initialized from texts and embeddings. Parameters texts (List[str]) – embedding (langchain.embeddings.base.Embeddings) – metadatas (Optional[List[dict]]) – azure_search_endpoint (str) – azure_search_key (str) – index_name (str) – kwargs (Any) – Return type langchain.vectorstores.azuresearch.AzureSearch
https://api.python.langchain.com/en/stable/modules/vectorstores.html
2b28b54605b7-21
kwargs (Any) – Return type langchain.vectorstores.azuresearch.AzureSearch class langchain.vectorstores.Cassandra(embedding, session, keyspace, table_name, ttl_seconds=None)[source] Bases: langchain.vectorstores.base.VectorStore Wrapper around Cassandra embeddings platform. There is no notion of a default table name, since each embedding function implies its own vector dimension, which is part of the schema. Example from langchain.vectorstores import Cassandra from langchain.embeddings.openai import OpenAIEmbeddings embeddings = OpenAIEmbeddings() session = ... keyspace = 'my_keyspace' vectorstore = Cassandra(embeddings, session, keyspace, 'my_doc_archive') Parameters embedding (Embeddings) – session (Session) – keyspace (str) – table_name (str) – ttl_seconds (int | None) – Return type None delete_collection()[source] Just an alias for clear (to better align with other VectorStore implementations). Return type None clear()[source] Empty the collection. Return type None delete_by_document_id(document_id)[source] Parameters document_id (str) – Return type None add_texts(texts, metadatas=None, ids=None, **kwargs)[source] Run more texts through the embeddings and add to the vectorstore. Parameters texts (Iterable[str]) – Texts to add to the vectorstore. metadatas (Optional[List[dict]], optional) – Optional list of metadatas. ids (Optional[List[str]], optional) – Optional list of IDs. kwargs (Any) – Returns List of IDs of the added texts. Return type List[str]
https://api.python.langchain.com/en/stable/modules/vectorstores.html