Add extra headers for OpenAI (#1615)
This commit is contained in:
committed by
GitHub
parent
f761e83033
commit
3b86549485
@@ -278,6 +278,12 @@ function M:parse_curl_args(prompt_opts)
|
||||
["Content-Type"] = "application/json",
|
||||
}
|
||||
|
||||
if provider_conf.extra_headers then
|
||||
for key, value in pairs(provider_conf.extra_headers) do
|
||||
headers[key] = value
|
||||
end
|
||||
end
|
||||
|
||||
if P.env.require_api_key(provider_conf) then
|
||||
local api_key = self.parse_api_key()
|
||||
if api_key == nil then
|
||||
|
||||
Reference in New Issue
Block a user