Skip to content

Commit

Permalink
Use subscription configuration variables for openai live tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp committed Aug 29, 2023
1 parent ccab267 commit 8be4061
Showing 1 changed file with 9 additions and 32 deletions.
41 changes: 9 additions & 32 deletions sdk/ai/azopenai/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +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_DEPLOYMENT: $(AOAI-CHAT-COMPLETIONS-MODEL-DEPLOYMENT)
AOAI_COMPLETIONS_MODEL_DEPLOYMENT: $(AOAI-COMPLETIONS-MODEL-DEPLOYMENT)
AOAI_EMBEDDINGS_MODEL_DEPLOYMENT: $(AOAI-EMBEDDINGS-MODEL-DEPLOYMENT)

# Azure OpenAI "Canary"
AOAI_COMPLETIONS_MODEL_DEPLOYMENT_CANARY: $(AOAI-COMPLETIONS-MODEL-DEPLOYMENT-CANARY)
AOAI_API_KEY_CANARY: $(AOAI-API-KEY-CANARY)
AOAI_EMBEDDINGS_MODEL_DEPLOYMENT_CANARY: $(AOAI-EMBEDDINGS-MODEL-DEPLOYMENT-CANARY)
AOAI_CHAT_COMPLETIONS_MODEL_DEPLOYMENT_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)

AZURE_CLIENT_ID: $(OPENAI_CLIENT_ID)
AZURE_CLIENT_SECRET: $(OPENAI_CLIENT_SECRET)
AZURE_TENANT_ID: $(OPENAI_TENANT_ID)
AZURE_SUBSCRIPTION_ID: $(OPENAI_SUBSCRIPTION_ID)

0 comments on commit 8be4061

Please sign in to comment.