From 529b4a2c811c18f81358ba04d2d9e3bb200ac055 Mon Sep 17 00:00:00 2001 From: Xiaoyun Zhang Date: Mon, 24 Jun 2024 12:22:34 -0700 Subject: [PATCH] fix #333 and update sk version (#335) ## Purpose * ... ## Does this introduce a breaking change? ``` [ ] Yes [ ] No ``` fix #333 ## Pull Request Type What kind of change does this Pull Request introduce? ``` [ ] 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 ``` ``` ## What to Check Verify that the following are valid * ... ## Other Information --- README.md | 14 +++++++------- app/Directory.Packages.props | 4 ++-- app/backend/MinimalApi.csproj | 1 + infra/main.bicep | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ecac8bb2..59ce9496 100644 --- a/README.md +++ b/README.md @@ -307,27 +307,27 @@ By default, the deployed Azure container app will have no authentication or acce To then limit access to a specific set of users or groups, you can follow the steps from [Restrict your Azure AD app to a set of users](https://learn.microsoft.com/azure/active-directory/develop/howto-restrict-your-app-to-a-set-of-users) by changing "Assignment Required?" option under the Enterprise Application, and then assigning users/groups access. Users not granted explicit access will receive the error message -AADSTS50105: Your administrator has configured the application to block users unless they are specifically granted ('assigned') access to the application.- -### Enable GPT-4V support +### Enable vision (multi-modal) support -With GPT-4-vision-preview(GPT-4V), it's possible to support an enrichmented retrival augmented generation by providing both text and image as source content. To enable GPT-4V support, you need to enable `USE_VISION` and use `GPT-4V` model when provisioning. +With GPT-4o, it's possible to support an enrichmented retrival augmented generation by providing both text and image as source content. To enable vision support, you need to enable `USE_VISION` and use `GPT-4o` model when provisioning. > [!NOTE] -> You would need to re-indexing supporting material and re-deploy the application after enabling GPT-4V support if you have already deployed the application before. This is because enabling GPT-4V support requires new fields to be added to the search index. +> You would need to re-indexing supporting material and re-deploy the application after enabling GPT-4o support if you have already deployed the application before. This is because enabling GPT-4o support requires new fields to be added to the search index. To enable GPT-4V support with Azure OpenAI Service, run the following commands: ```bash azd env set USE_VISION true azd env set USE_AOAI true -azd env set AZURE_OPENAI_CHATGPT_MODEL_NAME gpt-4 -azd env set AZURE_OPENAI_RESOURCE_LOCATION westus # gpt-4-vision-preview is only available in a few regions. Please check the model availability for more details. +azd env set AZURE_OPENAI_CHATGPT_MODEL_NAME gpt-4o +azd env set AZURE_OPENAI_RESOURCE_LOCATION westus # Please check the gpt-4o availability for more details. azd up ``` -To enable GPT-4V support with OpenAI, run the following commands: +To enable vision support with OpenAI, run the following commands: ```bash azd env set USE_VISION true azd env set USE_AOAI false -azd env set OPENAI_CHATGPT_DEPLOYMENT gpt-4-vision-preview +azd env set OPENAI_CHATGPT_DEPLOYMENT gpt-4o azd up ``` diff --git a/app/Directory.Packages.props b/app/Directory.Packages.props index d7753682..602cb7e7 100644 --- a/app/Directory.Packages.props +++ b/app/Directory.Packages.props @@ -5,7 +5,7 @@ - + @@ -40,7 +40,7 @@ - + diff --git a/app/backend/MinimalApi.csproj b/app/backend/MinimalApi.csproj index d25c40a8..04783d07 100644 --- a/app/backend/MinimalApi.csproj +++ b/app/backend/MinimalApi.csproj @@ -5,6 +5,7 @@ enable enable preview + $(NoWarn);SKEXP0010 6c0daa7e-5118-4a21-8aeb-f7b977fe2f01 true Linux diff --git a/infra/main.bicep b/infra/main.bicep index 3dc343cb..9c31f9fd 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -20,7 +20,7 @@ param tags string = '' param openAiResourceGroupLocation string @description('Name of the chat GPT model. Default: gpt-35-turbo') -@allowed([ 'gpt-35-turbo', 'gpt-4', 'gpt-35-turbo-16k', 'gpt-4-16k' ]) +@allowed([ 'gpt-35-turbo', 'gpt-4', 'gpt-4o', 'gpt-35-turbo-16k', 'gpt-4-16k' ]) param azureOpenAIChatGptModelName string = 'gpt-35-turbo' param azureOpenAIChatGptModelVersion string ='0613' @@ -420,7 +420,7 @@ module azureOpenAi 'core/ai/cognitiveservices.bicep' = if (useAOAI) { model: { format: 'OpenAI' name: azureOpenAIChatGptModelName - version: 'vision-preview' + version: '2024-05-13' } sku: { name: 'Standard'