mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-15 06:16:18 +00:00
Use utf8 in all file read operations
This commit is contained in:
1 parent
c596bce092
commit
e8d493f4d6
12 files changed
+20
-20
No files matched your search
@@ -31,13 +31,13 @@ def main():
|
||||
)
|
||||
|
||||
# write prompt factory with added methods
|
||||
with open("code_templates/prompt_factory_template.py") as f:
|
||||
with open("code_templates/prompt_factory_template.py", encoding="utf-8") as f:
|
||||
code = f.read()
|
||||
methods_str = "".join(methods)
|
||||
code = code.replace("# methods", methods_str)
|
||||
|
||||
prompt_factory_module = f"{package}/llm/prompt_factory.py"
|
||||
with open(prompt_factory_module, "w") as f:
|
||||
with open(prompt_factory_module, "w", encoding="utf-8") as f:
|
||||
f.write(code)
|
||||
log.info(f"Prompt factory generated successfully in {prompt_factory_module}")
|
||||
|
||||
|
||||
Reference in new issue
Block a user