pip install httpxexport NOVEL_MODELSCOPE_KEY="your_modelscope_key"
export NOVEL_FYRA_KEY="your_fyra_key"
export NOVEL_PH8_KEY="your_ph8_key"
| 服务 | URL | 环境变量 |
|---|---|---|
| ------ | ----- | --------- |
| ModelScope | https://api-inference.modelscope.cn/v1/chat/completions | NOVEL_MODELSCOPE_KEY |
| Fyra | https://Fyra.im/v1/chat/completions | NOVEL_FYRA_KEY |
| Ph8 | https://ph8.co/v1/chat/completions | NOVEL_PH8_KEY |
用户文本会发送到以上 API 端点以生成小说内容。
references/api-config.md 获取 API 配置说明scripts/batch_generate.py大纲 → 逐章prompt → 逐个调用外部 LLM API → 分段生成 → 保存文件
scripts/batch_generate.py:
references/api-config.mdreferences/prompt-template.md共 1 个版本