From e3c7a571d87daeb7235579f6ba0e6a6f91b7073a Mon Sep 17 00:00:00 2001 From: Andreas Lilleby Hjulstad Date: Wed, 20 Nov 2024 16:09:19 +0100 Subject: [PATCH] chore: fix env variables and change app title --- backend/src/services/agent.py | 2 +- docker-compose.yml | 9 +++++++++ webapp/.env.example | 11 +++++++---- webapp/src/app/layout.tsx | 4 ++-- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/backend/src/services/agent.py b/backend/src/services/agent.py index 82b4d1a..419663b 100644 --- a/backend/src/services/agent.py +++ b/backend/src/services/agent.py @@ -24,7 +24,7 @@ deployment_name = os.getenv("AZURE_OPENAI_DEPLOYMENT_NAME") # TODO: add correct elements to the AzureOpenAI class -API_KEY = os.getenv("OPENAI_API_KEY") +API_KEY = os.getenv("AZURE_OPENAI_API_KEY") llm = ChatOpenAI(temperature=0, api_key=API_KEY) diff --git a/docker-compose.yml b/docker-compose.yml index 1a24959..322ab9c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,7 @@ services: environment: - ARKIVGPT_URL=http://host.docker.internal:80/api # Overrides the URLs set in .env to use host.docker.internal instead of localhost - PLANPRAT_URL=http://host.docker.internal:8000/plan-prat/ + - CADAID_URL=${CADAID_URL} - DATABASE_URL=${DATABASE_URL} - NEXTAUTH_URL=${NEXTAUTH_URL} extra_hosts: @@ -26,3 +27,11 @@ services: - "8000:8000" volumes: - ./backend:/code + environment: + - AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY} + - AZURE_OPENAI_API_BASE=${AZURE_OPENAI_API_BASE} + - AZURE_OPENAI_DEPLOYMENT_NAME=${AZURE_OPENAI_DEPLOYMENT_NAME} + - API_VERSION=${API_VERSION} + - ARKIVGPT_URL=${ARKIVGPT_URL} + - CADAID_URL=${CADAID_URL} + diff --git a/webapp/.env.example b/webapp/.env.example index 7b06f0a..ae62ab1 100644 --- a/webapp/.env.example +++ b/webapp/.env.example @@ -17,15 +17,18 @@ DATABASE_URL="mysql://root:password@localhost:3306/ntnu-kpro-ai-assistant" # You can generate a new secret on the command line with: # openssl rand -base64 32 # https://next-auth.js.org/configuration/options#secret -# NEXTAUTH_SECRET="" +NEXTAUTH_SECRET="" NEXTAUTH_URL="http://localhost:3000" -# Planprat API -PLANPRAT_URL="http://localhost:8000/plan-prat" - # Next Auth Discord Provider DISCORD_CLIENT_ID="" DISCORD_CLIENT_SECRET="" # ArkivGPT API ARKIVGPT_URL="http://localhost:80/api" + +# CADAID API +CADAID_URL="http://localhost:5001/detect/" + +# Planprat API +PLANPRAT_URL="http://localhost:8000/plan-prat" diff --git a/webapp/src/app/layout.tsx b/webapp/src/app/layout.tsx index d8feee2..fd0fbff 100644 --- a/webapp/src/app/layout.tsx +++ b/webapp/src/app/layout.tsx @@ -8,8 +8,8 @@ import Navbar from "../components/Navbar"; import Footer from "../components/Footer"; export const metadata: Metadata = { - title: "Create T3 App", - description: "Generated by create-t3-app", + title: "KartAI AI-modeller", + description: "Dette er en tjeneste som viser hvordan de ulike KI-assistentene til Norkart kan brukes til å effektivisere og hjelpe innbyggere og saksbehandlere med byggesøknader.", icons: [{ rel: "icon", url: "/favicon.ico" }], };