id stringlengths 14 15 | text stringlengths 35 2.51k | source stringlengths 61 154 |
|---|---|---|
46c1298ceb12-0 | API Reference¶
langchain.agents: Agents¶
Interface for agents.
Classes¶
agents.agent.Agent
Class responsible for calling the language model and deciding the action.
agents.agent.AgentExecutor
Consists of an agent using tools.
agents.agent.AgentOutputParser
Create a new model by parsing and validating input data from ke... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-1 | Create a new model by parsing and validating input data from keyword arguments.
agents.agent_toolkits.openapi.planner.RequestsPostToolWithParsing
Create a new model by parsing and validating input data from keyword arguments.
agents.agent_toolkits.openapi.toolkit.OpenAPIToolkit
Toolkit for interacting with a OpenAPI ap... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-2 | An agent designed to hold a conversation in addition to using tools.
agents.conversational_chat.output_parser.ConvoOutputParser
Create a new model by parsing and validating input data from keyword arguments.
agents.mrkl.base.ChainConfig(action_name, ...)
Configuration for chain to use in MRKL system.
agents.mrkl.base.M... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-3 | agents.structured_chat.output_parser.StructuredChatOutputParser
Create a new model by parsing and validating input data from keyword arguments.
agents.structured_chat.output_parser.StructuredChatOutputParserWithRetries
Create a new model by parsing and validating input data from keyword arguments.
agents.tools.InvalidT... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-4 | agents.agent_toolkits.sql.base.create_sql_agent(...)
Construct a sql agent from an LLM and tools.
agents.agent_toolkits.vectorstore.base.create_vectorstore_agent(...)
Construct a vectorstore agent from an LLM and tools.
agents.agent_toolkits.vectorstore.base.create_vectorstore_router_agent(...)
Construct a vectorstore ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-5 | Cache that uses Redis as a backend.
cache.RedisSemanticCache(redis_url, embedding)
Cache that uses Redis as a vector-store backend.
cache.SQLAlchemyCache(engine, cache_schema)
Cache that uses SQAlchemy as a backend.
cache.SQLiteCache([database_path])
Cache that uses SQLite as a backend.
langchain.callbacks: Callbacks¶
... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-6 | Callback Handler that logs to Infino.
callbacks.manager.AsyncCallbackManager(handlers)
Async callback manager that can be used to handle callbacks from LangChain.
callbacks.manager.AsyncCallbackManagerForChainRun(*, ...)
Async callback manager for chain run.
callbacks.manager.AsyncCallbackManagerForLLMRun(*, ...)
Async... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-7 | callbacks.streaming_aiter.AsyncIteratorCallbackHandler()
Callback handler that returns an async iterator.
callbacks.streaming_aiter_final_only.AsyncFinalIteratorCallbackHandler(*)
Callback handler that returns an async iterator.
callbacks.streaming_stdout.StreamingStdOutCallbackHandler()
Callback handler for streaming.... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-8 | callbacks.tracers.schemas.ToolRun
Class for ToolRun.
callbacks.tracers.schemas.TracerSession
TracerSessionV1 schema for the V2 API.
callbacks.tracers.schemas.TracerSessionBase
A creation class for TracerSession.
callbacks.tracers.schemas.TracerSessionV1
TracerSessionV1 schema.
callbacks.tracers.schemas.TracerSessionV1B... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-9 | Get a callback manager for a chain group in a context manager.
callbacks.manager.tracing_enabled([session_name])
Get the Deprecated LangChainTracer in a context manager.
callbacks.manager.tracing_v2_enabled([...])
Instruct LangChain to log all runs in context to LangSmith.
callbacks.manager.wandb_tracing_enabled([...])... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-10 | Hash a string using sha1.
callbacks.utils.import_pandas()
Import the pandas python package and raise an error if it is not installed.
callbacks.utils.import_spacy()
Import the spacy python package and raise an error if it is not installed.
callbacks.utils.import_textstat()
Import the textstat python package and raise a... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-11 | chains.combine_documents.base.BaseCombineDocumentsChain
Base interface for chains combining documents.
chains.combine_documents.map_reduce.CombineDocsProtocol(...)
Interface for the combine_docs method.
chains.combine_documents.map_reduce.MapReduceDocumentsChain
Combining documents by mapping a chain over them, then co... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-12 | chains.graph_qa.kuzu.KuzuQAChain
Chain for question-answering against a graph by generating Cypher statements for Kùzu.
chains.graph_qa.nebulagraph.NebulaGraphQAChain
Chain for question-answering against a graph by generating nGQL statements.
chains.hyde.base.HypotheticalDocumentEmbedder
Generate hypothetical document ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-13 | Create a new model by parsing and validating input data from keyword arguments.
chains.openai_functions.qa_with_structure.AnswerWithSources
An answer to the question being asked, with sources.
chains.pal.base.PALChain
Implements Program-Aided Language Models.
chains.prompt_selector.BasePromptSelector
Create a new model... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-14 | Defines interface for IR translation using visitor pattern.
chains.query_constructor.parser.QueryTransformer
chains.query_constructor.schema.AttributeInfo
Information about a data source attribute.
chains.question_answering.__init__.LoadingCallable(...)
Interface for loading the combine documents chain.
chains.retrieva... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-15 | Chain for querying SQL database that is a sequential chain.
chains.summarize.__init__.LoadingCallable(...)
Interface for loading the combine documents chain.
chains.transform.TransformChain
Chain transform chain output.
Functions¶
chains.combine_documents.base.format_document(...)
Format a document into a string based ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-16 | Returns the kwargs for the LLMChain constructor.
chains.prompt_selector.is_chat_model(llm)
Check if the language model is a chat model.
chains.prompt_selector.is_llm(llm)
Check if the language model is a LLM.
chains.qa_with_sources.loading.load_qa_with_sources_chain(llm)
Load question answering with sources chain.
chai... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-17 | chat_models.google_palm.ChatGooglePalm
Wrapper around Google's PaLM Chat API.
chat_models.google_palm.ChatGooglePalmError
Error raised when there is an issue with the Google PaLM API.
chat_models.openai.ChatOpenAI
Wrapper around OpenAI Chat large language models.
chat_models.promptlayer_openai.PromptLayerChatOpenAI
Wra... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-18 | docstore.wikipedia.Wikipedia()
Wrapper around wikipedia API.
langchain.document_loaders: Document Loaders¶
All different types of document loaders.
Classes¶
document_loaders.acreom.AcreomLoader(path[, ...])
Initialize with path.
document_loaders.airbyte_json.AirbyteJSONLoader(...)
Loader that loads local airbyte json f... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-19 | A blob is used to represent raw data by either reference or value.
document_loaders.blob_loaders.schema.BlobLoader()
Abstract interface for blob loaders implementation.
document_loaders.blob_loaders.youtube_audio.YoutubeAudioLoader(...)
Load YouTube urls as audio file(s).
document_loaders.blockchain.BlockchainDocumentL... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-20 | Loader that loads Outlook Message files using extract_msg.
document_loaders.email.UnstructuredEmailLoader(...)
Loader that uses unstructured to load email files.
document_loaders.embaas.BaseEmbaasLoader
Create a new model by parsing and validating input data from keyword arguments.
document_loaders.embaas.EmbaasBlobLoa... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-21 | Load GitBook data.
document_loaders.github.BaseGitHubLoader
Load issues of a GitHub repository.
document_loaders.github.GitHubIssuesLoader
Create a new model by parsing and validating input data from keyword arguments.
document_loaders.googledrive.GoogleDriveLoader
Loader that loads Google Docs from Google Drive.
docum... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-22 | Loads a JSON file and references a jq schema provided to load the text into documents.
document_loaders.larksuite.LarkSuiteDocLoader(...)
Loader that loads LarkSuite (FeiShu) document.
document_loaders.markdown.UnstructuredMarkdownLoader(...)
Loader that uses unstructured to load markdown files.
document_loaders.mastod... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-23 | Loader that loads Open city data.
document_loaders.org_mode.UnstructuredOrgModeLoader(...)
Loader that uses unstructured to load Org-Mode files.
document_loaders.parsers.audio.OpenAIWhisperParser()
Transcribe and parse audio files.
document_loaders.parsers.generic.MimeTypeBasedParser(...)
A parser that uses mime-types ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-24 | document_loaders.pdf.OnlinePDFLoader(file_path)
Loader that loads online PDFs.
document_loaders.pdf.PDFMinerLoader(file_path)
Loader that uses PDFMiner to load PDF files.
document_loaders.pdf.PDFMinerPDFasHTMLLoader(...)
Loader that uses PDFMiner to load PDF files as HTML content.
document_loaders.pdf.PDFPlumberLoader(... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-25 | Reddit posts loader.
document_loaders.roam.RoamLoader(path)
Loader that loads Roam files from disk.
document_loaders.rst.UnstructuredRSTLoader(...)
Loader that uses unstructured to load RST files.
document_loaders.rtf.UnstructuredRTFLoader(...)
Loader that uses unstructured to load rtf files.
document_loaders.s3_direct... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-26 | Loader that loads HTML to markdown using 2markdown.
document_loaders.toml.TomlLoader(source)
A TOML document loader that inherits from the BaseLoader class.
document_loaders.trello.TrelloLoader(client, ...)
Trello loader.
document_loaders.twitter.TwitterTweetLoader(...)
Twitter tweets loader.
document_loaders.unstructu... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-27 | Loads a DOCX with docx2txt and chunks at character level.
document_loaders.word_document.UnstructuredWordDocumentLoader(...)
Loader that uses unstructured to load word documents.
document_loaders.xml.UnstructuredXMLLoader(...)
Loader that uses unstructured to load XML files.
document_loaders.youtube.GoogleApiYoutubeLoa... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-28 | langchain.document_transformers: Document Transformers¶
Transform documents
Classes¶
document_transformers.EmbeddingsRedundantFilter
Filter that drops redundant documents by comparing their embeddings.
Functions¶
document_transformers.get_stateful_documents(...)
Convert a list of documents to a list of documents with s... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-29 | Wrapper around sentence_transformers embedding models.
embeddings.huggingface_hub.HuggingFaceHubEmbeddings
Wrapper around HuggingFaceHub embedding models.
embeddings.jina.JinaEmbeddings
Create a new model by parsing and validating input data from keyword arguments.
embeddings.llamacpp.LlamaCppEmbeddings
Wrapper around ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-30 | Use tenacity to retry the embedding call.
embeddings.google_palm.embed_with_retry(...)
Use tenacity to retry the completion call.
embeddings.minimax.embed_with_retry(...)
Use tenacity to retry the completion call.
embeddings.openai.embed_with_retry(...)
Use tenacity to retry the embedding call.
embeddings.self_hosted_h... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-31 | evaluation.comparison.eval_chain.PairwiseStringResultOutputParser
A parser for the output of the PairwiseStringEvalChain.
evaluation.criteria.eval_chain.CriteriaEvalChain
LLM Chain for evaluating runs against criteria.
evaluation.criteria.eval_chain.CriteriaResultOutputParser
A parser for the output of the CriteriaEval... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-32 | Get an eval chain for grading a model's response against a map of criteria.
evaluation.run_evaluators.implementations.get_qa_evaluator(llm, *)
Get an eval chain that compares response against ground truth.
evaluation.run_evaluators.implementations.get_trajectory_evaluator(...)
Get an eval chain for grading a model's re... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-33 | A character with memory and innate characteristics.
experimental.generative_agents.memory.GenerativeAgentMemory
Create a new model by parsing and validating input data from keyword arguments.
experimental.llms.jsonformer_decoder.JsonFormer
Create a new model by parsing and validating input data from keyword arguments.
... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-34 | Create a new model by parsing and validating input data from keyword arguments.
Functions¶
experimental.autonomous_agents.autogpt.output_parser.preprocess_json_input(...)
Preprocesses a string to be parsed as json.
experimental.autonomous_agents.autogpt.prompt_generator.get_prompt(tools)
This function generates a promp... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-35 | Get colored text.
input.print_text(text[, color, end, file])
Print text with highlighting and no end characters.
langchain.llms: LLMs¶
Wrappers on top of large language models APIs.
Classes¶
llms.ai21.AI21
Wrapper around AI21 large language models.
llms.ai21.AI21PenaltyData
Parameters for AI21 penalty data.
llms.aleph_... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-36 | llms.beam.Beam
Wrapper around Beam API for gpt2 large language model.
llms.bedrock.Bedrock
LLM provider to invoke Bedrock models.
llms.cerebriumai.CerebriumAI
Wrapper around CerebriumAI large language models.
llms.clarifai.Clarifai
Wrapper around Clarifai's large language models.
llms.cohere.Cohere
Wrapper around Coher... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-37 | llms.llamacpp.LlamaCpp
Wrapper around the llama.cpp model.
llms.manifest.ManifestWrapper
Wrapper around HazyResearch's Manifest library.
llms.modal.Modal
Wrapper around Modal large language models.
llms.mosaicml.MosaicML
Wrapper around MosaicML's LLM inference service.
llms.nlpcloud.NLPCloud
Wrapper around NLPCloud lar... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-38 | Wrapper around RWKV language models.
llms.sagemaker_endpoint.ContentHandlerBase()
A handler class to transform input from LLM to a format that SageMaker endpoint expects.
llms.sagemaker_endpoint.LLMContentHandler()
Content handler for LLM class.
llms.sagemaker_endpoint.SagemakerEndpoint
Wrapper around custom Sagemaker ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-39 | llms.google_palm.generate_with_retry(llm, ...)
Use tenacity to retry the completion call.
llms.loading.load_llm(file)
Load LLM from file.
llms.loading.load_llm_from_config(config)
Load LLM from Config Dict.
llms.openai.completion_with_retry(llm, **kwargs)
Use tenacity to retry the completion call.
llms.openai.update_to... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-40 | Classes¶
memory.buffer.ConversationBufferMemory
Buffer for storing conversation memory.
memory.buffer.ConversationStringBufferMemory
Buffer for storing conversation memory.
memory.buffer_window.ConversationBufferWindowMemory
Buffer for storing conversation memory.
memory.chat_memory.BaseChatMemory
Create a new model by... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-41 | Class for combining multiple memories' data together.
memory.entity.BaseEntityStore
Create a new model by parsing and validating input data from keyword arguments.
memory.entity.ConversationEntityMemory
Entity extractor & summarizer memory.
memory.entity.InMemoryEntityStore
Basic in-memory entity store.
memory.entity.R... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-42 | output_parsers.enum.EnumOutputParser
Create a new model by parsing and validating input data from keyword arguments.
output_parsers.fix.OutputFixingParser
Wraps a parser and tries to fix parsing errors.
output_parsers.list.CommaSeparatedListOutputParser
Parse out comma separated lists.
output_parsers.list.ListOutputPar... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-43 | output_parsers.structured.StructuredOutputParser
Create a new model by parsing and validating input data from keyword arguments.
Functions¶
output_parsers.json.parse_and_check_json_markdown(...)
Parse a JSON string from a Markdown string and check that it contains the expected keys.
output_parsers.json.parse_json_markd... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-44 | Create a new model by parsing and validating input data from keyword arguments.
prompts.example_selector.base.BaseExampleSelector()
Interface for selecting examples to include in prompts.
prompts.example_selector.length_based.LengthBasedExampleSelector
Select examples based on length.
prompts.example_selector.ngram_ove... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-45 | Lightweight wrapper around requests library, with async support.
Classes¶
requests.Requests
Wrapper around requests to handle auth and async.
requests.TextRequestsWrapper
Lightweight wrapper around requests library.
langchain.retrievers: Retrievers¶
Classes¶
retrievers.arxiv.ArxivRetriever
It is effectively a wrapper f... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-46 | Create a new model by parsing and validating input data from keyword arguments.
retrievers.document_compressors.embeddings_filter.EmbeddingsFilter
Create a new model by parsing and validating input data from keyword arguments.
retrievers.elastic_search_bm25.ElasticSearchBM25Retriever(...)
Wrapper around Elasticsearch u... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-47 | Question-answering with sources over an LlamaIndex graph data structure.
retrievers.llama_index.LlamaIndexRetriever
Question-answering with sources over an LlamaIndex data structure.
retrievers.merger_retriever.MergerRetriever(...)
This class merges the results of multiple retrievers.
retrievers.metal.MetalRetriever(cl... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-48 | retrievers.self_query.pinecone.PineconeTranslator()
Logic for converting internal query language elements to valid filters.
retrievers.self_query.qdrant.QdrantTranslator(...)
Logic for converting internal query language elements to valid filters.
retrievers.self_query.weaviate.WeaviateTranslator()
Logic for converting ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-49 | retrievers.milvus.MilvusRetreiver(*args, ...)
Deprecated MilvusRetreiver.
retrievers.pinecone_hybrid_search.create_index(...)
Create a Pinecone index from a list of contexts.
retrievers.pinecone_hybrid_search.hash_text(text)
Hash a text using SHA256.
retrievers.self_query.myscale.DEFAULT_COMPOSER(op_name)
Default compo... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-50 | schema.FunctionMessage
Create a new model by parsing and validating input data from keyword arguments.
schema.Generation
Output of a single generation.
schema.HumanMessage
Type of message that is spoken by the human.
schema.LLMResult
Class that contains all relevant information for an LLM Result.
schema.NoOpOutputParse... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-51 | text_splitter.LineType
Line type as typed dict.
text_splitter.MarkdownTextSplitter(**kwargs)
Attempts to split the text along Markdown-formatted headings.
text_splitter.NLTKTextSplitter([separator])
Implementation of splitting text that looks at sentences using NLTK.
text_splitter.PythonCodeTextSplitter(**kwargs)
Attem... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-52 | tools.base.BaseTool
Interface LangChain tools must implement.
tools.base.SchemaAnnotationError
Raised when 'args_schema' is missing or has an incorrect type annotation.
tools.base.StructuredTool
Tool that can operate on any number of inputs.
tools.base.Tool
Tool that takes in function or coroutine directly.
tools.base.... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-53 | tools.file_management.list_dir.DirectoryListingInput
Input for ListDirectoryTool.
tools.file_management.list_dir.ListDirectoryTool
Create a new model by parsing and validating input data from keyword arguments.
tools.file_management.move.FileMoveInput
Input for MoveFileTool.
tools.file_management.move.MoveFileTool
Crea... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-54 | Enumerator of Resources to search.
tools.gmail.search.SearchArgsSchema
Create a new model by parsing and validating input data from keyword arguments.
tools.gmail.send_message.GmailSendMessage
Create a new model by parsing and validating input data from keyword arguments.
tools.gmail.send_message.SendMessageSchema
Crea... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-55 | Create a new model by parsing and validating input data from keyword arguments.
tools.office365.create_draft_message.CreateDraftMessageSchema
Create a new model by parsing and validating input data from keyword arguments.
tools.office365.create_draft_message.O365CreateDraftMessage
Create a new model by parsing and vali... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-56 | Base class for browser tools.
tools.playwright.click.ClickTool
Create a new model by parsing and validating input data from keyword arguments.
tools.playwright.click.ClickToolInput
Input for ClickTool.
tools.playwright.current_page.CurrentWebPageTool
Create a new model by parsing and validating input data from keyword ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-57 | A tool for running python code in a REPL.
tools.python.tool.PythonREPLTool
A tool for running python code in a REPL.
tools.requests.tool.BaseRequestsTool
Base class for requests tools.
tools.requests.tool.RequestsDeleteTool
Tool for making a DELETE request to an API endpoint.
tools.requests.tool.RequestsGetTool
Tool fo... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-58 | Tool for querying a Spark SQL.
tools.sql_database.tool.BaseSQLDatabaseTool
Base tool for interacting with a SQL database.
tools.sql_database.tool.InfoSQLDatabaseTool
Tool for getting metadata about a SQL database.
tools.sql_database.tool.ListSQLDatabaseTool
Tool for getting tables names.
tools.sql_database.tool.QuerySQ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-59 | Download audio from url to local.
tools.base.create_schema_from_function(...)
Create a pydantic schema from a function's signature.
tools.base.tool(*args[, return_direct, ...])
Make tools out of functions, can be used with or without arguments.
tools.convert_to_openai.format_tool_to_openai_function(tool)
Format tool in... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-60 | tools.plugin.marshal_spec(txt)
Convert the yaml or json serialized spec to a dict.
tools.python.tool.sanitize_input(query)
Sanitize input to the python REPL.
tools.steamship_image_generation.utils.make_image_public(...)
Upload a block to a signed URL and return the public URL.
langchain.utilities: Utilities¶
General ut... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-61 | utilities.pupmed.PubMedAPIWrapper
Wrapper around PubMed API.
utilities.python.PythonREPL
Simulates a standalone Python REPL.
utilities.scenexplain.SceneXplainAPIWrapper
Wrapper for SceneXplain API.
utilities.searx_search.SearxResults(data)
Dict like wrapper around search api results.
utilities.searx_search.SearxSearchW... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-62 | utils.mock_now(dt_value)
Context manager for mocking out datetime.now() in unit tests. Example: with mock_now(datetime.datetime(2011, 2, 3, 10, 11)): assert datetime.datetime.now() == datetime.datetime(2011, 2, 3, 10, 11).
utils.raise_for_status_with_text(response)
Raise an error with the response text.
utils.strin... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-63 | vectorstores.chroma.Chroma([...])
Wrapper around ChromaDB embeddings platform.
vectorstores.clarifai.Clarifai([user_id, ...])
Wrapper around Clarifai AI platform's vector store.
vectorstores.clickhouse.Clickhouse(embedding)
Wrapper around ClickHouse vector database
vectorstores.clickhouse.ClickhouseSettings
ClickHouse ... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-64 | Wrapper around MyScale vector database
vectorstores.myscale.MyScaleSettings
MyScale Client Configuration
vectorstores.opensearch_vector_search.OpenSearchVectorSearch(...)
Wrapper around OpenSearch as a vector database.
vectorstores.pinecone.Pinecone(index, ...[, ...])
Wrapper around Pinecone vector database.
vectorstor... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-65 | Wrapper around StarRocks vector database
vectorstores.starrocks.StarRocksSettings
StarRocks Client Configuration
vectorstores.supabase.SupabaseVectorStore(...)
VectorStore for a Supabase postgres database.
vectorstores.tair.Tair(embedding_function, ...)
Wrapper around Tair Vector store.
vectorstores.tigris.Tigris(clien... | https://api.python.langchain.com/en/latest/api_reference.html |
46c1298ceb12-66 | Check if a string has multiple substrings.
vectorstores.utils.maximal_marginal_relevance(...)
Calculate maximal marginal relevance. | https://api.python.langchain.com/en/latest/api_reference.html |
033bc13cc1e1-0 | langchain.retrievers.zep.ZepRetriever¶
class langchain.retrievers.zep.ZepRetriever(session_id: str, url: str, api_key: Optional[str] = None, top_k: Optional[int] = None)[source]¶
Bases: BaseRetriever
A Retriever implementation for the Zep long-term memory store. Search your
user’s long-term chat history with Zep.
Note:... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zep.ZepRetriever.html |
dffe0f61bab0-0 | langchain.retrievers.metal.MetalRetriever¶
class langchain.retrievers.metal.MetalRetriever(client: Any, params: Optional[dict] = None)[source]¶
Bases: BaseRetriever
Retriever that uses the Metal API.
Methods
__init__(client[, params])
aget_relevant_documents(query, *[, callbacks])
Asynchronously get documents relevant ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.metal.MetalRetriever.html |
fe8c61d7c61a-0 | langchain.retrievers.pinecone_hybrid_search.create_index¶
langchain.retrievers.pinecone_hybrid_search.create_index(contexts: List[str], index: Any, embeddings: Embeddings, sparse_encoder: Any, ids: Optional[List[str]] = None, metadatas: Optional[List[dict]] = None) → None[source]¶
Create a Pinecone index from a list of... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.create_index.html |
78ed46442dca-0 | langchain.retrievers.kendra.TextWithHighLights¶
class langchain.retrievers.kendra.TextWithHighLights(*, Text: str, Highlights: Optional[Any] = None, **extra_data: Any)[source]¶
Bases: BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data canno... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.TextWithHighLights.html |
60c551c938a2-0 | langchain.retrievers.zilliz.ZillizRetriever¶
class langchain.retrievers.zilliz.ZillizRetriever(embedding_function: Embeddings, collection_name: str = 'LangChainCollection', connection_args: Optional[Dict[str, Any]] = None, consistency_level: str = 'Session', search_params: Optional[dict] = None)[source]¶
Bases: BaseRet... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
98a6d88fc980-0 | langchain.retrievers.kendra.AdditionalResultAttributeValue¶
class langchain.retrievers.kendra.AdditionalResultAttributeValue(*, TextWithHighlightsValue: TextWithHighLights, **extra_data: Any)[source]¶
Bases: BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AdditionalResultAttributeValue.html |
8a5b4dd6ce79-0 | langchain.retrievers.document_compressors.chain_filter.default_get_input¶
langchain.retrievers.document_compressors.chain_filter.default_get_input(query: str, doc: Document) → Dict[str, Any][source]¶
Return the compression chain input. | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_filter.default_get_input.html |
d761a975322e-0 | langchain.retrievers.multi_query.LineListOutputParser¶
class langchain.retrievers.multi_query.LineListOutputParser[source]¶
Bases: PydanticOutputParser
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param p... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
d761a975322e-1 | eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
af58d31273d5-0 | langchain.retrievers.kendra.combined_text¶
langchain.retrievers.kendra.combined_text(title: str, excerpt: str) → str[source]¶ | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.combined_text.html |
49977a5aedd9-0 | langchain.retrievers.wikipedia.WikipediaRetriever¶
class langchain.retrievers.wikipedia.WikipediaRetriever(*, wiki_client: Any = None, top_k_results: int = 3, lang: str = 'en', load_all_available_meta: bool = False, doc_content_chars_max: int = 4000)[source]¶
Bases: BaseRetriever, WikipediaAPIWrapper
It is effectively ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.wikipedia.WikipediaRetriever.html |
49977a5aedd9-1 | validator validate_environment » all fields¶
Validate that the python package exists in environment.
model Config¶
Bases: object
Configuration for this pydantic object.
extra = 'forbid'¶ | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.wikipedia.WikipediaRetriever.html |
da8839b51bc7-0 | langchain.retrievers.self_query.myscale.MyScaleTranslator¶
class langchain.retrievers.self_query.myscale.MyScaleTranslator(metadata_key: str = 'metadata')[source]¶
Bases: Visitor
Logic for converting internal query language elements to valid filters.
Methods
__init__([metadata_key])
visit_comparison(comparison)
Transla... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.myscale.MyScaleTranslator.html |
da8839b51bc7-1 | Subset of allowed logical operators.
map_dict = {Operator.AND: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.CONTAIN: <function FUNCTION_COMPOSER.<locals>.f>, Comparator.EQ: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.GT: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.GTE: <function DEFAULT_COMPOSER.<lo... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.myscale.MyScaleTranslator.html |
88aea8d52f88-0 | langchain.retrievers.document_compressors.chain_extract.default_get_input¶
langchain.retrievers.document_compressors.chain_extract.default_get_input(query: str, doc: Document) → Dict[str, Any][source]¶
Return the compression chain input. | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.default_get_input.html |
b85564480ee8-0 | langchain.retrievers.kendra.DocumentAttribute¶
class langchain.retrievers.kendra.DocumentAttribute(*, Key: str, Value: DocumentAttributeValue, **extra_data: Any)[source]¶
Bases: BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be p... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.DocumentAttribute.html |
9255e1bc67f3-0 | langchain.retrievers.pinecone_hybrid_search.hash_text¶
langchain.retrievers.pinecone_hybrid_search.hash_text(text: str) → str[source]¶
Hash a text using SHA256.
Parameters
text – Text to hash.
Returns
Hashed text. | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.hash_text.html |
e462668005d8-0 | langchain.retrievers.self_query.base.SelfQueryRetriever¶
class langchain.retrievers.self_query.base.SelfQueryRetriever(*, vectorstore: VectorStore, llm_chain: LLMChain, search_type: str = 'similarity', search_kwargs: dict = None, structured_query_translator: Visitor, verbose: bool = False, use_original_query: bool = Fa... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
e462668005d8-1 | :param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
classmethod from_llm(llm: BaseLanguageModel, vectorstore: VectorStore, document_contents: str, metadata_field_info: List[AttributeInfo], structured_query_translator: Optional[Visitor] = None, chain_kwargs: Optional[Dict] = None, ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
48ad06069c50-0 | langchain.retrievers.llama_index.LlamaIndexRetriever¶
class langchain.retrievers.llama_index.LlamaIndexRetriever(*, index: Any = None, query_kwargs: Dict = None)[source]¶
Bases: BaseRetriever, BaseModel
Question-answering with sources over an LlamaIndex data structure.
Create a new model by parsing and validating input... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexRetriever.html |
558ae69c3ec0-0 | langchain.retrievers.contextual_compression.ContextualCompressionRetriever¶
class langchain.retrievers.contextual_compression.ContextualCompressionRetriever(*, base_compressor: BaseDocumentCompressor, base_retriever: BaseRetriever)[source]¶
Bases: BaseRetriever, BaseModel
Retriever that wraps a base retriever and compr... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.contextual_compression.ContextualCompressionRetriever.html |
125e7076a599-0 | langchain.retrievers.llama_index.LlamaIndexGraphRetriever¶
class langchain.retrievers.llama_index.LlamaIndexGraphRetriever(*, graph: Any = None, query_configs: List[Dict] = None)[source]¶
Bases: BaseRetriever, BaseModel
Question-answering with sources over an LlamaIndex graph data structure.
Create a new model by parsi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexGraphRetriever.html |
404d78df8fc6-0 | langchain.retrievers.document_compressors.cohere_rerank.CohereRerank¶
class langchain.retrievers.document_compressors.cohere_rerank.CohereRerank(*, client: Client, top_n: int = 3, model: str = 'rerank-english-v2.0')[source]¶
Bases: BaseDocumentCompressor
Create a new model by parsing and validating input data from keyw... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.cohere_rerank.CohereRerank.html |
da787aa2dcf8-0 | langchain.retrievers.kendra.clean_excerpt¶
langchain.retrievers.kendra.clean_excerpt(excerpt: str) → str[source]¶ | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.clean_excerpt.html |
16a3d5623ef9-0 | langchain.retrievers.milvus.MilvusRetreiver¶
langchain.retrievers.milvus.MilvusRetreiver(*args: Any, **kwargs: Any) → MilvusRetriever[source]¶
Deprecated MilvusRetreiver. Please use MilvusRetriever (‘i’ before ‘e’) instead.
Parameters
*args –
**kwargs –
Returns
MilvusRetriever | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetreiver.html |
d2d24f71525f-0 | langchain.retrievers.docarray.DocArrayRetriever¶
class langchain.retrievers.docarray.DocArrayRetriever(*, index: Any = None, embeddings: Embeddings, search_field: str, content_field: str, search_type: SearchType = SearchType.similarity, top_k: int = 1, filters: Optional[Any] = None)[source]¶
Bases: BaseRetriever, BaseM... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
d2d24f71525f-1 | Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
da876d2c1e2e-0 | langchain.retrievers.document_compressors.chain_extract.NoOutputParser¶
class langchain.retrievers.document_compressors.chain_extract.NoOutputParser(*, no_output_str: str = 'NO_OUTPUT')[source]¶
Bases: BaseOutputParser[str]
Parse outputs that could return a null string of some sort.
Create a new model by parsing and va... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html |
da876d2c1e2e-1 | property lc_namespace: List[str]¶
Return the namespace of the langchain object.
eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is s... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html |
bfc4cec2b38e-0 | langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever¶
class langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever(*, vectorstore: VectorStore, search_kwargs: dict = None, memory_stream: List[Document] = None, decay_rate: float = 0.01, k: int = 4, other_score_keys: List[s... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html |
bfc4cec2b38e-1 | Add documents to vectorstore.
add_documents(documents: List[Document], **kwargs: Any) → List[str][source]¶
Add documents to vectorstore.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to fi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html |
c5718729204a-0 | langchain.retrievers.kendra.AdditionalResultAttribute¶
class langchain.retrievers.kendra.AdditionalResultAttribute(*, Key: str, ValueType: Literal['TEXT_WITH_HIGHLIGHTS_VALUE'], Value: AdditionalResultAttributeValue, **extra_data: Any)[source]¶
Bases: BaseModel
Create a new model by parsing and validating input data fr... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AdditionalResultAttribute.html |
949998f3a1e4-0 | langchain.retrievers.kendra.RetrieveResultItem¶
class langchain.retrievers.kendra.RetrieveResultItem(*, Content: Optional[str] = None, DocumentAttributes: Optional[List[DocumentAttribute]] = [], DocumentId: Optional[str] = None, DocumentTitle: Optional[str] = None, DocumentURI: Optional[str] = None, Id: Optional[str] =... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.RetrieveResultItem.html |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 9