pull/222/head
akiba 2023-08-31 10:31:02 +08:00
parent f089663387
commit 5eb8ba4e82
No known key found for this signature in database
GPG Key ID: 9D600258808ACBCD
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ async def create_toml_file(request: Request, background_tasks: BackgroundTasks):
sample_prompts = j.get("sample_prompts", None)
if sample_prompts is not None and not os.path.exists(sample_prompts) and is_promopt_like(sample_prompts):
sample_prompts_file = os.path.join(os.getcwd(), f"toml", "autosave", f"{timestamp}-promopt.txt")
with open(sample_prompts_file, encoding="utf-8") as f:
with open(sample_prompts_file, "w", encoding="utf-8") as f:
f.write(sample_prompts)
j["sample_prompts"] = sample_prompts_file
log.info(f"Writted promopts to file {sample_prompts_file}")