177 lines
4.3 KiB
YAML
Raw Normal View History

2025-12-10 10:07:40 +08:00
# TravelContentCreator 统一配置文件
# 合并自: ai_model.json, engines.json, poster_gen.json, paths.json, system.json
# 创建日期: 2024-12-10
# ==================== 系统配置 ====================
system:
debug: false
log_level: INFO
parallel_processing: false
max_workers: 4
# ==================== 路径配置 ====================
paths:
project_root: /root/TravelContentCreator
resource:
prompt: resource/prompt
font: assets/font
template: resource/template
output:
data: data
result: result
temp: data/temp
static:
images: static/images
fonts: static/fonts
# ==================== AI 模型配置 ====================
ai_model:
model: qwq-plus
api_url: https://dashscope.aliyuncs.com/compatible-mode/v1
api_key: ${AI_API_KEY} # 从环境变量读取
temperature: 0.3
top_p: 0.4
presence_penalty: 1.2
timeout: 60000
max_retries: 3
stream: true
# ==================== AIGC 引擎配置 ====================
engines:
topic_generate:
prompt_name: topic_generate
prompt_version: latest
default_num_topics: 5
model:
temperature: 0.2
top_p: 0.3
presence_penalty: 1.5
content_generate:
prompt_name: content_generate
prompt_version: latest
enable_judge: true
judge_prompt_name: content_judge
model:
temperature: 0.3
top_p: 0.5
presence_penalty: 1.2
judge_model:
temperature: 0.2
top_p: 0.3
presence_penalty: 0.8
poster_generate:
prompt_name: poster_generate
prompt_version: latest
default_template: vibrant
image_download_timeout: 30
model:
temperature: 0.7
top_p: 0.9
# ==================== 海报配置 ====================
poster:
enable_poster_generation: true
anti_duplicate_hash: false
# 模板配置
templates:
vibrant:
name: 活力风格
size: [1350, 1800]
description: 适合景点、活动等充满活力的场景
fonts:
chinese: assets/font/兰亭粗黑简.TTF
colors:
ocean_deep: [[0, 30, 80], [20, 120, 220]]
sunset_warm: [[255, 94, 77], [255, 154, 0]]
cool_mint: [[64, 224, 208], [127, 255, 212]]
royal_purple: [[75, 0, 130], [138, 43, 226]]
forest_green: [[34, 139, 34], [144, 238, 144]]
fire_red: [[220, 20, 60], [255, 69, 0]]
glass_effect:
max_opacity: 240
blur_radius: 22
transition_height: 120
intensity_multiplier: 1.5
layout:
title:
font_size_range: [60, 210]
width_ratio: 0.98
subtitle:
font_size_range: [30, 113]
width_ratio: 0.95
price:
font_size_range: [60, 180]
width_ratio: 0.7
business:
name: 商务风格
size: [1350, 1800]
description: 适合酒店、房地产等商务场景
collage:
name: 拼贴风格
size: [1350, 1800]
description: 多图拼贴风格
# 内容生成 Prompt (可选)
content_prompt:
system: resource/prompt/generatePosterContent/system.txt
user: resource/prompt/generatePosterContent/user.txt
model:
temperature: 0.5
top_p: 0.7
presence_penalty: 1.1
# ==================== 热点数据配置 ====================
hotspot:
cache_ttl:
weibo: 300 # 5分钟
baidu: 600 # 10分钟
xiaohongshu: 1800 # 30分钟
bing: 1800 # 30分钟
calendar: 3600 # 1小时
custom: 86400 # 24小时
baidu:
tabs:
- realtime
- travel
api_base: https://top.baidu.com/api/board
xiaohongshu:
search_keywords:
- 旅游攻略
- 周末去哪玩
- 亲子游推荐
- 自驾游路线
- 网红打卡地
- 小众景点
- 酒店推荐
- 民宿推荐
- 冬季旅行
- 滑雪攻略
- 温泉度假
# ==================== 参考文献配置 ====================
reference:
titles:
path: prompts/reference/titles.yaml
sampling_rate: 0.25
contents:
path: prompts/reference/contents.yaml
sampling_rate: 0.5
# ==================== 废弃配置 (保留供参考) ====================
# database: # Python 端不再直接访问数据库
# host: localhost
# user: root
# database: travel_content
# port: 3306
# resource: # 已迁移到 paths 和 reference
# style/demand/refer/object/product/image 配置已废弃