viruPVS/langchain-docs huggingface dataset:
Base model for the SQL stores.
vectorstores.pgvector.DistanceStrategy(value)
Enumerator of the Distance strategies.
vectorstores.pgvector.PGVector(...[, ...])
Postgres/PGVector vector store.
vectorstores.pinecone.Pinecone(index, ...[, ...])
Pinecone vector store.
vectorstores.qdrant.Qdrant(client, ...[, ...])
Qdrant vector store.
vectorstores.qdrant.QdrantException
Qdrant related exceptions.
vectorstores.redis.base.Redis(redis_url, ...)
Redis vector database.
vectorstores.redis.base.RedisVectorStoreRetriever
Retriever for Redis VectorStore.
vectorstores.redis.filters.RedisFilter()
Collection of RedisFilterFields.
vectorstores.redis.filters.RedisFilterExpression([...])
A logical expression of RedisFilterFields.
vectorstores.redis.filters.RedisFilterField(field)
Base class for RedisFilterFields.
vectorstores.redis.filters.RedisFilterOperator(value)
RedisFilterOperator enumerator is used to create RedisFilterExpressions.
vectorstores.redis.filters.RedisNum(field)
A RedisFilterField representing a numeric field in a Redis index.
vectorstores.redis.filters.RedisTag(field)
A RedisFilterField representing a tag in a Redis index.
vectorstores.redis.filters.RedisText(field)
A RedisFilterField representing a text field in a Redis index.
vectorstores.redis.schema.FlatVectorField
Schema for flat vector fields in Redis.
vectorstores.redis.schema.HNSWVectorField
Schema for HNSW vector fields in Redis.
vectorstores.redis.schema.NumericFieldSchema
Schema for numeric fields in Redis.
vectorstores.redis.schema.RedisDistanceMetric(value)
Distance metrics for Redis vector fields.
vectorstores.redis.schema.RedisField
Base class for Redis fields.
vectorstores.redis.schema.RedisModel
Schema for Redis index.
vectorstores.redis.schema.RedisVectorField
Schema for Redis index.
vectorstores.redis.schema.RedisVectorField
Base class for Redis vector fields.
vectorstores.redis.schema.TagFieldSchema
Schema for tag fields in Redis.
vectorstores.redis.schema.TextFieldSchema
Schema for text fields in Redis.
vectorstores.rocksetdb.Rockset(client, ...)
Rockset vector store.
vectorstores.scann.ScaNN(embedding, index, ...)
ScaNN vector store.
vectorstores.semadb.SemaDB(collection_name, ...)
SemaDB vector store.
vectorstores.singlestoredb.SingleStoreDB(...)
SingleStore DB vector store.
vectorstores.sklearn.BaseSerializer(persist_path)
Base class for serializing data.
vectorstores.sklearn.BsonSerializer(persist_path)
Serializes data in binary json using the bson python package.
vectorstores.sklearn.JsonSerializer(persist_path)
Serializes data in json using the json package from python standard library.
vectorstores.sklearn.ParquetSerializer(...)
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.sqlitevss.SQLiteVSS(table, ...)
Wrapper around SQLite with vss extension as a vector database.
vectorstores.starrocks.StarRocks(embedding)
StarRocks vector store.
vectorstores.starrocks.StarRocksSettings
StarRocks client configuration.
vectorstores.supabase.SupabaseVectorStore(...)
Supabase Postgres vector store.
vectorstores.surrealdb.SurrealDBStore(...)
SurrealDB as Vector Store.
vectorstores.tair.Tair(embedding_function, ...)
vectorstores.tair.Tair(embedding_function, ...)
Tair vector store.
vectorstores.tencentvectordb.ConnectionParams(...)
Tencent vector DB Connection params.
vectorstores.tencentvectordb.IndexParams(...)
Tencent vector DB Index params.
vectorstores.tencentvectordb.TencentVectorDB(...)
Initialize wrapper around the tencent vector database.
vectorstores.tigris.Tigris(client, ...)
Tigris vector store.
vectorstores.tiledb.TileDB(embedding, ...[, ...])
Wrapper around TileDB vector database.
vectorstores.timescalevector.TimescaleVector(...)
VectorStore implementation using the timescale vector client to store vectors in Postgres.
vectorstores.typesense.Typesense(...[, ...])
Typesense vector store.
vectorstores.usearch.USearch(embedding, ...)
USearch vector store.
vectorstores.utils.DistanceStrategy(value[, ...])
Enumerator of the Distance strategies for calculating distances between vectors.
vectorstores.vald.Vald(embedding[, host, ...])
Wrapper around Vald vector database.
vectorstores.vearch.Vearch(embedding_function)
Initialize vearch vector store flag 1 for cluster,0 for standalone
vectorstores.vectara.Vectara([...])
Vectara API vector store.
vectorstores.vectara.VectaraRetriever
Retriever class for Vectara.
vectorstores.vespa.VespaStore(app[, ...])
Vespa vector store.
vectorstores.weaviate.Weaviate(client, ...)
Weaviate vector store.
vectorstores.xata.XataVectorStore(api_key, ...)
Xata vector store.
vectorstores.yellowbrick.Yellowbrick(...)
Wrapper around Yellowbrick as a vector database.
vectorstores.zep.CollectionConfig(name, ...)
Configuration for a Zep Collection.
vectorstores.zep.CollectionConfig(name, ...)
Configuration for a Zep Collection.
vectorstores.zep.ZepVectorStore(...[, ...])
Zep vector store.
vectorstores.zilliz.Zilliz(embedding_function)
Zilliz vector store.
Functions¶
vectorstores.alibabacloud_opensearch.create_metadata(fields)
Create metadata from fields.
vectorstores.annoy.dependable_annoy_import()
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 contains multiple substrings.
vectorstores.neo4j_vector.check_if_not_null(...)
Check if the values are not None or empty string
vectorstores.neo4j_vector.remove_lucene_chars(text)
Remove Lucene special characters
vectorstores.neo4j_vector.sort_by_index_name(...)
Sort first element to match the index_name if exists
vectorstores.qdrant.sync_call_fallback(method)
Decorator to call the synchronous method of the class if the async method is not implemented.
vectorstores.redis.base.check_index_exists(...)
Check if Redis index exists.
vectorstores.redis.filters.check_operator_misuse(func)
Decorator to check for misuse of equality operators.
vectorstores.redis.schema.read_schema(...)
Reads in the index schema from a dict or yaml file.
vectorstores.scann.dependable_scann_import()
Import scann if available, otherwise raise error.
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(...)
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.
vectorstores.tiledb.dependable_tiledb_import()
Import tiledb-vector-search if available, otherwise raise error.
vectorstores.tiledb.get_documents_array_uri(uri)
vectorstores.tiledb.get_documents_array_uri_from_group(group)
vectorstores.tiledb.get_vector_index_uri(uri)
vectorstores.tiledb.get_vector_index_uri_from_group(group)
vectorstores.usearch.dependable_usearch_import()
Import usearch if available, otherwise raise error.
vectorstores.utils.filter_complex_metadata(...)
Filter out metadata types that are not supported for a vector store.
vectorstores.utils.maximal_marginal_relevance(...)
Calculate maximal marginal relevance.
langchain_core 0.1.1¶
langchain_core.agents¶
Classes¶
agents.AgentAction
A full description of an action for an ActionAgent to execute.
agents.AgentActionMessageLog
Override init to support instantiation by position for backward compat.
agents.AgentFinish
The final return value of an ActionAgent.
agents.AgentStep
The result of running an AgentAction.
Functions¶
langchain_core.beta¶
Classes¶
beta.runnables.context.Context()
beta.runnables.context.ContextGet
Create a new model by parsing and validating input data from keyword arguments.
beta.runnables.context.ContextSet
Create a new model by parsing and validating input data from keyword arguments.
beta.runnables.context.PrefixContext([prefix])
Functions¶
beta.runnables.context.aconfig_with_context(...)
beta.runnables.context.config_with_context(...)
langchain_core.caches¶
Classes¶
caches.BaseCache()
Base interface for cache.
langchain_core.callbacks¶
Classes¶
callbacks.base.AsyncCallbackHandler()
Async callback handler that handles callbacks from LangChain.
callbacks.base.BaseCallbackHandler()
Base callback handler that handles callbacks from LangChain.
callbacks.base.BaseCallbackManager(handlers)
Base callback manager that handles callbacks from LangChain.
callbacks.base.CallbackManagerMixin()
Mixin for callback manager.
callbacks.base.ChainManagerMixin()
Mixin for chain callbacks.
callbacks.base.LLMManagerMixin()
Mixin for LLM callbacks.
callbacks.base.RetrieverManagerMixin()
Mixin for Retriever callbacks.
callbacks.base.RunManagerMixin()
Mixin for run manager.
callbacks.base.ToolManagerMixin()
Mixin for tool callbacks.
callbacks.manager.AsyncCallbackManager(handlers)
Async callback manager that handles callbacks from LangChain.
callbacks.manager.AsyncCallbackManagerForChainGroup(...)
Async callback manager for the chain group.
callbacks.manager.AsyncCallbackManagerForChainGroup(...)
Async callback manager for the chain group.
callbacks.manager.AsyncCallbackManagerForChainRun(*, ...)
Async callback manager for chain run.
callbacks.manager.AsyncCallbackManagerForLLMRun(*, ...)
Async callback manager for LLM run.
callbacks.manager.AsyncCallbackManagerForRetrieverRun(*, ...)
Async callback manager for retriever run.
callbacks.manager.AsyncCallbackManagerForToolRun(*, ...)
Async callback manager for tool run.
callbacks.manager.AsyncParentRunManager(*, ...)
Async Parent Run Manager.
callbacks.manager.AsyncRunManager(*, run_id, ...)
Async Run Manager.
callbacks.manager.BaseRunManager(*, run_id, ...)
Base class for run manager (a bound callback manager).
callbacks.manager.CallbackManager(handlers)
Callback manager that handles callbacks from LangChain.
callbacks.manager.CallbackManagerForChainGroup(...)
Callback manager for the chain group.
callbacks.manager.CallbackManagerForChainRun(*, ...)
Callback manager for chain run.
callbacks.manager.CallbackManagerForLLMRun(*, ...)
Callback manager for LLM run.
callbacks.manager.CallbackManagerForRetrieverRun(*, ...)
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.stdout.StdOutCallbackHandler([color])
Callback Handler that prints to std out.
callbacks.streaming_stdout.StreamingStdOutCallbackHandler()
Callback handler for streaming.
Functions¶
callbacks.manager.ahandle_event(handlers, ...)
Generic event handler for AsyncCallbackManager.
callbacks.manager.atrace_as_chain_group(...)
Generic event handler for AsyncCallbackManager.
callbacks.manager.atrace_as_chain_group(...)
Get an async callback manager for a chain group in a context manager.
callbacks.manager.handle_event(handlers, ...)
Generic event handler for CallbackManager.
callbacks.manager.trace_as_chain_group(...)
Get a callback manager for a chain group in a context manager.
langchain_core.chat_history¶
Classes¶
chat_history.BaseChatMessageHistory()
Abstract base class for storing chat message history.
langchain_core.chat_sessions¶
Classes¶
chat_sessions.ChatSession
Chat Session represents a single conversation, channel, or other group of messages.
langchain_core.documents¶
Classes¶
documents.base.Document
Class for storing a piece of text and associated metadata.
documents.transformers.BaseDocumentTransformer()
Abstract base class for document transformation systems.
langchain_core.embeddings¶
Classes¶
embeddings.Embeddings()
Interface for embedding models.
langchain_core.example_selectors¶
Logic for selecting examples to include in prompts.
Classes¶
example_selectors.base.BaseExampleSelector()
Interface for selecting examples to include in prompts.
example_selectors.length_based.LengthBasedExampleSelector
Select examples based on length.
example_selectors.semantic_similarity.MaxMarginalRelevanceExampleSelector
ExampleSelector that selects examples based on Max Marginal Relevance.
example_selectors.semantic_similarity.SemanticSimilarityExampleSelector
Example selector that selects examples based on SemanticSimilarity.
Functions¶
example_selectors.semantic_similarity.sorted_values(values)
Return a list of values in dict sorted by key.
langchain_core.exceptions¶
Classes¶
exceptions.LangChainException
General LangChain exception.
exceptions.OutputParserException(error[, ...])
Exception that output parsers should raise to signify a parsing error.
exceptions.TracerException
Base class for exceptions in tracers module.
langchain_core.language_models¶
Classes¶
Base class for exceptions in tracers module.
langchain_core.language_models¶
Classes¶
language_models.base.BaseLanguageModel
Abstract base class for interfacing with language models.
language_models.chat_models.BaseChatModel
Base class for Chat models.
language_models.chat_models.SimpleChatModel
Simple Chat Model.
language_models.llms.BaseLLM
Base LLM abstract interface.
language_models.llms.LLM
Base LLM abstract class.
Functions¶
language_models.chat_models.agenerate_from_stream(stream)
language_models.chat_models.generate_from_stream(stream)
language_models.llms.create_base_retry_decorator(...)
Create a retry decorator for a given LLM and provided list of error types.
language_models.llms.get_prompts(params, prompts)
Get prompts that are already cached.
language_models.llms.update_cache(...)
Update the cache and get the LLM output.
langchain_core.load¶
Serialization and deserialization.
Classes¶
load.load.Reviver([secrets_map, ...])
Reviver for JSON objects.
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.
Functions¶
load.dump.default(obj)
Return a default value for a Serializable object or a SerializedNotImplemented object.
load.dump.dumpd(obj)
Return a json dict representation of an object.
load.dump.dumps(obj, *[, pretty])
Return a json string representation of an object.
load.load.load(obj, *[, secrets_map, ...])
Revive a LangChain class from a JSON object.
load.load.loads(text, *[, secrets_map, ...])
load.load.loads(text, *[, secrets_map, ...])
Revive a LangChain class from a JSON string.
load.serializable.to_json_not_implemented(obj)
Serialize a "not implemented" object.
load.serializable.try_neq_default(value, ...)
langchain_core.memory¶
Classes¶
memory.BaseMemory
Abstract base class for memory in Chains.
langchain_core.messages¶
Classes¶
messages.ai.AIMessage
A Message from an AI.
messages.ai.AIMessageChunk
A Message chunk from an AI.
messages.base.BaseMessage
The base abstract Message class.
messages.base.BaseMessageChunk
A Message chunk, which can be concatenated with other Message chunks.
messages.chat.ChatMessage
A Message that can be assigned an arbitrary speaker (i.e.
messages.chat.ChatMessageChunk
A Chat Message chunk.
messages.function.FunctionMessage
A Message for passing the result of executing a function back to a model.
messages.function.FunctionMessageChunk
A Function Message chunk.
messages.human.HumanMessage
A Message from a human.
messages.human.HumanMessageChunk
A Human Message chunk.
messages.system.SystemMessage
A Message for priming AI behavior, usually passed in as the first of a sequence of input messages.
messages.system.SystemMessageChunk
A System Message chunk.
messages.tool.ToolMessage
A Message for passing the result of executing a tool back to a model.
messages.tool.ToolMessageChunk
A Tool Message chunk.
Functions¶
messages.base.merge_content(first_content, ...)
messages.base.message_to_dict(message)
messages.base.messages_to_dict(messages)
Convert a sequence of Messages to a list of dictionaries.
langchain_core.output_parsers¶
Classes¶
output_parsers.base.BaseGenerationOutputParser
Base class to parse the output of an LLM call.
Base class to parse the output of an LLM call.
output_parsers.base.BaseLLMOutputParser()
Abstract base class for parsing the outputs of a model.
output_parsers.base.BaseOutputParser
Base class to parse the output of an LLM call.
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.MarkdownListOutputParser
Parse a markdown list.
output_parsers.list.NumberedListOutputParser
Parse a numbered list.
output_parsers.string.StrOutputParser
OutputParser that parses LLMResult into the top likely string.
output_parsers.transform.BaseCumulativeTransformOutputParser
Base class for an output parser that can handle streaming input.
output_parsers.transform.BaseTransformOutputParser
Base class for an output parser that can handle streaming input.
langchain_core.outputs¶
Classes¶
outputs.chat_generation.ChatGeneration
A single chat generation output.
outputs.chat_generation.ChatGenerationChunk
A ChatGeneration chunk, which can be concatenated with other
outputs.chat_result.ChatResult
Class that contains all results for a single chat model call.
outputs.generation.Generation
A single text generation output.
outputs.generation.GenerationChunk
A Generation chunk, which can be concatenated with other Generation chunks.
outputs.llm_result.LLMResult
Class that contains all results for a batched LLM call.
outputs.run_info.RunInfo
Class that contains metadata for a single execution of a Chain or model.
langchain_core.prompt_values¶
Classes¶
prompt_values.ChatPromptValue
Chat prompt value.
prompt_values.ChatPromptValueConcrete
Chat prompt value which explicitly lists out the message types it accepts.
prompt_values.PromptValue
Base abstract class for inputs to any language model.
prompt_values.PromptValue
Base abstract class for inputs to any language model.
prompt_values.StringPromptValue
String prompt value.
langchain_core.prompts¶
Prompt is the input to the model.
Prompt is often constructed
from multiple components. Prompt classes and functions make constructing
and working with prompts easy.
Class hierarchy:
BasePromptTemplate --> PipelinePromptTemplate
                       StringPromptTemplate --> PromptTemplate
                                                FewShotPromptTemplate
                                                FewShotPromptWithTemplates
                       BaseChatPromptTemplate --> AutoGPTPrompt
                                                  ChatPromptTemplate --> AgentScratchPadChatPromptTemplate
BaseMessagePromptTemplate --> MessagesPlaceholder
                              BaseStringMessagePromptTemplate --> ChatMessagePromptTemplate
                                                                  HumanMessagePromptTemplate
                                                                  AIMessagePromptTemplate
                                                                  SystemMessagePromptTemplate
Classes¶
prompts.base.BasePromptTemplate
Base class for all prompt templates, returning a prompt.
prompts.chat.AIMessagePromptTemplate
AI message prompt template.
prompts.chat.BaseChatPromptTemplate
Base class for chat prompt templates.
prompts.chat.BaseMessagePromptTemplate
Base class for message prompt templates.
prompts.chat.BaseStringMessagePromptTemplate
Base class for message prompt templates that use a string prompt template.
prompts.chat.ChatMessagePromptTemplate
Chat message prompt template.
prompts.chat.ChatPromptTemplate
A prompt template for chat models.
prompts.chat.HumanMessagePromptTemplate
Human message prompt template.
prompts.chat.MessagesPlaceholder
Prompt template that assumes variable is already list of messages.
prompts.chat.SystemMessagePromptTemplate
System message prompt template.
prompts.few_shot.FewShotChatMessagePromptTemplate
Chat prompt template that supports few-shot examples.
prompts.few_shot.FewShotPromptTemplate
Prompt template that contains few shot examples.
prompts.few_shot_with_templates.FewShotPromptWithTemplates
Prompt template that contains few shot examples.
Prompt template that contains few shot examples.
prompts.pipeline.PipelinePromptTemplate
A prompt template for composing multiple prompt templates together.
prompts.prompt.PromptTemplate
A prompt template for a language model.
prompts.string.StringPromptTemplate
String prompt that exposes the format method, returning a prompt.
Functions¶
prompts.base.format_document(doc, prompt)
Format a document into a string based on a prompt template.
prompts.loading.load_prompt(path)
Unified method for loading a prompt from LangChainHub or local fs.
prompts.loading.load_prompt_from_config(config)
Load prompt from Config Dict.
prompts.string.check_valid_template(...)
Check that template string is valid.
prompts.string.get_template_variables(...)
Get the variables from the template.
prompts.string.jinja2_formatter(template, ...)
Format a template using jinja2.
prompts.string.validate_jinja2(template, ...)
Validate that the input variables are valid for the template.
langchain_core.retrievers¶
Classes¶
retrievers.BaseRetriever
Abstract base class for a Document retrieval system.
langchain_core.runnables¶
LangChain Runnable and the LangChain Expression Language (LCEL).
The LangChain Expression Language (LCEL) offers a declarative method to build
production-grade programs that harness the power of LLMs.
Programs created using LCEL and LangChain Runnables inherently support
synchronous, asynchronous, batch, and streaming operations.
Support for async allows servers hosting LCEL based programs to scale better
for higher concurrent loads.
Streaming of intermediate outputs as they’re being generated allows for
creating more responsive UX.
This module contains schema and implementation of LangChain Runnables primitives.
Classes¶
runnables.base.Runnable()
A unit of work that can be invoked, batched, streamed, transformed and composed.
A unit of work that can be invoked, batched, streamed, transformed and composed.
runnables.base.RunnableBinding
Wrap a runnable with additional functionality.
runnables.base.RunnableBindingBase
A runnable that delegates calls to another runnable with a set of kwargs.
runnables.base.RunnableEach
A runnable that delegates calls to another runnable with each element of the input sequence.
runnables.base.RunnableEachBase
A runnable that delegates calls to another runnable with each element of the input sequence.
runnables.base.RunnableGenerator(transform)
A runnable that runs a generator function.
runnables.base.RunnableLambda(func[, afunc])
RunnableLambda converts a python callable into a Runnable.
runnables.base.RunnableMap
alias of RunnableParallel
runnables.base.RunnableParallel
A runnable that runs a mapping of runnables in parallel, and returns a mapping of their outputs.
runnables.base.RunnableSequence
A sequence of runnables, where the output of each is the input of the next.
runnables.base.RunnableSerializable
A Runnable that can be serialized to JSON.
runnables.branch.RunnableBranch
A Runnable that selects which branch to run based on a condition.
runnables.config.EmptyDict
Empty dict type.
runnables.config.RunnableConfig
Configuration for a Runnable.
runnables.configurable.DynamicRunnable
A Serializable Runnable that can be dynamically configured.
runnables.configurable.RunnableConfigurableAlternatives
A Runnable that can be dynamically configured.
runnables.configurable.RunnableConfigurableFields
A Runnable that can be dynamically configured.
runnables.configurable.StrEnum(value[, ...])
A string enum.
runnables.fallbacks.RunnableWithFallbacks
A Runnable that can fallback to other Runnables if it fails.