Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file. #1073

Closed
1 task done
KunLiam opened this issue Apr 13, 2023 · 38 comments
Closed
1 task done
Labels
bug Something isn't working function: memory

Comments

@KunLiam
Copy link

KunLiam commented Apr 13, 2023

Duplicates

  • I have searched the existing issues

Steps to reproduce 🕹

No response

Current behavior 😯

Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.
Using memory of type: LocalCache
Think....

Expected behavior 🤔

Could you tell me what the problem is? Where is auto-gpt.json?

Your prompt 📝

# Paste your prompt here
@crazystar945
Copy link

I also face this problem ><

@zed-t
Copy link

zed-t commented Apr 13, 2023

+1

@Collin987
Copy link

Collin987 commented Apr 13, 2023

I faced the same issue and ChatGPT solved it for me.

Create the missing file: If the 'auto-gpt.json' file is supposed to exist in your project directory, you can simply create a new file with this name. This can be done using a text editor or by running a command in your terminal/command prompt (e.g., touch auto-gpt.json on Unix-based systems or echo.> auto-gpt.json on Windows).

@xhb-fortunate
Copy link

from the tests files ,and come to integration file.create the file . and the problem is solved.

@YoloerGuy
Copy link

from the tests files ,and come to integration file.create the file . and the problem is solved.

I tried creating the auto-gpt.json file everywhere in the folder and still get the same error

Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.

How?

@becool9123
Copy link

from the tests files ,and come to integration file.create the file . and the problem is solved.

I tried creating the auto-gpt.json file everywhere in the folder and still get the same error

Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.

How?

same issue, I'm using macOS Ventura 13.3.1, M1 Pro chip.
anyone help?

@muleyprasad
Copy link

Looks like this is fixed now, just take latest and it should go away.

@YoloerGuy
Copy link

Looks like this is fixed now, just take latest and it should go away.

Still having the same issue after downloading the latest :(

@muleyprasad
Copy link

Looks like this is fixed now, just take latest and it should go away.

Still having the same issue after downloading the latest :(

For me, it went away after successfully running auto-gpt once. The execution did create auto-gpt.json automatically and used it in subsequent runs. That warning is not an error, something else might be preventing your runs. Please paste the text of the error you are seeing on your terminal.

@wgermino
Copy link

wgermino commented Apr 13, 2023

One thing that removed the error for me was adding the "auto-gpt.json" file to the root \Auto-GPT> folder. The first attempt failed, I think because it was recognized as a TXT file even after renaming it. I then tried copying and pasting the following file:
image
(.gitignore), which seems to be different from a plain TXT file. I renamed the copy "auto-gpt.json" and removed the characters that were in the original file (so it's completely blank). I started the program again and this time the error message was gone. Instead, I received this error:

Traceback (most recent call last):
  File "C:\AutoGPT\Auto-GPT\scripts\main.py", line 461, in <module>
    main()
  File "C:\AutoGPT\Auto-GPT\scripts\main.py", line 365, in main
    assistant_reply = chat.chat_with_ai(
  File "C:\AutoGPT\Auto-GPT\scripts\chat.py", line 126, in chat_with_ai
    assistant_reply = create_chat_completion(
  File "C:\AutoGPT\Auto-GPT\scripts\llm_utils.py", line 50, in create_chat_completion
    raise RuntimeError("Failed to get response after 5 retries")
RuntimeError: Failed to get response after 5 retries

So I'm not certain if I made progress or just created another error, but I thought I would share anyways. I was wondering if there should be anything in the JSON file.

@muleyprasad
Copy link

Did you configured payment information in openai account? You will get a token without it but API calls will fail.

@Wladastic
Copy link
Contributor

ai_config.py tries to get the config from root folder:

# Soon this will go in a folder where it remembers more stuff about the run(s)
SAVE_FILE = os.path.join(os.path.dirname(__file__), '..', 'ai_settings.yaml')

This should be changed as well, as app/../ is root of the docker

@tylewis1499
Copy link

having the same issue. I took a random json file and removed its contents and renamed it to auto-gpt and put it in the Auto-GPT folder. now there is no warning message, but it still says "Using memory of type: LocalCache". Then it thinks and gives the same runtime error. Is this due to it not using pinecone? I put the pinecone api key in just as i did the openai api key, as well as the region. I am on the east coast of us though, and for some reason the region is asia-southeast1-gcp, which I thought was odd and could be the issue. Finally in the .env file it says MEMORY_BACKEND=local. Perhaps this needs to be changed? I tried changing it to pinecone but nothing happened.

@dan-reynolds
Copy link

dan-reynolds commented Apr 14, 2023

I am having the same problem as wgermino
raise RuntimeError("Failed to get response after 5 retries") RuntimeError: Failed to get response after 5 retries

I am paying for the chatGPT 'Pro' Subscription. Do I also need to pay to access the API?
I generated an API key fine.

@WhispersOfOblivion
Copy link

I am paying for the chatGPT 'Pro' Subscription. Do I also need to pay to access the API? I generated an API key fine.

I believe the API requires a separate subscription and a different API key. If I remember right the free key doesn't work for this and the Pro subscription is only for web page access to ChatGPT.

(If I did this wrong, I have cataracts & using a single eye @30% AND this was my 1st Github post ever.)

@makiman-777
Copy link

What is separate subscription and a different API key?

@WhispersOfOblivion
Copy link

WhispersOfOblivion commented Apr 14, 2023

Create the missing file: If the 'auto-gpt.json' file is supposed to exist in your project directory, you can simply create a new file with this name. This can be done using a text editor or by running a command in your terminal/command prompt (e.g., touch auto-gpt.json on Unix-based systems or echo.> auto-gpt.json on Windows).

For Windows you can also use the Command prompt to enter "copy con auto-gpt.json", hit enter, then hit CTRL+Z and hit enter again. This will create an empty file, without the period in it. For those who are curious, copy con tells the shell to copy what you type from the keyboard console and write it to a file. Within the copy con command CTRL+Z causes it to place the end of file, save and exit as soon as you hit enter. Dunno if this helps or not.

@Nickonomic
Copy link

It produced an error when I made an empty file. Instead, it must contain '{}' inside it. That solves the problem.

@JuroOravec
Copy link
Contributor

Duplicate of #1189. @888yyh would you close this one issue if it indeed is the same thing?

(I had this issue too - It's that we haven't opted into "paid account" on OpenAI's billing page. The auto-gpt.json is a red herring - it's a last messag we see, but it's unrelated to the API limit reached, the script can work without the auto-gpt.json)

I'm making an MR as we speak to update the README section on OpenAI's API key, to make this clear.

@wgermino
Copy link

Did you configured payment information in openai account? You will get a token without it but API calls will fail.

Thank you. Yes, that was the issue---my OpenAi account. I added payment info and now it works. Thanks!

@wgermino
Copy link

For Windows you can also use the Command prompt to enter "copy con auto-gpt.json", hit enter, then hit CTRL+Z and hit enter again. This will create an empty file, without the period in it. ...

Great shortcut. Thank you!

@xhb-fortunate
Copy link

from the tests files ,and come to integration file.create the file . and the problem is solved.

I tried creating the auto-gpt.json file everywhere in the folder and still get the same error

Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.

How?
You should create in the test file. and here is the example

image

@WhispersOfOblivion
Copy link

WhispersOfOblivion commented Apr 15, 2023

I tried creating the auto-gpt.json file everywhere in the folder and still get the same error
Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.

I created the 'auto-gpt.json' file and copied it to EVERY Auto-GPT subdirectory. Then I ran Main.py a couple times and afterward, the ONLY 'auto-gpt.json' file that changed was the one in the scripts folder where Main.py is located. Afterwards, I deleted all the extra 'auto-gpt.json' files and ran Main.py again. Since it still seemed to work correctly, I am assuming that it belongs in the Scripts folder, NOT in the root folder.

I am currently on the Stable branch, if that helps or matters.

@4brainiacs
Copy link

Into the main auto-gpt directory create a JSON file "auto-gpt" using the following lines:

{ "Cache": { "Path": "localcache", "MaxSize": 1073741824, "Shards": 1024, "BlobSize": 1048576, "Mode": 493 } }

Duplicates

  • I have searched the existing issues

Steps to reproduce 🕹

No response

Current behavior 😯

Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file. Using memory of type: LocalCache Think....

Expected behavior 🤔

Could you tell me what the problem is? Where is auto-gpt.json?

Your prompt 📝

# Paste your prompt here

@KunLiam
Copy link
Author

KunLiam commented Apr 15, 2023

从测试文件,并来到集成文件。创建文件。问题就解决了。

我尝试在文件夹中的任何地方创建 auto-gpt.json 文件,但仍然出现相同的错误

警告:文件“auto-gpt.json”不存在。本地内存不会保存到文件中。

如何?

使用命令行 touch auto-gpt.json

@RajaRenga
Copy link

{ "Cache": { "Path": "localcache", "MaxSize": 1073741824, "Shards": 1024, "BlobSize": 1048576, "Mode": 493 } }

this did suppress the error on my windows workstation

@rbfussell
Copy link

#1073

What is separate subscription and a different API key?

This has nothing to do with this issue, go to discord reddit or somewhere else.

https://openai.com/pricing

@lerivas
Copy link

lerivas commented Apr 16, 2023

I don't know why they start doing things that don't work from the beginning. I get the same error as well. They should be more aware of the errors they leave in the updates.

@KunLiam
Copy link
Author

KunLiam commented Apr 16, 2023

你有没有在openai账户配置支付信息?如果没有它,您将获得一个令牌,但 API 调用将失败。

Do I have to set up a paid account to use it?

@dan-reynolds
Copy link

Yes. You need a paid subscription. This is separate to the chatGPT pro subscription.

@PodevynLoris
Copy link

Check if you are using Python 3.10 , then re-install the requirements

@stevenjohn
Copy link

Just to say I have the same issue, running latest pull from master (yesterday), notes:

  • The error message is "Warning: The file 'AutoGpt.json' does not exist", I notice the caps
  • I have added blank files (on Mac) to root directory, scripts, and autogpt
  • I have added both auto-gpt.json and AutoGpt.json in case it should be the same format as the error
  • I am running on Mac M1 using Docker

Don't seem to be able to get rid of the error

@becool9123
Copy link

I solved this problem by using Redis as memory (see https://github.com/Significant-Gravitas/Auto-GPT#memory-backend-setup)

@Pwuts
Copy link
Member

Pwuts commented Apr 19, 2023

@stevenjohn please post your log when reporting an issue. Does it help if you create a blank JSON file with the content {}?

@Pwuts Pwuts changed the title Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file. Using memory of type: LocalCache Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file. Apr 19, 2023
@Pwuts Pwuts added bug Something isn't working function: memory labels Apr 19, 2023
@PhilosopherChild
Copy link

Instead of getting continous dialogue I return this

Y:\AI\AutoGPT\Auto-GPT>python scripts/main.py --continous
Please run:
python -m autogpt

Y:\AI\AutoGPT\Auto-GPT>python -m autogpt
Welcome back! Would you like me to return to being Book?
Continue with the last settings?

It then makes it manual mode instead of continuous. Also I continue to get .json issues despite making a auto-gpt.json file.

@k-boikov
Copy link
Contributor

You need to run python -m autogpt --continuous

@Qoyyuum Qoyyuum closed this as completed Apr 20, 2023
@subcat
Copy link

subcat commented Apr 25, 2023

I created a blank auto-gpt.json file and the error went away.

@lafllamme
Copy link

lafllamme commented Apr 27, 2023

I used a docker setup.

I cloned this repo:
git clone -b stable https://github.com/Significant-Gravitas/Auto-GPT.git

then I checked, if the .env.template was there, copied it's content with this:
cp .env.template .env

so I could add my open api key and set the value.

I saw, that I had no 'auto-gpt.json', I created one with touch and let it empty.

I builded and run the container using this:

docker-compose build auto-gpt

docker-compose run --rm auto-gpt
 docker-compose run --rm auto-gpt
Creating autogpt_redis_1 ... done
Creating autogpt_auto-gpt_run ... done
Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.
NEWS:  ::UPDATED:: Welcome to Auto-GPT! We'll keep you informed of the latest news and features by printing messages here. If you don't wish to see this message, you can run Auto-GPT with the --skip-news flag # INCLUDED COMMAND 'send_tweet' IS DEPRICATED, AND WILL BE REMOVED IN THE NEXT STABLE RELEASE Base Twitter functionality (and more) is now covered by plugins: https://github.com/Significant-Gravitas/Auto-GPT-Plugins ## Changes to Docker configuration The workdir has been changed from /home/appuser to /app. Be sure to update any volume mounts accordingly. 
Welcome to Auto-GPT!  run with '--help' for more information.
Create an AI-Assistant:  Enter the name of your AI and its role below. Entering nothing will load defaults.
Name your AI:  For example, 'Entrepreneur-GPT'

I receive this error message:
Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.

Image


Edit: this is the fix

I resolved this by doing the following (Mac OS, M1, Running docker):

Create an empty file in the root folder:

touch auto-gpt.json

Modify the Dockerfile, find this section:

Copy the application files

COPY --chown=appuser:appuser autogpt/ ./autogpt

Add this:

Copy auto-gpt.json

COPY --chown=appuser:appuser auto-gpt.json .

Errors goes away.
joserodolfofreitas reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working function: memory
Projects
Archived in project
Development

No branches or pull requests