diff --git a/examples/llama.vim b/examples/llama.vim index 7cc575a03..155ffc913 100644 --- a/examples/llama.vim +++ b/examples/llama.vim @@ -347,10 +347,15 @@ function! s:ring_update() \ 't_max_predict_ms': 1 \ }) - let l:curl_command = printf( - \ "curl --silent --no-buffer --request POST --url %s --header \"Content-Type: application/json\" --data %s", - \ g:llama_config.endpoint, shellescape(l:request) - \ ) + let l:curl_command = [ + \ "curl", + \ "--silent", + \ "--no-buffer", + \ "--request", "POST", + \ "--url", g:llama_config.endpoint, + \ "--header", "Content-Type: application/json", + \ "--data", l:request + \ ] " no callbacks because we don't need to process the response if s:nvim_ghost_text @@ -462,7 +467,6 @@ function! llama#fim(is_auto) abort \ "--data", l:request \ ] - if s:current_job != v:null if s:nvim_ghost_text call jobstop(s:current_job)