From de274600b77082ff49f3ca94c2f883ab91db29b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6berl?= Date: Wed, 21 Feb 2024 17:19:12 +0100 Subject: [PATCH 01/10] Show only enabled authentication mechanisms --- src/app/page.tsx | 6 +++++- src/features/auth-page/login.tsx | 14 ++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 91616adfd..41000a6d9 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -5,7 +5,11 @@ export default async function Home() { await redirectIfAuthenticated(); return (
- +
); } diff --git a/src/features/auth-page/login.tsx b/src/features/auth-page/login.tsx index 9c07a05c7..675f8d592 100644 --- a/src/features/auth-page/login.tsx +++ b/src/features/auth-page/login.tsx @@ -14,6 +14,8 @@ import { interface LoginProps { isDevMode: boolean; + githubEnabled: boolean; + entraIdEnabled: boolean; } export const LogIn: FC = (props) => { @@ -31,13 +33,17 @@ export const LogIn: FC = (props) => { - - - {props.isDevMode ? ( + {props.githubEnabled && ( + + )} + {props.entraIdEnabled && ( + + )} + {props.isDevMode && ( - ) : null} + )} ); From 6c80194971d1aa538589540dcb865ca6646c10cc Mon Sep 17 00:00:00 2001 From: "Jason E. Jensen" Date: Tue, 30 Apr 2024 21:49:47 +0000 Subject: [PATCH 02/10] Allow override of endpoint suffixes with env vars --- src/.env.example | 6 +++++- .../chat-services/azure-ai-search/azure-ai-search.ts | 3 ++- src/features/common/services/ai-search.ts | 3 ++- src/features/common/services/azure-storage.ts | 3 ++- src/features/common/services/key-vault.ts | 3 ++- src/features/common/services/openai.ts | 12 ++++++++---- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/.env.example b/src/.env.example index 915f905e7..8b0650d32 100644 --- a/src/.env.example +++ b/src/.env.example @@ -11,6 +11,7 @@ AZURE_OPENAI_API_INSTANCE_NAME=azurechat AZURE_OPENAI_API_DEPLOYMENT_NAME=gpt-4 AZURE_OPENAI_API_VERSION=2023-12-01-preview AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME=embedding +AZURE_OPENAI_API_ENDPOINT_SUFFIX= # DALL-E image creation endpoint config AZURE_OPENAI_DALLE_API_KEY=222222 @@ -53,6 +54,7 @@ AZURE_COSMOSDB_CONFIG_CONTAINER_NAME=config AZURE_SEARCH_API_KEY= AZURE_SEARCH_NAME= AZURE_SEARCH_INDEX_NAME= +AZURE_SEARCH_ENDPOINT_SUFFIX= # Azure AI Document Intelligence to extract content from your data AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT=https://NAME.api.cognitive.microsoft.com/ @@ -68,6 +70,8 @@ AZURE_SPEECH_KEY= # Azure Storage account to store files AZURE_STORAGE_ACCOUNT_NAME=azurechat AZURE_STORAGE_ACCOUNT_KEY=123456 +AZURE_STORAGE_ENDPOINT_SUFFIX= # Azure Key Vault to store secrets -AZURE_KEY_VAULT_NAME= \ No newline at end of file +AZURE_KEY_VAULT_NAME= +AZURE_KEY_VAULT_ENDPOINT_SUFFIX= diff --git a/src/features/chat-page/chat-services/azure-ai-search/azure-ai-search.ts b/src/features/chat-page/chat-services/azure-ai-search/azure-ai-search.ts index d2b3c6398..b6d26679f 100644 --- a/src/features/chat-page/chat-services/azure-ai-search/azure-ai-search.ts +++ b/src/features/chat-page/chat-services/azure-ai-search/azure-ai-search.ts @@ -129,8 +129,9 @@ export const ExtensionSimilaritySearch = async (props: { input: searchText, model: "", }); + const endpointSuffix = process.env.AZURE_SEARCH_ENDPOINT_SUFFIX || "search.windows.net"; - const endpoint = `https://${searchName}.search.windows.net`; + const endpoint = `https://${searchName}.${endpointSuffix}`; const searchClient = new SearchClient( endpoint, diff --git a/src/features/common/services/ai-search.ts b/src/features/common/services/ai-search.ts index 187cac299..86b669e04 100644 --- a/src/features/common/services/ai-search.ts +++ b/src/features/common/services/ai-search.ts @@ -15,8 +15,9 @@ export const AzureAISearchCredentials = () => { "One or more Azure AI Search environment variables are not set" ); } + const endpointSuffix = process.env.AZURE_SEARCH_ENDPOINT_SUFFIX || "search.windows.net"; - const endpoint = `https://${searchName}.search.windows.net`; + const endpoint = `https://${searchName}.${endpointSuffix}`; return { apiKey, endpoint, diff --git a/src/features/common/services/azure-storage.ts b/src/features/common/services/azure-storage.ts index 0cc026426..42e0eaffe 100644 --- a/src/features/common/services/azure-storage.ts +++ b/src/features/common/services/azure-storage.ts @@ -10,8 +10,9 @@ const InitBlobServiceClient = () => { throw new Error( "Azure Storage Account not configured correctly, check environment variables." ); + const endpointSuffix = process.env.AZURE_STORAGE_ENDPOINT_SUFFIX || "core.windows.net"; - const connectionString = `DefaultEndpointsProtocol=https;AccountName=${acc};AccountKey=${key};EndpointSuffix=core.windows.net`; + const connectionString = `DefaultEndpointsProtocol=https;AccountName=${acc};AccountKey=${key};EndpointSuffix=${endpointSuffix}`; const blobServiceClient = BlobServiceClient.fromConnectionString(connectionString); diff --git a/src/features/common/services/key-vault.ts b/src/features/common/services/key-vault.ts index 0a0b09580..7f821b642 100644 --- a/src/features/common/services/key-vault.ts +++ b/src/features/common/services/key-vault.ts @@ -10,7 +10,8 @@ export const AzureKeyVaultInstance = () => { "Azure Key vault is not configured correctly, check environment variables." ); } - const url = `https://${keyVaultName}.vault.azure.net`; + const endpointSuffix = process.env.AZURE_KEY_VAULT_ENDPOINT_SUFFIX || "vault.azure.net"; + const url = `https://${keyVaultName}.${endpointSuffix}`; return new SecretClient(url, credential); }; diff --git a/src/features/common/services/openai.ts b/src/features/common/services/openai.ts index 41c9ed0d6..954d0c818 100644 --- a/src/features/common/services/openai.ts +++ b/src/features/common/services/openai.ts @@ -1,9 +1,10 @@ import { OpenAI } from "openai"; export const OpenAIInstance = () => { + const endpointSuffix = process.env.AZURE_OPENAI_API_ENDPOINT_SUFFIX || "openai.azure.com"; const openai = new OpenAI({ apiKey: process.env.AZURE_OPENAI_API_KEY, - baseURL: `https://${process.env.AZURE_OPENAI_API_INSTANCE_NAME}.openai.azure.com/openai/deployments/${process.env.AZURE_OPENAI_API_DEPLOYMENT_NAME}`, + baseURL: `https://${process.env.AZURE_OPENAI_API_INSTANCE_NAME}.${endpointSuffix}/openai/deployments/${process.env.AZURE_OPENAI_API_DEPLOYMENT_NAME}`, defaultQuery: { "api-version": process.env.AZURE_OPENAI_API_VERSION }, defaultHeaders: { "api-key": process.env.AZURE_OPENAI_API_KEY }, }); @@ -20,10 +21,11 @@ export const OpenAIEmbeddingInstance = () => { "Azure OpenAI Embeddings endpoint config is not set, check environment variables." ); } + const endpointSuffix = process.env.AZURE_OPENAI_API_ENDPOINT_SUFFIX || "openai.azure.com"; const openai = new OpenAI({ apiKey: process.env.AZURE_OPENAI_API_KEY, - baseURL: `https://${process.env.AZURE_OPENAI_API_INSTANCE_NAME}.openai.azure.com/openai/deployments/${process.env.AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME}`, + baseURL: `https://${process.env.AZURE_OPENAI_API_INSTANCE_NAME}.${endpointSuffix}/openai/deployments/${process.env.AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME}`, defaultQuery: { "api-version": process.env.AZURE_OPENAI_API_VERSION }, defaultHeaders: { "api-key": process.env.AZURE_OPENAI_API_KEY }, }); @@ -41,10 +43,11 @@ export const OpenAIDALLEInstance = () => { "Azure OpenAI DALLE endpoint config is not set, check environment variables." ); } + const endpointSuffix = process.env.AZURE_OPENAI_API_ENDPOINT_SUFFIX || "openai.azure.com"; const openai = new OpenAI({ apiKey: process.env.AZURE_OPENAI_DALLE_API_KEY, - baseURL: `https://${process.env.AZURE_OPENAI_DALLE_API_INSTANCE_NAME}.openai.azure.com/openai/deployments/${process.env.AZURE_OPENAI_DALLE_API_DEPLOYMENT_NAME}`, + baseURL: `https://${process.env.AZURE_OPENAI_DALLE_API_INSTANCE_NAME}.${endpointSuffix}/openai/deployments/${process.env.AZURE_OPENAI_DALLE_API_DEPLOYMENT_NAME}`, defaultQuery: { "api-version": process.env.AZURE_OPENAI_DALLE_API_VERSION || "2023-12-01-preview", @@ -67,10 +70,11 @@ export const OpenAIVisionInstance = () => { "Azure OpenAI Vision environment config is not set, check environment variables." ); } + const endpointSuffix = process.env.AZURE_OPENAI_API_ENDPOINT_SUFFIX || "openai.azure.com"; const openai = new OpenAI({ apiKey: process.env.AZURE_OPENAI_VISION_API_KEY, - baseURL: `https://${process.env.AZURE_OPENAI_VISION_API_INSTANCE_NAME}.openai.azure.com/openai/deployments/${process.env.AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME}`, + baseURL: `https://${process.env.AZURE_OPENAI_VISION_API_INSTANCE_NAME}.${endpointSuffix}/openai/deployments/${process.env.AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME}`, defaultQuery: { "api-version": process.env.AZURE_OPENAI_VISION_API_VERSION, }, From c3ffb8b7cc4250163859dd9a5b0dd7f086734262 Mon Sep 17 00:00:00 2001 From: thivy Date: Fri, 6 Sep 2024 09:10:49 +1000 Subject: [PATCH 03/10] Update OpenAI to gpt4o --- .../chat-api/chat-api-multimodal.tsx | 4 ++-- src/features/common/services/openai.ts | 23 ------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/features/chat-page/chat-services/chat-api/chat-api-multimodal.tsx b/src/features/chat-page/chat-services/chat-api/chat-api-multimodal.tsx index c47d1f0da..45630514e 100644 --- a/src/features/chat-page/chat-services/chat-api/chat-api-multimodal.tsx +++ b/src/features/chat-page/chat-services/chat-api/chat-api-multimodal.tsx @@ -1,7 +1,7 @@ "use server"; import "server-only"; -import { OpenAIVisionInstance } from "@/features/common/services/openai"; +import { OpenAIInstance } from "@/features/common/services/openai"; import { ChatCompletionStreamingRunner } from "openai/resources/beta/chat/completions"; import { ChatThreadModel } from "../models"; export const ChatApiMultimodal = (props: { @@ -12,7 +12,7 @@ export const ChatApiMultimodal = (props: { }): ChatCompletionStreamingRunner => { const { chatThread, userMessage, signal, file } = props; - const openAI = OpenAIVisionInstance(); + const openAI = OpenAIInstance(); return openAI.beta.chat.completions.stream( { diff --git a/src/features/common/services/openai.ts b/src/features/common/services/openai.ts index 41c9ed0d6..c7437184d 100644 --- a/src/features/common/services/openai.ts +++ b/src/features/common/services/openai.ts @@ -55,26 +55,3 @@ export const OpenAIDALLEInstance = () => { }); return openai; }; - -export const OpenAIVisionInstance = () => { - if ( - !process.env.AZURE_OPENAI_VISION_API_KEY || - !process.env.AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME || - !process.env.AZURE_OPENAI_VISION_API_INSTANCE_NAME || - !process.env.AZURE_OPENAI_VISION_API_VERSION - ) { - throw new Error( - "Azure OpenAI Vision environment config is not set, check environment variables." - ); - } - - const openai = new OpenAI({ - apiKey: process.env.AZURE_OPENAI_VISION_API_KEY, - baseURL: `https://${process.env.AZURE_OPENAI_VISION_API_INSTANCE_NAME}.openai.azure.com/openai/deployments/${process.env.AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME}`, - defaultQuery: { - "api-version": process.env.AZURE_OPENAI_VISION_API_VERSION, - }, - defaultHeaders: { "api-key": process.env.AZURE_OPENAI_VISION_API_KEY }, - }); - return openai; -}; From 39c1e9c1f77838cef739bdb8f5353675fada4fe8 Mon Sep 17 00:00:00 2001 From: thivy Date: Fri, 6 Sep 2024 17:44:01 +1000 Subject: [PATCH 04/10] update bicep to deploy only one model --- docs/migration.md | 14 ++-- infra/main.bicep | 27 ++----- infra/main.json | 180 +++++------------------------------------- infra/resources.bicep | 79 +++--------------- src/.env.example | 6 -- 5 files changed, 41 insertions(+), 265 deletions(-) diff --git a/docs/migration.md b/docs/migration.md index 3e71e7d2d..82de9c1db 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -1,4 +1,8 @@ -# Migration +# Migration 2.1 + +The new changes merges GPT-4 and GPT-4 Vision models into a single GPT-4o model. This allows multi-modal inputs and generates text as an output. The new model is available within the following [regions](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-preview-model-availability). + +# Migration 2.0 The following changes and services are required to migrate from the old version to the new version. @@ -6,10 +10,10 @@ Refer the `.env.example` file for the latest environment variable changes. If you previously had Azure Chat running and have pulled the v2 version you will need at minimum to make the following changes: -* Change the "OPENAI_API_KEY" environment setting to "AZURE_OPENAI_API_KEY" -* Add an additional container to your Cosmos DB database called "config" with a partition key of "/userId" -* Add the "AZURE_KEY_VAULT_NAME" environment setting with the name of your Azure Key Vault -* Add the "New Azure Services" settings below if you wish to use these features +- Change the "OPENAI_API_KEY" environment setting to "AZURE_OPENAI_API_KEY" +- Add an additional container to your Cosmos DB database called "config" with a partition key of "/userId" +- Add the "AZURE_KEY_VAULT_NAME" environment setting with the name of your Azure Key Vault +- Add the "New Azure Services" settings below if you wish to use these features ## New Azure Services diff --git a/infra/main.bicep b/infra/main.bicep index c6e2f3ad7..60eaa51b2 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -20,12 +20,12 @@ param location string param openAILocation string param openAISku string = 'S0' -param openAIApiVersion string = '2023-12-01-preview' +param openAIApiVersion string ='2024-05-13' -param chatGptDeploymentCapacity int = 120 -param chatGptDeploymentName string = 'chat-gpt-35-turbo' -param chatGptModelName string = 'gpt-35-turbo' -param chatGptModelVersion string = '1106' +param chatGptDeploymentCapacity int = 30 +param chatGptDeploymentName string = 'gpt-4o' +param chatGptModelName string = 'gpt-4o' +param chatGptModelVersion string = '2024-05-13' param embeddingDeploymentName string = 'embedding' param embeddingDeploymentCapacity int = 120 param embeddingModelName string = 'text-embedding-ada-002' @@ -40,17 +40,6 @@ param dalleDeploymentName string = 'dall-e-3' param dalleModelName string = 'dall-e-3' param dalleApiVersion string = '2023-12-01-preview' -// DALL-E v3 only supported in Sweden Central for now -@description('Location for the GPT vision instance resource') -@allowed(['swedencentral','westus',]) -param gptvisionLocation string - -param gptvisionDeploymentCapacity int = 1 -param gptvisionDeploymentName string = 'gpt-4-vision' -param gptvisionModelName string = 'gpt-4' -param gptvisionApiVersion string = '2023-12-01-preview' -param gptvisionModelVersion string = 'vision-preview' - param formRecognizerSkuName string = 'S0' param searchServiceIndexName string = 'azure-chat' param searchServiceSkuName string = 'standard' @@ -93,12 +82,6 @@ module resources 'resources.bicep' = { dalleDeploymentName: dalleDeploymentName dalleModelName: dalleModelName dalleApiVersion: dalleApiVersion - gptvisionLocation: gptvisionLocation - gptvisionApiVersion: gptvisionApiVersion - gptvisionDeploymentCapacity: gptvisionDeploymentCapacity - gptvisionDeploymentName: gptvisionDeploymentName - gptvisionModelName: gptvisionModelName - gptvisionModelVersion: gptvisionModelVersion formRecognizerSkuName: formRecognizerSkuName searchServiceIndexName: searchServiceIndexName searchServiceSkuName: searchServiceSkuName diff --git a/infra/main.json b/infra/main.json index 25d7ee091..397308da6 100644 --- a/infra/main.json +++ b/infra/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.24.24.22086", - "templateHash": "16779160080190232837" + "version": "0.29.47.4906", + "templateHash": "18214004695586675733" } }, "parameters": { @@ -48,23 +48,23 @@ }, "openAIApiVersion": { "type": "string", - "defaultValue": "2023-12-01-preview" + "defaultValue": "2024-05-13" }, "chatGptDeploymentCapacity": { "type": "int", - "defaultValue": 120 + "defaultValue": 30 }, "chatGptDeploymentName": { "type": "string", - "defaultValue": "chat-gpt-35-turbo" + "defaultValue": "gpt-4o" }, "chatGptModelName": { "type": "string", - "defaultValue": "gpt-35-turbo" + "defaultValue": "gpt-4o" }, "chatGptModelVersion": { "type": "string", - "defaultValue": "1106" + "defaultValue": "2024-05-13" }, "embeddingDeploymentName": { "type": "string", @@ -103,36 +103,6 @@ "type": "string", "defaultValue": "2023-12-01-preview" }, - "gptvisionLocation": { - "type": "string", - "allowedValues": [ - "swedencentral", - "westus" - ], - "metadata": { - "description": "Location for the GPT vision instance resource" - } - }, - "gptvisionDeploymentCapacity": { - "type": "int", - "defaultValue": 1 - }, - "gptvisionDeploymentName": { - "type": "string", - "defaultValue": "gpt-4-vision" - }, - "gptvisionModelName": { - "type": "string", - "defaultValue": "gpt-4" - }, - "gptvisionApiVersion": { - "type": "string", - "defaultValue": "2023-12-01-preview" - }, - "gptvisionModelVersion": { - "type": "string", - "defaultValue": "vision-preview" - }, "formRecognizerSkuName": { "type": "string", "defaultValue": "S0" @@ -239,24 +209,6 @@ "dalleApiVersion": { "value": "[parameters('dalleApiVersion')]" }, - "gptvisionLocation": { - "value": "[parameters('gptvisionLocation')]" - }, - "gptvisionApiVersion": { - "value": "[parameters('gptvisionApiVersion')]" - }, - "gptvisionDeploymentCapacity": { - "value": "[parameters('gptvisionDeploymentCapacity')]" - }, - "gptvisionDeploymentName": { - "value": "[parameters('gptvisionDeploymentName')]" - }, - "gptvisionModelName": { - "value": "[parameters('gptvisionModelName')]" - }, - "gptvisionModelVersion": { - "value": "[parameters('gptvisionModelVersion')]" - }, "formRecognizerSkuName": { "value": "[parameters('formRecognizerSkuName')]" }, @@ -282,8 +234,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.24.24.22086", - "templateHash": "14077555141603956691" + "version": "0.29.47.4906", + "templateHash": "18109441359842852578" } }, "parameters": { @@ -301,36 +253,28 @@ "type": "string" }, "openAiSkuName": { - "type": "string", - "defaultValue": "S0" + "type": "string" }, "chatGptDeploymentCapacity": { - "type": "int", - "defaultValue": 30 + "type": "int" }, "chatGptDeploymentName": { - "type": "string", - "defaultValue": "chat-gpt-35-turbo" + "type": "string" }, "chatGptModelName": { - "type": "string", - "defaultValue": "chat-gpt-35-turbo" + "type": "string" }, "chatGptModelVersion": { - "type": "string", - "defaultValue": "1106" + "type": "string" }, "embeddingDeploymentName": { - "type": "string", - "defaultValue": "text-embedding-ada-002" + "type": "string" }, "embeddingDeploymentCapacity": { - "type": "int", - "defaultValue": 10 + "type": "int" }, "embeddingModelName": { - "type": "string", - "defaultValue": "text-embedding-ada-002" + "type": "string" }, "dalleLocation": { "type": "string" @@ -347,29 +291,6 @@ "dalleApiVersion": { "type": "string" }, - "gptvisionLocation": { - "type": "string" - }, - "gptvisionDeploymentCapacity": { - "type": "int", - "defaultValue": 30 - }, - "gptvisionDeploymentName": { - "type": "string", - "defaultValue": "gpt-4-vision" - }, - "gptvisionModelName": { - "type": "string", - "defaultValue": "gpt-4" - }, - "gptvisionApiVersion": { - "type": "string", - "defaultValue": "2023-12-01-preview" - }, - "gptvisionModelVersion": { - "type": "string", - "defaultValue": "vision-preview" - }, "speechServiceSkuName": { "type": "string", "defaultValue": "S0" @@ -408,7 +329,6 @@ "variables": { "openai_name": "[toLower(format('{0}-aillm-{1}', parameters('name'), parameters('resourceToken')))]", "openai_dalle_name": "[toLower(format('{0}-aidalle-{1}', parameters('name'), parameters('resourceToken')))]", - "openai_gpt_vision_name": "[toLower(format('{0}-aivision-{1}', parameters('name'), parameters('resourceToken')))]", "form_recognizer_name": "[toLower(format('{0}-form-{1}', parameters('name'), parameters('resourceToken')))]", "speech_service_name": "[toLower(format('{0}-speech-{1}', parameters('name'), parameters('resourceToken')))]", "cosmos_name": "[toLower(format('{0}-cosmos-{1}', parameters('name'), parameters('resourceToken')))]", @@ -435,7 +355,7 @@ "version": "[parameters('chatGptModelVersion')]" }, "sku": { - "name": "Standard", + "name": "GlobalStandard", "capacity": "[parameters('chatGptDeploymentCapacity')]" } }, @@ -479,19 +399,6 @@ "[resourceId('Microsoft.Web/sites', variables('webapp_name'))]" ] }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "apiVersion": "2021-06-01-preview", - "name": "[format('{0}/{1}', variables('keyVaultName'), 'AZURE-OPENAI-VISION-API-KEY')]", - "properties": { - "contentType": "text/plain", - "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('openai_gpt_vision_name')), '2023-05-01').key1]" - }, - "dependsOn": [ - "[resourceId('Microsoft.CognitiveServices/accounts', variables('openai_gpt_vision_name'))]", - "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" - ] - }, { "type": "Microsoft.KeyVault/vaults/secrets", "apiVersion": "2021-06-01-preview", @@ -613,25 +520,6 @@ "[resourceId('Microsoft.CognitiveServices/accounts', variables('openai_dalle_name'))]" ] }, - { - "type": "Microsoft.CognitiveServices/accounts/deployments", - "apiVersion": "2023-05-01", - "name": "[format('{0}/{1}', variables('openai_gpt_vision_name'), parameters('gptvisionDeploymentName'))]", - "properties": { - "model": { - "format": "OpenAI", - "name": "[parameters('gptvisionModelName')]", - "version": "[parameters('gptvisionModelVersion')]" - } - }, - "sku": { - "name": "Standard", - "capacity": "[parameters('gptvisionDeploymentCapacity')]" - }, - "dependsOn": [ - "[resourceId('Microsoft.CognitiveServices/accounts', variables('openai_gpt_vision_name'))]" - ] - }, { "type": "Microsoft.Storage/storageAccounts/blobServices/containers", "apiVersion": "2022-05-01", @@ -693,22 +581,6 @@ "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", "value": "true" }, - { - "name": "AZURE_OPENAI_VISION_API_KEY", - "value": "[format('@Microsoft.KeyVault(VaultName={0};SecretName={1})', variables('keyVaultName'), 'AZURE-OPENAI-VISION-API-KEY')]" - }, - { - "name": "AZURE_OPENAI_VISION_API_INSTANCE_NAME", - "value": "[variables('openai_gpt_vision_name')]" - }, - { - "name": "AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME", - "value": "[parameters('gptvisionDeploymentName')]" - }, - { - "name": "AZURE_OPENAI_VISION_API_VERSION", - "value": "[parameters('gptvisionApiVersion')]" - }, { "name": "AZURE_OPENAI_API_KEY", "value": "[format('@Microsoft.KeyVault(VaultName={0};SecretName={1})', variables('keyVaultName'), 'AZURE-OPENAI-API-KEY')]" @@ -809,7 +681,6 @@ "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-DOCUMENT-INTELLIGENCE-KEY')]", "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-OPENAI-API-KEY')]", "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-OPENAI-DALLE-API-KEY')]", - "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-OPENAI-VISION-API-KEY')]", "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-SEARCH-API-KEY')]", "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-SPEECH-KEY')]", "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-STORAGE-ACCOUNT-KEY')]", @@ -1024,21 +895,6 @@ "name": "[parameters('openAiSkuName')]" } }, - { - "type": "Microsoft.CognitiveServices/accounts", - "apiVersion": "2023-05-01", - "name": "[variables('openai_gpt_vision_name')]", - "location": "[parameters('gptvisionLocation')]", - "tags": "[parameters('tags')]", - "kind": "OpenAI", - "properties": { - "customSubDomainName": "[variables('openai_gpt_vision_name')]", - "publicNetworkAccess": "Enabled" - }, - "sku": { - "name": "[parameters('openAiSkuName')]" - } - }, { "type": "Microsoft.CognitiveServices/accounts", "apiVersion": "2023-05-01", diff --git a/infra/resources.bicep b/infra/resources.bicep index 110672927..49b3a1c29 100644 --- a/infra/resources.bicep +++ b/infra/resources.bicep @@ -4,14 +4,14 @@ param resourceToken string param openai_api_version string param openAiLocation string -param openAiSkuName string = 'S0' -param chatGptDeploymentCapacity int = 30 -param chatGptDeploymentName string = 'chat-gpt-35-turbo' -param chatGptModelName string = 'chat-gpt-35-turbo' -param chatGptModelVersion string = '1106' -param embeddingDeploymentName string = 'text-embedding-ada-002' -param embeddingDeploymentCapacity int = 10 -param embeddingModelName string = 'text-embedding-ada-002' +param openAiSkuName string +param chatGptDeploymentCapacity int +param chatGptDeploymentName string +param chatGptModelName string +param chatGptModelVersion string +param embeddingDeploymentName string +param embeddingDeploymentCapacity int +param embeddingModelName string param dalleLocation string param dalleDeploymentCapacity int @@ -19,13 +19,6 @@ param dalleDeploymentName string param dalleModelName string param dalleApiVersion string -param gptvisionLocation string -param gptvisionDeploymentCapacity int = 30 -param gptvisionDeploymentName string = 'gpt-4-vision' -param gptvisionModelName string = 'gpt-4' -param gptvisionApiVersion string = '2023-12-01-preview' -param gptvisionModelVersion string = 'vision-preview' - param speechServiceSkuName string = 'S0' param formRecognizerSkuName string = 'S0' @@ -45,7 +38,6 @@ param tags object = {} var openai_name = toLower('${name}-aillm-${resourceToken}') var openai_dalle_name = toLower('${name}-aidalle-${resourceToken}') -var openai_gpt_vision_name = toLower('${name}-aivision-${resourceToken}') var form_recognizer_name = toLower('${name}-form-${resourceToken}') var speech_service_name = toLower('${name}-speech-${resourceToken}') @@ -79,7 +71,7 @@ var llmDeployments = [ version: chatGptModelVersion } sku: { - name: 'Standard' + name: 'GlobalStandard' capacity: chatGptDeploymentCapacity } } @@ -133,22 +125,6 @@ resource webApp 'Microsoft.Web/sites@2020-06-01' = { name: 'SCM_DO_BUILD_DURING_DEPLOYMENT' value: 'true' } - { - name: 'AZURE_OPENAI_VISION_API_KEY' - value: '@Microsoft.KeyVault(VaultName=${kv.name};SecretName=${kv::AZURE_OPENAI_VISION_API_KEY.name})' - } - { - name: 'AZURE_OPENAI_VISION_API_INSTANCE_NAME' - value: openai_gpt_vision_name - } - { - name: 'AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME' - value: gptvisionDeploymentName - } - { - name: 'AZURE_OPENAI_VISION_API_VERSION' - value: gptvisionApiVersion - } { name: 'AZURE_OPENAI_API_KEY' value: '@Microsoft.KeyVault(VaultName=${kv.name};SecretName=${kv::AZURE_OPENAI_API_KEY.name})' @@ -298,14 +274,6 @@ resource kv 'Microsoft.KeyVault/vaults@2021-06-01-preview' = { enabledForTemplateDeployment: false } - resource AZURE_OPENAI_VISION_API_KEY 'secrets' = { - name: 'AZURE-OPENAI-VISION-API-KEY' - properties: { - contentType: 'text/plain' - value: azureopenaivision.listKeys().key1 - } - } - resource AZURE_OPENAI_API_KEY 'secrets' = { name: 'AZURE-OPENAI-API-KEY' properties: { @@ -516,35 +484,6 @@ resource azureopenaidalle 'Microsoft.CognitiveServices/accounts@2023-05-01' = { -resource azureopenaivision 'Microsoft.CognitiveServices/accounts@2023-05-01' = { - name: openai_gpt_vision_name - location: gptvisionLocation - tags: tags - kind: 'OpenAI' - properties: { - customSubDomainName: openai_gpt_vision_name - publicNetworkAccess: 'Enabled' - } - sku: { - name: openAiSkuName - } - - resource dalleDeployment 'deployments' = { - name: gptvisionDeploymentName - properties: { - model: { - format: 'OpenAI' - name: gptvisionModelName - version:gptvisionModelVersion - } - } - sku: { - name: 'Standard' - capacity: gptvisionDeploymentCapacity - } - } -} - resource speechService 'Microsoft.CognitiveServices/accounts@2023-05-01' = { name: speech_service_name location: location diff --git a/src/.env.example b/src/.env.example index 915f905e7..2ebc01512 100644 --- a/src/.env.example +++ b/src/.env.example @@ -18,12 +18,6 @@ AZURE_OPENAI_DALLE_API_INSTANCE_NAME=azurechat-dall-e AZURE_OPENAI_DALLE_API_DEPLOYMENT_NAME=dall-e AZURE_OPENAI_DALLE_API_VERSION=2023-12-01-preview -# GPT4 V OpenaAI details -AZURE_OPENAI_VISION_API_KEY=333333 -AZURE_OPENAI_VISION_API_INSTANCE_NAME=azurechat-vision -AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME=gpt-4-vision -AZURE_OPENAI_VISION_API_VERSION=2023-12-01-preview - # Update your admin email addresses - comma separated ADMIN_EMAIL_ADDRESS=you@email.com,you2@email.com From db658c5975b9a7b30c44c58a837c8c93eaa6ca47 Mon Sep 17 00:00:00 2001 From: David Watson Date: Tue, 10 Sep 2024 14:25:44 +1000 Subject: [PATCH 05/10] Update bicep with correct default OpenAI API version, update Azure app service start command --- docs/8-extensions.md | 3 +++ infra/main.bicep | 2 +- infra/resources.bicep | 2 +- .../extensions-page/extension-services/extension-service.ts | 2 +- src/features/prompt-page/prompt-service.ts | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/8-extensions.md b/docs/8-extensions.md index 992a287cd..1b50fcecb 100644 --- a/docs/8-extensions.md +++ b/docs/8-extensions.md @@ -47,6 +47,9 @@ As an example you can create an extension that calls Bing Search API to search f In the example below only the `query` is required as Bing does not require a body parameter. +> [!NOTE] +> As header values specified for an extension often contain secrets (e.g. API keys) Azure Chat stores those values securely in Azure Key Vault. If you are deploying the solution to Azure using azd or the bicep templates the required Key Vault role assignment is automatically created. If you are running the solution locally you will need to manually add the "Key Vault Secrets Officer" role to identy that is running the solution (wh8ch will typically be the user logged into the Azure CLI) + # Bing Search Extension 1. **Name**: `Bing Search` diff --git a/infra/main.bicep b/infra/main.bicep index 60eaa51b2..2a6fb848d 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -20,7 +20,7 @@ param location string param openAILocation string param openAISku string = 'S0' -param openAIApiVersion string ='2024-05-13' +param openAIApiVersion string ='2024-08-01-preview' param chatGptDeploymentCapacity int = 30 param chatGptDeploymentName string = 'gpt-4o' diff --git a/infra/resources.bicep b/infra/resources.bicep index 49b3a1c29..a364e04cc 100644 --- a/infra/resources.bicep +++ b/infra/resources.bicep @@ -113,7 +113,7 @@ resource webApp 'Microsoft.Web/sites@2020-06-01' = { siteConfig: { linuxFxVersion: 'node|18-lts' alwaysOn: true - appCommandLine: 'next start' + appCommandLine: 'node .next/standalone/server.js' ftpsState: 'Disabled' minTlsVersion: '1.2' appSettings: [ diff --git a/src/features/extensions-page/extension-services/extension-service.ts b/src/features/extensions-page/extension-services/extension-service.ts index 59d08ff7d..e73b1ee6c 100644 --- a/src/features/extensions-page/extension-services/extension-service.ts +++ b/src/features/extensions-page/extension-services/extension-service.ts @@ -123,7 +123,7 @@ export const CreateExtension = async ( status: "ERROR", errors: [ { - message: `Error adding Extension: ${resource}`, + message: `Unable to add Extension: ${resource}`, }, ], }; diff --git a/src/features/prompt-page/prompt-service.ts b/src/features/prompt-page/prompt-service.ts index f50feaba6..52e9d3bc3 100644 --- a/src/features/prompt-page/prompt-service.ts +++ b/src/features/prompt-page/prompt-service.ts @@ -25,7 +25,7 @@ export const CreatePrompt = async ( status: "UNAUTHORIZED", errors: [ { - message: `Unable to create prompt`, + message: `Unable to create prompt - admin role required.`, }, ], }; From e58eb11d1360fead96d62a33e46f15be46fe7f71 Mon Sep 17 00:00:00 2001 From: David Watson Date: Wed, 11 Sep 2024 11:00:26 +1000 Subject: [PATCH 06/10] Maked endpoint suffixes as optional in example config --- src/.env.example | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/.env.example b/src/.env.example index 87f9456e2..646879352 100644 --- a/src/.env.example +++ b/src/.env.example @@ -11,7 +11,6 @@ AZURE_OPENAI_API_INSTANCE_NAME=azurechat AZURE_OPENAI_API_DEPLOYMENT_NAME=gpt-4 AZURE_OPENAI_API_VERSION=2023-12-01-preview AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME=embedding -AZURE_OPENAI_API_ENDPOINT_SUFFIX= # DALL-E image creation endpoint config AZURE_OPENAI_DALLE_API_KEY=222222 @@ -48,7 +47,6 @@ AZURE_COSMOSDB_CONFIG_CONTAINER_NAME=config AZURE_SEARCH_API_KEY= AZURE_SEARCH_NAME= AZURE_SEARCH_INDEX_NAME= -AZURE_SEARCH_ENDPOINT_SUFFIX= # Azure AI Document Intelligence to extract content from your data AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT=https://NAME.api.cognitive.microsoft.com/ @@ -64,8 +62,12 @@ AZURE_SPEECH_KEY= # Azure Storage account to store files AZURE_STORAGE_ACCOUNT_NAME=azurechat AZURE_STORAGE_ACCOUNT_KEY=123456 -AZURE_STORAGE_ENDPOINT_SUFFIX= # Azure Key Vault to store secrets AZURE_KEY_VAULT_NAME= -AZURE_KEY_VAULT_ENDPOINT_SUFFIX= + +# optional - endpoint suffix overrides - typically used for Azure Government Clouds, China Clouds, etc. Only use if required. +# AZURE_OPENAI_API_ENDPOINT_SUFFIX= +# AZURE_SEARCH_ENDPOINT_SUFFIX= +# AZURE_STORAGE_ENDPOINT_SUFFIX= +# AZURE_KEY_VAULT_ENDPOINT_SUFFIX= \ No newline at end of file From 1bd4a7e7d446172040df9ed499faf1e927979834 Mon Sep 17 00:00:00 2001 From: David Watson Date: Wed, 11 Sep 2024 14:07:50 +1000 Subject: [PATCH 07/10] Minor fixes following on from model update --- .gitignore | 1 + README.md | 6 +++--- infra/main.bicep | 8 ++++---- infra/resources.bicep | 5 +++-- src/.env.example | 2 +- src/features/chat-page/chat-services/chat-api/chat-api.ts | 1 + 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 0bd4239ca..83208207f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ yarn-error.log* # local env files .env*.local +.env # typescript *.tsbuildinfo diff --git a/README.md b/README.md index dad35ef84..7f6f9914e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Unleash the Power of Azure Open AI +# Unleash the Power of Azure OpenAI 1. [Introduction](#introduction) 1. [Solution Overview](/docs/1-introduction.md) @@ -14,11 +14,11 @@ # Introduction -_Azure Chat Solution Accelerator powered by Azure Open AI Service_ +_Azure Chat Solution Accelerator powered by Azure OpenAI Service_ ![](/docs/images/intro.png) -_Azure Chat Solution Accelerator powered by Azure Open AI Service_ is a solution accelerator that allows organisations to deploy a private chat tenant in their Azure Subscription, with a familiar user experience and the added capabilities of chatting over your data and files. +_Azure Chat Solution Accelerator powered by Azure OpenAI Service_ is a solution accelerator that allows organisations to deploy a private chat tenant in their Azure Subscription, with a familiar user experience and the added capabilities of chatting over your data and files. Benefits are: diff --git a/infra/main.bicep b/infra/main.bicep index 2a6fb848d..f15740ad5 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -9,9 +9,9 @@ param name string @description('Primary location for all resources') param location string -// azure open ai -- only regions supporting gpt-35-turbo v1106 +// azure open ai -- regions currently support gpt-4o global-standard @description('Location for the OpenAI resource group') -@allowed(['australiaeast', 'canadaeast', 'francecentral', 'southindia', 'uksouth', 'swedencentral', 'westus']) +@allowed(['australiaeast', 'brazilsouth', 'canadaeast', 'eastus', 'eastus2', 'francecentral', 'germanywestcentral', 'japaneast', 'koreacentral', 'northcentralus', 'norwayeast', 'polandcentral', 'spaincentral', 'southafricanorth', 'southcentralus', 'southindia', 'swedencentral', 'switzerlandnorth', 'uksouth', 'westeurope', 'westus', 'westus3']) @metadata({ azd: { type: 'location' @@ -30,9 +30,9 @@ param embeddingDeploymentName string = 'embedding' param embeddingDeploymentCapacity int = 120 param embeddingModelName string = 'text-embedding-ada-002' -// DALL-E v3 only supported in Sweden Central for now +// DALL-E v3 only supported in limited regions for now @description('Location for the OpenAI DALL-E 3 instance resource group') -@allowed(['swedencentral']) +@allowed(['swedencentral', 'eastus', 'australiaeast']) param dalleLocation string param dalleDeploymentCapacity int = 1 diff --git a/infra/resources.bicep b/infra/resources.bicep index a364e04cc..1240bfc17 100644 --- a/infra/resources.bicep +++ b/infra/resources.bicep @@ -45,8 +45,9 @@ var cosmos_name = toLower('${name}-cosmos-${resourceToken}') var search_name = toLower('${name}search${resourceToken}') var webapp_name = toLower('${name}-webapp-${resourceToken}') var appservice_name = toLower('${name}-app-${resourceToken}') -// storage name must be less than 24 chars, alphanumeric only - token is 13 -var storage_prefix = take(name, 8) +// storage name must be < 24 chars, alphanumeric only. 'sto' is 3 and resourceToken is 13 +var clean_name = replace(replace(name, '-', ''), '_', '') +var storage_prefix = take(clean_name, 8) var storage_name = toLower('${storage_prefix}sto${resourceToken}') // keyvault name must be less than 24 chars - token is 13 var kv_prefix = take(name, 7) diff --git a/src/.env.example b/src/.env.example index 2ebc01512..bf1c81a32 100644 --- a/src/.env.example +++ b/src/.env.example @@ -49,7 +49,7 @@ AZURE_SEARCH_NAME= AZURE_SEARCH_INDEX_NAME= # Azure AI Document Intelligence to extract content from your data -AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT=https://NAME.api.cognitive.microsoft.com/ +AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT=https://NAME.cognitiveservices.azure.com/ AZURE_DOCUMENT_INTELLIGENCE_KEY= # max upload document size in bytes diff --git a/src/features/chat-page/chat-services/chat-api/chat-api.ts b/src/features/chat-page/chat-services/chat-api/chat-api.ts index deec3ac11..f176587a0 100644 --- a/src/features/chat-page/chat-services/chat-api/chat-api.ts +++ b/src/features/chat-page/chat-services/chat-api/chat-api.ts @@ -102,6 +102,7 @@ export const ChatAPIEntry = async (props: UserPrompt, signal: AbortSignal) => { headers: { "Cache-Control": "no-cache", Connection: "keep-alive", + "Content-Type": "text/event-stream" }, }); }; From 45c3e6a5ef20339ef8d881007f51cb29ca72799c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Blomberg?= <36976865+julianbl@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:49:24 +0200 Subject: [PATCH 08/10] Add or update the Azure App Service build and deployment workflow config --- .../main_itazchat2-webapp-rxjah4bntxkd2.yml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/main_itazchat2-webapp-rxjah4bntxkd2.yml diff --git a/.github/workflows/main_itazchat2-webapp-rxjah4bntxkd2.yml b/.github/workflows/main_itazchat2-webapp-rxjah4bntxkd2.yml new file mode 100644 index 000000000..1050c9299 --- /dev/null +++ b/.github/workflows/main_itazchat2-webapp-rxjah4bntxkd2.yml @@ -0,0 +1,71 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy Node.js app to Azure Web App - itazchat2-webapp-rxjah4bntxkd2 + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js version + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: node-app + path: release.zip + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v3 + with: + name: node-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + - name: Login to Azure + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_30590872C17643B8ACD44E3D0C4F27CE }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_68711834BB1F4A94802DB5E2115C4CF1 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_00AB400C656F409096DA39D8390EC168 }} + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'itazchat2-webapp-rxjah4bntxkd2' + slot-name: 'Production' + package: . + \ No newline at end of file From 728dbaf34da4818afd66878210e787d033713b5f Mon Sep 17 00:00:00 2001 From: Mingus Date: Tue, 9 Apr 2024 13:42:49 -0300 Subject: [PATCH 09/10] Auto Sign-in and try to logout using Azure App Service authentication --- src/.nvmrc | 1 + src/features/auth-page/login.tsx | 8 ++++++-- src/features/main-menu/user-profile.tsx | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 src/.nvmrc diff --git a/src/.nvmrc b/src/.nvmrc new file mode 100644 index 000000000..39d00c051 --- /dev/null +++ b/src/.nvmrc @@ -0,0 +1 @@ +18.17.0 \ No newline at end of file diff --git a/src/features/auth-page/login.tsx b/src/features/auth-page/login.tsx index 675f8d592..339569fb0 100644 --- a/src/features/auth-page/login.tsx +++ b/src/features/auth-page/login.tsx @@ -1,7 +1,7 @@ "use client"; import { AI_NAME } from "@/features/theme/theme-config"; import { signIn } from "next-auth/react"; -import { FC } from "react"; +import { FC, useEffect } from "react"; import { Avatar, AvatarImage } from "../ui/avatar"; import { Button } from "../ui/button"; import { @@ -19,6 +19,10 @@ interface LoginProps { } export const LogIn: FC = (props) => { + useEffect(() => { + signIn("azure-ad"); + }); + return ( @@ -29,7 +33,7 @@ export const LogIn: FC = (props) => { {AI_NAME} - Login in with your GitHub or Microsoft 365 account + Signing in with your Microsoft account diff --git a/src/features/main-menu/user-profile.tsx b/src/features/main-menu/user-profile.tsx index 66620e980..f91405aad 100644 --- a/src/features/main-menu/user-profile.tsx +++ b/src/features/main-menu/user-profile.tsx @@ -55,7 +55,11 @@ export const UserProfile = () => { signOut({ callbackUrl: "/" })} + onClick={() => + signOut({ + callbackUrl: "/.auth/logout", + }) + } > Log out From d87aaa58837a1a213b5b49c74e5b8c7102363f9c Mon Sep 17 00:00:00 2001 From: Mingus Date: Wed, 24 Apr 2024 19:31:56 +0200 Subject: [PATCH 10/10] =?UTF-8?q?Change=20name=20to=20Mural=E2=80=99s=20Ch?= =?UTF-8?q?atbot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/theme/theme-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/theme/theme-config.ts b/src/features/theme/theme-config.ts index 57391f556..a7e51852b 100644 --- a/src/features/theme/theme-config.ts +++ b/src/features/theme/theme-config.ts @@ -1,5 +1,5 @@ -export const AI_NAME = "Azure Chat"; -export const AI_DESCRIPTION = "Azure Chat is a friendly AI assistant."; +export const AI_NAME = "Mural's Chatbot"; +export const AI_DESCRIPTION = "Mural's Chatbot is a friendly AI assistant."; export const CHAT_DEFAULT_PERSONA = AI_NAME + " default"; export const CHAT_DEFAULT_SYSTEM_PROMPT = `You are a friendly ${AI_NAME} AI assistant. You must always return in markdown format.