diff options
| author | Max Resnick <max@ofmax.li> | 2025-01-28 22:27:47 -0800 |
|---|---|---|
| committer | Max Resnick <max@ofmax.li> | 2025-01-31 22:45:23 -0800 |
| commit | c8162fc43a748a97aab4647be2f5cdf50bc739ea (patch) | |
| tree | 0099688a7a09af76a2ae978790c5e013b59bcb9c /py/complete.py | |
| parent | 380d5cdd9538c2522dfc8d03a8a261760bb0439a (diff) | |
| download | vim-ai-c8162fc43a748a97aab4647be2f5cdf50bc739ea.tar.gz | |
chore: rebase and fix up conflicts
Diffstat (limited to 'py/complete.py')
| -rw-r--r-- | py/complete.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/py/complete.py b/py/complete.py index 8078dea..765d6e0 100644 --- a/py/complete.py +++ b/py/complete.py @@ -42,7 +42,10 @@ def run_ai_completition(context): if prompt: print('Completing...') vim.command("redraw") - text_chunks = engines[engine](prompt) + provider_class = load_provider(config['provider']) + provider = provider_class(config) + messages = parse_chat_messages(f">>> user\n\n{prompt}".strip()) + text_chunks = provider.request(messages) render_text_chunks(text_chunks) clear_echo_message() except BaseException as error: |