Spaces:
Runtime error
Runtime error
File size: 826 Bytes
69f2236 054d73a 69f2236 054d73a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | const readEnvString = (value: unknown): string | undefined =>
typeof value === "string" && value.trim().length > 0
? value.trim()
: undefined;
export const CHATKIT_API_URL =
readEnvString(import.meta.env.VITE_CHATKIT_API_URL) ?? "/chatkit";
export const API_BASE_URL =
readEnvString(import.meta.env.VITE_API_BASE_URL) ?? "";
/**
* ChatKit requires a domain key at runtime. Use the local fallback while
* developing, and register a production domain key for deployment:
* https://platform.openai.com/settings/organization/security/domain-allowlist
*/
export const CHATKIT_API_DOMAIN_KEY =
readEnvString(import.meta.env.VITE_CHATKIT_API_DOMAIN_KEY) ??
"domain_pk_localhost_dev";
export const GOOGLE_AUTH_URL = `${API_BASE_URL}/auth/start`;
export const AUTH_STATUS_URL = `${API_BASE_URL}/auth/status`;
|