chores: udpate readme (#2264)

This commit is contained in:
yetone
2025-06-19 14:33:50 +08:00
committed by GitHub
parent 8d936b738e
commit af2eaf797c
3 changed files with 25 additions and 27 deletions

View File

@@ -73,6 +73,9 @@ For building binary if you wish to build from source, then `cargo` is required.
```lua
{
"yetone/avante.nvim",
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make", -- ⚠️ must add this line! ! !
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
---@module 'avante'
@@ -80,23 +83,19 @@ For building binary if you wish to build from source, then `cargo` is required.
opts = {
-- add any opts here
-- for example
provider = "openai",
provider = "claude",
providers = {
openai = {
endpoint = "https://api.openai.com/v1",
model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
extra_request_body = {
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
temperature = 0.75,
max_completion_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
--reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
},
claude = {
endpoint = "https://api.anthropic.com",
model = "claude-sonnet-4-20250514",
timeout = 30000, -- Timeout in milliseconds
extra_request_body = {
temperature = 0.75,
max_tokens = 20480,
},
},
},
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-lua/plenary.nvim",

View File

@@ -58,6 +58,9 @@
```lua
{
"yetone/avante.nvim",
-- 如果您想从源代码构建,请执行 `make BUILD_FROM_SOURCE=true`
build = "make", -- ⚠️ 一定要加上这一行配置!!!!!
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- 对于 Windows
event = "VeryLazy",
version = false, -- 永远不要将此值设置为 "*"!永远不要!
---@module 'avante'
@@ -65,23 +68,19 @@
opts = {
-- 在此处添加任何选项
-- 例如
provider = "openai",
provider = "claude",
providers = {
openai = {
endpoint = "https://api.openai.com/v1",
model = "gpt-4o", -- 您想要的模型(或使用 gpt-4o 等)
extra_request_body = {
timeout = 30000, -- 超时时间(毫秒),增加此值以适应推理模型
temperature = 0,
max_tokens = 8192, -- 增加此值以包括推理模型的推理令牌
--reasoning_effort = "medium", -- low|medium|high仅用于推理模型
},
claude = {
endpoint = "https://api.anthropic.com",
model = "claude-sonnet-4-20250514",
timeout = 30000, -- Timeout in milliseconds
extra_request_body = {
temperature = 0.75,
max_tokens = 20480,
},
},
},
},
-- 如果您想从源代码构建,请执行 `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- 对于 Windows
dependencies = {
"nvim-treesitter/nvim-treesitter",

View File

@@ -270,7 +270,7 @@ M._defaults = {
---@type AvanteSupportedProvider
claude = {
endpoint = "https://api.anthropic.com",
model = "claude-3-7-sonnet-20250219",
model = "claude-sonnet-4-20250514",
timeout = 30000, -- Timeout in milliseconds
extra_request_body = {
temperature = 0.75,