talk2data / agents.py
prithvi55's picture
adding files
d1a818a verified
Raw History Blame
466 Bytes
from langchain.agents import initialize_agent, AgentType, Tool
from langchain.memory import ConversationBufferMemory
def get_conversation_memory():
return ConversationBufferMemory(memory_key="chat_history", return_messages=True)
def init_multi_agent(tools, llm, memory):
return initialize_agent(
tools=tools,
llm=llm,
agent=AgentType.CONVERSATIONAL_REACT_DESCRIPTION,
memory=memory,
verbose=True
)