feat(azure): support vision (#354)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-29 01:48:40 -04:00 committed by GitHub
parent 93ca541262
commit 5c1861d93f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 10 deletions

View File

@ -45,13 +45,19 @@ M.paste_image = function(line)
return false
end
return ImgClip.paste_image({
local opts = {
dir_path = paste_directory:absolute(),
prompt_for_file_name = false,
filetypes = {
AvanteInput = { url_encode_path = true, template = "\nimage: $FILE_PATH\n" },
},
}, line)
}
if vim.fn.has("wsl") > 0 or vim.fn.has("win32") > 0 then
opts.use_absolute_path = true
end
return ImgClip.paste_image(opts, line)
end
---@param filepath string

View File

@ -13,14 +13,7 @@ local M = {}
M.api_key_name = "AZURE_OPENAI_API_KEY"
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_message = O.parse_message
M.parse_response = O.parse_response
M.parse_curl_args = function(provider, code_opts)