Skip to content

Commit ad9ddcf

Browse files
authored
llm.vim : stop generation at multiple linebreaks, bind to <F2> (#2879)
1 parent 8341a25 commit ad9ddcf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/llm.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function! Llm()
88
let buffer_content = join(getline(1, '$'), "\n")
99

1010
" Create the JSON payload
11-
let json_payload = {"temp":0.72,"top_k":100,"top_p":0.73,"repeat_penalty":1.100000023841858,"n_predict":10,"stream": v:false}
11+
let json_payload = {"temp":0.72,"top_k":100,"top_p":0.73,"repeat_penalty":1.100000023841858,"n_predict":256,"stop": ["\n\n\n"],"stream": v:false}
1212
let json_payload.prompt = buffer_content
1313

1414
" Define the curl command
@@ -25,3 +25,4 @@ function! Llm()
2525
endfunction
2626

2727
command! Llm call Llm()
28+
noremap <F2> :Llm<CR>

0 commit comments

Comments
 (0)