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.45k stars 44.06k forks source link

OpenAI API connection error - Azure base URL being added to call #3562

Closed Monty1122 closed 12 months ago

Monty1122 commented 1 year ago

getting a strange error about misconfigured Azure URL - but the USE_AZURE=FALSE is set and when I run a print I get

"The value of self.use_azure: False"

anybody seen this ?

see this one below

and

raise error.APIConnectionError(

openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'your-base-url-for-azure/chat/completions': No scheme supplied. Perhaps you meant https://your-base-url-for-azure/chat/completions?_

-- ./run.sh All packages are installed. NEWS: 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. WARNING: You are running on summary_memory branch - this is not a supported branch. Welcome back! Would you like me to return to being airline ticket price AI? Asking user via keyboard... Continue with the last settings? Name: airline ticket price AI Role: an ai desinged to find the lowest price on a business class flight ticket one way from sydney australia to san francisco Goals: ['find the lowest prices ', 'find the shortest flight time', 'identify the booking url', 'save the url to a file', 'shutdowb'] API Budget: $1.5 Continue (y/n): y airline ticket price AI has been created with the following details: Name: airline ticket price AI Role: an ai desinged to find the lowest price on a business class flight ticket one way from sydney australia to san francisco Goals:

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/Users/david/Desktop/dkautogpt/Auto-GPT/autogpt/main.py", line 5, in autogpt.cli.main() File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/click/core.py", line 1635, in invoke rv = super().invoke(ctx) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(args, kwargs) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, *kwargs) File "/Users/david/Desktop/dkautogpt/Auto-GPT/autogpt/cli.py", line 90, in main run_auto_gpt( File "/Users/david/Desktop/dkautogpt/Auto-GPT/autogpt/main.py", line 150, in run_auto_gpt agent.start_interaction_loop() File "/Users/david/Desktop/dkautogpt/Auto-GPT/autogpt/agent/agent.py", line 95, in start_interaction_loop assistant_reply = chat_with_ai( File "/Users/david/Desktop/dkautogpt/Auto-GPT/autogpt/llm/chat.py", line 232, in chat_with_ai assistant_reply = create_chat_completion( File "/Users/david/Desktop/dkautogpt/Auto-GPT/autogpt/llm/llm_utils.py", line 164, in create_chat_completion response = api_manager.create_chat_completion( File "/Users/david/Desktop/dkautogpt/Auto-GPT/autogpt/llm/api_manager.py", line 55, in create_chat_completion response = openai.ChatCompletion.create( File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(args, kwargs) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/openai/api_resources/abstract/engine_apiresource.py", line 153, in create response, , api_key = requestor.request( File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/openai/api_requestor.py", line 216, in request result = self.request_raw( _File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/openai/api_requestor.py", line 528, in request_raw raise error.APIConnectionError(

openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'your-base-url-for-azure/chat/completions': No scheme supplied. Perhaps you meant https://your-base-url-for-azure/chat/completions?_

SiT1991 commented 1 year ago

same here

k-boikov commented 1 year ago

Please try the stable branch. And double check you .env.

SiT1991 commented 1 year ago

I have already tried the stable branch. The older versions without the plugins work, only the current one does not.

AlexanderMoen commented 1 year ago

in the .env file I added a # before the OPENAI_API_BASE=your-base-url-for-azure line and it works fine for me now for clarity, it now looks like:

OPENAI_API_BASE=your-base-url-for-azure

SiT1991 commented 1 year ago

That doesn't work either, I already did it at the beginning. It seems that the configuration has no effect whether I activate or deactivate it.

ram-sh commented 1 year ago

where in Azure do you find gpt35-deployment-id-for-azure? i have deployed the model but i cant find that ID... any thoughts? image

github-actions[bot] commented 1 year ago

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.

github-actions[bot] commented 12 months ago

This issue was closed automatically because it has been stale for 10 days with no activity.