id stringlengths 14 16 | text stringlengths 13 2.7k | source stringlengths 57 178 |
|---|---|---|
6331aa868e0e-3 | returned. If False, both input keys and new keys generated by this
chain will be returned. Defaults to False.
callbacks – Callbacks to use for this chain run. These will be called in
addition to callbacks passed to the chain during construction, but only
these runtime callbacks will propagate to calls to other objects.... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-4 | method expects inputs to be passed directly in as positional arguments or
keyword arguments, whereas Chain.__call__ expects a single input dictionary
with all the inputs
Parameters
*args – If the chain expects a single input, it can be passed in as the
sole positional argument.
callbacks – Callbacks to use for this cha... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-5 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, diff: bool = True, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names:... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-6 | e.g., if the underlying runnable uses an API which supports a batch mode.
bind(**kwargs: Any) → Runnable[Input, Output]¶
Bind arguments to a Runnable, returning a new Runnable.
config_schema(*, include: Optional[Sequence[str]] = None) → Type[BaseModel]¶
The type of config this runnable accepts specified as a pydantic m... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-7 | exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating
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(**kw... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-8 | Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic output schema that depends on which
configuration the runnable is invoked with.
This method allows to get an output schema for a specific configuration.
Parameters
config – A config to use when generating the schem... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-9 | 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 each input.
classmethod parse_file... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-10 | Returns
A dict of the final chain outputs.
run(*args: Any, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶
Convenience method for executing chain.
The main difference between this method... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-11 | save(file_path: Union[Path, str]) → None¶
Save the chain.
Expects Chain._chain_type property to be implemented and for memory to benull.
Parameters
file_path – Path to file to save the chain to.
Example
chain.save(file_path="path/chain.yaml")
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definiti... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-12 | Add fallbacks to a runnable, returning a new Runnable.
Parameters
fallbacks – A sequence of runnables to try if the original runnable fails.
exceptions_to_handle – A tuple of exception types to handle.
Returns
A new Runnable that will try the original runnable, and then each
fallback in order, upon failures.
with_liste... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
6331aa868e0e-13 | Bind input and output types to a Runnable, returning a new Runnable.
property InputType: Type[langchain.schema.runnable.utils.Input]¶
The type of input this runnable accepts specified as a type annotation.
property OutputType: Type[langchain.schema.runnable.utils.Output]¶
The type of output this runnable produces speci... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.agent_executor.PlanAndExecute.html |
e9ca751584e9-0 | langchain_experimental.plan_and_execute.schema.Plan¶
class langchain_experimental.plan_and_execute.schema.Plan[source]¶
Bases: BaseModel
Plan.
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 steps: Lis... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.Plan.html |
e9ca751584e9-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... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.Plan.html |
e9ca751584e9-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... | lang/api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.Plan.html |
d3f406677a0b-0 | langchain.agents.agent.MultiActionAgentOutputParser¶
class langchain.agents.agent.MultiActionAgentOutputParser[source]¶
Bases: BaseOutputParser[Union[List[AgentAction], AgentFinish]]
Base class for parsing agent output into agent actions/finish.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, L... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-2 | Default implementation runs invoke in parallel using a thread pool executor.
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.
bind(**kwargs: Any) → R... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-3 | Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creat... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-4 | methods will have a dynamic output schema that depends on which
configuration the runnable is invoked with.
This method allows to get an output 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 output.
invoke(input:... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-5 | 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 each input.
abstract parse(text: str) → Union[List[AgentAction], AgentFinish][source]¶
Parse text... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-6 | classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
stream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶
Default implementation of stream, which calls invoke.
Subclasses should override t... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-7 | fallback in order, upon failures.
with_listeners(*, on_start: Optional[Listener] = None, on_end: Optional[Listener] = None, on_error: Optional[Listener] = None) → Runnable[Input, Output]¶
Bind lifecycle listeners to a Runnable, returning a new Runnable.
on_start: Called before the runnable starts running, with the Run ... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
d3f406677a0b-8 | The type of output this runnable produces specified as a type annotation.
property config_specs: List[langchain.schema.runnable.utils.ConfigurableFieldSpec]¶
List configurable fields for this runnable.
property input_schema: Type[pydantic.main.BaseModel]¶
The type of input this runnable accepts specified as a pydantic ... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.MultiActionAgentOutputParser.html |
f5848a1a1b7e-0 | langchain.agents.agent.BaseSingleActionAgent¶
class langchain.agents.agent.BaseSingleActionAgent[source]¶
Bases: BaseModel
Base Single Action Agent class.
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.
abst... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.BaseSingleActionAgent.html |
f5848a1a1b7e-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(**kwargs: Any) → Dict[source]¶
Return dictionary representation of agent.
classmethod from_llm_and_tools(llm: BaseLanguageModel, tools: Sequence[BaseTool], callback_manager: Optional[BaseCallbac... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.BaseSingleActionAgent.html |
f5848a1a1b7e-2 | abstract plan(intermediate_steps: List[Tuple[AgentAction, str]], callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Union[AgentAction, AgentFinish][source]¶
Given input, decided what to do.
Parameters
intermediate_steps – Steps the LLM has taken to date,
along with obser... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.BaseSingleActionAgent.html |
cd477e6e2a5b-0 | langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit¶
class langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit[source]¶
Bases: BaseToolkit
Toolkit for interacting with a Vector Store.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationE... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit.html |
cd477e6e2a5b-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit.html |
cd477e6e2a5b-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit.html |
1d03260bc410-0 | langchain.agents.loading.load_agent¶
langchain.agents.loading.load_agent(path: Union[str, Path], **kwargs: Any) → Union[BaseSingleActionAgent, BaseMultiActionAgent][source]¶
Unified method for loading an agent from LangChainHub or local fs.
Parameters
path – Path to the agent file.
**kwargs – Additional keyword argumen... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.loading.load_agent.html |
a3f217021cb0-0 | langchain.agents.agent_toolkits.spark_sql.toolkit.SparkSQLToolkit¶
class langchain.agents.agent_toolkits.spark_sql.toolkit.SparkSQLToolkit[source]¶
Bases: BaseToolkit
Toolkit for interacting with Spark SQL.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the inp... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.spark_sql.toolkit.SparkSQLToolkit.html |
a3f217021cb0-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.spark_sql.toolkit.SparkSQLToolkit.html |
a3f217021cb0-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.spark_sql.toolkit.SparkSQLToolkit.html |
11401a981072-0 | langchain.agents.agent_toolkits.json.toolkit.JsonToolkit¶
class langchain.agents.agent_toolkits.json.toolkit.JsonToolkit[source]¶
Bases: BaseToolkit
Toolkit for interacting with a JSON spec.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot b... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.json.toolkit.JsonToolkit.html |
11401a981072-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.json.toolkit.JsonToolkit.html |
11401a981072-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.json.toolkit.JsonToolkit.html |
1120b911b253-0 | langchain.agents.agent_toolkits.multion.toolkit.MultionToolkit¶
class langchain.agents.agent_toolkits.multion.toolkit.MultionToolkit[source]¶
Bases: BaseToolkit
Toolkit for interacting with the Browser Agent.
Security Note: This toolkit contains tools that interact with theuser’s browser via the multion API which grant... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.multion.toolkit.MultionToolkit.html |
1120b911b253-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.multion.toolkit.MultionToolkit.html |
1120b911b253-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.multion.toolkit.MultionToolkit.html |
e9fc817b8eec-0 | langchain.agents.agent_toolkits.openapi.toolkit.OpenAPIToolkit¶
class langchain.agents.agent_toolkits.openapi.toolkit.OpenAPIToolkit[source]¶
Bases: BaseToolkit
Toolkit for interacting with an OpenAPI API.
Security Note: This toolkit contains tools that can read and modifythe state of a service; e.g., by creating, dele... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.openapi.toolkit.OpenAPIToolkit.html |
e9fc817b8eec-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.openapi.toolkit.OpenAPIToolkit.html |
e9fc817b8eec-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.openapi.toolkit.OpenAPIToolkit.html |
e5ad1489906a-0 | langchain.agents.openai_assistant.base.OpenAIAssistantAction¶
class langchain.agents.openai_assistant.base.OpenAIAssistantAction[source]¶
Bases: AgentAction
AgentAction with info needed to submit custom tool output to existing run.
Override init to support instantiation by position for backward compat.
param log: str [... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.openai_assistant.base.OpenAIAssistantAction.html |
e5ad1489906a-1 | 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] = None, deep: bool = False) → Model¶
Duplicate a model, optionally... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.openai_assistant.base.OpenAIAssistantAction.html |
e5ad1489906a-2 | Return whether or not the class is 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_defaults: bool = False, ... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.openai_assistant.base.OpenAIAssistantAction.html |
e5ad1489906a-3 | 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¶
property lc_attributes: Dict¶
List of attribute names that should be included in the serialized kwargs.
These attributes must be accepted by th... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.openai_assistant.base.OpenAIAssistantAction.html |
0d865746740e-0 | langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit¶
class langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit[source]¶
Bases: BaseToolkit
Toolkit for routing between Vector Stores.
Create a new model by parsing and validating input data from keyword arguments.
Raises V... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit.html |
0d865746740e-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit.html |
0d865746740e-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit.html |
09e51f484c2d-0 | langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit¶
class langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit[source]¶
Bases: BaseToolkit
Toolkit for interacting with Power BI dataset.
Security Note: This toolkit interacts with an external service.
Control access to who can use this toolkit.
Make... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit.html |
09e51f484c2d-1 | Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creat... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit.html |
09e51f484c2d-2 | 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 = None, encoding: unicode = 'utf8', proto... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit.html |
79b61e1c745e-0 | langchain.agents.agent.AgentExecutor¶
class langchain.agents.agent.AgentExecutor[source]¶
Bases: Chain
Agent that is using tools.
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 agent: Union[BaseSingle... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-1 | If a callable function, the function will be called with the exception
as an argument, and the result of that function will be passed to the agentas an observation.
param max_execution_time: Optional[float] = None¶
The maximum amount of wall clock time to spend in the execution
loop.
param max_iterations: Optional[int]... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-2 | The valid tools the agent can call.
param trim_intermediate_steps: Union[int, Callable[[List[Tuple[AgentAction, str]]], List[Tuple[AgentAction, str]]]] = -1¶
param verbose: bool [Optional]¶
Whether or not run in verbose mode. In verbose mode, some intermediate logs
will be printed to the console. Defaults to the global... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-3 | include_run_info – Whether to include run info in the response. Defaults
to False.
Returns
A dict of named outputs. Should contain all outputs specified inChain.output_keys.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwar... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-4 | tags – List of string tags to pass to all callbacks. These will be passed in
addition to tags passed to the chain during construction, but only
these runtime tags will propagate to calls to other objects.
metadata – Optional metadata associated with the chain. Defaults to None
include_run_info – Whether to include run ... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-5 | addition to callbacks passed to the chain during construction, but only
these runtime callbacks will propagate to calls to other objects.
tags – List of string tags to pass to all callbacks. These will be passed in
addition to tags passed to the chain during construction, but only
these runtime tags will propagate to c... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-6 | Stream all output from a runnable, as reported to the callback system.
This includes all inner runs of LLMs, Retrievers, Tools, etc.
Output is streamed as Log objects, which include a list of
jsonpatch ops that describe how the state of the run has changed in each
step, and the final state of the run.
The jsonpatch ops... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-7 | Returns
A pydantic model that can be used to validate config.
configurable_alternatives(which: ConfigurableField, default_key: str = 'default', **kwargs: Union[Runnable[Input, Output], Callable[[], Runnable[Input, Output]]]) → RunnableSerializable[Input, Output]¶
configurable_fields(**kwargs: Union[ConfigurableField, C... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-8 | method.
Returns
A dictionary representation of the chain.
Example
chain.dict(exclude_unset=True)
# -> {"_type": "foo", "verbose": False, ...}
classmethod from_agent_and_tools(agent: Union[BaseSingleActionAgent, BaseMultiActionAgent], tools: Sequence[BaseTool], callbacks: Optional[Union[List[BaseCallbackHandler], BaseCa... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-9 | Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate output.
invoke(input: Dict[str, Any], config: Optional[RunnableConfig] = None, **kwargs: Any) → Dict[str, Any]¶
Transform a single input into an output. Override to implement.
Parameters
input – The inp... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-10 | 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.
lookup_tool(name: str) → BaseTool[source]¶
Lookup tool by name.
map() → Runnable[List[Input], List[Output]]¶
Return a new Runnable that maps a... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-11 | inputs are also added to the final outputs.
Returns
A dict of the final chain outputs.
run(*args: Any, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶
Convenience method for executing ch... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-12 | chain.run(question=question, context=context)
# -> "The temperature in Boise is..."
save(file_path: Union[Path, str]) → None[source]¶
Raise error - saving not supported for Agent Executors.
save_agent(file_path: Union[Path, str]) → None[source]¶
Save the underlying agent.
classmethod schema(by_alias: bool = True, ref_t... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-13 | 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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-14 | 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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
79b61e1c745e-15 | Set env var OPENAI_API_KEY or load from a .env file
SQL
Message Memory in Agent backed by a database
Memory in Agent
XML Agent
Custom MRKL agent
Shared memory across agents and tools
Custom multi-action agent
Running Agent as an Iterator
Custom agent
Custom agent with tool retrieval | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.AgentExecutor.html |
577e56ce8b41-0 | langchain.agents.agent.RunnableMultiActionAgent¶
class langchain.agents.agent.RunnableMultiActionAgent[source]¶
Bases: BaseMultiActionAgent
Agent powered by runnables.
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 vali... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.RunnableMultiActionAgent.html |
577e56ce8b41-1 | Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating
the new model: you should trust this data
deep – set to True to make a deep co... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.RunnableMultiActionAgent.html |
577e56ce8b41-2 | plan(intermediate_steps: List[Tuple[AgentAction, str]], callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Union[List[AgentAction], AgentFinish][source]¶
Given input, decided what to do.
Parameters
intermediate_steps – Steps the LLM has taken to date,
along with the obse... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent.RunnableMultiActionAgent.html |
4bafb655ddf1-0 | langchain.agents.agent_toolkits.spark_sql.base.create_spark_sql_agent¶ | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.spark_sql.base.create_spark_sql_agent.html |
4bafb655ddf1-1 | langchain.agents.agent_toolkits.spark_sql.base.create_spark_sql_agent(llm: BaseLanguageModel, toolkit: SparkSQLToolkit, callback_manager: Optional[BaseCallbackManager] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, prefix: str = 'You are an agent designed to interact with Spa... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.spark_sql.base.create_spark_sql_agent.html |
4bafb655ddf1-2 | Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question', input_variables: Optional[List[str]] = None, top_k: int = 10, max_iterations... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.spark_sql.base.create_spark_sql_agent.html |
4bafb655ddf1-3 | Construct a Spark SQL agent from an LLM and tools.
Examples using create_spark_sql_agent¶
Spark SQL | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.spark_sql.base.create_spark_sql_agent.html |
7ea4df769009-0 | langchain.agents.chat.output_parser.ChatOutputParser¶
class langchain.agents.chat.output_parser.ChatOutputParser[source]¶
Bases: AgentOutputParser
Output parser for the chat agent.
param pattern = re.compile('^.*?`{3}(?:json)?\\n(.*?)`{3}.*?$', re.DOTALL)¶
Regex pattern to parse the output.
async abatch(inputs: List[In... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-1 | Parameters
result – A list of Generations to be parsed. The Generations are assumed
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 astr... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-2 | input is still being generated.
batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation runs invoke in parallel using a thread pool executor.
The default implementation of batch w... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-3 | 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] = None, deep: bool = False) → Model¶
Duplicate a model, optionally... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-4 | For example, if the class is langchain.llms.openai.OpenAI, then the
namespace is [“langchain”, “llms”, “openai”]
get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶
Get a pydantic model that can be used to validate output to the runnable.
Runnables that leverage the configurable_fields and con... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-5 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a ... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-6 | to retry or fix the output in some way, and needs information from
the prompt to do so.
Parameters
completion – String output of a language model.
prompt – Input PromptValue.
Returns
Structured output
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod sc... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-7 | Add fallbacks to a runnable, returning a new Runnable.
Parameters
fallbacks – A sequence of runnables to try if the original runnable fails.
exceptions_to_handle – A tuple of exception types to handle.
Returns
A new Runnable that will try the original runnable, and then each
fallback in order, upon failures.
with_liste... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
7ea4df769009-8 | Bind input and output types to a Runnable, returning a new Runnable.
property InputType: Any¶
The type of input this runnable accepts specified as a type annotation.
property OutputType: Type[langchain.schema.output_parser.T]¶
The type of output this runnable produces specified as a type annotation.
property config_spe... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.chat.output_parser.ChatOutputParser.html |
dc6a321cb309-0 | langchain.agents.agent_toolkits.jira.toolkit.JiraToolkit¶
class langchain.agents.agent_toolkits.jira.toolkit.JiraToolkit[source]¶
Bases: BaseToolkit
Jira Toolkit.
Security Note: This toolkit contains tools that can read and modifythe state of a service; e.g., by creating, deleting, or updating,
reading underlying data.... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.jira.toolkit.JiraToolkit.html |
dc6a321cb309-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.jira.toolkit.JiraToolkit.html |
dc6a321cb309-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.jira.toolkit.JiraToolkit.html |
122e7e76a6ae-0 | langchain_experimental.agents.agent_toolkits.xorbits.base.create_xorbits_agent¶
langchain_experimental.agents.agent_toolkits.xorbits.base.create_xorbits_agent(llm: BaseLLM, data: Any, callback_manager: Optional[BaseCallbackManager] = None, prefix: str = '', suffix: str = '', input_variables: Optional[List[str]] = None,... | lang/api.python.langchain.com/en/latest/agents/langchain_experimental.agents.agent_toolkits.xorbits.base.create_xorbits_agent.html |
a390b001c7f0-0 | langchain.agents.agent_toolkits.gitlab.toolkit.GitLabToolkit¶
class langchain.agents.agent_toolkits.gitlab.toolkit.GitLabToolkit[source]¶
Bases: BaseToolkit
GitLab Toolkit.
Security Note: This toolkit contains tools that can read and modifythe state of a service; e.g., by creating, deleting, or updating,
reading underl... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.gitlab.toolkit.GitLabToolkit.html |
a390b001c7f0-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.gitlab.toolkit.GitLabToolkit.html |
a390b001c7f0-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.gitlab.toolkit.GitLabToolkit.html |
6cf732ec760f-0 | langchain.agents.load_tools.load_tools¶
langchain.agents.load_tools.load_tools(tool_names: List[str], llm: Optional[BaseLanguageModel] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → List[BaseTool][source]¶
Load tools based on their name.
Tools allow agents to... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.load_tools.load_tools.html |
6cf732ec760f-1 | ClearML
Google Search
Log, Trace, and Monitor
Portkey
Google Drive tool
Bittensor
Amazon API Gateway
Debugging
LangSmith Walkthrough
Agents
Agent Debates with Tools
Multiple callback handlers
Defining Custom Tools
Human-in-the-loop Tool Validation
Access intermediate steps
Timeouts for agents
Streaming final agent outp... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.load_tools.load_tools.html |
abc078874606-0 | langchain.agents.self_ask_with_search.base.SelfAskWithSearchAgent¶
class langchain.agents.self_ask_with_search.base.SelfAskWithSearchAgent[source]¶
Bases: Agent
Agent for the self-ask-with-search paper.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input d... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.self_ask_with_search.base.SelfAskWithSearchAgent.html |
abc078874606-1 | Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating
the new model: you should trust this data
deep – set to True to make a deep co... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.self_ask_with_search.base.SelfAskWithSearchAgent.html |
abc078874606-2 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.self_ask_with_search.base.SelfAskWithSearchAgent.html |
abc078874606-3 | classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
tool_run_logging_kwargs() → Dict¶
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.self_ask_with_search.base.SelfAskWithSearchAgent.html |
53d7eae22e32-0 | langchain.agents.agent_toolkits.sql.toolkit.SQLDatabaseToolkit¶
class langchain.agents.agent_toolkits.sql.toolkit.SQLDatabaseToolkit[source]¶
Bases: BaseToolkit
Toolkit for interacting with SQL databases.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.sql.toolkit.SQLDatabaseToolkit.html |
53d7eae22e32-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... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.sql.toolkit.SQLDatabaseToolkit.html |
53d7eae22e32-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | lang/api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.sql.toolkit.SQLDatabaseToolkit.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.