Skip to content

Commit c9c9a36

Browse files
Add bot UI environment variables for bot API endpoint
1 parent 9191739 commit c9c9a36

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

env.example

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ EMBEDDING_MODEL=sentence_transformer #or google-genai-embedding-001 openai, olla
2626
#*****************************************************************
2727
#OLLAMA_BASE_URL=http://host.docker.internal:11434
2828

29+
#*****************************************************************
30+
# Fronted Bot UI
31+
#*****************************************************************
32+
#VITE_API_BASE_URL=http://localhost:8504
33+
2934
#*****************************************************************
3035
# OpenAI
3136
#*****************************************************************

front-end/src/lib/chat.store.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { writable } from "svelte/store";
22

3-
const API_ENDPOINT = "http://localhost:8504/query-stream";
3+
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "http://localhost:8504";
4+
const API_ENDPOINT = API_BASE_URL + "/query-stream";
45

56
export const chatStates = {
67
IDLE: "idle",

front-end/src/lib/generation.store.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { writable } from "svelte/store";
22

3-
const API_ENDPOINT = "http://localhost:8504/generate-ticket";
3+
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "http://localhost:8504";
4+
const API_ENDPOINT = API_BASE_URL + "/generate-ticket";
45

56
export const generationStates = {
67
IDLE: "idle",

readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Available variables:
2121
| AWS_DEFAULT_REGION | | REQUIRED - Only if LLM=claudev2 or embedding_model=aws |
2222
| OPENAI_API_KEY | | REQUIRED - Only if LLM=gpt-4 or LLM=gpt-3.5 or embedding_model=openai |
2323
| GOOGLE_API_KEY | | REQUIRED - Only required when using GoogleGenai LLM or embedding model google-genai-embedding-001|
24+
| VITE_API_BASE_URL | http://localhost:8504 | OPTIONAL - URL to the Bot API endpoint |
2425
| LANGCHAIN_ENDPOINT | "https://api.smith.langchain.com" | OPTIONAL - URL to Langchain Smith API |
2526
| LANGCHAIN_TRACING_V2 | false | OPTIONAL - Enable Langchain tracing v2 |
2627
| LANGCHAIN_PROJECT | | OPTIONAL - Langchain project name |

0 commit comments

Comments
 (0)