Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2025 jan update #469

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a5886a7
Update open-ai-app.yml
joshsavachik Feb 13, 2024
222252e
Update open-ai-app.yml
joshsavachik Feb 13, 2024
113472b
Update open-ai-app.yml
joshsavachik Feb 13, 2024
061cee8
Update open-ai-app.yml
joshsavachik Feb 13, 2024
e20d215
Update open-ai-app.yml
joshsavachik Feb 13, 2024
f23cb1a
Updating theme and AI name to match our branding
Feb 13, 2024
b00ae8d
Changing dark mode color accents to match light mode
Feb 14, 2024
558891b
Updated to new APiChat logo
Mar 18, 2024
9863f7c
Revert "Updated to new APiChat logo"
Mar 18, 2024
788f23c
Updating citation function
Mar 18, 2024
2707090
Updating citation function
Mar 18, 2024
88bc26a
Updating APiChat to new official logo + adjusting color accent to mat…
Mar 19, 2024
1271bbb
Updating dark mode background to allow for easier readibility
Mar 19, 2024
78f9d2d
Adjusting colors more for readibility in dark mode
Mar 19, 2024
0b426e5
Adjustment to logo to 500x500
Mar 19, 2024
460ff55
Fixing reversed HSL codes
Mar 19, 2024
bd5fa45
Updated wording in AI description to match APi brand language
Mar 29, 2024
9c26f3c
Merge branch 'main' of https://github.com/APiGroupAI/apichat
Mar 29, 2024
193e21d
Update open-ai-app.yml
joshsavachik Apr 4, 2024
c672b99
Update open-ai-app.yml
joshsavachik Apr 4, 2024
613b8f7
Update open-ai-app.yml
joshsavachik Apr 4, 2024
80dd057
Update open-ai-app.yml
joshsavachik Apr 4, 2024
3cb89ab
Update open-ai-app.yml
joshsavachik Apr 4, 2024
8800bdf
Update open-ai-app.yml
joshsavachik Apr 4, 2024
8eb4bb4
Update open-ai-app.yml
joshsavachik Apr 4, 2024
5efa79d
Update open-ai-app.yml
joshsavachik Apr 4, 2024
9ed5dda
Update open-ai-app.yml
joshsavachik Apr 4, 2024
3e62f68
Update open-ai-app.yml
joshsavachik Apr 4, 2024
f23a89d
Update open-ai-app.yml
joshsavachik Apr 4, 2024
231eed5
Update open-ai-app.yml
joshsavachik Apr 8, 2024
882df67
Update open-ai-app.yml
joshsavachik Apr 8, 2024
65a6816
Update open-ai-app.yml
joshsavachik Apr 8, 2024
910609d
Update open-ai-app.yml
joshsavachik Apr 8, 2024
dfbf1ba
Update open-ai-app.yml
joshsavachik Apr 8, 2024
6a93af7
Update open-ai-app.yml
joshsavachik Apr 8, 2024
13b8275
Update open-ai-app.yml
joshsavachik Apr 8, 2024
e675795
Update open-ai-app.yml
joshsavachik Apr 8, 2024
cc92614
Update open-ai-app.yml
joshsavachik Apr 8, 2024
b8c06f9
Update open-ai-app.yml
joshsavachik Apr 8, 2024
b3ac435
Update open-ai-app.yml
joshsavachik Apr 8, 2024
c63bbde
Updating default theme + removing Extensions/Personas from the home page
Apr 8, 2024
9b502ae
Merge branch 'main' of https://github.com/APiGroupAI/apichat
Apr 8, 2024
52001d3
Added additional New Chat button to home page
Apr 9, 2024
3fc15c9
Increased button size on home page
Apr 10, 2024
48c10a9
Updated login page to remove Github login option
Apr 11, 2024
3b1df7d
Removed "Add new prompt" and dev extension msgs
Apr 23, 2024
602e46e
Updated citation service code
May 2, 2024
d4fe5e8
Further citation service updates
May 2, 2024
ee70b0e
updated citation serv
May 28, 2024
32e183e
Update open-ai-app.yml
joshsavachik Oct 16, 2024
2d5987a
Update azure-dev-validate.yml
joshsavachik Oct 16, 2024
e666197
Update azure-dev-validate.yml
joshsavachik Oct 24, 2024
0c3dd6b
Update azure-dev-validate.yml
joshsavachik Oct 24, 2024
8a5d7a4
Update azure-dev-validate.yml
joshsavachik Oct 24, 2024
fc98a4a
Update azure-dev-validate.yml
joshsavachik Oct 24, 2024
718f27c
Update azure-dev-validate.yml
joshsavachik Oct 24, 2024
47bd2a4
Update resources.bicep
joshsavachik Oct 24, 2024
92df62b
Update main.bicep
joshsavachik Oct 24, 2024
1478b8b
Update resources.bicep
joshsavachik Oct 24, 2024
25b6274
Update resources.bicep
joshsavachik Oct 24, 2024
7f39b06
Update resources.bicep
joshsavachik Oct 24, 2024
dcf7e7c
Update resources.bicep
joshsavachik Oct 24, 2024
0a6ae2f
Update resources.bicep
joshsavachik Oct 24, 2024
8ff2c6b
empty
Oct 24, 2024
faa6666
Update open-ai-app.yml
joshsavachik Oct 24, 2024
0a86ade
azure app insights integrated
Jan 9, 2025
963ac54
Menu open default to false
Jan 14, 2025
2381e2a
app insights update
Jan 14, 2025
f8347c2
Code update for app insights
Jan 14, 2025
67be046
get User session
Jan 16, 2025
a8815e8
User details log in app insight
Jan 16, 2025
5905e69
session log to check user details
Jan 17, 2025
499e0eb
Removed console log
Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/azure-dev-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches:
- main
- master
- oct-update
pull_request:
branches:
- main
- master
- oct-update

