初始化文章撰写大模型工作流系统
功能模块: - 主题选择器: 基于历史文章和热门趋势自动推荐主题 - 资料收集器: 自动搜索和收集相关资料 - 资料分析器: 深度分析资料内容,提取关键信息 - 大纲生成器: 基于资料自动生成文章大纲 - 文章撰写器: 分段撰写,支持多种文章类型 - 资料池管理: 中间产物持久化存储,建立索引 支持的文字类型: - 技术解析 - 技术文档翻译 - 项目介绍分析 - 综述文章 - 实践教程 - 问题分析 技术栈: - Python 3.x - 大模型API (OpenAI格式) - Requests库 配置的大模型: - URL: http://192.168.2.5:1234/v1 - Model: qwen3.5-4b
This commit is contained in:
2
config/__init__.py
Normal file
2
config/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# 空的配置包初始化文件
|
||||
from .settings import *
|
||||
70
config/settings.py
Normal file
70
config/settings.py
Normal file
@@ -0,0 +1,70 @@
|
||||
"""
|
||||
文章撰写大模型工作流系统配置
|
||||
"""
|
||||
|
||||
# 大模型API配置
|
||||
LLM_CONFIG = {
|
||||
"base_url": "http://192.168.2.5:1234/v1",
|
||||
"api_key": "sk-lm-fuP5tGU8:Hi7YU87jHyDP6Ay8Tl2j",
|
||||
"model": "qwen3.5-4b",
|
||||
"max_tokens": 4096,
|
||||
"temperature": 0.7,
|
||||
"timeout": 120,
|
||||
}
|
||||
|
||||
# 文章类型定义
|
||||
ARTICLE_TYPES = {
|
||||
"技术解析": {
|
||||
"description": "深入分析某项技术的原理、实现、应用场景",
|
||||
"structure": ["背景介绍", "技术原理", "核心实现", "应用案例", "总结展望"],
|
||||
"word_count": 2000-3000,
|
||||
},
|
||||
"技术文档翻译": {
|
||||
"description": "翻译官方文档、论文、技术博客等",
|
||||
"structure": ["原文概述", "核心内容翻译", "关键术语解释", "补充说明"],
|
||||
"word_count": 1500-2500,
|
||||
},
|
||||
"项目介绍分析": {
|
||||
"description": "介绍开源项目、分析项目架构、使用方法",
|
||||
"structure": ["项目概述", "核心功能", "架构分析", "使用指南", "对比评价"],
|
||||
"word_count": 1500-2500,
|
||||
},
|
||||
"综述文章": {
|
||||
"description": "汇总某一领域的技术发展、对比分析多个方案",
|
||||
"structure": ["领域背景", "主流方案", "对比分析", "发展趋势", "总结建议"],
|
||||
"word_count": 2000-3000,
|
||||
},
|
||||
"实践教程": {
|
||||
"description": "手把手教程,包含具体操作步骤",
|
||||
"structure": ["准备工作", "步骤详解", "常见问题", "进阶技巧"],
|
||||
"word_count": 1500-2000,
|
||||
},
|
||||
"问题分析": {
|
||||
"description": "分析某个技术问题、Bug、性能瓶颈等",
|
||||
"structure": ["问题描述", "原因分析", "解决方案", "经验总结"],
|
||||
"word_count": 1000-1500,
|
||||
},
|
||||
}
|
||||
|
||||
# 资料池配置
|
||||
RESOURCE_POOL_CONFIG = {
|
||||
"pool_dir": "data/resource_pool",
|
||||
"index_file": "data/resource_index.json",
|
||||
"history_file": "data/article_history.json",
|
||||
"summaries_dir": "data/summaries",
|
||||
"images_dir": "assets/images",
|
||||
}
|
||||
|
||||
# 搜索配置
|
||||
SEARCH_CONFIG = {
|
||||
"max_results": 10,
|
||||
"sources": ["web", "github", "huggingface", "papers"],
|
||||
"cache_hours": 24,
|
||||
}
|
||||
|
||||
# 输出配置
|
||||
OUTPUT_CONFIG = {
|
||||
"output_dir": "output/articles",
|
||||
"format": "markdown",
|
||||
"include_assets": True,
|
||||
}
|
||||
Reference in New Issue
Block a user