@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
10 lines (5 loc) • 353 B
text/typescript
import urlJoin from 'url-join';
const isVercelPreview = process.env.VERCEL === '1' && process.env.VERCEL_ENV !== 'production';
const vercelPreviewUrl = `https://${process.env.VERCEL_URL}`;
const siteUrl = isVercelPreview ? vercelPreviewUrl : 'https://lobechat.com';
export const getCanonicalUrl = (...paths: string[]) => urlJoin(siteUrl, ...paths);