Spaces:
Sleeping
Sleeping
| // src/config/api.js | |
| export const API_LLM = import.meta.env.VITE_API_URL_LLM || '/api/llm/generate'; | |
| export const API_TTS = import.meta.env.VITE_API_URL_TTS || '/api/tts/generate-tts'; | |
| export const API_STT = import.meta.env.VITE_API_URL_STT || '/api/stt/transcribe'; | |
| export const WS_URL = import.meta.env.VITE_WS_URL || (() => { | |
| // Auto-détection de l'URL WebSocket basée sur l'environnement | |
| if (window.location.protocol === 'https:') { | |
| return `wss://${window.location.host}/ws`; | |
| } else { | |
| return `ws://${window.location.host}/ws`; | |
| } | |
| })(); | |