chore(openai): add back support functions for ease-of-use (#402)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-30 13:49:08 -04:00 committed by GitHub
parent b196627e86
commit 5ff5dcf72b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,6 +27,11 @@ local M = {}
M.api_key_name = "OPENAI_API_KEY"
---@param opts AvantePromptOptions
M.get_user_message = function(opts)
return table.concat(opts.user_prompts, "\n\n")
end
M.parse_message = function(opts)
local user_prompt = table.concat(opts.user_prompts, "\n\n")