chore: allow to pass raw curl args (#920)
This can be used to pass additional arguments to curl, which can be helpful when working on new providers like bedrock, that can use curl arguments for authorization.
This commit is contained in:
@@ -155,6 +155,7 @@ M._stream = function(opts, Provider)
|
|||||||
proxy = spec.proxy,
|
proxy = spec.proxy,
|
||||||
insecure = spec.insecure,
|
insecure = spec.insecure,
|
||||||
body = curl_body_file,
|
body = curl_body_file,
|
||||||
|
raw = spec.rawArgs,
|
||||||
stream = function(err, data, _)
|
stream = function(err, data, _)
|
||||||
if err then
|
if err then
|
||||||
completed = true
|
completed = true
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ local DressingState = { winid = nil, input_winid = nil, input_bufnr = nil }
|
|||||||
---
|
---
|
||||||
---@alias AvanteMessagesParser fun(opts: AvantePromptOptions): AvanteChatMessage[]
|
---@alias AvanteMessagesParser fun(opts: AvantePromptOptions): AvanteChatMessage[]
|
||||||
---
|
---
|
||||||
---@class AvanteCurlOutput: {url: string, proxy: string, insecure: boolean, body: table<string, any> | string, headers: table<string, string>}
|
---@class AvanteCurlOutput: {url: string, proxy: string, insecure: boolean, body: table<string, any> | string, headers: table<string, string>, rawArgs: string[] | nil}
|
||||||
---@alias AvanteCurlArgsParser fun(opts: AvanteProvider | AvanteProviderFunctor, code_opts: AvantePromptOptions): AvanteCurlOutput
|
---@alias AvanteCurlArgsParser fun(opts: AvanteProvider | AvanteProviderFunctor, code_opts: AvantePromptOptions): AvanteCurlOutput
|
||||||
---
|
---
|
||||||
---@class ResponseParser
|
---@class ResponseParser
|
||||||
|
|||||||
Reference in New Issue
Block a user