Replies: 2 comments 1 reply
-
To replace the from langflow.interface.agents import AgentCreator
from langchain.llms import YourLanguageModel
from langchain.tools import YourTool
# Create an instance of the AgentCreator
agent_creator = AgentCreator()
# Define your language model and tools
llm = YourLanguageModel()
tools = [YourTool()]
# Build the agent configuration
config = agent_creator.build_config()
# Instantiate the agent
agent = agent_creator.build(
agent=config['agent']['value'],
llm=llm,
tools=tools,
max_iterations=config['max_iterations']['value']
)
# Now you can use the agent
print(agent) In this example, replace |
Beta Was this translation helpful? Give feedback.
-
AgentCreator is not present in the langflow UI, how can I add it in the canvas? |
Beta Was this translation helpful? Give feedback.
-
In langflow 1.0.15 I do nofind the Agentinitializer, how it can be replaced? or how can I istantiate a simple agent?
Beta Was this translation helpful? Give feedback.
All reactions