chore: run stylua [generated] (#460)
* chore: add stylua Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * chore: running stylua Signed-off-by: Aaron Pham <contact@aarnphm.xyz> --------- Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
local Utils = require("avante.utils")
|
||||
local P = require("avante.providers")
|
||||
local Utils = require "avante.utils"
|
||||
local P = require "avante.providers"
|
||||
|
||||
---@alias CohereFinishReason "COMPLETE" | "LENGTH" | "ERROR"
|
||||
---
|
||||
@@ -52,9 +52,7 @@ M.parse_stream_data = function(data, opts)
|
||||
return
|
||||
end
|
||||
---@cast json CohereTextGenerationResponse
|
||||
if json.event_type == "text-generation" then
|
||||
opts.on_chunk(json.text)
|
||||
end
|
||||
if json.event_type == "text-generation" then opts.on_chunk(json.text) end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,9 +69,7 @@ M.parse_curl_args = function(provider, code_opts)
|
||||
.. "."
|
||||
.. vim.version().patch,
|
||||
}
|
||||
if not P.env.is_local("cohere") then
|
||||
headers["Authorization"] = "Bearer " .. provider.parse_api_key()
|
||||
end
|
||||
if not P.env.is_local "cohere" then headers["Authorization"] = "Bearer " .. provider.parse_api_key() end
|
||||
|
||||
return {
|
||||
url = Utils.trim(base.endpoint, { suffix = "/" }) .. "/chat",
|
||||
|
||||
Reference in New Issue
Block a user