id stringlengths 14 15 | text stringlengths 13 2.7k | source stringlengths 60 181 |
|---|---|---|
82a11935e65b-57 | Tool for querying a SQL database.
tools.stackexchange.tool.StackExchangeTool
Tool that uses StackExchange
tools.steam.tool.SteamWebAPIQueryRun
Tool that searches the Steam Web API.
tools.steamship_image_generation.tool.ModelName(value)
Supported Image Models for generation.
tools.steamship_image_generation.tool.Steamsh... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-58 | tools.amadeus.utils.authenticate()
Authenticate using the Amadeus API
tools.azure_cognitive_services.utils.detect_file_src_type(...)
Detect if the file is local or remote.
tools.azure_cognitive_services.utils.download_audio_from_url(...)
Download audio from url to local.
tools.bearly.tool.file_to_base64(path)
Convert a... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-59 | Import InstalledAppFlow class.
tools.interaction.tool.StdInInquireTool(...)
Tool for asking the user for input.
tools.office365.utils.authenticate()
Authenticate using the Microsoft Grah API
tools.office365.utils.clean_body(body)
Clean body of a message or event.
tools.playwright.base.lazy_import_playwright_browsers()
... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-60 | utilities.arcee.ArceeDocumentSource
Source of an Arcee document.
utilities.arcee.ArceeRoute(value[, names, ...])
Routes available for the Arcee API as enumerator.
utilities.arcee.ArceeWrapper(arcee_api_key, ...)
Wrapper for Arcee API.
utilities.arcee.DALMFilter
Filters available for a DALM retrieval and generation.
uti... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-61 | Wrapper for DuckDuckGo Search API.
utilities.github.GitHubAPIWrapper
Wrapper for GitHub API.
utilities.gitlab.GitLabAPIWrapper
Wrapper for GitLab API.
utilities.golden_query.GoldenQueryAPIWrapper
Wrapper for Golden.
utilities.google_finance.GoogleFinanceAPIWrapper
Wrapper for SerpApi's Google Finance API You can create... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-62 | utilities.max_compute.MaxComputeAPIWrapper(client)
Interface for querying Alibaba Cloud MaxCompute tables.
utilities.merriam_webster.MerriamWebsterAPIWrapper
Wrapper for Merriam-Webster.
utilities.metaphor_search.MetaphorSearchAPIWrapper
Wrapper for Metaphor Search API.
utilities.nasa.NasaAPIWrapper
Create a new model ... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-63 | utilities.serpapi.HiddenPrints()
Context manager to hide prints.
utilities.serpapi.SerpAPIWrapper
Wrapper around SerpAPI.
utilities.spark_sql.SparkSQL([...])
SparkSQL is a utility class for interacting with Spark SQL.
utilities.sql_database.SQLDatabase(engine[, ...])
SQLAlchemy wrapper around a database.
utilities.stac... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-64 | Fetch the team id.
utilities.clickup.load_query(query[, ...])
Attempts to parse a JSON string and return the parsed object.
utilities.clickup.parse_dict_through_component(...)
Parse a dictionary by creating a component and then turning it back into a dictionary.
utilities.opaqueprompts.desanitize(...)
Restore the origi... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-65 | 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.openai.is_openai_v1()
utils.openai_functions.convert_pydantic_to_openai_function(...)
Converts a Pydantic model to a function d... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-66 | vectorstores.atlas.AtlasDB(name[, ...])
Atlas vector store.
vectorstores.awadb.AwaDB([table_name, ...])
AwaDB vector store.
vectorstores.azure_cosmos_db.AzureCosmosDBVectorSearch(...)
Azure Cosmos DB for MongoDB vCore vector store.
vectorstores.azure_cosmos_db.CosmosDBSimilarityType(value)
Cosmos DB Similarity Type as ... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-67 | vectorstores.docarray.hnsw.DocArrayHnswSearch(...)
HnswLib storage using DocArray package.
vectorstores.docarray.in_memory.DocArrayInMemorySearch(...)
In-memory DocArray storage for exact search.
vectorstores.elastic_vector_search.ElasticKnnSearch(...)
[Deprecated] [DEPRECATED] Elasticsearch with k-nearest neighbor se... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-68 | Marqo vector store.
vectorstores.matching_engine.MatchingEngine(...)
Google Vertex AI Vector Search (previously Matching Engine) vector store.
vectorstores.meilisearch.Meilisearch(embedding)
Meilisearch vector store.
vectorstores.milvus.Milvus(embedding_function)
Milvus vector store.
vectorstores.momento_vector_index.M... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-69 | 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 ve... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-70 | 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.
vec... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-71 | 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... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-72 | 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.
vectorst... | https://api.python.langchain.com/en/latest/community_api_reference.html |
82a11935e65b-73 | 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... | https://api.python.langchain.com/en/latest/community_api_reference.html |
4b6f64b5e782-0 | 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 r... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-1 | 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.AsyncCallback... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-2 | 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 f... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-3 | 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.
lang... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-4 | 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.
langcha... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-5 | 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 com... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-6 | 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 eas... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-7 | 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... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-8 | 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 delegate... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-9 | A Runnable that can fallback to other Runnables if it fails.
runnables.history.RunnableWithMessageHistory
A runnable that manages chat message history for another runnable.
runnables.passthrough.RunnableAssign
A runnable that assigns key-value pairs to Dict[str, Any] inputs.
runnables.passthrough.RunnablePassthrough
A ... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-10 | runnables.config.acall_func_with_variable_args(...)
Call function that may optionally accept a run_manager and/or config.
runnables.config.call_func_with_variable_args(...)
Call function that may optionally accept a run_manager and/or config.
runnables.config.ensure_config([config])
Ensure that a config is a dict with ... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-11 | runnables.utils.gather_with_concurrency(n, ...)
Gather coroutines with a limit on the number of concurrent coroutines.
runnables.utils.get_function_first_arg_dict_keys(func)
Get the keys of the first argument of a function if it is a dict.
runnables.utils.get_lambda_source(func)
Get the source code of a lambda function... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-12 | tracers.langchain_v1.LangChainTracerV1(**kwargs)
An implementation of the SharedTracer that POSTS to the langchain endpoint.
tracers.log_stream.LogEntry
A single entry in the run log.
tracers.log_stream.LogStreamCallbackHandler(*)
A tracer that streams run logs to a stream.
tracers.log_stream.RunLog(*ops, state)
A run ... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-13 | Collect all run traces in context.
tracers.context.register_configure_hook(...)
tracers.context.tracing_enabled([session_name])
Get the Deprecated LangChainTracer in a context manager.
tracers.context.tracing_v2_enabled([...])
Instruct LangChain to log all runs in context to LangSmith.
tracers.evaluation.wait_for_all_e... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-14 | Pure-Python implementation of anext() for testing purposes.
utils.aiter.tee_peer(iterator, buffer, ...)
An individual iterator of a tee()
utils.env.env_var_is_set(env_var)
Check if an environment variable is set.
utils.env.get_from_dict_or_env(data, key, ...)
Get a value from a dictionary or an environment variable.
ut... | https://api.python.langchain.com/en/latest/core_api_reference.html |
4b6f64b5e782-15 | Stringify a dictionary.
utils.strings.stringify_value(val)
Stringify a value.
utils.utils.build_extra_kwargs(extra_kwargs, ...)
Build extra kwargs from values and extra_kwargs.
utils.utils.check_package_version(package[, ...])
Check the version of a package.
utils.utils.convert_to_secret_str(value)
Convert a string to ... | https://api.python.langchain.com/en/latest/core_api_reference.html |
d6cf2eb57d0e-0 | langchain_nvidia_ai_endpoints 0.0.1¶
langchain_nvidia_ai_endpoints.chat_models¶
Chat Model Components Derived from ChatModel/NVIDIA
Classes¶
chat_models.ChatNVIDIA
NVIDIA chat model.
Functions¶
langchain_nvidia_ai_endpoints.embeddings¶
Embeddings Components Derived from NVEModel/Embeddings
Classes¶
embeddings.NVIDIAEmb... | https://api.python.langchain.com/en/latest/nvidia_ai_endpoints_api_reference.html |
b986358aa78f-0 | langchain_experimental.llm_bash.prompt.BashOutputParser¶
class langchain_experimental.llm_bash.prompt.BashOutputParser[source]¶
Bases: BaseOutputParser
Parser for bash output.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kw... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-1 | to be different candidate outputs for a single model input.
Returns
Structured output.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support str... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-2 | exclude_names – Exclude logs with these names.
exclude_types – Exclude logs with these types.
exclude_tags – Exclude logs with these tags.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of atransform, which ... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-3 | configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-4 | Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic input schema that depends on which
configuration the runnable is invoked with.
This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-5 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-6 | parse_result(result: List[Generation], *, partial: bool = False) → T¶
Parse a list of candidate model Generations into a specific format.
The return value is parsed from only the first Generation in the result, whichis assumed to be the highest-likelihood Generation.
Parameters
result – A list of Generations to be pars... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-7 | input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-8 | added to the run.
with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶
Create a new Runnable that retries the original runnable on exceptions.
Parameters
retry_if_exc... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
b986358aa78f-9 | property output_schema: Type[pydantic.main.BaseModel]¶
The type of output this runnable produces specified as a pydantic model.
Examples using BashOutputParser¶
Bash chain | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.prompt.BashOutputParser.html |
82a9daa506e2-0 | langchain_experimental.llm_bash.base.LLMBashChain¶
class langchain_experimental.llm_bash.base.LLMBashChain[source]¶
Bases: Chain
Chain that interprets a prompt and executes bash operations.
Example
from langchain.chains import LLMBashChain
from langchain.llms import OpenAI
llm_bash = LLMBashChain.from_llm(OpenAI())
Cre... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-1 | and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a chain with its use case.
param prompt: BasePromptTemplate = PromptTemplate(input_variables=['question'], output_parser=BashOutputParser(), template='If someone asks you to perform a task, your job is ... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-2 | accessible via langchain.globals.get_verbose().
__call__(inputs: Union[Dict[str, Any], Any], return_only_outputs: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = Non... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-3 | Default implementation runs ainvoke in parallel using asyncio.gather.
The default implementation of batch works well for IO bound runnables.
Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.
async acall(inputs: Union[Dict... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-4 | Returns
A dict of named outputs. Should contain all outputs specified inChain.output_keys.
async ainvoke(input: Dict[str, Any], config: Optional[RunnableConfig] = None, **kwargs: Any) → Dict[str, Any]¶
Default implementation of ainvoke, calls invoke from a thread.
The default implementation allows usage of async code e... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-5 | directly as keyword arguments.
Returns
The chain output.
Example
# Suppose we have a single-input chain that takes a 'question' string:
await chain.arun("What's the temperature in Boise, Idaho?")
# -> "The temperature in Boise is..."
# Suppose we have a multi-input chain that takes a 'question' string
# and 'context' s... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-6 | step, and the final state of the run.
The jsonpatch ops can be applied in order to construct state.
Parameters
input – The input to the runnable.
config – The config to use for the runnable.
diff – Whether to yield diffs between each step, or the current state.
with_streamed_output_list – Whether to yield the streamed_... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-7 | To mark a field as configurable, see the configurable_fields
and configurable_alternatives methods.
Parameters
include – A list of fields to include in the config schema.
Returns
A pydantic model that can be used to validate config.
configurable_alternatives(which: ConfigurableField, *, default_key: str = 'default', pr... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-8 | new model instance
dict(**kwargs: Any) → Dict¶
Dictionary representation of chain.
Expects Chain._chain_type property to be implemented and for memory to benull.
Parameters
**kwargs – Keyword arguments passed to default pydantic.BaseModel.dict
method.
Returns
A dictionary representation of the chain.
Example
chain.dict... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-9 | methods will have a dynamic input schema that depends on which
configuration the runnable is invoked with.
This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate input.
classmethod get_... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-10 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-11 | Parameters
inputs – Dictionary of raw inputs, or single input if chain expects
only one param. Should contain all inputs specified in
Chain.input_keys except for inputs that will be set by the chain’s
memory.
Returns
A dictionary of all inputs, including those added by the chain’s memory.
prep_outputs(inputs: Dict[str,... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-12 | these runtime tags will propagate to calls to other objects.
**kwargs – If the chain expects multiple inputs, they can be passed in
directly as keyword arguments.
Returns
The chain output.
Example
# Suppose we have a single-input chain that takes a 'question' string:
chain.run("What's the temperature in Boise, Idaho?")... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-13 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and lo... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-14 | added to the run.
with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶
Create a new Runnable that retries the original runnable on exceptions.
Parameters
retry_if_exc... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
82a9daa506e2-15 | property output_schema: Type[pydantic.main.BaseModel]¶
The type of output this runnable produces specified as a pydantic model.
Examples using LLMBashChain¶
Bash chain | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.base.LLMBashChain.html |
c541e78aefdf-0 | langchain_experimental.llm_bash.bash.BashProcess¶
class langchain_experimental.llm_bash.bash.BashProcess(strip_newlines: bool = False, return_err_output: bool = False, persistent: bool = False)[source]¶
Wrapper class for starting subprocesses.
Uses the python built-in subprocesses.run()
Persistent processes are not ava... | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.bash.BashProcess.html |
c541e78aefdf-1 | subprocess or on in a new subprocess environment.
Parameters
commands (List[str]) – a list of commands to
execute in the session
Examples using BashProcess¶
Bash chain | https://api.python.langchain.com/en/latest/llm_bash/langchain_experimental.llm_bash.bash.BashProcess.html |
97932f618640-0 | langchain_community.retrievers.kendra.AdditionalResultAttribute¶
class langchain_community.retrievers.kendra.AdditionalResultAttribute[source]¶
Bases: BaseModel
Additional result attribute.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.kendra.AdditionalResultAttribute.html |
97932f618640-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.kendra.AdditionalResultAttribute.html |
97932f618640-2 | classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.kendra.AdditionalResultAttribute.html |
e8a5c6871402-0 | langchain.retrievers.self_query.pinecone.PineconeTranslator¶
class langchain.retrievers.self_query.pinecone.PineconeTranslator[source]¶
Translate Pinecone internal query language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Subset of allowed logical ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.pinecone.PineconeTranslator.html |
302eaa3e7b54-0 | langchain_community.retrievers.knn.KNNRetriever¶
class langchain_community.retrievers.knn.KNNRetriever[source]¶
Bases: BaseRetriever
KNN retriever.
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 embed... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-1 | Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[s... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, diff: bool = True, with_streamed_output_list: bool = True, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Option... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-3 | Default implementation of atransform, which buffers input and calls astream.
Subclasses should override this method if they can start producing output while
input is still being generated.
batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-4 | 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, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-5 | methods will have a dynamic input schema that depends on which
configuration the runnable is invoked with.
This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate input.
classmethod get_... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-6 | This metadata will be associated with each call to this retriever,
and passed as arguments to the handlers defined in callbacks.
Returns
List of relevant documents
invoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶
Transform a single input into an output. Override to implement.
Parameters
inp... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-7 | by calling invoke() with each input.
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = No... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-8 | Bind config to a Runnable, returning a new Runnable.
with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶
Add fallbacks to a runnable, returning a new Runnable.
Parameters
fallbacks – A se... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
302eaa3e7b54-9 | between retries
stop_after_attempt – The maximum number of attempts to make before giving up
Returns
A new Runnable that retries the original runnable on exceptions.
with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶
Bind input and output types... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.knn.KNNRetriever.html |
06e9932ce9a1-0 | langchain_community.retrievers.zilliz.ZillizRetreiver¶
langchain_community.retrievers.zilliz.ZillizRetreiver(*args: Any, **kwargs: Any) → ZillizRetriever[source]¶
Deprecated ZillizRetreiver.
Please use ZillizRetriever (‘i’ before ‘e’) instead.
Parameters
*args –
**kwargs –
Returns
ZillizRetriever | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zilliz.ZillizRetreiver.html |
134640dc5b3e-0 | langchain.retrievers.multi_query.LineListOutputParser¶
class langchain.retrievers.multi_query.LineListOutputParser[source]¶
Bases: PydanticOutputParser
Output parser for a list of lines.
param pydantic_object: Type[T] [Required]¶
The pydantic model to parse.
async abatch(inputs: List[Input], config: Optional[Union[Runn... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-1 | to be different candidate outputs for a single model input.
Returns
Structured output.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support str... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-2 | exclude_names – Exclude logs with these names.
exclude_types – Exclude logs with these types.
exclude_tags – Exclude logs with these tags.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of atransform, which ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-3 | configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-4 | methods will have a dynamic input schema that depends on which
configuration the runnable is invoked with.
This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate input.
classmethod get_... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-5 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-6 | parse_result(result: List[Generation], *, partial: bool = False) → T¶
Parse a list of candidate model Generations into a specific format.
The return value is parsed from only the first Generation in the result, whichis assumed to be the highest-likelihood Generation.
Parameters
result – A list of Generations to be pars... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-7 | input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-8 | added to the run.
with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶
Create a new Runnable that retries the original runnable on exceptions.
Parameters
retry_if_exc... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
134640dc5b3e-9 | property output_schema: Type[pydantic.main.BaseModel]¶
The type of output this runnable produces specified as a pydantic model. | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
1a6825d6c3b7-0 | langchain_core.retrievers.BaseRetriever¶
class langchain_core.retrievers.BaseRetriever[source]¶
Bases: RunnableSerializable[str, List[Document]], ABC
Abstract base class for a Document retrieval system.
A retrieval system is defined as something that can take string queries and returnthe most ‘relevant’ Documents from ... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-1 | These tags will be associated with each call to this retriever,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a retriever with its
use case.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, ... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-2 | The default implementation allows usage of async code even if
the runnable did not implement a native async version of invoke.
Subclasses should override this method if they can run asynchronously.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Def... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-3 | include_tags – Only include logs with these tags.
exclude_names – Exclude logs with these names.
exclude_types – Exclude logs with these types.
exclude_tags – Exclude logs with these tags.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Out... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-4 | configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-5 | classmethod from_orm(obj: Any) → Model¶
get_input_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶
Get a pydantic model that can be used to validate input to the runnable.
Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic input schema that depend... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-6 | :param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
:param tags: Optional list of tags associated with the retriever. Defaults to None
These tags will be associated with each call to this retriever,
and passed as arguments to the handlers defined in callbacks.
Par... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-7 | classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a list of strings that describes the path
to the object.
map() → Runnable[List[Input], List[Output]]¶
Return a new Runnable that maps a list of inputs to a list of outputs,
by calling invoke() with e... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-8 | classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runna... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-9 | added to the run.
with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶
Create a new Runnable that retries the original runnable on exceptions.
Parameters
retry_if_exc... | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
1a6825d6c3b7-10 | property output_schema: Type[pydantic.main.BaseModel]¶
The type of output this runnable produces specified as a pydantic model.
Examples using BaseRetriever¶
Retrieve as you generate with FLARE | https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html |
f22a0a10b7bb-0 | langchain_community.retrievers.kendra.RetrieveResultItem¶
class langchain_community.retrievers.kendra.RetrieveResultItem[source]¶
Bases: ResultItem
Retrieve API result item.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form ... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.kendra.RetrieveResultItem.html |
f22a0a10b7bb-1 | the new model: you should trust this data
deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[boo... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.kendra.RetrieveResultItem.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.