Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix langchain lint #1056

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gpt_index/langchain_helpers/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
from langchain.agents import AgentExecutor, initialize_agent
from langchain.callbacks import BaseCallbackManager
from langchain.llms.base import BaseLLM
from langchain.agents.agent_types import AgentType

from gpt_index.langchain_helpers.agents.toolkits import LlamaToolkit


def create_llama_agent(
toolkit: LlamaToolkit,
llm: BaseLLM,
agent: Optional[str] = None,
agent: Optional[AgentType] = None,
callback_manager: Optional[BaseCallbackManager] = None,
agent_path: Optional[str] = None,
agent_kwargs: Optional[dict] = None,
Expand Down Expand Up @@ -77,7 +78,7 @@ def create_llama_chat_agent(
"""
# chat agent
# TODO: explore chat-conversational-react-description
agent_type = "conversational-react-description"
agent_type = AgentType.CONVERSATIONAL_REACT_DESCRIPTION
return create_llama_agent(
toolkit,
llm,
Expand Down