From 2a418adca13bc7f8d4b35a4a1ec83fe0e5aedd91 Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Mon, 16 Dec 2024 23:13:35 +0100 Subject: new role syntax --- tests/context_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/context_test.py') diff --git a/tests/context_test.py b/tests/context_test.py index 869215d..1e179f1 100644 --- a/tests/context_test.py +++ b/tests/context_test.py @@ -1,7 +1,7 @@ -import vim from context import make_ai_context, make_prompt default_config = { + "engine": "chat", "options": { "model": "gpt-4o", "endpoint_url": "https://api.openai.com/v1/chat/completions", @@ -81,6 +81,7 @@ def test_role_config_different_commands(): assert 'preset_tab' == actual_config['ui']['open_chat_command'] assert 'hello' == actual_prompt assert 'https://localhost/chat' == actual_config['options']['endpoint_url'] + assert 'chat' == actual_config['engine'] context = make_ai_context({ **base, 'command_type': 'complete' }) actual_config = context['config'] @@ -89,6 +90,7 @@ def test_role_config_different_commands(): assert '0' == actual_config['ui']['paste_mode'] assert 'hello' == actual_prompt assert 'https://localhost/complete' == actual_config['options']['endpoint_url'] + assert 'complete' == actual_config['engine'] context = make_ai_context({ **base, 'command_type': 'edit' }) actual_config = context['config'] @@ -97,6 +99,7 @@ def test_role_config_different_commands(): assert '0' == actual_config['ui']['paste_mode'] assert 'hello' == actual_prompt assert 'https://localhost/edit' == actual_config['options']['endpoint_url'] + assert 'complete' == actual_config['engine'] def test_multiple_role_configs(): context = make_ai_context({ -- cgit v1.2.3