Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions autoload/llama.vim
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ highlight default llama_hl_fim_info guifg=#77ff2f ctermfg=119
" auto_fim: trigger FIM completion automatically on cursor movement
" max_line_suffix: do not auto-trigger FIM completion if there are more than this number of characters to the right of the cursor
" max_cache_keys: max number of cached completions to keep in result_cache
" fim_params: request parameters for the FIM completion (optional, use default parameters if not provided)
" inst_params: request parameters for the instruction completion (optional, use default parameters if not provided)
" enable_at_startup: enable llama.vim functionality at startup (default: v:true)
"
" ring buffer of chunks, accumulated with time upon:
Expand Down Expand Up @@ -92,6 +94,8 @@ let s:default_config = {
\ 'keymap_inst_accept': "<Tab>",
\ 'keymap_inst_cancel': "<Esc>",
\ 'keymap_debug_toggle': "<leader>lld",
\ 'fim_params': {},
\ 'inst_params': {},
\ 'enable_at_startup': v:true,
\ }

Expand Down Expand Up @@ -823,6 +827,7 @@ function! llama#fim(pos_x, pos_y, is_auto, prev, use_cache) abort
\ "tokens_cached",
\ ],
\ }
call extend(l:request, g:llama_config.fim_params, 'force')

let l:curl_command = [
\ "curl",
Expand Down Expand Up @@ -1497,6 +1502,7 @@ function! llama#inst_send(req_id, messages)
\ 'stream': v:true,
\ 'cache_prompt': v:true,
\ }
call extend(l:request, g:llama_config.inst_params, 'force')

let l:curl_command = [
\ "curl",
Expand Down
8 changes: 8 additions & 0 deletions doc/llama.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ Currently the default config is:
\ 'keymap_inst_accept': "<Tab>",
\ 'keymap_inst_cancel': "<Esc>",
\ 'keymap_debug_toggle': "<leader>lld",
\ 'fim_params': {},
\ 'inst_params': {},
\ 'enable_at_startup': v:true,
\ }
<
Expand Down Expand Up @@ -177,6 +179,12 @@ Currently the default config is:

- {max_cache_keys} max number of cached completions to keep in result_cache

- {fim_params} request parameters for the FIM completion (optional, use
default parameters if not provided)

- {inst_params} request parameters for the instruction completion
(optional, use default parameters if not provided)

- {enable_at_startup} whether to enable llama.vim functionality at startup
(v:true to enable, v:false to disable; default: v:true)

Expand Down