Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
14
15
text
stringlengths
49
2.47k
source
stringlengths
61
166
088bd5c75607-0
langchain API Reference¶ langchain._api¶ Helper functions for managing the LangChain API. This module is only relevant for LangChain developers, not for users. Warning This module and its submodules are for internal use only. Do not use them in your own code. We may change the API at any time with no warning. Classes...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-1
agents.agent.AgentOutputParser Base class for parsing agent output into agent action/finish. agents.agent.BaseMultiActionAgent Base Multi Action Agent class. agents.agent.BaseSingleActionAgent Base Single Action Agent class. agents.agent.ExceptionTool Tool that just returns the query. agents.agent.LLMSingleActionAgent ...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-2
An agent that holds a conversation in addition to using tools. agents.react.output_parser.ReActOutputParser Output parser for the ReAct agent. agents.react.base.DocstoreExplorer(docstore) Class to assist with exploration of a document store. agents.react.base.ReActChain Chain that implements the ReAct paper. agents.rea...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-3
Information about a VectorStore. agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit Toolkit for routing between Vector Stores. agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit Toolkit for interacting with a Vector Store. agents.agent_toolkits.zapier.toolkit.ZapierToolkit Zapier Toolkit. agen...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-4
agents.agent_toolkits.jira.toolkit.JiraToolkit Jira Toolkit. agents.agent_toolkits.github.toolkit.GitHubToolkit GitHub Toolkit. agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit Toolkit for interacting with Power BI dataset. agents.agent_toolkits.json.toolkit.JsonToolkit Toolkit for interacting with a JSON spec. age...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-5
Construct a Power BI agent from an LLM and tools. agents.agent_toolkits.powerbi.chat_base.create_pbi_chat_agent(llm) Construct a Power BI agent from a Chat LLM and tools. agents.agent_toolkits.python.base.create_python_agent(...) Construct a python agent from an LLM and tool. agents.agent_toolkits.spark.base.create_spa...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-6
Cache provides an optional caching layer for LLMs. Cache is useful for two reasons: It can save you money by reducing the number of API calls you make to the LLM provider if you’re often requesting the same completion multiple times. It can speed up your application by reducing the number of API calls you make to the L...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-7
Callback Handler that logs metrics and artifacts to mlflow server. callbacks.mlflow_callback.MlflowLogger(**kwargs) Callback Handler that logs metrics and artifacts to mlflow server. callbacks.human.HumanApprovalCallbackHandler(...) Callback for manually validating values. callbacks.human.HumanRejectedException Excepti...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-8
callbacks.manager.AsyncCallbackManager(handlers) Async callback manager that handles callbacks from LangChain. callbacks.manager.AsyncCallbackManagerForChainRun(*, ...) Async callback manager for chain run. callbacks.manager.AsyncCallbackManagerForLLMRun(*, ...) Async callback manager for LLM run. callbacks.manager.Asy...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-9
Callback Handler that logs to Weights and Biases. callbacks.flyte_callback.FlyteCallbackHandler() This callback handler that is used within a Flyte task. callbacks.utils.BaseMetadataCallbackHandler() This class handles the metadata and associated function states for callbacks. callbacks.streaming_stdout.StreamingStdOut...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-10
callbacks.tracers.schemas.BaseRun Base class for Run. callbacks.tracers.schemas.ChainRun Class for ChainRun. callbacks.tracers.schemas.LLMRun Class for LLMRun. callbacks.tracers.schemas.Run Run schema for the V2 API in the Tracer. callbacks.tracers.schemas.ToolRun Class for ToolRun. callbacks.tracers.schemas.TracerSess...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-11
callbacks.tracers.stdout.ConsoleCallbackHandler(...) Tracer that prints to the console. callbacks.tracers.stdout.FunctionCallbackHandler(...) Tracer that calls a function with a single str parameter. callbacks.tracers.evaluation.EvaluatorCallbackHandler(...) A tracer that runs a run evaluator whenever a run is persiste...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-12
Analyze text using textstat and spacy. callbacks.mlflow_callback.construct_html_from_prompt_and_generation(...) Construct an html element from a prompt and a generation. callbacks.mlflow_callback.import_mlflow() Import the mlflow python package and raise an error if it is not installed. callbacks.openai_info.get_openai...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-13
callbacks.utils.load_json(json_path) Load json file to a string. callbacks.wandb_callback.analyze_text(text) Analyze text using textstat and spacy. callbacks.wandb_callback.construct_html_from_prompt_and_generation(...) Construct an html element from a prompt and a generation. callbacks.wandb_callback.import_wandb() Im...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-14
chains.prompt_selector.BasePromptSelector Base class for prompt selectors. chains.prompt_selector.ConditionalPromptSelector Prompt collection that goes through conditionals. chains.sequential.SequentialChain Chain where the outputs of one chain feed directly into next. chains.sequential.SimpleSequentialChain Simple cha...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-15
chains.router.base.MultiRouteChain Use a single chain to route an input to one of multiple candidate chains. chains.router.base.Route(destination, ...) Create new instance of Route(destination, next_inputs) chains.router.base.RouterChain Chain that outputs the name of a destination chain and the inputs to it. chains.ro...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-16
chains.retrieval_qa.base.RetrievalQA Chain for question-answering against an index. chains.retrieval_qa.base.VectorDBQA Chain for question-answering against a vector database. chains.api.base.APIChain Chain that makes API calls and summarizes the responses to answer a question. chains.api.openapi.chain.OpenAPIEndpointC...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-17
Combining documents by mapping a chain over them, then combining results. chains.llm_symbolic_math.base.LLMSymbolicMathChain Chain that interprets a prompt and executes python code to do symbolic math. chains.llm_checker.base.LLMCheckerChain Chain for question-answering with self-verification. chains.sql_database.query...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-18
Chain for question-answering against a graph by generating gremlin statements. chains.graph_qa.arangodb.ArangoGraphQAChain Chain for question-answering against a graph by generating AQL statements. chains.graph_qa.kuzu.KuzuQAChain Chain for question-answering against a graph by generating Cypher statements for Kùzu. ch...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-19
chains.openai_functions.base.create_structured_output_chain(...) Create an LLMChain that uses an OpenAI function to get a structured output. chains.openai_functions.citation_fuzzy_match.create_citation_fuzzy_match_chain(llm) Create a citation fuzzy match chain. chains.openai_functions.extraction.create_extraction_chain...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-20
chains.query_constructor.parser.get_parser([...]) Returns a parser for the query language. chains.query_constructor.parser.v_args(...) chains.sql_database.query.create_sql_query_chain(llm, db) Create a chain that generates SQL queries. langchain.chat_models¶ Chat Models are a variation on language models. While Chat Mo...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-21
chat_models.anthropic.ChatAnthropic Anthropic's large language chat model. chat_models.mlflow_ai_gateway.ChatMLflowAIGateway Wrapper around chat LLMs in the MLflow AI Gateway. chat_models.mlflow_ai_gateway.ChatParams Parameters for the MLflow AI Gateway LLM. chat_models.anyscale.ChatAnyscale Wrapper around Anyscale Cha...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-22
docstore.in_memory.InMemoryDocstore([_dict]) Simple in memory docstore in the form of a dict. langchain.document_loaders¶ Document Loaders are classes to load Documents. Document Loaders are usually used to load a lot of Documents in a single run. Class hierarchy: BaseLoader --> <name>Loader # Examples: TextLoader, U...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-23
Loader that uses Unstructured to load PNG and JPG files. document_loaders.roam.RoamLoader(path) Loads Roam files from disk. document_loaders.s3_directory.S3DirectoryLoader(bucket) Loading logic for loading documents from an AWS S3. document_loaders.iugu.IuguLoader(resource[, ...]) Loader that fetches data from IUGU. do...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-24
document_loaders.notiondb.NotionDBLoader(...) Notion DB Loader. document_loaders.rss.RSSFeedLoader([urls, ...]) Loader that uses newspaper to load news articles from RSS feeds. document_loaders.embaas.BaseEmbaasLoader Base class for embedding a model into an Embaas document extraction API. document_loaders.embaas.Embaa...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-25
document_loaders.youtube.GoogleApiClient([...]) A Generic Google Api Client. document_loaders.youtube.GoogleApiYoutubeLoader(...) Loads all Videos from a Channel document_loaders.youtube.YoutubeLoader(video_id) Loads Youtube transcripts. document_loaders.python.PythonLoader(file_path) Load Python files, respecting any ...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-26
Loads all child links from a given url. document_loaders.twitter.TwitterTweetLoader(...) Twitter tweets loader. document_loaders.markdown.UnstructuredMarkdownLoader(...) Loader that uses Unstructured to load markdown files. document_loaders.merge.MergedDataLoader(loaders) Merge documents from a list of loaders document...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-27
document_loaders.pdf.PDFPlumberLoader(file_path) Loader that uses pdfplumber to load PDF files. document_loaders.pdf.PyMuPDFLoader(file_path) Loader that uses PyMuPDF to load PDF files. document_loaders.pdf.PyPDFDirectoryLoader(path) Loads a directory with PDF files with pypdf and chunks at character level. document_lo...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-28
document_loaders.xml.UnstructuredXMLLoader(...) Loader that uses unstructured to load XML files. document_loaders.nuclia.NucliaLoader(path, ...) Extract text from any file type. document_loaders.toml.TomlLoader(source) A TOML document loader that inherits from the BaseLoader class. document_loaders.url_playwright.Playw...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-29
Load text files. document_loaders.figma.FigmaFileLoader(...) Loads Figma file json. document_loaders.obs_file.OBSFileLoader(...) Loader for Huawei OBS file. document_loaders.csv_loader.CSVLoader(file_path) Loads a CSV file into a list of documents. document_loaders.csv_loader.UnstructuredCSVLoader(...) Loader that uses...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-30
document_loaders.googledrive.GoogleDriveLoader Loads Google Docs from Google Drive. document_loaders.odt.UnstructuredODTLoader(...) Loader that uses unstructured to load OpenOffice ODT files. document_loaders.email.OutlookMessageLoader(...) Loads Outlook Message files using extract_msg. document_loaders.email.Unstructu...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-31
document_loaders.rocksetdb.ColumnNotFoundError(...) Column not found error. document_loaders.rocksetdb.RocksetLoader(...) Wrapper around Rockset db document_loaders.confluence.ConfluenceLoader(url) Load Confluence pages. document_loaders.confluence.ContentFormat(value) Enumerator of the content formats of Confluence pa...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-32
document_loaders.parsers.pdf.PyPDFParser([...]) Loads a PDF with pypdf and chunks at character level. document_loaders.parsers.pdf.PyPDFium2Parser() Parse PDFs with PyPDFium2. document_loaders.parsers.audio.OpenAIWhisperParser([...]) Transcribe and parse audio files. document_loaders.parsers.audio.OpenAIWhisperParserLo...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-33
document_loaders.parsers.language.javascript.JavaScriptSegmenter(code) The code segmenter for JavaScript. document_loaders.blob_loaders.file_system.FileSystemBlobLoader(path, *) Blob loader for the local file system. document_loaders.blob_loaders.schema.Blob A blob is used to represent raw data by either reference or v...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-34
document_loaders.unstructured.validate_unstructured_version(...) Raises an error if the unstructured version does not exceed the specified minimum. document_loaders.whatsapp_chat.concatenate_rows(...) Combine message information in a readable format ready to be used. langchain.document_transformers¶ Document Transforme...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-35
Functions¶ document_transformers.embeddings_redundant_filter.get_stateful_documents(...) Convert a list of documents to a list of documents with state. document_transformers.openai_functions.create_metadata_tagger(...) Create a DocumentTransformer that uses an OpenAI function chain to automatically langchain.embeddings...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-36
embeddings.bedrock.BedrockEmbeddings Bedrock embedding models. embeddings.self_hosted_hugging_face.SelfHostedHuggingFaceEmbeddings HuggingFace embedding models on self-hosted remote hardware. embeddings.self_hosted_hugging_face.SelfHostedHuggingFaceInstructEmbeddings HuggingFace InstructEmbedding models on self-hosted ...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-37
Custom Sagemaker Inference Endpoints. embeddings.deepinfra.DeepInfraEmbeddings Deep Infra's embedding inference service. embeddings.huggingface_hub.HuggingFaceHubEmbeddings HuggingFaceHub embedding models. embeddings.edenai.EdenAiEmbeddings EdenAI embedding. embeddings.localai.LocalAIEmbeddings LocalAI embedding models...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-38
LangChain primitives such as language models and chains. Loading an evaluator To load an evaluator, you can use the load_evaluators or load_evaluator functions with the names of the evaluators to load. from langchain.evaluation import load_evaluator evaluator = load_evaluator("qa") evaluator.evaluate_strings( predi...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-39
StringEvaluator: Evaluate a prediction string against a reference label and/or input context. PairwiseStringEvaluator: Evaluate two prediction strings against each other. Useful for scoring preferences, measuring similarity between two chain or llm agents, or comparing outputs on similar inputs. AgentTrajectoryEvaluato...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-40
A chain for evaluating ReAct style agents. evaluation.agents.trajectory_eval_chain.TrajectoryOutputParser Trajectory output parser. evaluation.comparison.eval_chain.LabeledPairwiseStringEvalChain A chain for comparing two outputs, such as the outputs evaluation.comparison.eval_chain.PairwiseStringEvalChain A chain for ...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-41
Networkx wrapper for entity graph operations. graphs.kuzu_graph.KuzuGraph(db[, database]) Kùzu wrapper for graph operations. graphs.rdf_graph.RdfGraph([source_file, ...]) RDFlib wrapper for graph operations. graphs.nebula_graph.NebulaGraph(space[, ...]) NebulaGraph wrapper for graph operations NebulaGraph inherits meth...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-42
access to the large language model (LLM) APIs and services. Class hierarchy: BaseLanguageModel --> BaseLLM --> LLM --> <name> # Examples: AI21, HuggingFaceHub, OpenAI Main helpers: LLMResult, PromptValue, CallbackManagerForLLMRun, AsyncCallbackManagerForLLMRun, CallbackManager, AsyncCallbackManager, AIMessage, BaseMes...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-43
llms.mosaicml.MosaicML MosaicML LLM service. llms.azureml_endpoint.AzureMLEndpointClient(...) AzureML Managed Endpoint client. llms.azureml_endpoint.AzureMLOnlineEndpoint Azure ML Online Endpoint models. llms.azureml_endpoint.ContentFormatterBase() Transform request and response of AzureML endpoint to match with requir...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-44
Wrapper around Minimax large language models. llms.beam.Beam Beam API for gpt2 large language model. llms.ctransformers.CTransformers C Transformers LLM models. llms.xinference.Xinference Wrapper for accessing Xinference's large-scale model inference service. llms.google_palm.GooglePalm Google PaLM models. llms.predict...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-45
Create a new model by parsing and validating input data from keyword arguments. llms.tongyi.Tongyi Tongyi Qwen large language models. llms.ollama.Ollama Ollama locally run large language models. llms.petals.Petals Petals Bloom models. llms.octoai_endpoint.OctoAIEndpoint OctoAI LLM Endpoints. llms.edenai.EdenAI Wrapper ...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-46
llms.fireworks.Fireworks Wrapper around Fireworks large language models. llms.fireworks.FireworksChat Wrapper around Fireworks Chat large language models. llms.fake.FakeListLLM Fake LLM for testing purposes. llms.promptlayer_openai.PromptLayerOpenAI PromptLayer OpenAI large language models. llms.promptlayer_openai.Prom...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-47
llms.fireworks.acompletion_with_retry(llm, ...) Use tenacity to retry the async completion call. llms.fireworks.completion_with_retry(llm, ...) Use tenacity to retry the completion call. llms.fireworks.execute(prompt, model, api_key) Execute LLM query llms.fireworks.update_token_usage(keys, ...) Update token usage. llm...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-48
load.serializable.BaseSerialized Base class for serialized objects. load.serializable.Serializable Serializable base class. load.serializable.SerializedConstructor Serialized constructor. load.serializable.SerializedNotImplemented Serialized not implemented. load.serializable.SerializedSecret Serialized secret. load.lo...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-49
VectorStoreRetriever-backed memory. memory.buffer_window.ConversationBufferWindowMemory Buffer for storing conversation memory inside a limited size window. memory.combined.CombinedMemory Combining multiple memories' data together. memory.summary_buffer.ConversationSummaryBufferMemory Buffer with summarizer for storing...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-50
Chat message history stored in a Postgres database. memory.chat_message_histories.zep.ZepChatMessageHistory(...) Chat message history that uses Zep as a backend. memory.chat_message_histories.dynamodb.DynamoDBChatMessageHistory(...) Chat message history that stores history in AWS DynamoDB. memory.chat_message_histories...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-51
Main helpers: Serializable, Generation, PromptValue Classes¶ output_parsers.list.CommaSeparatedListOutputParser Parse the output of an LLM call to a comma-separated list. output_parsers.list.ListOutputParser Parse the output of an LLM call to a list. output_parsers.boolean.BooleanOutputParser Parse the output of an LLM...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-52
output_parsers.json.SimpleJsonOutputParser Parse the output of an LLM call to a JSON object. output_parsers.pydantic.PydanticOutputParser Parse an output using a pydantic model. output_parsers.enum.EnumOutputParser Parse an output that is one of a set of values. output_parsers.retry.RetryOutputParser Wraps a parser and...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-53
prompts.few_shot.FewShotChatMessagePromptTemplate Chat prompt template that supports few-shot examples. prompts.few_shot.FewShotPromptTemplate Prompt template that contains few shot examples. prompts.prompt.Prompt alias of PromptTemplate prompts.prompt.PromptTemplate A prompt template for a language model. prompts.chat...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-54
prompts.base.check_valid_template(template, ...) Check that template string is valid. prompts.base.jinja2_formatter(template, **kwargs) Format a template using jinja2. prompts.base.validate_jinja2(template, ...) Validate that the input variables are valid for the template. prompts.example_selector.ngram_overlap.ngram_o...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-55
Retrieves documents from a ChatGPT plugin. retrievers.web_research.LineList List of questions. retrievers.web_research.QuestionListOutputParser Output parser for a list of numbered questions. retrievers.web_research.SearchQueries Search queries to run to research for the user's goal. retrievers.web_research.WebResearch...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-56
retrievers.knn.KNNRetriever KNN Retriever. retrievers.multi_query.LineList List of lines. retrievers.multi_query.LineListOutputParser Output parser for a list of lines. retrievers.multi_query.MultiQueryRetriever Given a user query, use an LLM to write a set of queries. retrievers.vespa_retriever.VespaRetriever Retrieve...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-57
retrievers.kendra.TextWithHighLights Text with highlights. retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever Retriever for the Weaviate's hybrid search. retrievers.merger_retriever.MergerRetriever Retriever that merges the results of multiple retrievers. retrievers.ensemble.EnsembleRetriever This class en...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-58
retrievers.document_compressors.embeddings_filter.EmbeddingsFilter Document compressor that uses embeddings to drop documents unrelated to the query. retrievers.document_compressors.cohere_rerank.CohereRerank DocumentCompressor that uses Cohere's rerank API to compress documents. retrievers.document_compressors.base.Ba...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-59
retrievers.kendra.combined_text(item) Combines a ResultItem title and excerpt into a single string. retrievers.knn.create_index(contexts, embeddings) Create an index of embeddings for a list of contexts. retrievers.milvus.MilvusRetreiver(*args, ...) Deprecated MilvusRetreiver. retrievers.pinecone_hybrid_search.create_i...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-60
alias of StrOutputParser schema.output_parser.OutputParserException(error) Exception that output parsers should raise to signify a parsing error. schema.output_parser.StrOutputParser OutputParser that parses LLMResult into the top likely string.. schema.document.BaseDocumentTransformer() Abstract base class for documen...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-61
schema.output.GenerationChunk Create a new model by parsing and validating input data from keyword arguments. schema.output.LLMResult Class that contains all results for a batched LLM call. schema.output.RunInfo Class that contains metadata for a single execution of a Chain or model. schema.agent.AgentAction(tool, tool...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-62
Convert sequence of Messages to strings and concatenate them into one string. schema.messages.messages_from_dict(messages) Convert a sequence of messages from dicts to Message objects. schema.messages.messages_to_dict(messages) Convert a sequence of Messages to a list of dictionaries. schema.prompt_template.format_docu...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-63
RunEvalConfig.Criteria("helpfulness"), RunEvalConfig.Criteria({ "fifth-grader-score": "Do you have to be smarter than a fifth grader to answer this question?" }), ] ) client = Client() run_on_dataset( client, "<my_dataset_name>", construct_chain, evaluation=evaluation_con...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-64
Configuration for a run evaluation. smith.evaluation.runner_utils.InputFormatError Raised when the input format is invalid. smith.evaluation.string_run_evaluator.ChainStringRunMapper Extract items to evaluate from the run object from a chain. smith.evaluation.string_run_evaluator.LLMStringRunMapper Extract items to eva...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-65
Text Splitters are classes for splitting text. Class hierarchy: BaseDocumentTransformer --> TextSplitter --> <name>TextSplitter # Example: CharacterTextSplitter RecursiveCharacterTextSplitter --> <name>TextSplitter Note: MarkdownHeaderTextSplitter does not derive from Text...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-66
text_splitter.Tokenizer(chunk_overlap, ...) Functions¶ text_splitter.split_text_on_tokens(*, text, ...) Split incoming text and return chunks using tokenizer. langchain.tools¶ Tools are classes that an Agent uses to interact with the world. Each tool has a description. Agent uses the description to choose the right too...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-67
tools.spark_sql.tool.InfoSparkSQLTool Tool for getting metadata about a Spark SQL. tools.spark_sql.tool.ListSparkSQLTool Tool for getting tables names. tools.spark_sql.tool.QueryCheckerTool Use an LLM to check if a query is correct. tools.spark_sql.tool.QuerySparkSQLTool Tool for querying a Spark SQL. tools.shell.tool....
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-68
tools.playwright.navigate.NavigateToolInput Input for NavigateToolInput. tools.playwright.click.ClickTool Tool for clicking on an element with the given CSS selector. tools.playwright.click.ClickToolInput Input for ClickTool. tools.playwright.navigate_back.NavigateBackTool Navigate back to the previous page in the brow...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-69
tools.office365.base.O365BaseTool Base class for the Office 365 tools. tools.office365.send_message.O365SendMessage Tool for sending an email in Office 365. tools.office365.send_message.SendMessageSchema Input for SendMessageTool. tools.office365.send_event.O365SendEvent Tool for sending calendar events in Office 365. ...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-70
Input for GetMessageTool. tools.gmail.get_thread.GmailGetThread Tool that gets a thread by ID from Gmail. tools.brave_search.tool.BraveSearch Tool that queries the BraveSearch. tools.openapi.utils.api_models.APIOperation A model for a single API operation. tools.openapi.utils.api_models.APIProperty A model for a proper...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-71
tools.requests.tool.RequestsPutTool Tool for making a PUT request to an API endpoint. tools.pubmed.tool.PubmedQueryRun Tool that searches the PubMed API. tools.file_management.file_search.FileSearchInput Input for FileSearchTool. tools.file_management.file_search.FileSearchTool Tool that searches for files in a subdire...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-72
tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool Tool that queries the Azure Cognitive Services Form Recognizer API. tools.openweathermap.tool.OpenWeatherMapQueryRun Tool that queries the OpenWeatherMap API. tools.jira.tool.JiraAction Tool that queries the Atlassian Jira API. tools.bing_search...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-73
tools.ddg_search.tool.DuckDuckGoSearchResults Tool that queries the DuckDuckGo search API and gets back json. tools.ddg_search.tool.DuckDuckGoSearchRun Tool that queries the DuckDuckGo search API. tools.graphql.tool.BaseGraphQLTool Base tool for querying a GraphQL API. tools.json.tool.JsonGetValueTool Tool for getting ...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-74
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 into the OpenAI function API. tools.ddg_search.tool.DuckDuckGoSearchTool(...) De...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-75
Run an async coroutine. 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.utilitie...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-76
utilities.tensorflow_datasets.TensorflowDatasets Access to the TensorFlow Datasets. utilities.dataforseo_api_search.DataForSeoAPIWrapper Wrapper around the DataForSeo API. utilities.metaphor_search.MetaphorSearchAPIWrapper Wrapper for Metaphor Search API. utilities.google_search.GoogleSearchAPIWrapper Wrapper for Googl...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-77
utilities.bash.BashProcess([strip_newlines, ...]) Wrapper class for starting subprocesses. utilities.graphql.GraphQLAPIWrapper Wrapper around GraphQL API. Functions¶ utilities.loading.try_load_from_hub(path, ...) Load configuration from hub. utilities.powerbi.fix_table_name(table) Add single quotes around table names t...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-78
Row-wise cosine similarity between two equal-width matrices. utils.math.cosine_similarity_top_k(X, Y[, ...]) Row-wise cosine similarity with optional top-k and score threshold filtering. utils.strings.comma_list(items) Convert a list to a comma-separated string. utils.strings.stringify_dict(data) Stringify a dictionary...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-79
vectorstores.awadb.AwaDB([table_name, ...]) Interface implemented by AwaDB vector stores. vectorstores.marqo.Marqo(client, index_name) Wrapper around Marqo database. vectorstores.opensearch_vector_search.OpenSearchVectorSearch(...) Wrapper around OpenSearch as a vector database. vectorstores.starrocks.StarRocks(embeddi...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-80
Initialize wrapper around the Zilliz vector database. vectorstores.tair.Tair(embedding_function, ...) Wrapper around Tair Vector store. vectorstores.pgembedding.BaseModel(**kwargs) A simple constructor that allows initialization from kwargs. vectorstores.pgembedding.CollectionStore(...) A simple constructor that allows...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-81
vectorstores.elastic_vector_search.ElasticKnnSearch(...) ElasticKnnSearch is a class for performing k-nearest neighbor (k-NN) searches on text data using Elasticsearch. vectorstores.elastic_vector_search.ElasticVectorSearch(...) Wrapper around Elasticsearch as a vector database. vectorstores.qdrant.Qdrant(client, ...[,...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-82
vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearchSettings(...) 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 fro...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-83
vectorstores.atlas.AtlasDB(name[, ...]) Wrapper around Atlas: Nomic's neural database and rhizomatic instrument. vectorstores.hologres.Hologres(...[, ndims, ...]) VectorStore implementation using Hologres. vectorstores.hologres.HologresWrapper(...) vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch(...) Wrapper around...
https://api.python.langchain.com/en/latest/api_reference.html
088bd5c75607-84
Import annoy if available, otherwise raise error. vectorstores.clickhouse.has_mul_sub_str(s, *args) Check if a string contains multiple substrings. vectorstores.faiss.dependable_faiss_import([...]) Import faiss if available, otherwise raise error. vectorstores.myscale.has_mul_sub_str(s, *args) Check if a string contain...
https://api.python.langchain.com/en/latest/api_reference.html
b69aa00ac138-0
langchain_experimental API Reference¶ langchain_experimental.autonomous_agents¶ Classes¶ autonomous_agents.hugginggpt.hugginggpt.HuggingGPT(...) autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerationChain Chain to execute tasks. autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerator(...) autonomo...
https://api.python.langchain.com/en/latest/experimental_api_reference.html
b69aa00ac138-1
Action returned by AutoGPTOutputParser. autonomous_agents.autogpt.output_parser.AutoGPTOutputParser Output parser for AutoGPT. autonomous_agents.autogpt.output_parser.BaseAutoGPTOutputParser Base Output parser for AutoGPT. autonomous_agents.autogpt.agent.AutoGPT(...) Agent class for interacting with Auto-GPT. autonomou...
https://api.python.langchain.com/en/latest/experimental_api_reference.html
b69aa00ac138-2
llms.jsonformer_decoder.JsonFormer Jsonformer wrapped LLM using HuggingFace Pipeline API. Functions¶ llms.jsonformer_decoder.import_jsonformer() Lazily import jsonformer. llms.rellm_decoder.import_rellm() Lazily import rellm. langchain_experimental.pal_chain¶ Implements Program-Aided Language Models. As in https://arxi...
https://api.python.langchain.com/en/latest/experimental_api_reference.html
b69aa00ac138-3
langchain_experimental.sql¶ Chain for interacting with SQL Database. Classes¶ sql.base.SQLDatabaseChain Chain for interacting with SQL Database. sql.base.SQLDatabaseSequentialChain Chain for querying SQL database that is a sequential chain. langchain_experimental.tot¶ Classes¶ tot.memory.ToTDFSMemory([stack]) Memory fo...
https://api.python.langchain.com/en/latest/experimental_api_reference.html
87025ac1244e-0
langchain.llms.fireworks.completion_with_retry¶ langchain.llms.fireworks.completion_with_retry(llm: Union[BaseFireworks, FireworksChat], **kwargs: Any) → Any[source]¶ Use tenacity to retry the completion call.
https://api.python.langchain.com/en/latest/llms/langchain.llms.fireworks.completion_with_retry.html
de5bf662f185-0
langchain.llms.azureml_endpoint.GPT2ContentFormatter¶ class langchain.llms.azureml_endpoint.GPT2ContentFormatter[source]¶ Content handler for GPT2 Attributes accepts The MIME type of the response data returned from the endpoint content_type The MIME type of the input data passed to the endpoint Methods __init__() escap...
https://api.python.langchain.com/en/latest/llms/langchain.llms.azureml_endpoint.GPT2ContentFormatter.html
4187a9c3b475-0
langchain_experimental.llms.llamaapi.ChatLlamaAPI¶ class langchain_experimental.llms.llamaapi.ChatLlamaAPI[source]¶ Bases: BaseChatModel 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 cache: Optional[...
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
4187a9c3b475-1
Top Level call async agenerate_prompt(prompts: List[PromptValue], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → LLMResult¶ Asynchronously pass a sequence of prompts and return model generations. This method should make use of batche...
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
4187a9c3b475-2
Use this method when calling pure text generation models and only the topcandidate generation is needed. Parameters text – String input to pass to the model. stop – Stop words to use when generating. Model output is cut off at the first occurrence of any of these substrings. **kwargs – Arbitrary additional keyword argu...
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
4187a9c3b475-3
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu...
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
4187a9c3b475-4
This method should make use of batched calls for models that expose a batched API. Use this method when you want to: take advantage of batched calls, need more output from the model than just the top generated value, are building chains that are agnostic to the underlying language modeltype (e.g., pure text completion ...
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
4187a9c3b475-5
Parameters text – The string input to tokenize. Returns A list of ids corresponding to the tokens in the text, in order they occurin the text. invoke(input: Union[PromptValue, str, List[BaseMessage]], config: Optional[RunnableConfig] = None, *, stop: Optional[List[str]] = None, **kwargs: Any) → BaseMessageChunk¶ json(*...
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
4187a9c3b475-6
Parameters text – String input to pass to the model. stop – Stop words to use when generating. Model output is cut off at the first occurrence of any of these substrings. **kwargs – Arbitrary additional keyword arguments. These are usually passed to the model provider API call. Returns Top model prediction as a string....
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
4187a9c3b475-7
classmethod validate(value: Any) → Model¶ with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.Runnable[~langchain.schema.runnable.Input, ~langchain.schema.runnable.Output]], *, exceptions_to_handle: ~typing.Tuple[~typing.Type[BaseException]] = (<class 'Exception'>,)) → RunnableWithFallbacks[Input, Out...
https://api.python.langchain.com/en/latest/llms/langchain_experimental.llms.llamaapi.ChatLlamaAPI.html
0b29baa3a28c-0
langchain.llms.loading.load_llm_from_config¶ langchain.llms.loading.load_llm_from_config(config: dict) → BaseLLM[source]¶ Load LLM from Config Dict.
https://api.python.langchain.com/en/latest/llms/langchain.llms.loading.load_llm_from_config.html
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5