Welcome to Microsoft Q&A! Thanks for posting the question.
If you are using function os.getenv()
then you need to pass the environment variables which you have configured in your machine. For example, If have setup environment variables as
- AZURE_OAI_ENDPOINT with value
https://testopenai.openai.azure.com/
, - AZURE_OAI_KEY with
xxxxxxxxxxxxxx
and - AZURE_OAI_MODEL with value
gpt35turbo
then you need to use the function os.getenv() like below -
azure_oai_endpoint = os.getenv("AZURE_OAI_ENDPOINT")
azure_oai_key = os.getenv("AZURE_OAI_KEY")
azure_oai_model = os.getenv("AZURE_OAI_MODEL")
Please refer to this document to setup the environment variables.
Also, if you want to hardcode these values then you need to use assign the values like below -
azure_oai_endpoint = "https://testopenai.openai.azure.com/"
azure_oai_key = "xxxxxxxxxxxxxxxx"
azure_oai_model = "gpt35turbo"
Please let me know if you have any other questions.
Thanks,
Saurabh
Please 'Accept as answer' and Upvote if it helped so that it can help others in the community looking for help on similar topics.