Skip to content

Commit 8f293c8

Browse files
coolcshnjejongio
authored
Update the gpt model from davinci to turbo (Azure-Samples#116)
## Purpose Switching the default model from davinci to turbo because davinci was depreciated on July 6th and you can no longer deploy with it. ## Does this introduce a breaking change? [ ] Yes [X ] No ## Pull Request Type What kind of change does this Pull Request introduce? [X ] Bugfix [ ] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Documentation content changes [ ] Other... Please describe: ``` ## How to Test * Get the code ``` git clone [repo-address] cd [repo-name] git checkout [branch-name] npm install ``` * Test the code <!-- Add steps to run the tests suite and/or manually test --> ``` ``` ## What to Check Verify that the following are valid * ... ## Other Information <!-- Add any other helpful information that may be needed here. --> --------- Co-authored-by: Scott Hunter <[email protected]> Co-authored-by: Jon Gallant <[email protected]>
1 parent 8224a85 commit 8f293c8

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

app/Dockerfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

3-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
3+
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
44
WORKDIR /app
55
EXPOSE 80
66
EXPOSE 443
@@ -14,12 +14,10 @@ COPY ["shared/", "shared/"]
1414
RUN dotnet restore "backend/MinimalApi.csproj"
1515

1616
WORKDIR "/src/backend"
17-
RUN dotnet build "MinimalApi.csproj" -c Release -o /app/build
18-
1917
FROM build AS publish
20-
RUN dotnet publish "MinimalApi.csproj" -c Release -o /app/publish /p:UseAppHost=false
18+
RUN dotnet publish "MinimalApi.csproj" -o /app
2119

2220
FROM base AS final
2321
WORKDIR /app
24-
COPY --from=publish /app/publish .
22+
COPY --from=publish /app .
2523
ENTRYPOINT ["dotnet", "MinimalApi.dll"]

app/backend/MinimalApi.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<UserSecretsId>6c0daa7e-5118-4a21-8aeb-f7b977fe2f01</UserSecretsId>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
10+
<PublishRelease>true</PublishRelease>
1011
</PropertyGroup>
1112

1213
<ItemGroup>

infra/main.bicep

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ param formRecognizerSkuName string = 'S0'
4848
@description('Capacity of the GPT deployment. Default: 30')
4949
param gptDeploymentCapacity int = 30
5050

51-
@description('Name of the GPT deployment. Default: davinci')
52-
param gptDeploymentName string = 'davinci'
51+
@description('Name of the GPT deployment. Default: turbo')
52+
param gptDeploymentName string = 'turbo'
5353

54-
@description('Name of the GPT model. Default: text-davinci-003')
55-
param gptModelName string = 'text-davinci-003'
54+
@description('Name of the GPT model. Default: gpt-35-turbo')
55+
param gptModelName string = 'gpt-35-turbo'
5656

5757
@description('Name of the Azure Key Vault')
5858
param keyVaultName string = ''
@@ -296,7 +296,7 @@ module openAi 'core/ai/cognitiveservices.bicep' = {
296296
model: {
297297
format: 'OpenAI'
298298
name: gptModelName
299-
version: '1'
299+
version: '0301'
300300
}
301301
sku: {
302302
name: 'Standard'

0 commit comments

Comments
 (0)