add baidu bce platform support

This commit is contained in:
zhangkun9038@dingtalk.com 2025-02-09 02:02:11 +08:00
parent 3f61df6373
commit a715664408

View File

@ -285,17 +285,6 @@ M.parse_curl_args = function(provider, prompt_opts)
-- Add appid header if configured -- Add appid header if configured
if base.bce_appid then headers["appid"] = base.bce_appid end 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 if P.env.require_api_key(base) then
local api_key = provider.parse_api_key() local api_key = provider.parse_api_key()
if api_key == nil then if api_key == nil then