fix(openai): add support for Cloudflare's AI-Gateway (#192)
This commit is contained in:
parent
9ac9f827ba
commit
1142c3c274
@ -13,7 +13,7 @@ M.defaults = {
|
||||
provider = "claude",
|
||||
---@type AvanteSupportedProvider
|
||||
openai = {
|
||||
endpoint = "https://api.openai.com",
|
||||
endpoint = "https://api.openai.com/v1",
|
||||
model = "gpt-4o",
|
||||
temperature = 0,
|
||||
max_tokens = 4096,
|
||||
|
@ -95,7 +95,7 @@ M.parse_curl_args = function(provider, code_opts)
|
||||
end
|
||||
|
||||
return {
|
||||
url = Utils.trim(base.endpoint, { suffix = "/" }) .. "/v1/chat/completions",
|
||||
url = Utils.trim(base.endpoint, { suffix = "/" }) .. "/chat/completions",
|
||||
proxy = base.proxy,
|
||||
insecure = base.allow_insecure,
|
||||
headers = headers,
|
||||
|
Loading…
x
Reference in New Issue
Block a user