summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchaihahaha <chai836275709@gmail.com>2023-08-30 14:50:55 +0800
committerGitHub <noreply@github.com>2023-08-30 09:50:55 +0300
commitad9ddcff6ef322db5cf13785bd7c856b610d242e (patch)
treeef6454f36a50fff6246ffd93087abc599f9bb45a
parent8341a25957b319a03d4a811176cd5ad7f2b0fbd4 (diff)
llm.vim : stop generation at multiple linebreaks, bind to <F2> (#2879)
-rw-r--r--examples/llm.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/llm.vim b/examples/llm.vim
index 594a2854..d580a3d0 100644
--- a/examples/llm.vim
+++ b/examples/llm.vim
@@ -8,7 +8,7 @@ function! Llm()
let buffer_content = join(getline(1, '$'), "\n")
" Create the JSON payload
- let json_payload = {"temp":0.72,"top_k":100,"top_p":0.73,"repeat_penalty":1.100000023841858,"n_predict":10,"stream": v:false}
+ 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}
let json_payload.prompt = buffer_content
" Define the curl command
@@ -25,3 +25,4 @@ function! Llm()
endfunction
command! Llm call Llm()
+noremap <F2> :Llm<CR>