Tony20100/langchain_full huggingface dataset:
langchain.agents.react.base.ReActTextWorldAgent¶
class langchain.agents.react.base.ReActTextWorldAgent[source]¶
Bases: ReActDocstoreAgent
[Deprecated] Agent for the ReAct TextWorld chain.
Notes
Deprecated since version 0.1.0.
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 allowed_tools: Optional[List[str]] = None¶
param llm_chain: LLMChain [Required]¶
param output_parser: AgentOutputParser [Optional]¶
async aplan(intermediate_steps: List[Tuple[AgentAction, str]], callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Union[AgentAction, AgentFinish]¶
Given input, decided what to do.
Parameters
intermediate_steps (List[Tuple[AgentAction, str]]) – Steps the LLM has taken to date,
along with observations
callbacks (Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]]) – Callbacks to run.
**kwargs (Any) – User inputs.
Returns
Action specifying what tool to use.
Return type
Union[AgentAction, AgentFinish]
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
langchain.agents.agent_iterator.AgentExecutorIterator¶
class langchain.agents.agent_iterator.AgentExecutorIterator(agent_executor: AgentExecutor, inputs: Any, callbacks: Callbacks = None, *, tags: Optional[list[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, run_id: Optional[UUID] = None, include_run_info: bool = False, yield_actions: bool = False)[source]¶
Iterator for AgentExecutor.
Initialize the AgentExecutorIterator with the given AgentExecutor,
inputs, and optional callbacks.
Attributes
agent_executor
color_mapping
inputs
name_to_tool_map
callbacks
tags
metadata
run_name
run_id
include_run_info
yield_actions
Methods
__init__(agent_executor, inputs[, ...])
Initialize the AgentExecutorIterator with the given AgentExecutor, inputs, and optional callbacks.
make_final_outputs(outputs, run_manager)
reset()
Reset the iterator to its initial state, clearing intermediate steps, iterations, and time elapsed.
update_iterations()
Increment the number of iterations and update the time elapsed.
Parameters
agent_executor (AgentExecutor) – 
inputs (Any) – 
callbacks (Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]]) – 
tags (Optional[list[str]]) – 
metadata (Optional[Dict[str, Any]]) – 
run_name (Optional[str]) – 
run_id (Optional[UUID]) – 
include_run_info (bool) – 
yield_actions (bool) –
include_run_info (bool) – 
yield_actions (bool) – 
__init__(agent_executor: AgentExecutor, inputs: Any, callbacks: Callbacks = None, *, tags: Optional[list[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, run_id: Optional[UUID] = None, include_run_info: bool = False, yield_actions: bool = False)[source]¶
Initialize the AgentExecutorIterator with the given AgentExecutor,
inputs, and optional callbacks.
Parameters
agent_executor (AgentExecutor) – 
inputs (Any) – 
callbacks (Callbacks) – 
tags (Optional[list[str]]) – 
metadata (Optional[Dict[str, Any]]) – 
run_name (Optional[str]) – 
run_id (Optional[UUID]) – 
include_run_info (bool) – 
yield_actions (bool) – 
make_final_outputs(outputs: Dict[str, Any], run_manager: Union[CallbackManagerForChainRun, AsyncCallbackManagerForChainRun]) → AddableDict[source]¶
Parameters
outputs (Dict[str, Any]) – 
run_manager (Union[CallbackManagerForChainRun, AsyncCallbackManagerForChainRun]) – 
Return type
AddableDict
reset() → None[source]¶
Reset the iterator to its initial state, clearing intermediate steps,
iterations, and time elapsed.
Return type
None
update_iterations() → None[source]¶
Increment the number of iterations and update the time elapsed.
Return type
None
langchain.agents.initialize.initialize_agent¶
langchain.agents.initialize.initialize_agent(tools: Sequence[BaseTool], llm: BaseLanguageModel, agent: Optional[AgentType] = None, callback_manager: Optional[BaseCallbackManager] = None, agent_path: Optional[str] = None, agent_kwargs: Optional[dict] = None, *, tags: Optional[Sequence[str]] = None, **kwargs: Any) → AgentExecutor[source]¶
[Deprecated] Load an agent executor given tools and LLM.
Parameters
tools (Sequence[BaseTool]) – List of tools this agent has access to.
llm (BaseLanguageModel) – Language model to use as the agent.
agent (Optional[AgentType]) – Agent type to use. If None and agent_path is also None, will default to
AgentType.ZERO_SHOT_REACT_DESCRIPTION.
callback_manager (Optional[BaseCallbackManager]) – CallbackManager to use. Global callback manager is used if
not provided. Defaults to None.
agent_path (Optional[str]) – Path to serialized agent to use.
agent_kwargs (Optional[dict]) – Additional keyword arguments to pass to the underlying agent
tags (Optional[Sequence[str]]) – Tags to apply to the traced runs.
**kwargs (Any) – Additional keyword arguments passed to the agent executor
Returns
An agent executor
Return type
AgentExecutor
Notes
Deprecated since version 0.1.0: Use Use new agent constructor methods like create_react_agent, create_json_agent, create_structured_chat_agent, etc. instead.
Examples using initialize_agent¶
AINetwork
AWS Lambda
Aim
Amazon API Gateway
Argilla
Azure Cognitive Services
Bearly Code Interpreter
ChatGPT Plugins
ClearML
ClickUp
Comet
Comet Tracing
Connery Action Tool
Connery Toolkit
Dall-E Image Generator
Document Comparison
Connery Action Tool
Connery Toolkit
Dall-E Image Generator
Document Comparison
E2B Data Analysis
Eden AI
Eleven Labs Text2Speech
Flyte
Github
Gitlab
Google Drive
Google Finance
Google Jobs
Google Serper
Gradio
GraphQL
Human as a tool
Jira
LLMonitor
MLflow
Memorize
NASA
Natural Language APIs
Office365
OpenWeatherMap
PlayWright Browser
SageMaker Tracking
SceneXplain
Search Tools
SearchApi
Serper - Google Search API
Shell (bash)
Steam Game Recommendation & Game Details
WandB Tracing
Weights & Biases
Xata
Yahoo Finance News
Zapier Natural Language Actions
Zep Cloud Memory
Zep Open Source Memory
langchain.agents.agent.AgentOutputParser¶
class langchain.agents.agent.AgentOutputParser[source]¶
Bases: BaseOutputParser[Union[AgentAction, AgentFinish]]
Base class for parsing agent output into agent action/finish.
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.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
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.
Parameters
inputs (List[Input]) – 
config (Optional[Union[RunnableConfig, List[RunnableConfig]]]) – 
return_exceptions (bool) – 
kwargs (Optional[Any]) – 
Return type
List[Output]
async abatch_as_completed(inputs: Sequence[Input], config: Optional[Union[RunnableConfig, Sequence[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → AsyncIterator[Tuple[int, Union[Output, Exception]]]¶
Run ainvoke in parallel on a list of inputs,
yielding results as they complete.
Parameters
inputs (Sequence[Input]) – 
config (Optional[Union[RunnableConfig, Sequence[RunnableConfig]]]) – 
return_exceptions (bool) – 
kwargs (Optional[Any]) – 
Return type
AsyncIterator[Tuple[int, Union[Output, Exception]]]
def _lambda(x: int) -> int:
    return x + 1
runnable = RunnableLambda(_lambda)
print(runnable.map().invoke([1, 2, 3])) # [2, 3, 4]
Return type
Runnable[List[Input], List[Output]]
abstract parse(text: str) → Union[AgentAction, AgentFinish][source]¶
Parse text into agent action/finish.
Parameters
text (str) – 
Return type
Union[AgentAction, AgentFinish]
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
Parameters
path (Union[str, Path]) – 
content_type (unicode) – 
encoding (unicode) – 
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
classmethod parse_obj(obj: Any) → Model¶
Parameters
obj (Any) – 
Return type
Model
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
Parameters
b (Union[str, bytes]) – 
content_type (unicode) – 
encoding (unicode) – 
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
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
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 ValidationError if the input data cannot be parsed to form a valid model.
param llm: BaseLanguageModel [Required]¶
param vectorstore_info: VectorStoreInfo [Required]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
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 choose which fields to include, exclude and change.
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to include in new model
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to exclude from new model, as with values this takes precedence over include
update (Optional[DictStrAny]) – 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 (bool) – set to True to make a deep copy of the model
deep (bool) – set to True to make a deep copy of the model
self (Model) – 
Returns
new model instance
Return type
Model
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, exclude_defaults: bool = False, exclude_none: bool = False) → DictStrAny¶
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – 
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – 
by_alias (bool) – 
skip_defaults (Optional[bool]) – 
exclude_unset (bool) – 
exclude_defaults (bool) – 
exclude_none (bool) – 
Return type
DictStrAny
classmethod from_orm(obj: Any) → Model¶
Parameters
obj (Any) – 
Return type
Model
get_tools() → List[BaseTool][source]¶
Get the tools in the toolkit.
Return type
List[BaseTool]
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, exclude_none: bool = False, encoder: Optional[Callable[[Any], Any]] = None, models_as_dict: bool = True, **dumps_kwargs: Any) → unicode¶
langchain.agents.openai_functions_multi_agent.base.OpenAIMultiFunctionsAgent¶
class langchain.agents.openai_functions_multi_agent.base.OpenAIMultiFunctionsAgent[source]¶
Bases: BaseMultiActionAgent
[Deprecated] An Agent driven by OpenAIs function powered API.
Parameters
llm – This should be an instance of ChatOpenAI, specifically a model
that supports using functions.
tools – The tools this agent has access to.
prompt – The prompt for this agent, should support agent_scratchpad as one
of the variables. For an easy way to construct this prompt, use
OpenAIMultiFunctionsAgent.create_prompt(…)
Notes
Deprecated since version 0.1.0: Use create_openai_tools_agent instead.
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 llm: BaseLanguageModel [Required]¶
param prompt: BasePromptTemplate [Required]¶
param tools: Sequence[BaseTool] [Required]¶
async aplan(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 (List[Tuple[AgentAction, str]]) – Steps the LLM has taken to date,
along with observations
**kwargs (Any) – User inputs.
callbacks (Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]]) – 
**kwargs – 
Returns
Action specifying what tool to use.
Return type
Union[List[AgentAction], AgentFinish]
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
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 choose which fields to include, exclude and change.
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to include in new model
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to exclude from new model, as with values this takes precedence over include
update (Optional[DictStrAny]) – 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 (bool) – set to True to make a deep copy of the model
self (Model) – 
Returns
new model instance
Return type
Model
classmethod create_prompt(system_message: Optional[SystemMessage] = SystemMessage(content='You are a helpful AI assistant.'), extra_prompt_messages: Optional[List[BaseMessagePromptTemplate]] = None) → BasePromptTemplate[source]¶
Create prompt for this agent.
Parameters
system_message (Optional[SystemMessage]) – Message to use as the system message that will be the
first in the prompt.
extra_prompt_messages (Optional[List[BaseMessagePromptTemplate]]) – Prompt messages that will be placed between the
system message and the new human input.
Returns
A prompt template to pass into this agent.
Return type
BasePromptTemplate
dict(**kwargs: Any) → Dict¶
Return dictionary representation of agent.
Parameters
kwargs (Any) – 
Return type
Dict
classmethod from_llm_and_tools(llm: BaseLanguageModel, tools: Sequence[BaseTool], callback_manager: Optional[BaseCallbackManager] = None, extra_prompt_messages: Optional[List[BaseMessagePromptTemplate]] = None, system_message: Optional[SystemMessage] = SystemMessage(content='You are a helpful AI assistant.'), **kwargs: Any) → BaseMultiActionAgent[source]¶
Construct an agent from an LLM and tools.
Parameters
llm (BaseLanguageModel) – 
tools (Sequence[BaseTool]) – 
callback_manager (Optional[BaseCallbackManager]) – 
extra_prompt_messages (Optional[List[BaseMessagePromptTemplate]]) – 
system_message (Optional[SystemMessage]) – 
kwargs (Any) – 
Return type
BaseMultiActionAgent
classmethod from_orm(obj: Any) → Model¶
Parameters
obj (Any) – 
Return type
Model
get_allowed_tools() → List[str][source]¶
Get allowed tools.
Return type
List[str]
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, exclude_none: bool = False, encoder: Optional[Callable[[Any], Any]] = None, models_as_dict: bool = True, **dumps_kwargs: Any) → unicode¶
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
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 (List[Tuple[AgentAction, str]]) – Steps the LLM has taken to date, along with observations
**kwargs (Any) – User inputs.
callbacks (Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]]) – 
**kwargs – 
Returns
Action specifying what tool to use.
Return type
Union[List[AgentAction], AgentFinish]
return_stopped_response(early_stopping_method: str, intermediate_steps: List[Tuple[AgentAction, str]], **kwargs: Any) → AgentFinish¶
Return response when agent has been stopped due to max iterations.
Parameters
early_stopping_method (str) – 
intermediate_steps (List[Tuple[AgentAction, str]]) – 
kwargs (Any) – 
Return type
AgentFinish
save(file_path: Union[Path, str]) → None¶
Save the agent.
Parameters
file_path (Union[Path, str]) – Path to file to save the agent to.
Return type
None
Example:
.. code-block:: python
# If working with agent executor
agent.agent.save(file_path=”path/agent.yaml”)
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
Return type
DictStrAny
ref_template (unicode) – 
Return type
DictStrAny
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
dumps_kwargs (Any) – 
Return type
unicode
tool_run_logging_kwargs() → Dict¶
Return type
Dict
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
Parameters
localns (Any) – 
Return type
None
classmethod validate(value: Any) → Model¶
Parameters
value (Any) – 
Return type
Model
property functions: List[dict]¶
property input_keys: List[str]¶
Get input keys. Input refers to user input here.
property return_values: List[str]¶
Return values of the agent.
langchain.agents.agent_toolkits.vectorstore.base.create_vectorstore_agent¶
langchain.agents.agent_toolkits.vectorstore.base.create_vectorstore_agent(llm: BaseLanguageModel, toolkit: VectorStoreToolkit, callback_manager: Optional[BaseCallbackManager] = None, prefix: str = 'You are an agent designed to answer questions about sets of documents.\nYou have access to tools for interacting with the documents, and the inputs to the tools are questions.\nSometimes, you will be asked to provide sources for your questions, in which case you should use the appropriate tool to do so.\nIf the question does not seem relevant to any of the tools provided, just return "I don\'t know" as the answer.\n', verbose: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any) → AgentExecutor[source]¶
Construct a VectorStore agent from an LLM and tools.
Parameters
llm (BaseLanguageModel) – LLM that will be used by the agent
toolkit (VectorStoreToolkit) – Set of tools for the agent
callback_manager (Optional[BaseCallbackManager], optional) – Object to handle the callback [ Defaults to None. ]
prefix (str, optional) – The prefix prompt for the agent. If not provided uses default PREFIX.
verbose (bool, optional) – If you want to see the content of the scratchpad. [ Defaults to False ]
agent_executor_kwargs (Optional[Dict[str, Any]], optional) – If there is any other parameter you want to send to the agent. [ Defaults to None ]
**kwargs – Additional named parameters to pass to the ZeroShotAgent.
Returns
Returns a callable AgentExecutor object. Either you can call it or use run method with the query to get the response
Return type
AgentExecutor
langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreInfo¶
class langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreInfo[source]¶
Bases: BaseModel
Information about a VectorStore.
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 description: str [Required]¶
param name: str [Required]¶
param vectorstore: VectorStore [Required]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
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 choose which fields to include, exclude and change.
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to include in new model
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to exclude from new model, as with values this takes precedence over include
update (Optional[DictStrAny]) – 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 (bool) – set to True to make a deep copy of the model
langchain_experimental.agents.agent_toolkits.pandas.base.create_pandas_dataframe_agent¶
langchain_experimental.agents.agent_toolkits.pandas.base.create_pandas_dataframe_agent(llm: Runnable[Union[PromptValue, str, Sequence[Union[BaseMessage, List[str], Tuple[str, str], str, Dict[str, Any]]]], Union[BaseMessage, str]], df: Any, agent_type: Union[AgentType, Literal['openai-tools', 'tool-calling']] = AgentType.ZERO_SHOT_REACT_DESCRIPTION, callback_manager: Optional[BaseCallbackManager] = None, prefix: Optional[str] = None, suffix: Optional[str] = None, input_variables: Optional[List[str]] = None, verbose: bool = False, return_intermediate_steps: bool = False, max_iterations: Optional[int] = 15, max_execution_time: Optional[float] = None, early_stopping_method: str = 'force', agent_executor_kwargs: Optional[Dict[str, Any]] = None, include_df_in_prompt: Optional[bool] = True, number_of_head_rows: int = 5, extra_tools: Sequence[BaseTool] = (), engine: Literal['pandas', 'modin'] = 'pandas', **kwargs: Any) → AgentExecutor[source]¶
Construct a Pandas agent from an LLM and dataframe(s).
Parameters
llm (Runnable[Union[PromptValue, str, Sequence[Union[BaseMessage, List[str], Tuple[str, str], str, Dict[str, Any]]]], Union[BaseMessage, str]]) – Language model to use for the agent. If agent_type is “tool-calling” then
llm is expected to support tool calling.
df (Any) – Pandas dataframe or list of Pandas dataframes.