feat: Add custom loader for Chutes provider
This commit is contained in:
@@ -556,6 +556,19 @@ export namespace Provider {
|
||||
},
|
||||
}
|
||||
},
|
||||
chutes: async (input) => {
|
||||
const hasKey = await (async () => {
|
||||
const env = Env.all()
|
||||
if (input.env.some((item) => env[item])) return true
|
||||
if (await Auth.get(input.id)) return true
|
||||
return false
|
||||
})()
|
||||
|
||||
return {
|
||||
autoload: hasKey,
|
||||
options: {},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export const Model = z
|
||||
|
||||
Reference in New Issue
Block a user