fix: provider must be set (#868)

This commit is contained in:
yetone 2024-11-19 05:14:04 +08:00 committed by GitHub
parent 3b390040f5
commit cf2312abbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,6 +161,8 @@ end
---@param opts {refresh: boolean, provider: AvanteProviderFunctor}
---@private
E.setup = function(opts)
opts.provider.setup()
local var = opts.provider.api_key_name
if var == nil or var == "" then
@ -168,8 +170,6 @@ E.setup = function(opts)
return
end
opts.provider.setup()
-- check if var is a all caps string
if type(var) == "table" or var:match("^cmd:(.*)") then return end