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",
|
provider = "claude",
|
||||||
---@type AvanteSupportedProvider
|
---@type AvanteSupportedProvider
|
||||||
openai = {
|
openai = {
|
||||||
endpoint = "https://api.openai.com",
|
endpoint = "https://api.openai.com/v1",
|
||||||
model = "gpt-4o",
|
model = "gpt-4o",
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
max_tokens = 4096,
|
max_tokens = 4096,
|
||||||
|
@ -95,7 +95,7 @@ M.parse_curl_args = function(provider, code_opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url = Utils.trim(base.endpoint, { suffix = "/" }) .. "/v1/chat/completions",
|
url = Utils.trim(base.endpoint, { suffix = "/" }) .. "/chat/completions",
|
||||||
proxy = base.proxy,
|
proxy = base.proxy,
|
||||||
insecure = base.allow_insecure,
|
insecure = base.allow_insecure,
|
||||||
headers = headers,
|
headers = headers,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user