mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 13:58:56 +01:00
Use chat_instruct_command in API (#3482)
This commit is contained in:
parent
3d48933f27
commit
2cf64474f2
@ -38,7 +38,7 @@ async def run(user_input, history):
|
||||
'_continue': False,
|
||||
'stop_at_newline': False,
|
||||
'chat_generation_attempts': 1,
|
||||
'chat-instruct_command': 'Continue the chat dialogue below. Write a single reply for the character "<|character|>".\n\n<|prompt|>',
|
||||
'chat_instruct_command': 'Continue the chat dialogue below. Write a single reply for the character "<|character|>".\n\n<|prompt|>',
|
||||
|
||||
# Generation params. If 'preset' is set to different than 'None', the values
|
||||
# in presets/preset-name.yaml are used instead of the individual numbers.
|
||||
|
@ -32,7 +32,7 @@ def run(user_input, history):
|
||||
'_continue': False,
|
||||
'stop_at_newline': False,
|
||||
'chat_generation_attempts': 1,
|
||||
'chat-instruct_command': 'Continue the chat dialogue below. Write a single reply for the character "<|character|>".\n\n<|prompt|>',
|
||||
'chat_instruct_command': 'Continue the chat dialogue below. Write a single reply for the character "<|character|>".\n\n<|prompt|>',
|
||||
|
||||
# Generation params. If 'preset' is set to different than 'None', the values
|
||||
# in presets/preset-name.yaml are used instead of the individual numbers.
|
||||
|
@ -79,7 +79,7 @@ def build_parameters(body, chat=False):
|
||||
'name2_instruct': str(body.get('name2_instruct', name2_instruct)),
|
||||
'context_instruct': str(body.get('context_instruct', context_instruct)),
|
||||
'turn_template': str(body.get('turn_template', turn_template)),
|
||||
'chat-instruct_command': str(body.get('chat-instruct_command', shared.settings['chat-instruct_command'])),
|
||||
'chat-instruct_command': str(body.get('chat_instruct_command', body.get('chat-instruct_command', shared.settings['chat-instruct_command']))),
|
||||
'history': body.get('history', {'internal': [], 'visible': []})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user