Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use subscription configuration variables for openai live tests #21287

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 9 additions & 35 deletions sdk/ai/azopenai/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,40 +27,14 @@ stages:
parameters:
ServiceDirectory: "ai/azopenai"
RunLiveTests: true
CloudConfig:
Public:
SubscriptionConfigurations:
- $(sub-config-azure-cloud-test-resources)
- $(sub-config-openai-test-resources) # TestSecrets-openai
EnvVars:
AZURE_TEST_RUN_LIVE: 'true' # use when utilizing the New-TestResources Script

# these come from our keyvault (TestSecrets-openai)
AZURE_CLIENT_ID: $(openai-client-id)
AZURE_CLIENT_SECRET: $(openai-client-secret)
AZURE_TENANT_ID: $(openai-tenant-id)

# Azure OpenAI
AOAI_ENDPOINT: $(AOAI-ENDPOINT)
AOAI_API_KEY: $(AOAI-API-KEY)
AOAI_CHAT_COMPLETIONS_MODEL: $(AOAI-CHAT-COMPLETIONS-MODEL-DEPLOYMENT)
AOAI_COMPLETIONS_MODEL: $(AOAI-COMPLETIONS-MODEL-DEPLOYMENT)
AOAI_EMBEDDINGS_MODEL: $(AOAI-EMBEDDINGS-MODEL-DEPLOYMENT)

# Azure OpenAI "Canary"
AOAI_COMPLETIONS_MODEL_CANARY: $(AOAI-COMPLETIONS-MODEL-DEPLOYMENT-CANARY)
AOAI_API_KEY_CANARY: $(AOAI-API-KEY-CANARY)
AOAI_EMBEDDINGS_MODEL_CANARY: $(AOAI-EMBEDDINGS-MODEL-DEPLOYMENT-CANARY)
AOAI_CHAT_COMPLETIONS_MODEL_CANARY: $(AOAI-CHAT-COMPLETIONS-MODEL-DEPLOYMENT-CANARY)
AOAI_ENDPOINT_CANARY: $(AOAI-ENDPOINT-CANARY)

# OpenAI
OPENAI_API_KEY: $(OPENAI-API-KEY)
OPENAI_ENDPOINT: $(OPENAI-ENDPOINT)
OPENAI_EMBEDDINGS_MODEL: $(OPENAI-EMBEDDINGS-MODEL)
OPENAI_CHAT_COMPLETIONS_MODEL: $(OPENAI-CHAT-COMPLETIONS-MODEL)
OPENAI_COMPLETIONS_MODEL: $(OPENAI-COMPLETIONS-MODEL)

# used for BYOD scenarios with ChatCompletions
COGNITIVE_SEARCH_API_ENDPOINT: $(COGNITIVE-SEARCH-API-ENDPOINT)
COGNITIVE_SEARCH_API_INDEX: $(COGNITIVE-SEARCH-API-INDEX)
COGNITIVE_SEARCH_API_KEY: $(COGNITIVE-SEARCH-API-KEY)

AOAI_ENDPOINT_WHISPER: $(AOAI-ENDPOINT-WHISPER)
AOAI_API_KEY_WHISPER: $(AOAI-API-KEY-WHISPER)
AOAI_MODEL_WHISPER: $(AOAI-MODEL-WHISPER)
AZURE_CLIENT_ID: $(AZOPENAI_CLIENT_ID)
AZURE_CLIENT_SECRET: $(AZOPENAI_CLIENT_SECRET)
AZURE_TENANT_ID: $(AZOPENAI_TENANT_ID)
AZURE_SUBSCRIPTION_ID: $(AZOPENAI_SUBSCRIPTION_ID)
10 changes: 10 additions & 0 deletions sdk/ai/azopenai/test-resources.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This is a placeholder file to trigger environment variable setting via New-TestResources.ps1

@description('The base resource name.')
param baseName string = resourceGroup().name

@description('Which Azure Region to deploy the resource to. Defaults to the resource group location.')
param location string = resourceGroup().location

@description('The principal to assign the role to. This is application object id.')
param testApplicationOid string
Loading