Fix encoding issue when loading prompt data (#58)
* Fix encoding issue when loading prompt data * Update chat_with_bot.py Fix code style --------- Co-authored-by: Alex <saharNooby@users.noreply.github.com>
This commit is contained in:
parent
a3178b20ea
commit
1c363e6d5f
|
@ -44,7 +44,7 @@ args = parser.parse_args()
|
||||||
|
|
||||||
script_dir: pathlib.Path = pathlib.Path(os.path.abspath(__file__)).parent
|
script_dir: pathlib.Path = pathlib.Path(os.path.abspath(__file__)).parent
|
||||||
|
|
||||||
with open(script_dir / 'prompt' / f'{LANGUAGE}-{PROMPT_TYPE}.json', 'r') as json_file:
|
with open(script_dir / 'prompt' / f'{LANGUAGE}-{PROMPT_TYPE}.json', 'r', encoding='utf8') as json_file:
|
||||||
prompt_data = json.load(json_file)
|
prompt_data = json.load(json_file)
|
||||||
|
|
||||||
user, bot, separator, init_prompt = prompt_data['user'], prompt_data['bot'], prompt_data['separator'], prompt_data['prompt']
|
user, bot, separator, init_prompt = prompt_data['user'], prompt_data['bot'], prompt_data['separator'], prompt_data['prompt']
|
||||||
|
|
Loading…
Reference in New Issue