Closed jaxblack closed 1 year ago
If I am not wrong from reading this https://msandbu.org/openai-vs-azure-openai/
Azure OpenAI API key is a specific type of API key that allows you to access OpenAI's GPT-3 language model through the Azure Cognitive Services. This means that you can use the Azure portal to create and manage your Azure OpenAI API key, and you will be billed by Microsoft Azure for any usage of the API.
On the other hand, the OpenAI API key is a general API key that allows you to access all of the OpenAI APIs, including GPT-3, through the OpenAI API platform. This means that you can create and manage your OpenAI API key through the OpenAI website, and you will be billed directly by OpenAI for any usage of the API.
In summary, the main difference between the two API keys is the platform they are associated with and the billing method used for their usage. Azure OpenAI API key is associated with Azure Cognitive Services and is billed by Microsoft Azure, while OpenAI API key is associated with the OpenAI platform and is billed by OpenAI.
I also want to use Azure api-key
(auto-gpt) ➜ Auto-GPT git:(master) ✗ grep -nFR USE_AZURE *
README.md:102:- If you want to use GPT on an Azure instance, set USE_AZURE
to True
and provide the OPENAI_AZURE_API_BASE
, OPENAI_AZURE_API_VERSION
and OPENAI_AZURE_DEPLOYMENT_ID
values as explained here: https://pypi.org/project/openai/ in the Microsoft Azure Endpoints
section. Additionally you need separate deployments for both embeddings and chat. Add their ID values to OPENAI_AZURE_CHAT_DEPLOYMENT_ID
and OPENAI_AZURE_EMBEDDINGS_DEPLOYMENT_ID
respectively
scripts/config.py:47: self.use_azure = os.getenv("USE_AZURE") == 'True'
Binary file scripts/pycache/config.cpython-38.pyc matches
Hi all this is definitely a something we want to support. I can support by helping to review any prs for this 😊
Also need this feature, hope it will be supported soon
Hi all this is definitely a something we want to support. I can support by helping to review any prs for this 😊
me too pls, waiting for next release
We'd like this feature as well, please.
me too
me too,please
How is it going so far? I am already very excited about it
me too
me too,please
I am digging into Azure Semantic Kernel and its examples... and most of them reference the following:
Env.Var("AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME"), Env.Var("AZURE_OPENAI_EMBEDDINGS_ENDPOINT"), Env.Var("AZURE_OPENAI_EMBEDDINGS_KEY"))
I had not idea that Embeddings require separate set of Name/Endpoint/Key... How do I get them?
I have this working internally, at my current employer, with hardcoded api_key
s and model_name
s, deployment_id
s, etc.. We're just testing it out. We broke OpenAI to get Azure OpenAI working as easily as possible. Plus we still don't have access to 3.5-16k so summaries are broken.
I might, eventually, tidy it up and submit a PR. But it is not even close to a priority currently :/. I'm more than happy to provide any help if someone is implementing this and gets stuck.
hey this was fixed in #1165
In settings.py you can now enable azure
# Azure OpenAI
azure_openai_api_version: str = "2023-06-01-preview"
azure_openai_api_key: str = ""
azure_openai_api_base: str = ""
azure_openai_deployment_name: str = ""
Note that agentgpt uses function calling which is not supported by azure as of yet so it will fall back to openai in some cases :)
Note that agentgpt uses function calling which is not supported by azure as of yet so it will fall back to openai in some cases :)
I did manage to get it working, including functions. Versions 0613 support functions (source).
I think Microsoft is rolling them out slowly. What I didn't manage to get working properly were the summaries because I don't have access to the 16k model. Idk if there's any solution there.
hey this was fixed in #1165
In settings.py you can now enable azure
# Azure OpenAI azure_openai_api_version: str = "2023-06-01-preview" azure_openai_api_key: str = "" azure_openai_api_base: str = "" azure_openai_deployment_name: str = ""
Note that agentgpt uses function calling which is not supported by azure as of yet so it will fall back to openai in some cases :)
hellow, even though I added those options as well.
azure_openai_api_version: str = "2023-06-01-preview"
azure_openai_api_key: str = "<my key>"
azure_openai_api_base: str = "https://<my domain>.openai.azure.com/"
azure_openai_deployment_name: str = "gpt4"
However, it always says: Authentication error: Ensure a valid API key is being used. The next interface also only has the gpt3.5 gpt-3.5-16k gpt-4 option in the settings. It seems agentgpt is still using the openai api. What should I do?
I have this working internally, at my current employer, with hardcoded
api_key
s andmodel_name
s,deployment_id
s, etc.. We're just testing it out. We broke OpenAI to get Azure OpenAI working as easily as possible. Plus we still don't have access to 3.5-16k so summaries are broken.I might, eventually, tidy it up and submit a PR. But it is not even close to a priority currently :/. I'm more than happy to provide any help if someone is implementing this and gets stuck.
@Zizico2 How did you get this working? I've been trying to set the env variables in /next/.env and also tried changing settings via /platform/reworkd_platform/settings.py, but haven't had any luck.
I have this working internally, at my current employer, with hardcoded
api_key
s andmodel_name
s,deployment_id
s, etc.. We're just testing it out. We broke OpenAI to get Azure OpenAI working as easily as possible. Plus we still don't have access to 3.5-16k so summaries are broken. I might, eventually, tidy it up and submit a PR. But it is not even close to a priority currently :/. I'm more than happy to provide any help if someone is implementing this and gets stuck.@Zizico2 How did you get this working? I've been trying to set the env variables in /next/.env and also tried changing settings via /platform/reworkd_platform/settings.py, but haven't had any luck.
I see that they deprecated the functions calling and added it under the tools API: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling?tabs=python.
@awtkns maybe something to add to a new or existing feature?
Azure api-key is different from openai api-key. And it should be used.