Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.08k stars 43.97k forks source link

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

Closed KunLiam closed 1 year ago

KunLiam commented 1 year ago

Duplicates

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 commented 1 year ago

I also face this problem ><

zed-t commented 1 year ago

+1

Collin987 commented 1 year ago

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 commented 1 year ago

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

YoloerGuy commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

YoloerGuy commented 1 year ago

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

Still having the same issue after downloading the latest :(

muleyprasad commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

Wladastic commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

What is separate subscription and a different API key?

WhispersOfOblivion commented 1 year ago

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 commented 1 year ago

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

JuroOravec commented 1 year ago

Duplicate of https://github.com/Torantulino/Auto-GPT/issues/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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

  • [x] 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 commented 1 year ago

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

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

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

如何?

使用命令行 touch auto-gpt.json

RajaRenga commented 1 year ago

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

this did suppress the error on my windows workstation

rbfussell commented 1 year ago

https://github.com/Significant-Gravitas/Auto-GPT/issues/1073#:~:text=Github%20post%20ever.)-,makiman%2D777,-commented%20yesterday

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 commented 1 year ago

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 commented 1 year ago

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

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

dan-reynolds commented 1 year ago

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

PodevynLoris commented 1 year ago

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

stevenjohn commented 1 year ago

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

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

becool9123 commented 1 year ago

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

Pwuts commented 1 year ago

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

PhilosopherChild commented 1 year ago

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 commented 1 year ago

You need to run python -m autogpt --continuous

subcat commented 1 year ago

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

lafllamme commented 1 year ago

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