diff options
| author | Martin Bielik <martin.bielik@instea.sk> | 2024-12-08 21:15:53 +0100 |
|---|---|---|
| committer | Martin Bielik <martin.bielik@instea.sk> | 2024-12-08 21:15:53 +0100 |
| commit | ea83fdc59b64843f570c94d34d97c3131663d3e8 (patch) | |
| tree | 95eee645cbf775c6f6891853eff463b286c2ddca /py/complete.py | |
| parent | 03450bfb8193933916f2c2c2591faff041eb10d1 (diff) | |
| download | vim-ai-ea83fdc59b64843f570c94d34d97c3131663d3e8.tar.gz | |
print prompt in debug mode
Diffstat (limited to 'py/complete.py')
| -rw-r--r-- | py/complete.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/complete.py b/py/complete.py index d7040a3..0580257 100644 --- a/py/complete.py +++ b/py/complete.py @@ -14,6 +14,7 @@ is_selection = vim.eval("l:is_selection") def complete_engine(prompt): openai_options = make_openai_options(config_options) http_options = make_http_options(config_options) + printDebug("[engine-complete] text:\n" + prompt) request = { 'prompt': prompt, @@ -33,6 +34,7 @@ def chat_engine(prompt): initial_prompt = '\n'.join(initial_prompt) chat_content = f"{initial_prompt}\n\n>>> user\n\n{prompt}".strip() messages = parse_chat_messages(chat_content) + printDebug("[engine-chat] text:\n" + chat_content) return make_chat_text_chunks(messages, config_options) engines = {"chat": chat_engine, "complete": complete_engine} |