Skip to content

Commit

Permalink
Fix deployment when using OpenAI (as opposed to AOAI) (microsoft#519)
Browse files Browse the repository at this point in the history
### Motivation and Context
Using the deployment scripts or Deploy to Azure button is broken when
using an OpenAI account (as opposed to an AOAI one).

### Description
Create the proper settings in the bicep/ARM template

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
  • Loading branch information
glahaye authored and Ryangr0 committed Oct 26, 2023
1 parent 8d6ff2a commit 973e276
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
26 changes: 25 additions & 1 deletion scripts/deploy/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ param deploySpeechServices bool = true
@description('Whether to deploy the web searcher plugin, which requires a Bing resource')
param deployWebSearcherPlugin bool = false

@description('Whether to deploy binary packages to the cloud')
@description('Whether to deploy pre-built binary packages to the cloud')
param deployPackages bool = true

@description('Region for the resources')
Expand Down Expand Up @@ -385,6 +385,18 @@ resource appServiceWebConfig 'Microsoft.Web/sites/config@2022-09-01' = {
name: 'SemanticMemory:Services:AzureOpenAIEmbedding:Deployment'
value: embeddingModel
}
{
name: 'SemanticMemory:Services:OpenAI:TextModel'
value: completionModel
}
{
name: 'SemanticMemory:Services:OpenAI:EmbeddingModel'
value: embeddingModel
}
{
name: 'SemanticMemory:Services:OpenAI:APIKey'
value: aiApiKey
}
{
name: 'Plugins:0:Name'
value: 'Klarna Shopping'
Expand Down Expand Up @@ -568,6 +580,18 @@ resource appServiceMemoryPipelineConfig 'Microsoft.Web/sites/config@2022-09-01'
name: 'SemanticMemory:Services:AzureFormRecognizer:APIKey'
value: ocrAccount.listKeys().key1
}
{
name: 'SemanticMemory:Services:OpenAI:TextModel'
value: completionModel
}
{
name: 'SemanticMemory:Services:OpenAI:EmbeddingModel'
value: embeddingModel
}
{
name: 'SemanticMemory:Services:OpenAI:APIKey'
value: aiApiKey
}
{
name: 'Logging:LogLevel:Default'
value: 'Information'
Expand Down
Loading

0 comments on commit 973e276

Please sign in to comment.