From cb836dd49c0e24b304455a496b63994329781ef8 Mon Sep 17 00:00:00 2001 From: Jordan Tucker Date: Sat, 18 Nov 2023 22:19:10 -0600 Subject: [PATCH] fix: use shared chat-instruct_command with api (#4653) --- extensions/openai/completions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/openai/completions.py b/extensions/openai/completions.py index 99525b66..389466ff 100644 --- a/extensions/openai/completions.py +++ b/extensions/openai/completions.py @@ -203,6 +203,7 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False) - turn_template = body['turn_template'] or turn_template context_instruct = body['context_instruct'] or context_instruct system_message = body['system_message'] or system_message + chat_instruct_command = body['chat_instruct_command'] or shared.settings['chat-instruct_command'] # Chat character character = body['character'] or shared.settings['character'] @@ -228,7 +229,7 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False) - 'system_message': system_message, 'custom_system_message': custom_system_message, 'turn_template': turn_template, - 'chat-instruct_command': body['chat_instruct_command'], + 'chat-instruct_command': chat_instruct_command, 'history': history, 'stream': stream })