diff --git a/env.example b/env.example index 88e33cc3..c41335dd 100644 --- a/env.example +++ b/env.example @@ -26,6 +26,11 @@ EMBEDDING_MODEL=sentence_transformer #or google-genai-embedding-001 openai, olla #***************************************************************** #OLLAMA_BASE_URL=http://host.docker.internal:11434 +#***************************************************************** +# Fronted Bot UI +#***************************************************************** +#VITE_API_BASE_URL=http://localhost:8504 + #***************************************************************** # OpenAI #***************************************************************** diff --git a/front-end/src/lib/chat.store.js b/front-end/src/lib/chat.store.js index ab09cd06..79df66d8 100644 --- a/front-end/src/lib/chat.store.js +++ b/front-end/src/lib/chat.store.js @@ -1,6 +1,7 @@ import { writable } from "svelte/store"; -const API_ENDPOINT = "http://localhost:8504/query-stream"; +const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "http://localhost:8504"; +const API_ENDPOINT = API_BASE_URL + "/query-stream"; export const chatStates = { IDLE: "idle", diff --git a/front-end/src/lib/generation.store.js b/front-end/src/lib/generation.store.js index 11d6705a..32e86ef7 100644 --- a/front-end/src/lib/generation.store.js +++ b/front-end/src/lib/generation.store.js @@ -1,6 +1,7 @@ import { writable } from "svelte/store"; -const API_ENDPOINT = "http://localhost:8504/generate-ticket"; +const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "http://localhost:8504"; +const API_ENDPOINT = API_BASE_URL + "/generate-ticket"; export const generationStates = { IDLE: "idle", diff --git a/readme.md b/readme.md index 28fba3d4..04758213 100644 --- a/readme.md +++ b/readme.md @@ -21,6 +21,7 @@ Available variables: | AWS_DEFAULT_REGION | | REQUIRED - Only if LLM=claudev2 or embedding_model=aws | | OPENAI_API_KEY | | REQUIRED - Only if LLM=gpt-4 or LLM=gpt-3.5 or embedding_model=openai | | GOOGLE_API_KEY | | REQUIRED - Only required when using GoogleGenai LLM or embedding model google-genai-embedding-001| +| VITE_API_BASE_URL | http://localhost:8504 | OPTIONAL - URL to the Bot API endpoint | | LANGCHAIN_ENDPOINT | "https://api.smith.langchain.com" | OPTIONAL - URL to Langchain Smith API | | LANGCHAIN_TRACING_V2 | false | OPTIONAL - Enable Langchain tracing v2 | | LANGCHAIN_PROJECT | | OPTIONAL - Langchain project name |