Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
14
15
text
stringlengths
44
2.47k
source
stringlengths
61
181
dba2dae987f7-0
langchain API Reference¶ langchain.adapters¶ Classes¶ adapters.openai.ChatCompletion() Functions¶ adapters.openai.aenumerate(iterable[, start]) Async version of enumerate. adapters.openai.convert_dict_to_message(_dict) adapters.openai.convert_message_to_dict(message) adapters.openai.convert_messages_for_finetuning(...)...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-1
agents.agent.RunnableAgent Agent powered by runnables. agents.agent_iterator.AgentExecutorIterator(...) Iterator for AgentExecutor. agents.agent_iterator.BaseAgentExecutorIterator() Base class for AgentExecutorIterator. agents.agent_toolkits.ainetwork.toolkit.AINetworkToolkit Toolkit for interacting with AINetwork Bloc...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-2
agents.agent_toolkits.openapi.planner.RequestsPatchToolWithParsing Requests PATCH tool with LLM-instructed extraction of truncated responses. agents.agent_toolkits.openapi.planner.RequestsPostToolWithParsing Requests POST tool with LLM-instructed extraction of truncated responses. agents.agent_toolkits.openapi.planner....
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-3
agents.conversational.output_parser.ConvoOutputParser Output parser for the conversational agent. agents.conversational_chat.base.ConversationalChatAgent An agent designed to hold a conversation in addition to using tools. agents.conversational_chat.output_parser.ConvoOutputParser Output parser for the conversational a...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-4
Parses tool invocations and final answers in XML format. agents.react.base.DocstoreExplorer(docstore) Class to assist with exploration of a document store. agents.react.base.ReActChain [Deprecated] Chain that implements the ReAct paper. agents.react.base.ReActDocstoreAgent Agent for the ReAct chain. agents.react.base.R...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-5
agents.agent_toolkits.json.base.create_json_agent(...) Construct a json agent from an LLM and tools. agents.agent_toolkits.openapi.base.create_openapi_agent(...) Construct an OpenAPI agent from an LLM and tools. agents.agent_toolkits.openapi.planner.create_openapi_agent(...) Instantiate OpenAI API planner and controlle...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-6
Construct the scratchpad that lets the agent continue its thought process. agents.format_scratchpad.log_to_messages.format_log_to_messages(...) Construct the scratchpad that lets the agent continue its thought process. agents.format_scratchpad.openai_functions.format_to_openai_functions(...) Format intermediate steps. ...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-7
Parsing utils to go from string to AgentAction or Agent Finish. AgentAction means that an action should be taken. This contains the name of the tool to use, the input to pass to that tool, and a log variable (which contains a log of the agent’s thinking). AgentFinish means that a response should be given. This contains...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-8
Cache directly competes with Memory. See documentation for Pros and Cons. Class hierarchy: BaseCache --> <name>Cache # Examples: InMemoryCache, RedisCache, GPTCache Classes¶ cache.CassandraCache([session, keyspace, ...]) Cache that uses Cassandra / Astra DB as a backend. cache.CassandraSemanticCache(session, ...[, ......
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-9
Callback Handler that logs to Arize. callbacks.arthur_callback.ArthurCallbackHandler(...) Callback Handler that logs to Arthur platform. callbacks.base.AsyncCallbackHandler() Async callback handler that can be used to handle callbacks from langchain. callbacks.base.BaseCallbackHandler() Base callback handler that can b...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-10
callbacks.llmonitor_callback.LLMonitorCallbackHandler([...]) Initializes the LLMonitorCallbackHandler. #### Parameters: - app_id: The app id of the app you want to report to. Defaults to None, which means that LLMONITOR_APP_ID will be used. - api_url: The url of the LLMonitor API. Defaults to None, which me...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-11
Callback manager for retriever run. callbacks.manager.CallbackManagerForToolRun(*, ...) Callback manager for tool run. callbacks.manager.ParentRunManager(*, ...[, ...]) Sync Parent Run Manager. callbacks.manager.RunManager(*, run_id, ...) Sync Run Manager. callbacks.mlflow_callback.MlflowCallbackHandler([...]) Callback...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-12
Generates markdown labels for LLMThought containers. callbacks.streamlit.streamlit_callback_handler.LLMThoughtState(value) Enumerator of the LLMThought state. callbacks.streamlit.streamlit_callback_handler.StreamlitCallbackHandler(...) A callback handler that writes to a Streamlit app. callbacks.streamlit.streamlit_cal...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-13
callbacks.tracers.schemas.TracerSessionBase Base class for TracerSession. callbacks.tracers.schemas.TracerSessionV1 TracerSessionV1 schema. callbacks.tracers.schemas.TracerSessionV1Base Base class for TracerSessionV1. callbacks.tracers.schemas.TracerSessionV1Create Create class for TracerSessionV1. callbacks.tracers.st...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-14
Analyze text using textstat and spacy. callbacks.flyte_callback.import_flytekit() Import flytekit and flytekitplugins-deck-standard. callbacks.infino_callback.import_infino() Import the infino client. callbacks.labelstudio_callback.get_default_label_configs(mode) callbacks.llmonitor_callback.identify(user_id) callbacks...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-15
callbacks.sagemaker_callback.save_json(data, ...) Save dict to local file path. callbacks.tracers.evaluation.wait_for_all_evaluators() Wait for all tracers to finish. callbacks.tracers.langchain.get_client() Get the client. callbacks.tracers.langchain.log_error_once(...) Log an error once. callbacks.tracers.langchain.w...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-16
Load json file to a dictionary. callbacks.whylabs_callback.import_langkit([...]) Import the langkit python package and raise an error if it is not installed. langchain.chains¶ Chains are easily reusable components linked together. Chains encode a sequence of calls to components like models, document retrievers, other C...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-17
Combining documents by mapping a chain over them, then reranking results. chains.combine_documents.reduce.AsyncCombineDocsProtocol(...) Interface for the combine_docs method. chains.combine_documents.reduce.CombineDocsProtocol(...) Interface for the combine_docs method. chains.combine_documents.reduce.ReduceDocumentsCh...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-18
chains.graph_qa.cypher.GraphCypherQAChain Chain for question-answering against a graph by generating Cypher statements. chains.graph_qa.falkordb.FalkorDBQAChain Chain for question-answering against a graph by generating Cypher statements. chains.graph_qa.hugegraph.HugeGraphQAChain Chain for question-answering against a...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-19
Chain that requests a URL and then uses an LLM to parse results. chains.llm_summarization_checker.base.LLMSummarizationCheckerChain Chain for question-answering with self-verification. chains.llm_symbolic_math.base.LLMSymbolicMathChain Chain that interprets a prompt and executes python code to do symbolic math. chains....
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-20
Question-answering with sources over an index. chains.qa_with_sources.vector_db.VectorDBQAWithSourcesChain Question-answering with sources over a vector database. chains.query_constructor.base.StructuredQueryOutputParser Output parser that parses a structured query. chains.query_constructor.ir.Comparator(value) Enumera...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-21
chains.router.multi_prompt.MultiPromptChain A multi-route chain that uses an LLM router chain to choose amongst prompts. chains.router.multi_retrieval_qa.MultiRetrievalQAChain A multi-route chain that uses an LLM router chain to choose amongst retrieval qa chains. chains.sequential.SequentialChain Chain where the outpu...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-22
Convert a raw function/class to an OpenAI function. chains.openai_functions.base.create_openai_fn_chain(...) Create an LLM chain that uses OpenAI functions. chains.openai_functions.base.create_structured_output_chain(...) Create an LLMChain that uses an OpenAI function to get a structured output. chains.openai_function...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-23
Load a question answering with sources chain. chains.query_constructor.base.load_query_constructor_chain(...) Load a query constructor chain. chains.query_constructor.parser.get_parser([...]) Returns a parser for the query language. chains.query_constructor.parser.v_args(...) Dummy decorator for when lark is not instal...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-24
chat_loaders.utils.map_ai_messages_in_session(...) Convert messages from the specified 'sender' to AI messages. chat_loaders.utils.merge_chat_runs(chat_sessions) Merge chat runs together. chat_loaders.utils.merge_chat_runs_in_session(...) Merge chat runs together in a chat session. langchain.chat_models¶ Chat Models ar...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-25
chat_models.fake.FakeListChatModel Fake ChatModel for testing purposes. chat_models.fake.FakeMessagesListChatModel Create a new model by parsing and validating input data from keyword arguments. chat_models.fireworks.ChatFireworks Fireworks Chat models. chat_models.google_palm.ChatGooglePalm Google PaLM Chat models API...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-26
chat_models.vertexai.ChatVertexAI Vertex AI Chat large language models API. Functions¶ chat_models.anthropic.convert_messages_to_prompt_anthropic(...) Format a list of messages into a full prompt for the Anthropic model chat_models.baidu_qianfan_endpoint.convert_message_to_dict(message) chat_models.fireworks.acompletio...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-27
Mixin class that supports adding texts. docstore.base.Docstore() Interface to access to place that stores documents. docstore.in_memory.InMemoryDocstore([_dict]) Simple in memory docstore in the form of a dict. docstore.wikipedia.Wikipedia() Wrapper around wikipedia API. langchain.document_loaders¶ Document Loaders ar...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-28
Load local Airbyte json files. document_loaders.airtable.AirtableLoader(...) Load the Airtable tables. document_loaders.apify_dataset.ApifyDatasetLoader Load datasets from Apify web scraping, crawling, and data extraction platform. document_loaders.arcgis_loader.ArcGISLoader(layer) Load records from an ArcGIS FeatureLa...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-29
Load blobs in the local file system. document_loaders.blob_loaders.schema.Blob Blob represents 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 url...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-30
Load Datadog logs. document_loaders.dataframe.BaseDataFrameLoader(...) Initialize with dataframe object. document_loaders.dataframe.DataFrameLoader(...) Load Pandas DataFrame. document_loaders.diffbot.DiffbotLoader(...) Load Diffbot json file. document_loaders.directory.DirectoryLoader(...) Load from a directory. docum...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-31
document_loaders.facebook_chat.FacebookChatLoader(path) Load Facebook Chat messages directory dump. document_loaders.fauna.FaunaLoader(query, ...) Load from FaunaDB. document_loaders.figma.FigmaFileLoader(...) Load Figma file. document_loaders.gcs_directory.GCSDirectoryLoader(...) Load from GCS directory. document_load...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-32
document_loaders.image_captions.ImageCaptionLoader(...) Load image captions. document_loaders.imsdb.IMSDbLoader([...]) Load IMSDb webpages. document_loaders.iugu.IuguLoader(resource[, ...]) Load from IUGU. document_loaders.joplin.JoplinLoader([...]) Load notes from Joplin. document_loaders.json_loader.JSONLoader(...) L...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-33
Load from any file type using Nuclia Understanding API. document_loaders.obs_directory.OBSDirectoryLoader(...) Load from Huawei OBS directory. document_loaders.obs_file.OBSFileLoader(...) Load from the Huawei OBS file. document_loaders.obsidian.ObsidianLoader(path) Load Obsidian files from directory. document_loaders.o...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-34
Code segmenter for JavaScript. document_loaders.parsers.language.language_parser.LanguageParser([...]) Parse using the respective programming language syntax. document_loaders.parsers.language.python.PythonSegmenter(code) Code segmenter for Python. document_loaders.parsers.msword.MsWordParser() document_loaders.parsers...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-35
Load PDF files as HTML content using PDFMiner. document_loaders.pdf.PDFPlumberLoader(file_path) Load PDF files using pdfplumber. document_loaders.pdf.PyMuPDFLoader(file_path, *) Load PDF files using PyMuPDF. document_loaders.pdf.PyPDFDirectoryLoader(path) Load a directory with PDF files using pypdf and chunks at charac...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-36
Column not found error. document_loaders.rocksetdb.RocksetLoader(...) Load from a Rockset database. document_loaders.rss.RSSFeedLoader([urls, ...]) Load news articles from RSS feeds using Unstructured. document_loaders.rst.UnstructuredRSTLoader(...) Load RST files using Unstructured. document_loaders.rtf.UnstructuredRT...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-37
document_loaders.text.TextLoader(file_path) Load text file. document_loaders.tomarkdown.ToMarkdownLoader(...) Load HTML using 2markdown API. document_loaders.toml.TomlLoader(source) Load TOML files. document_loaders.trello.TrelloLoader(client, ...) Load cards from a Trello board. document_loaders.tsv.UnstructuredTSVLoa...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-38
Load WhatsApp messages text file. document_loaders.wikipedia.WikipediaLoader(query) Load from Wikipedia. document_loaders.word_document.Docx2txtLoader(...) Load DOCX file using docx2txt and chunks at character level. document_loaders.word_document.UnstructuredWordDocumentLoader(...) Load Microsof Word file using Unstru...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-39
Retrieve a list of elements from the Unstructured API. document_loaders.unstructured.satisfies_min_unstructured_version(...) Check if the installed Unstructured version exceeds the minimum version for the feature in question. document_loaders.unstructured.validate_unstructured_version(...) Raise an error if the Unstruc...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-40
document_transformers.nuclia_text_transform.NucliaTextTransformer(nua) The Nuclia Understanding API splits into paragraphs and sentences, identifies entities, provides a summary of the text and generates embeddings for all sentences. document_transformers.openai_functions.OpenAIMetadataTagger Extract metadata tags from...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-41
DashScope embedding models. embeddings.deepinfra.DeepInfraEmbeddings Deep Infra's embedding inference service. embeddings.edenai.EdenAiEmbeddings EdenAI embedding. embeddings.elasticsearch.ElasticsearchEmbeddings(...) Elasticsearch embedding models. embeddings.embaas.EmbaasEmbeddings Embaas's embedding service. embeddi...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-42
embeddings.jina.JinaEmbeddings Jina embedding models. embeddings.llamacpp.LlamaCppEmbeddings llama.cpp embedding models. embeddings.llm_rails.LLMRailsEmbeddings LLMRails embedding models. embeddings.localai.LocalAIEmbeddings LocalAI embedding models. embeddings.minimax.MiniMaxEmbeddings MiniMax's embedding service. emb...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-43
embeddings.tensorflow_hub.TensorflowHubEmbeddings TensorflowHub embedding models. embeddings.vertexai.VertexAIEmbeddings Google Cloud VertexAI embedding models. embeddings.xinference.XinferenceEmbeddings([...]) Wrapper around xinference embedding models. Functions¶ embeddings.dashscope.embed_with_retry(...) Use tenacit...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-44
name of the dataset to load. from langchain.evaluation import load_dataset ds = load_dataset("llm-math") Some common use cases for evaluation include: Grading the accuracy of a response against ground truth answers: QAEvalChain Comparing the output of two models: PairwiseStringEvalChain or LabeledPairwiseStringEvalChai...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-45
evaluation.comparison.eval_chain.PairwiseStringEvalChain A chain for comparing two outputs, such as the outputs evaluation.comparison.eval_chain.PairwiseStringResultOutputParser A parser for the output of the PairwiseStringEvalChain. evaluation.criteria.eval_chain.Criteria(value) A Criteria to evaluate. evaluation.crit...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-46
evaluation.schema.EvaluatorType(value[, ...]) The types of the evaluators. evaluation.schema.LLMEvalChain A base class for evaluators that use an LLM. evaluation.schema.PairwiseStringEvaluator() Compare the output of two models (or two outputs of the same model). evaluation.schema.StringEvaluator() Grade, tag, or other...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-47
HugeGraph wrapper for graph operations graphs.kuzu_graph.KuzuGraph(db[, database]) Kùzu wrapper for graph operations. graphs.memgraph_graph.MemgraphGraph(url, ...) Memgraph wrapper for graph operations. graphs.nebula_graph.NebulaGraph(space[, ...]) NebulaGraph wrapper for graph operations NebulaGraph inherits methods f...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-48
Code to support various indexing workflows. Provides code to: Create knowledge graphs from data. Support indexing workflows from LangChain data loaders to vectorstores. For indexing workflows, this code is used to avoid writing duplicated content into the vectostore and to avoid over-writing content if it’s unchanged. ...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-49
llms.anthropic.Anthropic Anthropic large language models. llms.anyscale.Anyscale Anyscale Service models. llms.aviary.Aviary Aviary hosted models. llms.aviary.AviaryBackend(backend_url, bearer) Aviary backend. llms.azureml_endpoint.AzureMLEndpointClient(...) AzureML Managed Endpoint client. llms.azureml_endpoint.AzureM...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-50
llms.bedrock.LLMInputOutputAdapter() Adapter class to prepare the inputs from Langchain to a format that LLM model expects. llms.bittensor.NIBittensorLLM NIBittensorLLM is created by Neural Internet (https://neuralinternet.ai/), powered by Bittensor, a decentralized network full of different AI models. llms.cerebriumai...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-51
llms.gradient_ai.GradientLLM Gradient.ai LLM Endpoints. llms.huggingface_endpoint.HuggingFaceEndpoint HuggingFace Endpoint models. llms.huggingface_hub.HuggingFaceHub HuggingFaceHub models. llms.huggingface_pipeline.HuggingFacePipeline HuggingFace Pipeline API. llms.huggingface_text_gen_inference.HuggingFaceTextGenInf...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-52
llms.ollama.Ollama Ollama locally runs large language models. llms.opaqueprompts.OpaquePrompts An LLM wrapper that uses OpaquePrompts to sanitize prompts. llms.openai.AzureOpenAI Azure-specific OpenAI large language models. llms.openai.BaseOpenAI Base OpenAI large language model class. llms.openai.OpenAI OpenAI large l...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-53
Model inference on self-hosted remote hardware. llms.self_hosted_hugging_face.SelfHostedHuggingFaceLLM HuggingFace Pipeline API to run on self-hosted remote hardware. llms.stochasticai.StochasticAI StochasticAI large language models. llms.symblai_nebula.Nebula Nebula Service models. llms.textgen.TextGen text-generation...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-54
Use tenacity to retry the completion call. llms.cohere.completion_with_retry(llm, **kwargs) Use tenacity to retry the completion call. llms.databricks.get_default_api_token() Gets the default Databricks personal access token. llms.databricks.get_default_host() Gets the default Databricks workspace hostname. llms.databr...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-55
llms.tongyi.generate_with_retry(llm, **kwargs) Use tenacity to retry the completion call. llms.tongyi.stream_generate_with_retry(llm, ...) Use tenacity to retry the completion call. llms.utils.enforce_stop_tokens(text, stop) Cut off the text as soon as any stop words occur. llms.vertexai.acompletion_with_retry(llm, *ar...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-56
Revive a LangChain class from a JSON string. load.serializable.to_json_not_implemented(obj) Serialize a "not implemented" object. langchain.memory¶ Memory maintains Chain state, incorporating context from past runs. Class hierarchy for Memory: BaseMemory --> BaseChatMemory --> <name>Memory # Examples: ZepMemory, Motor...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-57
memory.chat_message_histories.mongodb.MongoDBChatMessageHistory(...) Chat message history that stores history in MongoDB. memory.chat_message_histories.postgres.PostgresChatMessageHistory(...) Chat message history stored in a Postgres database. memory.chat_message_histories.redis.RedisChatMessageHistory(...) Chat messa...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-58
A memory wrapper that is read-only and cannot be changed. memory.simple.SimpleMemory Simple memory for storing context or other information that shouldn't ever change between prompts. memory.summary.ConversationSummaryMemory Conversation summarizer to chat memory. memory.summary.SummarizerMixin Mixin for summarizer. me...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-59
output_parsers.json.SimpleJsonOutputParser Parse the output of an LLM call to a JSON object. 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.list.NumberedListOutpu...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-60
output_parsers.xml.XMLOutputParser Parse an output using xml format. Functions¶ output_parsers.json.parse_and_check_json_markdown(...) Parse a JSON string from a Markdown string and check that it contains the expected keys. output_parsers.json.parse_json_markdown(...) Parse a JSON string from a Markdown string. output_...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-61
prompts.chat.ChatPromptValue Chat prompt value. prompts.chat.ChatPromptValueConcrete Chat prompt value which explicitly lists out the message types it accepts. prompts.chat.HumanMessagePromptTemplate Human message prompt template. prompts.chat.MessagesPlaceholder Prompt template that assumes variable is already list of...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-62
prompts.example_selector.ngram_overlap.ngram_overlap_score(...) Compute ngram overlap score of source and example as sentence_bleu score. prompts.example_selector.semantic_similarity.sorted_values(values) Return a list of values in dict sorted by key. prompts.loading.load_prompt(path) Unified method for loading a promp...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-63
Databerry API retriever. retrievers.docarray.DocArrayRetriever DocArray Document Indices retriever. retrievers.docarray.SearchType(value[, ...]) Enumerator of the types of search to perform. retrievers.document_compressors.base.BaseDocumentCompressor Base class for document compressors. retrievers.document_compressors....
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-64
Amazon Kendra Index retriever. retrievers.kendra.DocumentAttribute Document attribute. retrievers.kendra.DocumentAttributeValue Value of a document attribute. retrievers.kendra.Highlight Information that highlights the key words in the excerpt. retrievers.kendra.QueryResult Amazon Kendra Query API search result. retrie...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-65
Retrieve small chunks then retrieve their parent documents. retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever Pinecone Hybrid Search retriever. retrievers.pubmed.PubMedRetriever PubMed API retriever. retrievers.re_phraser.RePhraseQueryRetriever Given a query, use an LLM to re-phrase it. retrievers.remote_...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-66
Translate retrievers.self_query.supabase.SupabaseVectorTranslator() Translate Langchain filters to Supabase PostgREST filters. retrievers.self_query.timescalevector.TimescaleVectorTranslator() Translate the internal query language elements to valid filters. retrievers.self_query.vectara.VectaraTranslator() Translate Ve...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-67
retrievers.document_compressors.chain_extract.default_get_input(...) Return the compression chain input. retrievers.document_compressors.chain_filter.default_get_input(...) Return the compression chain input. retrievers.kendra.clean_excerpt(excerpt) Clean an excerpt from Kendra. retrievers.kendra.combined_text(item) Co...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-68
schema.agent.AgentActionMessageLog Create a new model by parsing and validating input data from keyword arguments. schema.agent.AgentFinish The final return value of an ActionAgent. schema.cache.BaseCache() Base interface for cache. schema.chat.ChatSession Chat Session represents a single conversation, channel, or othe...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-69
schema.output.ChatGenerationChunk A ChatGeneration chunk, which can be concatenated with other schema.output.ChatResult Class that contains all results for a single chat model call. schema.output.Generation A single text generation output. schema.output.GenerationChunk A Generation chunk, which can be concatenated with...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-70
A Runnable that selects which branch to run based on a condition. schema.runnable.base.RunnableEach A runnable that delegates calls to another runnable with each element of the input sequence. schema.runnable.base.RunnableGenerator(transform) A runnable that runs a generator function. schema.runnable.base.RunnableLambd...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-71
Functions¶ schema.messages.get_buffer_string(messages) 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 l...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-72
Indent all lines of text after the first line. langchain.smith¶ LangSmith utilities. This module provides utilities for connecting to LangSmith. For more information on LangSmith, see the LangSmith documentation. Evaluation LangSmith helps you evaluate Chains and other language model application components using a numb...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-73
from langchain.evaluation import StringEvaluator class MyStringEvaluator(StringEvaluator): @property def requires_input(self) -> bool: return False @property def requires_reference(self) -> bool: return True @property def evaluation_name(self) -> str: return "exact_match"...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-74
smith.evaluation.string_run_evaluator.StringExampleMapper Map an example, or row in the dataset, to the inputs of an evaluation. smith.evaluation.string_run_evaluator.StringRunEvaluatorChain Evaluate Run and optional examples. smith.evaluation.string_run_evaluator.StringRunMapper Extract items to evaluate from the run ...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-75
RecursiveCharacterTextSplitter --> <name>TextSplitter Note: MarkdownHeaderTextSplitter does not derive from TextSplitter. Main helpers: Document, Tokenizer, Language, LineType, HeaderType Classes¶ text_splitter.CharacterTextSplitter([...]) Splitting text that looks at characters. text_splitter.HeaderType Header type a...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-76
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 tool for the job. Class hierarchy: ToolMetaclass --> BaseTool --> <name>Tool # Examples: AIPluginTool, Bas...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-77
Create a new model by parsing and validating input data from keyword arguments. tools.amadeus.base.AmadeusBaseTool Base Tool for Amadeus. tools.amadeus.closest_airport.AmadeusClosestAirport Tool for finding the closest airport to a particular location. tools.amadeus.closest_airport.ClosestAirportSchema Schema for the A...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-78
Tool that queries the Bing search API. tools.brave_search.tool.BraveSearch Tool that queries the BraveSearch. tools.dataforseo_api_search.tool.DataForSeoAPISearchResults Tool that queries the DataForSeo Google Search API and get back json. tools.dataforseo_api_search.tool.DataForSeoAPISearchRun Tool that queries the Da...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-79
Models available for Eleven Labs Text2Speech. tools.eleven_labs.text2speech.ElevenLabsModel(value) Models available for Eleven Labs Text2Speech. tools.eleven_labs.text2speech.ElevenLabsText2SpeechTool Tool that queries the Eleven Labs Text2Speech API. tools.file_management.copy.CopyFileTool Tool that copies a file. too...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-80
tools.gmail.create_draft.CreateDraftSchema Input for CreateDraftTool. tools.gmail.create_draft.GmailCreateDraft Tool that creates a draft email for Gmail. tools.gmail.get_message.GmailGetMessage Tool that gets a message by ID from Gmail. tools.gmail.get_message.SearchArgsSchema Input for GetMessageTool. tools.gmail.get...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-81
tools.jira.tool.JiraAction Tool that queries the Atlassian Jira API. tools.json.tool.JsonGetValueTool Tool for getting a value in a JSON spec. tools.json.tool.JsonListKeysTool Tool for listing keys in a JSON spec. tools.json.tool.JsonSpec Base class for JSON spec. tools.metaphor_search.tool.MetaphorSearchResults Tool t...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-82
tools.office365.send_event.SendEventSchema Input for CreateEvent Tool. tools.office365.send_message.O365SendMessage Tool for sending an email in Office 365. tools.office365.send_message.SendMessageSchema Input for SendMessageTool. tools.openapi.utils.api_models.APIOperation A model for a single API operation. tools.ope...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-83
Input for NavigateToolInput. tools.playwright.navigate_back.NavigateBackTool Navigate back to the previous page in the browser history. tools.plugin.AIPlugin AI Plugin Definition. tools.plugin.AIPluginTool Tool for getting the OpenAPI spec for an AI Plugin. tools.plugin.AIPluginToolSchema Schema for AIPluginTool. tools...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-84
tools.searchapi.tool.SearchAPIRun Tool that queries the SearchApi.io search API. tools.searx_search.tool.SearxSearchResults Tool that queries a Searx instance and gets back json. tools.searx_search.tool.SearxSearchRun Tool that queries a Searx instance. tools.shell.tool.ShellInput Commands for the Bash Shell tool. tool...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-85
tools.vectorstore.tool.VectorStoreQATool Tool for the VectorDBQA chain. tools.vectorstore.tool.VectorStoreQAWithSourcesTool Tool for the VectorDBQAWithSources chain. tools.wikipedia.tool.WikipediaQueryRun Tool that searches the Wikipedia API. tools.wolfram_alpha.tool.WolframAlphaQueryRun Tool that queries using the Wol...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-86
Clean email body. tools.gmail.utils.get_gmail_credentials([...]) Get credentials. tools.gmail.utils.import_google() Import google libraries. tools.gmail.utils.import_googleapiclient_resource_builder() Import googleapiclient.discovery.build function. tools.gmail.utils.import_installed_app_flow() Import InstalledAppFlow ...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-87
langchain.tools.render¶ Different methods for rendering Tools to be passed to LLMs. Depending on the LLM you are using and the prompting strategy you are using, you may want Tools to be rendered in a different way. This module contains various ways to render tools. Functions¶ tools.render.format_tool_to_openai_function...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-88
utilities.github.GitHubAPIWrapper Wrapper for GitHub API. utilities.gitlab.GitLabAPIWrapper Wrapper for GitLab API. utilities.golden_query.GoldenQueryAPIWrapper Wrapper for Golden. utilities.google_places_api.GooglePlacesAPIWrapper Wrapper around Google Places API. utilities.google_search.GoogleSearchAPIWrapper Wrapper...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-89
Wrapper around SearchApi API. utilities.searx_search.SearxResults(data) Dict like wrapper around search api results. utilities.searx_search.SearxSearchWrapper Wrapper for Searx API. utilities.serpapi.HiddenPrints() Context manager to hide prints. utilities.serpapi.SerpAPIWrapper Wrapper around SerpAPI. utilities.spark_...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-90
utilities.sql_database.truncate_word(...[, ...]) Truncate a string to a certain number of words, based on the max string length. utilities.vertexai.init_vertexai([project, ...]) Init vertexai. utilities.vertexai.raise_vertex_import_error([...]) Raise ImportError related to Vertex SDK being not available. langchain.util...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-91
utils.input.get_bolded_text(text) Get bolded text. utils.input.get_color_mapping(items[, ...]) Get mapping for items to a support color. utils.input.get_colored_text(text, color) Get colored text. utils.input.print_text(text[, color, end, file]) Print text with highlighting and no end characters. utils.iter.batch_itera...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-92
utils.utils.mock_now(dt_value) Context manager for mocking out datetime.now() in unit tests. utils.utils.raise_for_status_with_text(response) Raise an error with the response text. utils.utils.xor_args(*arg_groups) Validate specified keyword args are mutually exclusive. langchain.vectorstores¶ Vector store stores embed...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-93
BagelDB.ai vector store. vectorstores.cassandra.Cassandra(embedding, ...) Wrapper around Apache Cassandra(R) for vector-store workloads. vectorstores.chroma.Chroma([...]) ChromaDB vector store. vectorstores.clarifai.Clarifai([user_id, ...]) Clarifai AI vector store. vectorstores.clickhouse.Clickhouse(embedding) ClickHo...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-94
Sparse retrieval strategy using the text_expansion processor. vectorstores.epsilla.Epsilla(client, embeddings) Wrapper around Epsilla vector database. vectorstores.faiss.FAISS(embedding_function, ...) Meta Faiss vector store. vectorstores.hologres.Hologres(...[, ndims, ...]) Hologres API vector store. vectorstores.holo...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-95
NucliaDB vector store. vectorstores.opensearch_vector_search.OpenSearchVectorSearch(...) Amazon OpenSearch Vector Engine vector store. vectorstores.pgembedding.BaseModel(**kwargs) Base model for all SQL stores. vectorstores.pgembedding.CollectionStore(...) Collection store. vectorstores.pgembedding.EmbeddingStore(**kwa...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-96
vectorstores.redis.filters.RedisText(field) A RedisText is a RedisFilterField representing a text field in a Redis index. vectorstores.redis.schema.FlatVectorField Create a new model by parsing and validating input data from keyword arguments. vectorstores.redis.schema.HNSWVectorField Create a new model by parsing and ...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-97
Serializes data in Apache Parquet format using the pyarrow package. vectorstores.sklearn.SKLearnVectorStore(...) Simple in-memory vector store based on the scikit-learn library NearestNeighbors implementation. vectorstores.sklearn.SKLearnVectorStoreException Exception raised by SKLearnVectorStore. vectorstores.sqlitevs...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-98
vectorstores.vectara.Vectara([...]) Vectara API vector store. vectorstores.vectara.VectaraRetriever Retriever class for Vectara. vectorstores.weaviate.Weaviate(client, ...) Weaviate vector store. vectorstores.xata.XataVectorStore(api_key, ...) Xata vector store. vectorstores.zep.CollectionConfig(name, ...) Configuratio...
https://api.python.langchain.com/en/latest/api_reference.html
dba2dae987f7-99
vectorstores.scann.normalize(x) Normalize vectors to unit length. vectorstores.starrocks.debug_output(s) Print a debug message if DEBUG is True. vectorstores.starrocks.get_named_result(...) Get a named result from a query. vectorstores.starrocks.has_mul_sub_str(s, *args) Check if a string has multiple substrings. vecto...
https://api.python.langchain.com/en/latest/api_reference.html
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
8