Skip to content

Commit fd464ec

Browse files
chore(build): auto-generate vimdoc / stylua
1 parent 4b642ce commit fd464ec

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/cmp-ai.txt

+24
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Table of Contents *cmp-ai-table-of-contents*
99
- Dedicated cmp keybindings |cmp-ai-cmp-ai-dedicated-cmp-keybindings|
1010
- Pretty Printing Menu Items |cmp-ai-cmp-ai-pretty-printing-menu-items|
1111
- Sorting |cmp-ai-cmp-ai-sorting|
12+
- Debugging Information |cmp-ai-cmp-ai-debugging-information|
1213

1314
==============================================================================
1415
1. cmp-ai *cmp-ai-cmp-ai*
@@ -452,6 +453,29 @@ You can bump `cmp-ai` completions to the top of your completion menu like so:
452453
})
453454
<
454455

456+
457+
DEBUGGING INFORMATION *cmp-ai-cmp-ai-debugging-information*
458+
459+
To retrieve the raw response from the backend, you can set the following
460+
optionin `provider_options`:
461+
462+
>lua
463+
provider_options = {
464+
raw_response_cb = function(response)
465+
-- the `response` parameter contains the raw response (JSON-like) object.
466+
467+
vim.notify(vim.inspect(response)) -- show the response as a lua table
468+
469+
vim.g.ai_raw_response = response -- store the raw response in a global
470+
-- variable so that you can use it
471+
-- somewhere else (like statusline).
472+
end,
473+
}
474+
<
475+
476+
This provides useful information like context lengths (# of tokens)
477+
andgeneration speeds (tokens per seconds), depending on your backend.
478+
455479
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
456480

457481
vim:tw=78:ts=8:noet:ft=help:norl:

0 commit comments

Comments
 (0)