diff --git a/README.md b/README.md index 63bcae9..79b8f6e 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,15 @@ For building binary if you wish to build from source, then `cargo` is required. max_tokens = 20480, }, }, + moonshot = { + endpoint = "https://api.moonshot.ai/v1", + model = "kimi-k2-0711-preview", + timeout = 30000, -- Timeout in milliseconds + extra_request_body = { + temperature = 0.75, + max_tokens = 32768, + }, + }, }, }, dependencies = { @@ -714,6 +723,7 @@ Given its early stage, `avante.nvim` currently supports the following basic func > export AVANTE_GEMINI_API_KEY=your-gemini-api-key > export AVANTE_CO_API_KEY=your-cohere-api-key > export AVANTE_AIHUBMIX_API_KEY=your-aihubmix-api-key +> export AVANTE_MOONSHOT_API_KEY=your-moonshot-api-key > ``` > > **Global API Keys (Legacy)** diff --git a/README_zh.md b/README_zh.md index eb86c91..e1eb1e5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -79,6 +79,15 @@ max_tokens = 20480, }, }, + moonshot = { + endpoint = "https://api.moonshot.ai/v1", + model = "kimi-k2-0711-preview", + timeout = 30000, -- 超时时间(毫秒) + extra_request_body = { + temperature = 0.75, + max_tokens = 32768, + }, + }, }, }, dependencies = { @@ -315,6 +324,15 @@ _请参见 [config.lua#L9](./lua/avante/config.lua) 以获取完整配置_ max_tokens = 4096, }, }, + moonshot = { + endpoint = "https://api.moonshot.ai/v1", + model = "kimi-k2-0711-preview", + timeout = 30000, -- 超时时间(毫秒) + extra_request_body = { + temperature = 0.75, + max_tokens = 32768, + }, + }, }, ---指定特殊的 dual_boost 模式 ---1. enabled: 是否启用 dual_boost 模式。默认为 false。 @@ -545,6 +563,7 @@ _请参见 [config.lua#L9](./lua/avante/config.lua) 以获取完整配置_ > export AVANTE_GEMINI_API_KEY=your-gemini-api-key > export AVANTE_CO_API_KEY=your-cohere-api-key > export AVANTE_AIHUBMIX_API_KEY=your-aihubmix-api-key +> export AVANTE_MOONSHOT_API_KEY=your-moonshot-api-key > ``` > > **全局 API 密钥(传统方式)** diff --git a/lua/avante/config.lua b/lua/avante/config.lua index 89e9f6d..d644106 100644 --- a/lua/avante/config.lua +++ b/lua/avante/config.lua @@ -401,6 +401,12 @@ M._defaults = { model = "auto", api_key_name = "MORPH_API_KEY", }, + moonshot = { + __inherited_from = "openai", + endpoint = "https://api.moonshot.ai/v1", + model = "kimi-k2-0711-preview", + api_key_name = "MOONSHOT_API_KEY", + }, }, ---Specify the special dual_boost mode ---1. enabled: Whether to enable dual_boost mode. Default to false.