fix(openai): enable image support on OpenAI platform only (fixes #282) (#284)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-08-27 11:35:25 -04:00
committed by GitHub
parent fe6518f6de
commit d7be4a59c2
4 changed files with 43 additions and 28 deletions

View File

@@ -13,7 +13,14 @@ local M = {}
M.api_key_name = "AZURE_OPENAI_API_KEY"
M.parse_message = O.parse_message
M.parse_message = function(opts)
local user_content = O.get_user_message(opts)
return {
{ role = "system", content = opts.system_prompt },
{ role = "user", content = user_content },
}
end
M.parse_response = O.parse_response
M.parse_curl_args = function(provider, code_opts)