fix: use shared chat-instruct_command with api (#4653)

This commit is contained in:
Jordan Tucker 2023-11-18 22:19:10 -06:00 committed by GitHub
parent 771e62e476
commit cb836dd49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,6 +203,7 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False) -
turn_template = body['turn_template'] or turn_template turn_template = body['turn_template'] or turn_template
context_instruct = body['context_instruct'] or context_instruct context_instruct = body['context_instruct'] or context_instruct
system_message = body['system_message'] or system_message system_message = body['system_message'] or system_message
chat_instruct_command = body['chat_instruct_command'] or shared.settings['chat-instruct_command']
# Chat character # Chat character
character = body['character'] or shared.settings['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, 'system_message': system_message,
'custom_system_message': custom_system_message, 'custom_system_message': custom_system_message,
'turn_template': turn_template, 'turn_template': turn_template,
'chat-instruct_command': body['chat_instruct_command'], 'chat-instruct_command': chat_instruct_command,
'history': history, 'history': history,
'stream': stream 'stream': stream
}) })