chih.yikuan
πŸš€ ExamInsight: AI-powered exam analysis for teachers
054d73a
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`;