From 01e6a3ef7502977061e078a67c60be14aec52886 Mon Sep 17 00:00:00 2001 From: Hayden Johnson Date: Tue, 8 Apr 2025 12:39:09 -0700 Subject: [PATCH] change default model and add reasoning mode --- assistant.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/assistant.py b/assistant.py index f4dc017..e67a004 100755 --- a/assistant.py +++ b/assistant.py @@ -11,7 +11,8 @@ from pygments.formatters import TerminalFormatter import os server = 'localhost:11434' -model = 'llama3.1:8b-instruct-q8_0' +model = 'gemma3:12b' +reasoning_model='deepseek-r1:14b' temp = 0.2 pattern = r'```[a-z]*\n[\s\S]*?\n```' @@ -186,6 +187,8 @@ def chat(message, stream=True): def chat2(args, user_input, stream=True): global conversation + global model + global reasoning_model command_result = parse_commands(user_input) if command_result: if type(command_result) == bool: @@ -194,8 +197,9 @@ def chat2(args, user_input, stream=True): user_input = command_result print('\033[91m' + 'assistant' + '\033[0m: ', end='') - if args.reflect: - result = reflection_mode(user_input, stream) + if args.reasoning: + model = reasoning_model + result = chat(user_input, stream) else: result = chat(user_input, stream) @@ -242,7 +246,7 @@ def parse_args(): # Add the --host argument parser.add_argument('--host', nargs='?', const=True, default=False, help='Specify host of ollama server') # Add the --reflect argument - parser.add_argument('--reflect', action='store_true', help='Use reflection prompting style to improve output. May be slower and not work with all models.') + parser.add_argument('--reasoning', '-r', action='store_true', help='Use the default reasoning model deepseek-r1:14b') # Parse the arguments return parser.parse_args()