Skip to content

Instantly share code, notes, and snippets.

@pavlovmilen
Created May 11, 2025 10:35
Show Gist options
  • Save pavlovmilen/5e8ec127cf32485a30c2dafd9f661cc0 to your computer and use it in GitHub Desktop.
Save pavlovmilen/5e8ec127cf32485a30c2dafd9f661cc0 to your computer and use it in GitHub Desktop.
gpt_model_client
gpt_model_client = AzureOpenAIChatCompletionClient(
model="gpt-4.1-mini-2025-04-14",
api_version="2024-06-01",
azure_deployment="gpt-4.1-mini",
azure_endpoint=os.environ.get("AZURE_OPEN_AI_API_ENDPOINT_SWEDEN"),
#azure_ad_token_provider=token_provider, # Optional if you choose key-based authentication.
api_key=os.environ.get("AZURE_OPEN_AI_API_KEY_SWEDEN"),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment