mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
fix: 预设值不生效 #54
This commit is contained in:
parent
79b28f518d
commit
0ab1bc0567
|
@ -55,8 +55,9 @@ def dump_session(session_name: str):
|
||||||
def get_default_prompt():
|
def get_default_prompt():
|
||||||
user_name = config.user_name if hasattr(config, 'user_name') and config.user_name != '' else 'You'
|
user_name = config.user_name if hasattr(config, 'user_name') and config.user_name != '' else 'You'
|
||||||
bot_name = config.bot_name if hasattr(config, 'bot_name') and config.bot_name != '' else 'Bot'
|
bot_name = config.bot_name if hasattr(config, 'bot_name') and config.bot_name != '' else 'Bot'
|
||||||
return user_name+":{}\n"+bot_name+":好的\n".format(config.default_prompt) if hasattr(config, 'default_prompt') and \
|
return user_name + ":{}\n".format(config.default_prompt if hasattr(config, 'default_prompt') \
|
||||||
config.default_prompt != "" else ''
|
and config.default_prompt != "" else '') + \
|
||||||
|
bot_name + ":好的\n"
|
||||||
|
|
||||||
|
|
||||||
# def blocked_func(lock: threading.Lock):
|
# def blocked_func(lock: threading.Lock):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user