feat: add Gemini support (#142)

Co-authored-by: Jihun Kim <jihun.kim.uk@gmail.com>
This commit is contained in:
jihunkim0
2024-08-21 17:52:25 +01:00
committed by GitHub
parent c41ad591a1
commit 45a47075e5
2 changed files with 107 additions and 3 deletions

View File

@@ -7,9 +7,9 @@ local M = {}
---@class avante.Config
M.defaults = {
debug = false,
---Currently, default supported providers include "claude", "openai", "azure", "deepseek", "groq"
---Currently, default supported providers include "claude", "openai", "azure", "deepseek", "groq", "gemini"
---For custom provider, see README.md
---@alias Provider "openai" | "claude" | "azure" | "deepseek" | "groq" | "copilot" | string
---@alias Provider "openai" | "claude" | "azure" | "deepseek" | "groq" | "copilot" | "gemini" | string
provider = "claude",
---@type AvanteSupportedProvider
openai = {
@@ -62,6 +62,13 @@ M.defaults = {
max_tokens = 4096,
["local"] = false,
},
---@type AvanteGeminiProvider
gemini = {
endpoint = "",
type = "gemini",
model = "gemini-1.5-pro",
options = {},
},
---To add support for custom provider, follow the format below
---See https://github.com/yetone/avante.nvim/README.md#custom-providers for more details
---@type {[string]: AvanteProvider}