-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.ts
More file actions
30 lines (28 loc) · 1.53 KB
/
config.ts
File metadata and controls
30 lines (28 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Backend API configuration
// Use environment var if provided; otherwise default to same-origin
const ENV_API_BASE_URL = import.meta.env.VITE_API_BASE_URL as string | undefined;
export const API_BASE_URL = (ENV_API_BASE_URL && ENV_API_BASE_URL.trim() !== "")
? ENV_API_BASE_URL
: window.location.origin;
// API endpoints
export const API_ENDPOINTS = {
PROCESS_TOPICS: `${API_BASE_URL}/api/process-topics`,
AI_PROCESS: `${API_BASE_URL}/api/ai-process`,
EXPLAIN_TOPIC: `${API_BASE_URL}/api/explain-topic`,
SUGGEST_TOPICS: `${API_BASE_URL}/api/suggest-topics`,
GENERATED_NODES: `${API_BASE_URL}/api/generated-node-gexf`,
GENERATE_GRAPH_WITH_EDGES: `${API_BASE_URL}/api/generate-graph-with-edges`,
GET_UNIQUE_REPOS: `${API_BASE_URL}/api/get-unique-repos`,
CREATE_EDGES_ON_GRAPH: `${API_BASE_URL}/api/create-edges-on-graph`,
// GraphRAG endpoints
GRAPHRAG_HEALTH: `${API_BASE_URL}/api/graphrag-health`,
GRAPHRAG_SETUP: `${API_BASE_URL}/api/graphrag-setup`,
GRAPHRAG_PROGRESS: `${API_BASE_URL}/api/graphrag-progress`,
GRAPHRAG_RESET_PROGRESS: `${API_BASE_URL}/api/graphrag-reset-progress`,
GRAPHRAG_CHANGE_PROVIDER: `${API_BASE_URL}/api/graphrag-change-provider`,
GRAPHRAG_UPDATE_README: `${API_BASE_URL}/api/graphrag-update-readme`,
GRAPHRAG_FIX_SCHEMA: `${API_BASE_URL}/api/graphrag-fix-schema`,
GRAPHRAG_QUERY: `${API_BASE_URL}/api/graphrag`,
GRAPHRAG_CLEANUP: `${API_BASE_URL}/api/graphrag-cleanup`,
GRAPHRAG_CHECK_CHANGES: `${API_BASE_URL}/api/graphrag-check-changes`,
} as const;