Closed p6002 closed 1 year ago
Hey, can you retry running the ./setup.sh
script? We've recently updated it
Previously I used ./setup.sh --docker
, now after using ./setup.sh
it shows:
Using ./setup.sh --docker
, the container run, but on the page, agent won't start up showing the same error as before:
ERROR when connecting to the OpenAI API key. Please check the API key or try later.
So you need to first fetch and pull the latest changes from master. To confirm this, make sure there is a cli
directory.
Next, the error message shows you have an outdated version of node installed. If you have nvm
nvm install 18
nvm use 18
From there, re-run setup.sh
it will ask you how you're running it (docker-compose, docker, etc) and ask you to provide a set of API keys for the different services we utilize
I managed (after several hours) to get the new version working. (It was necessary to manually add the IP address of the server instead of "localhost" in the .env files.
However, it did not change anything, and the error with the API on the website still appears.
The API is entered correctly during installation (serper also), the same OpenAI API works in other tools without any problem.
This output generates the terminal while the application is running (after ./setup.sh):
i also meet the problem,dose someone have solve the problem
I managed (after several hours) to get the new version working. (It was necessary to manually add the IP address of the server instead of "localhost" in the .env files.
However, it did not change anything, and the error with the API on the website still appears.
The API is entered correctly during installation (serper also), the same OpenAI API works in other tools without any problem.
This output generates the terminal while the application is running (after ./setup.sh):
@p6002 given the error message you've provided it seems you may have something else running on port 8000? Could you be running this or another project locally?
Trying different ways (with setup.sh
or compile everyting manually npm, poetry...), I'm still getting ERROR accessing OpenAI's API. Please check your API key or try again later
, the api key is working locally.
Same issue when using the container version of the deployment
Managed to get it to work: this is for the docker deployment one where i noticed that it was not properly formating the request as the environment variable was set to REWORKD_PLATFORM_OPENAI_API_BASE="https://api.openai.com/v1" the docker logs were showing that the URL it was sending requests to ended up being formated as "https://api.openai.com/v1"/chat/completions and were not communicating After updating the environment variable to REWORKD_PLATFORM_OPENAI_API_BASE=https://api.openai.com/v1 it started properly communicating to the API, also note i used the version 5.0-beta from https://github.com/reworkd/AgentGPT/releases/tag/v.0.5.0-beta
I guess it is connected to the openai has a problem, Because I rewrote create_model function to use AzureChatOpenAI instead of ChatOpenAI, it works...but my openai key can be used in other code
@awtkns given the error message you've provided it seems you may have something else running on port 8000? Could you be running this or another project locally?
I only have Portainer Agent on port 9001
:
This is the result of the ./setup.sh command:
My docker-compose file: https://pastebin.com/DNWMN9dT
Env file: https://pastebin.com/mKgCR6Ud
I think I tried every combination of URLs, currently it looks like the above.
It would be useful to have an example of a filled .env file and docker-compose, for example, for the local server address 192.168.1.100
I could easily convert it to my own data.
Currently, I have no idea what the difference is between the env entries:
PLATFORM_URL=
NEXTAUTH_URL=
REWORKD_PLATFORM_FRONTEND_URL=
Default entries http://localhost:8000/
does not work, in addition one of them contains as an example: http://host.docker.internal:8000
same problem with key if anyone managed to fix
After completely deleting and cloning the new repo (0.6.0)
, I was able to get the agent up and running.
The only changes I made in next/.env
instead of localhost I entered my server IP address here:
NEXT_PUBLIC_BACKEND_URL=
NEXTAUTH_URL=
REWORKD_PLATFORM_FRONTEND_URL=
May I ask how you started it? Don't you have the problem about "blocked by CORS policy"? I also used the 0.6.0 version and completed the relevant changes you mentioned. Here is my problom: I tried running this command (docker-compose -f deploy/docker-compose.yml --project-directory . up --build) and it showed that it was started, but the request (http://localhost:3000/api/agent/start) showed "blocked by CORS policy", and then I added this link(https://cors-anywhere.herokuapp.com/http://localhost:3000/api/agent/start) to fix it, but now 403
I just cloned the repository, ran ./setup.sh, docker_compose method and pasted the first two api. Setup ends with an error because you have to correct next/.env by typing what I specified in the previous post.
Discussed in https://github.com/reworkd/AgentGPT/discussions/605