chore: generate
This commit is contained in:
@@ -1243,9 +1243,7 @@ export namespace Provider {
|
|||||||
return { providerID: entry.providerID, modelID: entry.modelID }
|
return { providerID: entry.providerID, modelID: entry.modelID }
|
||||||
}
|
}
|
||||||
|
|
||||||
const provider = Object.values(providers).find(
|
const provider = Object.values(providers).find((p) => !cfg.provider || Object.keys(cfg.provider).includes(p.id))
|
||||||
(p) => !cfg.provider || Object.keys(cfg.provider).includes(p.id),
|
|
||||||
)
|
|
||||||
if (!provider) throw new Error("no providers found")
|
if (!provider) throw new Error("no providers found")
|
||||||
const [model] = sort(Object.values(provider.models))
|
const [model] = sort(Object.values(provider.models))
|
||||||
if (!model) throw new Error("no models found")
|
if (!model) throw new Error("no models found")
|
||||||
|
|||||||
Reference in New Issue
Block a user