from langchain_classic import hub
from langchain.agents import (
AgentExecutor,
create_agent,
)
from langchain.memory import ConversationBufferMemory
from langchain_community.llms import NIBittensorLLM
tools = [tool]
prompt = hub.pull("hwchase17/react")
llm = NIBittensorLLM(
system_prompt="Your task is to determine a response based on user prompt"
)
memory = ConversationBufferMemory(memory_key="chat_history")
agent = create_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, memory=memory)
response = agent_executor.invoke({"input": prompt})