Skip to content

Commit

Permalink
Add bot UI environment variables for bot API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rwilson-release committed May 7, 2024
1 parent 9191739 commit c9c9a36
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
#*****************************************************************
Expand Down
3 changes: 2 additions & 1 deletion front-end/src/lib/chat.store.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 2 additions & 1 deletion front-end/src/lib/generation.store.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit c9c9a36

Please sign in to comment.