I have installed nano using chocolatey but whenever I'am creating an agent that is supposed to use the terminal to modify a script, it run for an infinite time.
Here is the script :
import os
from langchain.agents import load_tools, initialize_agent, Tool
from langchain.llms import OpenAI
from langchain.agents import tool
OPENAI_KEY = os.environ['OPENAI_API_KEY']
llm = OpenAI(temperature=0)
Tools = []
tools = load_tools(['terminal'],llm=llm)
agent = initialize_agent(tools, llm, agent='zero-shot-react-description', verbose=True)
agent.run("Create a simple text file. after it's created, use nano to add a 'I AM HERE' inside of it.")
the result is the following: ←[1m> Entering new AgentExecutor chain...←[0m ←[32;1m←[1;3m I need to create a file and then open it in nano. Action: Terminal Action Input: touch text.txt && nano text.txt←[0m
Any ideas?
I'am sure it's not about nano function since I can do all steps manually.