DEV Community

CHANTSZCHEUK
CHANTSZCHEUK

Posted on

My Journey Learning Artificial Intelligence -Day2

First time try Azure OpenAI to make API call on python

create new deployment in Azure OpenAI Studio and set up deploy model to make API calls.
Image description

It need to install the necessary libraries and run the following command in cmd.
pip install -r requirements.txt
Image description

Create .env file for API Keys.
Image description
_A .env file is used to store environment variables, which can be accessed by your application to keep sensitive information like API keys secure and out of your source code. _

Try to run the ValidateSetup.py
Image description

There have a error about rate limit, the reason about this problem is because of Azure Student Account Quotas has limit 1000 tokens.
Image description

Luckily ,I find a free API Key on GitHub and active successfully
Image description

Top comments (0)