AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Error creating Redis search index: Index already exists

Open GoMightyAlgorythmGo opened this issue 2 years ago • 6 comments

Duplicates

  • [X] I have searched the existing issues

Steps to reproduce 🕹

( [!!] Edit: Seemingly fixed by (not conformed yet havent restarted them yet meaning exit + restart autoGPT): I found out that when i delete the "MEMORY_INDEX" and add a "MEMORY_INDEX=unique_value_for_each_agent_here" in each agents .env it fixes it at least they seem to use different memorys again.)

I followed the readme Redis Setup and now when i run two different AutoGPT simultaniously it seems to be forced to use the same memory it says "Error creating Redis search index: Index already exists Using memory of type: RedisMemory" Yesterday (09.04.2023) i could run multible autoGPT (with different folders of autoGPT) simultaniously to for example work on 2 different Goals/Projects at the same time.

It might be becuase i set a MEMORY_INDEX env variable with a value and because i can only make 1 variable with the same name at a time it mightt not be able to create a 2. one to index different memory? :

I followed this readme Redis Setup: "Install docker desktop.

Run:

docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest See https://hub.docker.com/r/redis/redis-stack-server for setting a password and additional configuration.

Set the following environment variables:

MEMORY_BACKEND=redis REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD= Note that this is not intended to be run facing the internet and is not secure, do not expose redis to the internet without a password or at all really.

You can optionally set

WIPE_REDIS_ON_START=False To persist memory stored in Redis.

You can specify the memory index for redis using the following:

MEMORY_INDEX=whatever"

Current behavior 😯

Continue (y/n): y Error creating Redis search index: Index already exists Using memory of type: RedisMemory

Expected behavior 🤔

That it uses different mememory (it was suddenly doing a different goal that had nothing to do with the project and was doing what the other instance was doing)

Your prompt 📝

Microsoft Windows [Version 10.0.22621.1485]
(c) Microsoft Corporation. All rights reserved.

C:\Windows\System32>cd C:\Programming\Auto_GPT_AI_2

C:\Programming\Auto_GPT_AI_2>python scripts/main.py --gpt3only --speak
Speak Mode:  ENABLED
GPT3.5 Only Mode:  ENABLED
Request failed with status code: 401
Response content: b'{"detail":{"status":"quota_exceeded","message":"This request exceeds your quota. You have 16 characters remaining, while 65 characters are required for this request.","character_used":10049,"character_limit":10000}}'
Welcome back!  Would you like me to return to being Coder_GPT_2?
Continue with the last settings?
Name:  Coder_GPT_2
Role:  an AI designed to autonomously develop and improve a programm using a free language model as a base of a multilayered system and improve it with (for example: neural networks, machinelerning and so on). Eventually it should improve itself by runing on the users pc. (Example: using selfplay, designing or solving challenges and so on.)(It should mainly be text-based.)
Goals: ['Asign agents that can asign a agent that can plan and asign agents to continue the plan or execute the plan and create a agent to help them. This should not be further than 8 agents deep. (Make sure not too many agents are created that might crash autoGPT.)', 'Use coding and copying code/software to assist in developing the proramm.', 'Make sure the user suggestions and remembered and executed.', 'Execute preventive steps to continue where left off if program exits or crahses, by going for small milestones that add up.', 'Track if you could complete the last milestone if not go for a even smaller milestone. Make sure you can remember the last milestone when the program crashes or shuts off.']
Continue (y/n): y

GoMightyAlgorythmGo avatar Apr 10 '23 10:04 GoMightyAlgorythmGo

Does your WIPE_REDIS_ON_START .env variable equal False? If so, this is normal behavior.

onekum avatar Apr 10 '23 12:04 onekum

Does your WIPE_REDIS_ON_START .env variable equal False? If so, this is normal behavior.

Interesting. I haven't restarted the pc or the agents to check out if the wipe_redis thing does anything. I have put it to false so they will remember what they did the last session hopefully otherwise i fear they might start from scratch -> repeating work.

GoMightyAlgorythmGo avatar Apr 10 '23 14:04 GoMightyAlgorythmGo

Well, from my understanding, WIPE_REDIS_ON_START needs to be True to register a new prompt. However, if you're just getting the Index already exists error, you can safely ignore it as it means the script is using the same memory as it was in the last session.

onekum avatar Apr 10 '23 14:04 onekum

It seems this area is very much needing some focus and the ability to switch vs this present behavior, see this suggestion: https://github.com/Torantulino/Auto-GPT/issues/831

ylluminate avatar Apr 11 '23 19:04 ylluminate

Well, from my understanding, WIPE_REDIS_ON_START needs to be True to register a new prompt. However, if you're just getting the Index already exists error, you can safely ignore it as it means the script is using the same memory as it was in the last session.

oh ok so it was good that i got that good to know.

Error creating Redis search index: Index already exists Using memory of type: RedisMemory

GoMightyAlgorythmGo avatar Apr 12 '23 12:04 GoMightyAlgorythmGo

This was resolved when I deleted my ai_settings.json file. After restoring it, still got the error but was able to ignore it.

light-handle avatar Apr 18 '23 14:04 light-handle

Since its resolved, I'll close this issue. If its not please raise a separate issue with new traceback and logs so we can investigate further. Thanks!

Qoyyuum avatar Apr 20 '23 08:04 Qoyyuum

The error still appears when the env variable is set to false, I think it's best to look like a notification other than an error, this will scare off a lot of users. Maybe run an if statement that shows that it's normal behavior.

mjdyibrahim avatar Apr 21 '23 03:04 mjdyibrahim