Skip to content

Commit

Permalink
Hotfix to AgentInitializer (langflow-ai#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielluiz authored Jun 26, 2023
2 parents f373d18 + 644fc98 commit d4e01f2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 34 deletions.
66 changes: 33 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langflow"
version = "0.2.1"
version = "0.2.2"
description = "A Python package with a built-in web application"
authors = ["Logspace <[email protected]>"]
maintainers = [
Expand Down
4 changes: 4 additions & 0 deletions src/backend/langflow/interface/agents/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Tool,
ZeroShotAgent,
initialize_agent,
AgentType,
)
from langchain.agents.agent_toolkits import (
SQLDatabaseToolkit,
Expand Down Expand Up @@ -297,6 +298,9 @@ def initialize(
agent: str,
memory: Optional[BaseChatMemory] = None,
):
# Find which value in the AgentType enum corresponds to the string
# passed in as agent
agent = AgentType(agent)
return initialize_agent(
tools=tools,
llm=llm,
Expand Down

0 comments on commit d4e01f2

Please sign in to comment.