mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 20:28:10 +00:00
Fix redundancy check about config_type in AGENT_TO_CLASS (#2934)
Fix of issue #2874
This commit is contained in:
parent
b40f90ea04
commit
ae7ed31386
@ -37,8 +37,6 @@ def _load_agent_from_tools(
|
||||
if config_type not in AGENT_TO_CLASS:
|
||||
raise ValueError(f"Loading {config_type} agent not supported")
|
||||
|
||||
if config_type not in AGENT_TO_CLASS:
|
||||
raise ValueError(f"Loading {config_type} agent not supported")
|
||||
agent_cls = AGENT_TO_CLASS[config_type]
|
||||
combined_config = {**config, **kwargs}
|
||||
return agent_cls.from_llm_and_tools(llm, tools, **combined_config)
|
||||
|
Loading…
Reference in New Issue
Block a user