From a7156644085d58a8779c5b9c6056da3d475ed64c Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Sun, 9 Feb 2025 02:02:11 +0800 Subject: [PATCH] add baidu bce platform support --- lua/avante/providers/openai.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lua/avante/providers/openai.lua b/lua/avante/providers/openai.lua index 9ab6872..0b4e053 100644 --- a/lua/avante/providers/openai.lua +++ b/lua/avante/providers/openai.lua @@ -285,17 +285,6 @@ M.parse_curl_args = function(provider, prompt_opts) -- Add appid header if configured if base.bce_appid then headers["appid"] = base.bce_appid end - if P.env.require_api_key(base) then - local api_key = provider.parse_api_key() - if api_key == nil then - error(Config.provider .. " API key is not set, please set it in your environment variable or config file") - end - headers["Authorization"] = "Bearer " .. api_key - end - local headers = { - ["Content-Type"] = "application/json", - } - if P.env.require_api_key(base) then local api_key = provider.parse_api_key() if api_key == nil then