AutoGPT
AutoGPT copied to clipboard
Redis Memory Issue (FT.INFO not found after multiple reinstalls and creating new servers/cleaning the ports.)
Duplicates
- [X] I have searched the existing issues
Steps to reproduce 🕹
Please note that this was based on the stable branch.
Installing docker, then creating a server in Redis. I had to remove the password because none of the commands were working, it wouldn't initiate the bot.
Each time Redis was reinstalled, updated or a new server was created, I would get the same error as listed below.
Error creating Redis search index: unknown command 'FT.CREATE', with args beginning with: 'auto-gpt' 'ON' 'HASH' 'PREFIX' '1' 'auto-gpt:' 'SCORE' '1.0' 'SCHEMA' 'data' 'TEXT' 'WEIGHT' '1.0' 'embedding' 'VECTOR' 'HNSW' Welcome to Auto-GPT! Enter the name of your AI and its role below. Entering nothing will load defaults. Name your AI: For example, 'Entrepreneur-GPT' AI Name: t t here! I am at your service. Describe your AI's role: t For example, 'an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth.' t is: Enter up to 5 goals for your AI: t For example: Increase net worth, Grow Twitter Account, Develop and manage multiple businesses autonomously' Enter nothing to load defaults, enter nothing when finished. Goal 1: Goal 2: Using memory of type: RedisMemory Using Browser: chrome
- Thinking...
Traceback (most recent call last):
File "/Users/pauljones/opt/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/pauljones/opt/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/pauljones/Auto-GPT/autogpt/main.py", line 53, in
main() File "/Users/pauljones/Auto-GPT/autogpt/main.py", line 49, in main agent.start_interaction_loop() File "/Users/pauljones/Auto-GPT/autogpt/agent/agent.py", line 65, in start_interaction_loop assistant_reply = chat_with_ai( File "/Users/pauljones/Auto-GPT/autogpt/chat.py", line 88, in chat_with_ai logger.debug(f"Memory Stats: {permanent_memory.get_stats()}") File "/Users/pauljones/Auto-GPT/autogpt/memory/redismem.py", line 154, in get_stats return self.redis.ft(f"{self.cfg.memory_index}").info() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/commands/search/commands.py", line 370, in info res = self.execute_command(INFO_CMD, self.index_name) File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1258, in execute_command return conn.retry.call_with_retry( File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/retry.py", line 46, in call_with_retry return do() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1259, in lambda: self._send_command_parse_response( File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1235, in _send_command_parse_response return self.parse_response(conn, command_name, **options) File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1275, in parse_response response = connection.read_response() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 882, in read_response raise response redis.exceptions.ResponseError: unknown command 'FT.INFO', with args beginning with: 'auto-gpt'
Current behavior 😯
Each time is says FT.INFO not found before asking for a bot name. After putting in the goals this happens.
Error creating Redis search index: unknown command 'FT.CREATE', with args beginning with: 'auto-gpt' 'ON' 'HASH' 'PREFIX' '1' 'auto-gpt:' 'SCORE' '1.0' 'SCHEMA' 'data' 'TEXT' 'WEIGHT' '1.0' 'embedding' 'VECTOR' 'HNSW' Welcome to Auto-GPT! Enter the name of your AI and its role below. Entering nothing will load defaults. Name your AI: For example, 'Entrepreneur-GPT' AI Name: t t here! I am at your service. Describe your AI's role: t For example, 'an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth.' t is: Enter up to 5 goals for your AI: t For example: Increase net worth, Grow Twitter Account, Develop and manage multiple businesses autonomously' Enter nothing to load defaults, enter nothing when finished. Goal 1: Goal 2: Using memory of type: RedisMemory Using Browser: chrome
- Thinking...
Traceback (most recent call last):
File "/Users/pauljones/opt/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/pauljones/opt/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/pauljones/Auto-GPT/autogpt/main.py", line 53, in
main() File "/Users/pauljones/Auto-GPT/autogpt/main.py", line 49, in main agent.start_interaction_loop() File "/Users/pauljones/Auto-GPT/autogpt/agent/agent.py", line 65, in start_interaction_loop assistant_reply = chat_with_ai( File "/Users/pauljones/Auto-GPT/autogpt/chat.py", line 88, in chat_with_ai logger.debug(f"Memory Stats: {permanent_memory.get_stats()}") File "/Users/pauljones/Auto-GPT/autogpt/memory/redismem.py", line 154, in get_stats return self.redis.ft(f"{self.cfg.memory_index}").info() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/commands/search/commands.py", line 370, in info res = self.execute_command(INFO_CMD, self.index_name) File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1258, in execute_command return conn.retry.call_with_retry( File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/retry.py", line 46, in call_with_retry return do() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1259, in lambda: self._send_command_parse_response( File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1235, in _send_command_parse_response return self.parse_response(conn, command_name, **options) File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1275, in parse_response response = connection.read_response() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 882, in read_response raise response redis.exceptions.ResponseError: unknown command 'FT.INFO', with args beginning with: 'auto-gpt'
Expected behavior 🤔
The bot should start working, instead it stops and goes back to the cd.
Your prompt 📝
# Paste your prompt here
Error creating Redis search index: unknown command 'FT.CREATE', with args beginning with: 'auto-gpt' 'ON' 'HASH' 'PREFIX' '1' 'auto-gpt:' 'SCORE' '1.0' 'SCHEMA' 'data' 'TEXT' 'WEIGHT' '1.0' 'embedding' 'VECTOR' 'HNSW' Welcome to Auto-GPT! Enter the name of your AI and its role below. Entering nothing will load defaults. Name your AI: For example, 'Entrepreneur-GPT' AI Name: t t here! I am at your service. Describe your AI's role: t For example, 'an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth.' t is: Enter up to 5 goals for your AI: t For example: Increase net worth, Grow Twitter Account, Develop and manage multiple businesses autonomously' Enter nothing to load defaults, enter nothing when finished. Goal 1: Goal 2: Using memory of type: RedisMemory Using Browser: chrome
- Thinking...
Traceback (most recent call last):
File "/Users/pauljones/opt/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/pauljones/opt/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/pauljones/Auto-GPT/autogpt/main.py", line 53, in
main() File "/Users/pauljones/Auto-GPT/autogpt/main.py", line 49, in main agent.start_interaction_loop() File "/Users/pauljones/Auto-GPT/autogpt/agent/agent.py", line 65, in start_interaction_loop assistant_reply = chat_with_ai( File "/Users/pauljones/Auto-GPT/autogpt/chat.py", line 88, in chat_with_ai logger.debug(f"Memory Stats: {permanent_memory.get_stats()}") File "/Users/pauljones/Auto-GPT/autogpt/memory/redismem.py", line 154, in get_stats return self.redis.ft(f"{self.cfg.memory_index}").info() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/commands/search/commands.py", line 370, in info res = self.execute_command(INFO_CMD, self.index_name) File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1258, in execute_command return conn.retry.call_with_retry( File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/retry.py", line 46, in call_with_retry return do() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1259, in lambda: self._send_command_parse_response( File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1235, in _send_command_parse_response return self.parse_response(conn, command_name, **options) File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1275, in parse_response response = connection.read_response() File "/Users/pauljones/opt/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 882, in read_response raise response redis.exceptions.ResponseError: unknown command 'FT.INFO', with args beginning with: 'auto-gpt'
I also have the same issue
I have the same issue
Same issue
@pjoneswv @beknazar @we1005 - I figured out you need the redisearch module... easiest way for me was to use the redis-stack container instead of redis.
Change the docker-compose.yml file to
version: "3.9"
services:
auto-gpt:
depends_on:
- redis
build: ./
env_file:
- .env
volumes:
- "./autogpt:/app"
- ".env:/app/.env"
profiles: ["exclude-from-up"]
redis:
image: "redis/redis-stack:latest"
ports:
- "6379:6379"
environment:
- REDIS_ARGS=--requirepass <choose a pwd>
Modify the .env to include the added password and the value of the redis host
REDIS_HOST=redis
It should work now ;)
You can also have a look at https://github.com/Significant-Gravitas/Auto-GPT/pull/2196
Same issue on my end using local apt-install'ed redis on WSL (not docker)
Looks like the docker redis from readme is working fine
Did you install the "redis-stack" package locally instead of redis? I was on a mac environment and the error went away after installing the following steps. https://redis.io/docs/stack/get-started/install/mac-os/
give this a shot. WSL Docker dns has always seemed to be problematic, so worth setting up it's own network also.
version: "3.9"
services:
auto-gpt:
depends_on:
- redis
build: ./
env_file:
- .env
environment:
- MEMORY_BACKEND=redis
- REDIS_HOST=auto-gpt-redis-1
- REDIS_PORT=6379
- REDIS_PASSWORD=autogpt12345
volumes:
- "./autogpt:/app"
- ".env:/app/.env"
- "./data/auto_gpt_workspace:/home/appuser/auto_gpt_workspace"
profiles: ["exclude-from-up"]
redis:
image: "redis/redis-stack-server:latest"
restart: on-failure
stop_grace_period: 1m
environment:
- REDIS_ARGS=--requirepass autogpt12345
volumes:
- ./data/redis:/data
networks:
default:
name: auto-gpt
the same issue
@blackcoffeeli - @lxe I'm running Auto-GPT locally (in WSL2) and redis-stack via docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
with no issues.
try to install redisearch
pip install redisearch
I hope this helps someone.
In regards to the FT.INFO and FT.CREATE error: I discovered there was a redis server running on my computer before the docker redis was activated. I ran the following (M1 Mac) to turn it off for good because it kept restarting every time I tried to just kill the port. I got the answer from this page here:
The command I used to kill the process from auto restarting for good.
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Check your ports and see what you find.
If you check your redis MODULE LIST
in the redis cli you should see the ft
module, but when I checked my MODULE LIST
it was empty, because it was the local redis I had installed awhile back. By removing that one, the docker redis was able to take precedence and AutoGPT was happy and able to access the correct MODULES
.
pip install redisearch
try to install redisearch
pip install redisearch
fine,
try to install redisearch
pip install redisearch
this got rid of the original message, but I got a new message new.
Error: Redis is not installed. Please install redis-py to use Redis as a memory backend.
Solution: Uninstall/stop all redis instances and download redis-stack instead of normal redis, and run it as a docker container using the following command:
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
try to install redisearch
pip install redisearch
Please add redisearch to requirements.
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.
This issue was closed automatically because it has been stale for 10 days with no activity.