AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

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

Open Monty1122 opened this issue 1 year ago • 6 comments

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

  • MissingSchema( requests.exceptions.MissingSchema: Invalid URL 'your-base-url-for-azure/chat/completions': No scheme supplied. Perhaps you meant https://your-base-url-for-azure/chat/completions?

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:

  • find the lowest prices
  • find the shortest flight time
  • identify the booking url
  • save the url to a file
  • shutdowb Using memory of type: LocalCache Using Browser: chrome Traceback (most recent call last): File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/openai/api_requestor.py", line 516, in request_raw result = _thread_context.session.request( File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/requests/sessions.py", line 573, in request prep = self.prepare_request(req) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request p.prepare( File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/requests/models.py", line 368, in prepare self.prepare_url(url, params) File "/Users/david/opt/anaconda3/envs/python_3.10_env/lib/python3.10/site-packages/requests/models.py", line 439, in prepare_url raise MissingSchema( requests.exceptions.MissingSchema: Invalid URL 'your-base-url-for-azure/chat/completions': No scheme supplied. Perhaps you meant https://your-base-url-for-azure/chat/completions?

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_api_resource.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?###

Monty1122 avatar Apr 30 '23 04:04 Monty1122

same here

SiT1991 avatar Apr 30 '23 12:04 SiT1991

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

k-boikov avatar Apr 30 '23 16:04 k-boikov

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

SiT1991 avatar May 01 '23 13:05 SiT1991

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

AlexanderMoen avatar May 05 '23 05:05 AlexanderMoen

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.

SiT1991 avatar May 05 '23 09:05 SiT1991

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

ram-sh avatar May 10 '23 12:05 ram-sh

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] avatar Sep 06 '23 21:09 github-actions[bot]

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

github-actions[bot] avatar Sep 17 '23 01:09 github-actions[bot]