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

How to get Auto-GPT to work with request to Azure Open AI deployed models? #3959

Closed
1 task done
Mitrandir-main opened this issue May 7, 2023 · 5 comments
Closed
1 task done

Comments

@Mitrandir-main
Copy link

⚠️ Search for existing issues first ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Windows

Which version of Auto-GPT are you using?

Latest Release

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

No response

Current behavior 😯

Hello,

I am trying to use my Azure gpt-3.5 model deployment for Auto-GPT, but when I enter prompt I always get Authorization error.
I run gpt3 only mode as I dont have gpt 4 acess still.

Where should i get the value for OPENAI_API_KEY from, I have tried with the endpoint key and authorization token from Azure login.

Do you have any suggestions on where the problem might be?

This is my .env

OPENAI_API_KEY= "I put endpoint key here"
USE_AZURE=True

This is my azure.yaml

azure_api_type: azure_ad
azure_api_base: https://name-here.openai.azure.com
azure_api_version: 2023-03-15-preview
azure_model_map:
fast_llm_model_deployment_id: "model gpt3 name"
smart_llm_model_deployment_id: "model gpt3 name"
embedding_model_deployment_id: "model ada2 name"

Expected behavior 🤔

Auto_GPT runs fine but is not able to respond and do requests to Azure Open AI API, has anyone got similar problems with getting Auto_GPT to work with Aure?

Your prompt 📝

# 

Your Logs 📒

<openai.error.APIError: Invalid response object from API: '{ "statusCode": 401, "message": "Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired." }' (HTTP response code was 401)
Press any key to continue>
@Mitrandir-main
Copy link
Author

When I try using token from azure login I get this error log:

self._interpret_response_line(

File "C:\Python311\Lib\site-packages\openai\api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(
openai.error.AuthenticationError: Principal does not have access to API/Operation.

@ntindle
Copy link
Member

ntindle commented May 8, 2023

We don't have access to azure so we can't really help here. Unless we get access we may need to remove the functionality. If you have access and can put us in touch, that would be lovely.

@ntindle ntindle closed this as completed May 8, 2023
@anonhostpi
Copy link

anonhostpi commented May 8, 2023

@ntindle just FTR, but I believe access to Azure is typically pretty inexpensive.

I pay for a single-user enterprise license for an Office 365 tenant (and it comes with azure) for only $12/month - it also comes with the rest of everything that comes with an enterprise license (Sharepoint, DataVerse/CRM, Power Automate, etc.).

I am mostly unfamiliar with how to actually use Azure, but from my peers I've heard that it isn't expensive to use. Usually only costing a few cents on single-user accounts.

Not saying that you should go out and buy a license, but if you are interested, it isn't expensive.

@ntindle
Copy link
Member

ntindle commented May 8, 2023

The OpenAI api for azure is closed access right now so even if we have an azure account (which we do) we don't have access to the open ai services through it

@anonhostpi
Copy link

Well, if @Mitrandir-main is proficient with Azure, I'm assuming they are probably decent with programming.

If that is the case, @Mitrandir-main, we would happily welcome you to the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants