mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
provider compatible in model_config
This commit is contained in:
@ -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}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user