Skip to content

Commit 0c853d2

Browse files
authored
Use subscription configuration variables for openai live tests (Azure#21287)
* Use subscription configuration variables for openai live tests * Add bicep file * add bicep comment
1 parent 81c4f03 commit 0c853d2

File tree

2 files changed

+19
-35
lines changed

2 files changed

+19
-35
lines changed

sdk/ai/azopenai/ci.yml

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,40 +27,14 @@ stages:
2727
parameters:
2828
ServiceDirectory: "ai/azopenai"
2929
RunLiveTests: true
30+
CloudConfig:
31+
Public:
32+
SubscriptionConfigurations:
33+
- $(sub-config-azure-cloud-test-resources)
34+
- $(sub-config-openai-test-resources) # TestSecrets-openai
3035
EnvVars:
3136
AZURE_TEST_RUN_LIVE: 'true' # use when utilizing the New-TestResources Script
32-
33-
# these come from our keyvault (TestSecrets-openai)
34-
AZURE_CLIENT_ID: $(openai-client-id)
35-
AZURE_CLIENT_SECRET: $(openai-client-secret)
36-
AZURE_TENANT_ID: $(openai-tenant-id)
37-
38-
# Azure OpenAI
39-
AOAI_ENDPOINT: $(AOAI-ENDPOINT)
40-
AOAI_API_KEY: $(AOAI-API-KEY)
41-
AOAI_CHAT_COMPLETIONS_MODEL: $(AOAI-CHAT-COMPLETIONS-MODEL-DEPLOYMENT)
42-
AOAI_COMPLETIONS_MODEL: $(AOAI-COMPLETIONS-MODEL-DEPLOYMENT)
43-
AOAI_EMBEDDINGS_MODEL: $(AOAI-EMBEDDINGS-MODEL-DEPLOYMENT)
44-
45-
# Azure OpenAI "Canary"
46-
AOAI_COMPLETIONS_MODEL_CANARY: $(AOAI-COMPLETIONS-MODEL-DEPLOYMENT-CANARY)
47-
AOAI_API_KEY_CANARY: $(AOAI-API-KEY-CANARY)
48-
AOAI_EMBEDDINGS_MODEL_CANARY: $(AOAI-EMBEDDINGS-MODEL-DEPLOYMENT-CANARY)
49-
AOAI_CHAT_COMPLETIONS_MODEL_CANARY: $(AOAI-CHAT-COMPLETIONS-MODEL-DEPLOYMENT-CANARY)
50-
AOAI_ENDPOINT_CANARY: $(AOAI-ENDPOINT-CANARY)
51-
52-
# OpenAI
53-
OPENAI_API_KEY: $(OPENAI-API-KEY)
54-
OPENAI_ENDPOINT: $(OPENAI-ENDPOINT)
55-
OPENAI_EMBEDDINGS_MODEL: $(OPENAI-EMBEDDINGS-MODEL)
56-
OPENAI_CHAT_COMPLETIONS_MODEL: $(OPENAI-CHAT-COMPLETIONS-MODEL)
57-
OPENAI_COMPLETIONS_MODEL: $(OPENAI-COMPLETIONS-MODEL)
58-
59-
# used for BYOD scenarios with ChatCompletions
60-
COGNITIVE_SEARCH_API_ENDPOINT: $(COGNITIVE-SEARCH-API-ENDPOINT)
61-
COGNITIVE_SEARCH_API_INDEX: $(COGNITIVE-SEARCH-API-INDEX)
62-
COGNITIVE_SEARCH_API_KEY: $(COGNITIVE-SEARCH-API-KEY)
63-
64-
AOAI_ENDPOINT_WHISPER: $(AOAI-ENDPOINT-WHISPER)
65-
AOAI_API_KEY_WHISPER: $(AOAI-API-KEY-WHISPER)
66-
AOAI_MODEL_WHISPER: $(AOAI-MODEL-WHISPER)
37+
AZURE_CLIENT_ID: $(AZOPENAI_CLIENT_ID)
38+
AZURE_CLIENT_SECRET: $(AZOPENAI_CLIENT_SECRET)
39+
AZURE_TENANT_ID: $(AZOPENAI_TENANT_ID)
40+
AZURE_SUBSCRIPTION_ID: $(AZOPENAI_SUBSCRIPTION_ID)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This is a placeholder file to trigger environment variable setting via New-TestResources.ps1
2+
3+
@description('The base resource name.')
4+
param baseName string = resourceGroup().name
5+
6+
@description('Which Azure Region to deploy the resource to. Defaults to the resource group location.')
7+
param location string = resourceGroup().location
8+
9+
@description('The principal to assign the role to. This is application object id.')
10+
param testApplicationOid string

0 commit comments

Comments
 (0)