Here is my code so far for context:
SimpleCSVReader = download_loader("SimpleCSVReader")
loader = SimpleCSVReader()
csv = loader.load_data(file=path)
index = GPTSimpleVectorIndex(csv)
tools = [
Tool(
name="GPT Index",
func=lambda q: str(index.query(q)),
description="The input to this tool should be a complete english sentence.",
return_direct=True,
),
]
memory = ConversationBufferMemory(memory_key="chat_history")
llm = OpenAI(temperature=0) # type: ignore
agent_chain = initialize_agent(
tools,
llm,
agent="conversational-react-description",
memory=memory,
)
#AI.agent_chain = create_ai(index)
print(agent_chain.run(input="What is the name of this csv?"))