provider compatible in model_config

This commit is contained in:
JzoNg
2024-11-07 21:50:22 +08:00
parent 0cfd676fd6
commit 5a679ed396
3 changed files with 38 additions and 13 deletions

View File

@ -57,3 +57,10 @@ export async function fetchWithRetry<T = any>(fn: Promise<T>, retries = 3): Prom
return [null, res]
}
}
export const correctProvider = (provider: string) => {
if (provider.includes('/'))
return provider
return `langgenius/${provider}/${provider}`
}