From af2eaf797c24e333fddb6a2121c540214de08d25 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 19 Jun 2025 14:33:50 +0800 Subject: [PATCH] chores: udpate readme (#2264) --- README.md | 25 ++++++++++++------------- README_zh.md | 25 ++++++++++++------------- lua/avante/config.lua | 2 +- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index fc80caa..ea6c4f0 100644 --- a/README.md +++ b/README.md @@ -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", diff --git a/README_zh.md b/README_zh.md index bd1ccd2..68e10bc 100644 --- a/README_zh.md +++ b/README_zh.md @@ -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", diff --git a/lua/avante/config.lua b/lua/avante/config.lua index fb5c4b2..4330075 100644 --- a/lua/avante/config.lua +++ b/lua/avante/config.lua @@ -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,