This repository contains very simple code to demonstrate using the Azure OpenAI Service using Python with Entra ID authentication.
It demonstrates three patterns:
- Using the OpenAI Python SDK with a service principal with a client id and client secret.
- Using the OpenAI Python SDK with a user-assigned managed identity.
- Using the OpenAI REST API with a service principal with a client id and client secret.
You can read more about the options for authentication within the Azure OpenAI Service at this blog.