fix: use the original prompts (#397)

This commit is contained in:
yetone
2024-08-30 22:21:50 +08:00
committed by GitHub
parent 5cf85d59bd
commit 104484f17c
9 changed files with 216 additions and 135 deletions

View File

@@ -31,9 +31,14 @@ local M = {}
M.api_key_name = "CO_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
return {
preamble = opts.system_prompt,
message = opts.user_prompt,
message = user_prompt,
}
end