Files
ai_novel/config.yaml

61 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AI Novel Writer Configuration Example
# 复制此文件为 config.yaml 并根据需要修改
# 项目目录配置 - 指定包含梗概大纲.md和章节目录.yaml的文件夹
project_dir: "novel1" # 将在此目录下查找梗概大纲.md和章节目录.yaml
# 提示词配置
prompt_config:
previous_chapters_count: 2 # 提示词中包含前n章节的完整内容默认为2
# 小说家LLM配置 - 用于生成小说内容
novelist_llm:
type: "openai" # 支持: "openai", "openai_compatible", "ollama"
model: "deepseek-r1-250528" # 推荐使用GPT-4以获得更好的创作质量
temperature: 0.7 # 创造性参数0.7-0.8适合创作
max_tokens: 12288 # 每个小节的最大token数
api_key: "f8370a60-fe0a-455f-9167-411d476123d2" # 或设置环境变量 OPENAI_API_KEY
base_url: "https://ark.cn-beijing.volces.com/api/v3" # 默认OpenAI API地址
# 总结器LLM配置 - 用于生成章节总结
summarizer_llm:
type: "openai"
model: "deepseek-v3-250324" # 总结任务可以使用较便宜的模型
temperature: 0.7 # 总结需要更准确,降低随机性
max_tokens: 12288 # 总结较短
api_key: "f8370a60-fe0a-455f-9167-411d476123d2" # 或设置环境变量 OPENAI_API_KEY
base_url: "https://ark.cn-beijing.volces.com/api/v3" # 默认OpenAI API地址
# 注意输出文件将自动保存在project_dir指定的目录中
# - 章节文件保存在 project_dir/chapters/ 目录下
# - 完整小说保存为 project_dir/小说标题.md
# ===== 其他供应商配置示例 =====
# OpenRouter配置示例取消注释使用
# novelist_llm:
# type: "openai_compatible"
# model: "anthropic/claude-3-haiku" # 或其他OpenRouter支持的模型
# temperature: 0.7
# max_tokens: 3000
# base_url: "https://openrouter.ai/api/v1"
# api_key: "sk-or-..." # 或设置环境变量 OPENROUTER_API_KEY
# Ollama配置示例取消注释使用
# novelist_llm:
# type: "ollama"
# model: "llama3.1" # 或其他本地模型
# temperature: 0.7
# base_url: "http://localhost:11434" # 或设置环境变量 OLLAMA_BASE_URL
# 混合配置示例:使用不同供应商的不同模型
# novelist_llm:
# type: "openai"
# model: "gpt-4"
# api_key: "your-openai-key"
#
# summarizer_llm:
# type: "ollama"
# model: "llama3.1"
# base_url: "http://localhost:11434"