| function getUrlParam(paramName: string): string | null { | |
| const urlParams = new URLSearchParams(window.location.search); | |
| return urlParams.get(paramName); | |
| } | |
| const SPACE_ID = getUrlParam('SPACE_ID'); | |
| const LLM_ENDPOINT = getUrlParam('LLM_ENDPOINT'); | |
| export const CONFIG = { | |
| llmEndpoint: | |
| LLM_ENDPOINT && LLM_ENDPOINT.length > 5 | |
| ? LLM_ENDPOINT | |
| : 'https://gnb1thady6h3noiz.us-east-1.aws.endpoints.huggingface.cloud/v1/chat/completions', | |
| ttsSpaceId: SPACE_ID || 'ngxson/kokoro-podcast-generator', | |
| }; | |
| console.log({ CONFIG }); | |