class Character:
    def __init__(self, name):
        self.name = name
        self.goal = ""
        self.conflict = ""
        self.backstory = ""
        self.motivation = ""

    def detail(self):
        return f"""
        【人物：{self.name}】
        - 目标：{self.goal}
        - 冲突：{self.conflict}
        - 背景：{self.backstory}
        - 动机：{self.motivation}
        """


class Scene:
    def __init__(self, title):
        self.title = title
        self.characters = []
        self.purpose = ""
        self.conflict = ""
        self.outcome = ""

    def detail(self):
        chars = ", ".join(self.characters)
        return f"""
        【场景：{self.title}】
        - 涉及人物：{chars}
        - 场景目标：{self.purpose}
        - 主要冲突：{self.conflict}
        - 结果：{self.outcome}
        """


class Snowflake:
    def __init__(self):
        self.one_sentence = ""
        self.five_sentences = []
        self.characters = {}
        self.one_page_summary = ""
        self.paragraphs = []
        self.expanded_summary = ""
        self.scenes = []

    def step1_one_sentence(self):
        print("步骤1：用一句话描述小说的核心概念")
        sentence = input("请输入小说的一句话总结：")
        self.one_sentence = sentence
        print(f"已记录：{sentence}\n")

    def step2_five_sentences(self):
        print("步骤2：扩展为5句话，描述主要人物、设定、冲突")
        sentences = []
        for i in range(5):
            s = input(f"请输入第{i+1}句描述：")
            sentences.append(s)
        self.five_sentences = sentences
        print("\n已扩展为故事段落：")
        for idx, sent in enumerate(sentences, 1):
            print(f"{idx}. {sent}")
        print()

    def step3_introduce_characters(self):
        print("步骤3：定义主要人物及其动机")
        num_chars = int(input("请输入主要人物的数量："))
        for _ in range(num_chars):
            name = input("人物姓名：")
            self.characters[name] = Character(name)
            self.characters[name].goal = input(f"{name} 的目标是什么？")
            self.characters[name].motivation = input(f"{name} 的动机是什么？")
        print("\n当前人物列表：")
        for char in self.characters.values():
            print(char.detail())

    def step4_one_page_summary(self):
        print("步骤4：扩展为1页梗概（约1000字）")
        summary = ""
        while True:
            part = input("请输入梗概的一部分（输入`完成`结束）：")
            if part.lower() == "完成":
                break
            summary += part + "\n\n"
        self.one_page_summary = summary
        print("\n【1页梗概】")
        print(summary)

    def step5_paragraphs(self):
        print("步骤5：将1页梗概拆分为多个段落")
        paras = self.one_page_summary.split("\n\n")
        self.paragraphs = paras
        print(f"已拆分为 {len(paras)} 个自然段：")
        for idx, para in enumerate(paras, 1):
            print(f"段落{idx}：{para[:30]}...")

    def step6_expand_summary(self):
        print("步骤6：扩展为4页大纲，细化每个段落")
        expanded = []
        for idx, para in enumerate(self.paragraphs):
            print(f"\n扩展第{idx+1}段：{para[:30]}...")
            detail = input("请输入详细内容：")
            expanded.append(detail)
        self.expanded_summary = "\n\n".join(expanded)
        print("\n【扩展后的4页大纲】")
        print(self.expanded_summary)

    def step7_character_details(self):
        print("步骤7：完善人物详细资料")
        for name, char in self.characters.items():
            print(f"\n详细描述人物：{name}")
            char.conflict = input(f"{name} 面临的最大冲突是什么？")
            char.backstory = input(f"{name} 的背景故事是什么？")
        print("\n【完整人物档案】")
        for char in self.characters.values():
            print(char.detail())

    def step8_list_scenes(self):
        print("步骤8：列出场景列表，细化每场戏")
        num_scenes = int(input("预计小说有多少个关键场景？"))
        for _ in range(num_scenes):
            title = input("场景标题：")
            scene = Scene(title)
            scene.characters = input("涉及人物（逗号分隔）：").split(",")
            scene.purpose = input("场景目标：")
            scene.conflict = input("主要冲突：")
            scene.outcome = input("结果：")
            self.scenes.append(scene)
        print("\n【场景列表】")
        for idx, scene in enumerate(self.scenes, 1):
            print(f"{idx}. {scene.detail()}")

    def export_to_markdown(self):
        print("步骤9：导出为Markdown文档")
        md = "# 小说大纲（雪花法生成）\n\n"
        md += "## 步骤1：一句话总结\n"
        md += f"- {self.one_sentence}\n\n"
        md += "## 步骤2：五句话描述\n"
        for s in self.five_sentences:
            md += f"- {s}\n"
        md += "\n## 步骤3：主要人物\n"
        for char in self.characters.values():
            md += char.detail() + "\n"
        md += "## 步骤4：1页梗概\n"
        md += self.one_page_summary + "\n"
        md += "## 步骤6：4页详细大纲\n"
        md += self.expanded_summary + "\n"
        md += "## 步骤8：场景列表\n"
        for scene in self.scenes:
            md += scene.detail() + "\n"

        with open("小说大纲.md", "w", encoding="utf-8") as f:
            f.write(md)
        print("已导出到 `小说大纲.md`！")

    def run(self):
        print("欢迎使用雪花写作法工具！")
        steps = [
            self.step1_one_sentence,
            self.step2_five_sentences,
            self.step3_introduce_characters,
            self.step4_one_page_summary,
            self.step5_paragraphs,
            self.step6_expand_summary,
            self.step7_character_details,
            self.step8_list_scenes,
            self.export_to_markdown,
        ]
        for idx, step in enumerate(steps, 1):
            input(f"\n按 Enter 进入第 {idx}/{len(steps)} 步...")
            step()
修改上面代码，通过chatgpt来一步一步生成各阶段的内容，用户只需要输入一句话描述，其他内容均chatgpt生成