jobs:
build:
Expand All @@ -19,9 +19,13 @@ jobs:
uses: actions/checkout@v3

- name: Build Bicep for linting
uses: azure/CLI@v1
uses: azure/cli@v2
with:
inlineScript: az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep --stdout
azcliversion: 2.64.0
inlineScript: |
tdnf install -y icu
tdnf install -y jq
az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep --stdout

- name: Run Microsoft Security DevOps Analysis
uses: microsoft/security-devops-action@preview
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/open-ai-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Build & deploy Next.js app to Azure Web App
on:
# Automatically trigger it when detected changes in repo
push:
branches: [main]
branches:
- main

# Allow manual workflow trigger
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment:
name: Production
name: 'Development'

steps:
- name: 🍏 Set up Node.js version
Expand All @@ -77,24 +77,26 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

# Set the build during deployment setting to false. This setting was added in the templates to all azd to work, but breaks deployment via webapps-deploy
- name: Azure CLI script
uses: azure/CLI@v1
with:
inlineScript: |
rg=$(az webapp list --query "[?name=='${{ secrets.AZURE_APP_SERVICE_NAME }}'].resourceGroup" --output tsv)
echo Setting SCM_DO_BUILD_DURING_DEPLOYMENT=false on app service ${{ secrets.AZURE_APP_SERVICE_NAME }}
az webapp config appsettings set -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg --settings SCM_DO_BUILD_DURING_DEPLOYMENT=false -o none
echo Setting --startup-file=\"node server.js\" on app service ${{ secrets.AZURE_APP_SERVICE_NAME }}
az webapp config set --startup-file="node server.js" -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg -o none
sleep 10
inlineScript: |
rg=$(az webapp list --query "[?name=='${{ secrets.AZURE_APP_SERVICE_NAME }}'].resourceGroup" --output tsv)
echo Setting SCM_DO_BUILD_DURING_DEPLOYMENT=true on app service ${{ secrets.AZURE_APP_SERVICE_NAME }} slot dev
az webapp config appsettings set -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg --settings SCM_DO_BUILD_DURING_DEPLOYMENT=false -o none --slot dev
echo Setting --startup-file="node server.js" on app service ${{ secrets.AZURE_APP_SERVICE_NAME }} slot dev
az webapp config set --startup-file="node server.js" -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg -o none --slot dev
sleep 10


- name: 🚀 Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ secrets.AZURE_APP_SERVICE_NAME }}
slot-name: 'dev'
publish-profile: ${{ secrets.AZURE_APP_SERVICE_PUBLISH_PROFILE_DEV }}
package: ${{ github.workspace }}/Nextjs-site.zip

- name: 🧹 Cleanup
run: rm ${{ github.workspace }}/Nextjs-site.zip
35 changes: 9 additions & 26 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -20,37 +20,26 @@ param location string
param openAILocation string

param openAISku string = 'S0'
param openAIApiVersion string = '2023-12-01-preview'
param openAIApiVersion string ='2024-08-01-preview'

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'

// 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
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'
Expand Down Expand Up @@ -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
Expand Down
89 changes: 15 additions & 74 deletions infra/resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,21 @@ 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
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'
Expand All @@ -45,16 +38,16 @@ 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}')
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)
Expand All @@ -79,7 +72,7 @@ var llmDeployments = [
version: chatGptModelVersion
}
sku: {
name: 'Standard'
name: 'GlobalStandard'
capacity: chatGptDeploymentCapacity
}
}
Expand Down Expand Up @@ -133,22 +126,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})'
Expand Down Expand Up @@ -298,14 +275,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: {
Expand Down Expand Up @@ -478,14 +447,15 @@ resource llmdeployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05
name: deployment.name
properties: {
model: deployment.model
raiPolicyName: contains(deployment, 'raiPolicyName') ? deployment.raiPolicyName : null
}
sku: contains(deployment, 'sku') ? deployment.sku : {
sku: deployment.sku != null ? deployment.sku : {
name: 'Standard'
capacity: deployment.capacity
}
}]



resource azureopenaidalle 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
name: openai_dalle_name
location: dalleLocation
Expand Down Expand Up @@ -516,35 +486,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
Expand Down
73 changes: 0 additions & 73 deletions src/.env.example

This file was deleted.

Binary file modified src/app/favicon.ico
Binary file not shown.
Loading