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
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¶
Artifacts are charts created by matplotlib when `plt.show()` is called
How YahooFinanceNewsTool works? {#how-yahoofinancenewstool-works}
IMPORTANT: If you plan to use this account in the future, make sure to save the
If this is your first time using playwright, you’ll have to install a browser executable.
These are sample parameters for Falcon 40B Instruct Deployed from Amazon SageMaker JumpStart
Using https://huggingface.co/laiyer/deberta-v3-base-prompt-injection
need to use GPT-4 here as GPT-3.5 does not understand, however hard you insist, that