chore(providers): add failed warning (#225)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-26 00:29:23 -04:00 committed by GitHub
parent 6113c246e0
commit 996378d2f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,6 +226,10 @@ M = setmetatable(M, {
if t[k].setup == nil then if t[k].setup == nil then
t[k].setup = function() t[k].setup = function()
t[k].parse_api_key() t[k].parse_api_key()
if not t[k].has() then
Utils.warn("Failed to setup " .. k .. ". Avante won't work as expected", { once = true, title = "Avante" })
end
end end
end end