chore(provider): use latest cohere models (#400)

Update prompts to correct grammar
concat with table.concat to avoid overhead

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-08-30 13:39:36 -04:00
committed by GitHub
parent 61acd714ba
commit b196627e86
4 changed files with 9 additions and 15 deletions

View File

@@ -28,10 +28,7 @@ local M = {}
M.api_key_name = "OPENAI_API_KEY"
M.parse_message = function(opts)
local user_prompt = ""
for _, user_prompt_ in ipairs(opts.user_prompts) do
user_prompt = user_prompt .. "\n\n" .. user_prompt_
end
local user_prompt = table.concat(opts.user_prompts, "\n\n")
---@type string | OpenAIMessage[]
local user_content