diff --git a/.gitignore b/.gitignore index 9c9ae38..12635b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /__pycache__ /AI_novel /vectorstore +/.conda config.json \ No newline at end of file diff --git a/novel_generator.py b/novel_generator.py index f088842..2ac9aee 100644 --- a/novel_generator.py +++ b/novel_generator.py @@ -262,7 +262,7 @@ def generate_chapter_with_state( 2) 更新/生成角色状态文档 3) 向量检索获取往期上下文 4) 大纲 -> 正文 - 5) 写入 chapter_{novel_number}.txt, 更新 lastchapter.txt + 5) 写入 chapter_{novel_number}.txt, 更新 last_chapter.txt 6) 更新向量库 :param novel_settings: 最终的作品设定(字符串) @@ -291,7 +291,7 @@ def generate_chapter_with_state( os.makedirs(chapters_dir, exist_ok=True) chapter_file = os.path.join(chapters_dir, f"chapter_{novel_number}.txt") - lastchapter_file = os.path.join(filepath, "lastchapter.txt") + lastchapter_file = os.path.join(filepath, "last_chapter.txt") character_state_file = os.path.join(filepath, "character_state.txt") global_summary_file = os.path.join(filepath, "global_summary.txt") @@ -396,7 +396,7 @@ def generate_chapter_with_state( if chapter_content: save_string_to_txt(chapter_content, chapter_file) - # 更新 lastchapter.txt + # 更新 last_chapter.txt clear_file_content(lastchapter_file) save_string_to_txt(chapter_content, lastchapter_file) diff --git a/ui.py b/ui.py index 6bbcaa6..08b3768 100644 --- a/ui.py +++ b/ui.py @@ -240,7 +240,7 @@ class NovelGeneratorGUI: # 读取设定 & 目录 novel_settings_file = os.path.join(filepath, "Novel_setting.txt") novel_novel_directory_file = os.path.join(filepath, "Novel_directory.txt") - last_chapter_file = os.path.join(filepath, "lastchapter.txt") + last_chapter_file = os.path.join(filepath, "last_chapter.txt") novel_settings = read_file(novel_settings_file) novel_novel_directory = read_file(novel_novel_directory_file) @@ -296,7 +296,7 @@ class NovelGeneratorGUI: novel_settings_file = os.path.join(filepath, "Novel_setting.txt") character_state_file = os.path.join(filepath, "character_state.txt") global_summary_file = os.path.join(filepath, "global_summary.txt") - last_chapter_file = os.path.join(filepath, "lastchapter.txt") + last_chapter_file = os.path.join(filepath, "last_chapter.txt") novel_setting = read_file(novel_settings_file) character_state = read_file(character_state_file) @@ -304,7 +304,7 @@ class NovelGeneratorGUI: last_chapter_text = read_file(last_chapter_file) if not last_chapter_text.strip(): - self.log("⚠️ lastchapter.txt 为空,暂无可检查的章节文本。") + self.log("⚠️ last_chapter.txt 为空,暂无可检查的章节文本。") return self.log("开始一致性审校...")