feat(azure): support vision (#354)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
93ca541262
commit
5c1861d93f
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user