fix(local): ensure to set login to true in local (fixes #135) (#295)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-27 18:05:47 -04:00 committed by GitHub
parent 01d12ccf98
commit 943d3f20b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,7 @@ M.defaults = {
---@type AvanteSupportedProvider
gemini = {
endpoint = "https://generativelanguage.googleapis.com/v1beta/models",
model = "gemini-1.5-pro",
model = "gemini-1.5-flash-latest",
timeout = 30000, -- Timeout in milliseconds
temperature = 0,
max_tokens = 4096,

View File

@ -173,6 +173,10 @@ E.setup = function(opts)
opts.provider.setup()
if opts.provider["local"] then
vim.g.avante_login = true
end
-- check if var is a all caps string
if var == M.AVANTE_INTERNAL_KEY or var:match("^cmd:(.*)") or opts.provider["local"] == true then
return