Files
cherry-studio/src/renderer/src/utils/api.ts
T
2025-02-21 13:50:24 +08:00

16 lines
290 B
TypeScript

export function formatApiHost(host: string) {
const forceUseOriginalHost = () => {
if (host.endsWith('/')) {
return true
}
if (host.endsWith('volces.com/api/v3')) {
return true
}
return false
}
return forceUseOriginalHost() ? host : `${host}/v1/`
}