File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Table of Contents *cmp-ai-table-of-contents*
9
9
- Dedicated cmp keybindings | cmp-ai-cmp-ai-dedicated-cmp-keybindings |
10
10
- Pretty Printing Menu Items | cmp-ai-cmp-ai-pretty-printing-menu-items |
11
11
- Sorting | cmp-ai-cmp-ai-sorting |
12
+ - Debugging Information | cmp-ai-cmp-ai-debugging-information |
12
13
13
14
==============================================================================
14
15
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:
452
453
})
453
454
<
454
455
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
+
455
479
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc >
456
480
457
481
vim:tw=78:ts=8:noet:ft=help:norl:
You can’t perform that action at this time.
0 commit comments