liurenchaxin/internal/technical/Final_Baxian_Sanqing_Model_...

241 lines
6.8 KiB
Markdown
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.

# 最终配置:八仙非推理 + 三清可推理
## 🎭 八仙配置(严格非推理模型)
### 先天八卦顺序 - 全部非推理模型
```yaml
八仙最终配置:
乾一_吕洞宾:
model: "mistralai/mistral-7b-instruct:free"
type: "非推理模型"
特点: "直接输出,无独白"
daily_limit: 200
兑二_何仙姑:
model: "google/gemini-1.5-flash:free"
type: "非推理模型"
特点: "流畅对话,无思考链"
daily_limit: 100
离三_铁拐李:
model: "microsoft/phi-3.5-mini-instruct:free"
type: "非推理模型"
特点: "简洁直接,火爆风格"
daily_limit: 150
震四_汉钟离:
model: "meta-llama/llama-3.1-8b-instruct:free"
type: "非推理模型"
特点: "稳重输出,无废话"
daily_limit: 100
巽五_蓝采和:
model: "moonshot-v1-8k:free"
type: "非推理模型"
特点: "温和表达,国产稳定"
daily_limit: 200
坎六_张果老:
model: "alibaba/qwen-2.5-7b-instruct:free"
type: "非推理模型"
特点: "智慧深沉,中文优化"
daily_limit: 200
艮七_韩湘子:
model: "deepseek-chat:free"
type: "非推理模型"
特点: "稳重坚定,非推理版本"
daily_limit: 150
坤八_曹国舅:
model: "zhipuai/glm-4-9b-chat:free"
type: "非推理模型"
特点: "包容总结,智谱稳定版"
daily_limit: 200
```
## 👑 三清配置(可用推理模型)
### 高层决策者 - 允许深度思考
```yaml
三清配置:
太上老君:
model: "anthropic/claude-3.5-sonnet:free"
type: "高级对话模型"
role: "控场主持"
特点: "快速反应,可适度思考"
daily_limit: 15
允许独白: false # 主持人需要简洁
灵宝道君:
model: "openai/gpt-4o-mini:free"
type: "非推理模型"
role: "技术统计 + MCP"
特点: "数据驱动,逻辑清晰"
daily_limit: 200
mcp_enabled: true
允许独白: false # 技术报告需要简洁
元始天尊:
model: "openai/o1-mini:free" # 可以用推理模型
type: "推理模型"
role: "最终决策"
特点: "深度思考,一槌定音"
daily_limit: 20
允许独白: true # 最高决策者可以展示思考过程
输出要求: "思考过程 + 最终结论50字内"
```
## 🔄 差异化处理策略
### 八仙:专业形象优先
```python
class BaxianNonReasoningConfig:
"""八仙非推理配置"""
def __init__(self):
self.baxian_models = {
"吕洞宾": "mistralai/mistral-7b-instruct:free",
"何仙姑": "google/gemini-1.5-flash:free",
"铁拐李": "microsoft/phi-3.5-mini-instruct:free",
"汉钟离": "meta-llama/llama-3.1-8b-instruct:free",
"蓝采和": "moonshot-v1-8k:free",
"张果老": "alibaba/qwen-2.5-7b-instruct:free",
"韩湘子": "deepseek-chat:free",
"曹国舅": "zhipuai/glm-4-9b-chat:free"
}
self.output_requirements = {
"max_length": 100,
"style": "直接专业",
"forbidden_words": ["让我想想", "首先", "分析一下"],
"required_format": "观点 + 理由 + 建议"
}
def get_baxian_prompt(self, immortal, topic):
"""获取八仙专用prompt无独白版"""
return f"""你是{immortal},八仙之一。
【发言要求】
- 直接表达观点,不展示思考过程
- 保持{immortal}的性格特色
- 简洁有力不超过100字
- 专业权威,符合仙人身份
【话题】{topic}
{immortal}发言】:"""
```
### 三清:允许深度思考
```python
class SanqingFlexibleConfig:
"""三清灵活配置"""
def __init__(self):
self.sanqing_models = {
"太上老君": {
"model": "anthropic/claude-3.5-sonnet:free",
"allow_thinking": False, # 主持人要简洁
"max_length": 50
},
"灵宝道君": {
"model": "openai/gpt-4o-mini:free",
"allow_thinking": False, # 技术报告要简洁
"max_length": 150,
"mcp_enabled": True
},
"元始天尊": {
"model": "openai/o1-mini:free",
"allow_thinking": True, # 最高决策者可以思考
"max_length": 200,
"output_format": "思考过程 + 结论"
}
}
def get_sanqing_prompt(self, deity, topic, context):
"""获取三清专用prompt"""
config = self.sanqing_models[deity]
if deity == "元始天尊" and config["allow_thinking"]:
return f"""你是元始天尊,最高决策者。
【特殊权限】
- 你可以展示思考过程(其他人不行)
- 深度分析后给出最终决策
- 思考过程要有价值,不是废话
【任务】
基于以下辩论内容:{context}
话题:{topic}
【思考与决策】
<思考过程>
[你的深度思考...]
</思考过程>
<最终决策>
[50字内的权威结论]
</最终决策>"""
else:
return f"""你是{deity}{config.get('role', '三清之一')}
【发言要求】
- 直接表达观点
- 保持权威性
- 不超过{config['max_length']}
【话题】{topic}
{deity}发言】:"""
```
## 🎯 实际运行效果
### 八仙发言示例(非推理模型)
```
吕洞宾: "技术面突破关键阻力,建议加仓科技股。"
何仙姑: "市场情绪转暖,投资者信心回升,看好后市。"
铁拐李: "主流观点过于乐观,警惕回调风险。"
```
### 三清发言示例
```
太上老君: "各位观点激烈,现在请元始天尊最终决策。"
灵宝道君: "根据RSS数据核实科技股PE为28倍略高于历史均值。"
元始天尊:
<思考过程>
综合八仙观点,技术面确实突破,但估值偏高。
市场情绪虽然转暖,但需警惕回调风险。
当前阶段应该谨慎乐观。
</思考过程>
<最终决策>
谨慎看多。建议轻仓试探,严控风险。
</最终决策>
```
## 💡 配置优势
### 八仙非推理的好处
1. **专业形象** - 不会暴露搞笑的思考过程
2. **响应速度** - 非推理模型更快
3. **成本控制** - 免费额度更充足
4. **稳定输出** - 不会有意外的独白
### 三清可推理的好处
1. **决策权威** - 元始天尊可以展示深度思考
2. **层次分明** - 体现三清的高层地位
3. **灵活处理** - 根据角色需求差异化配置
## 🚀 最终建议
这个配置方案:
-**八仙专业** - 非推理模型,无独白风险
-**三清权威** - 灵活配置,体现层次
-**成本可控** - 全部免费模型
-**效果保证** - 避免搞笑场面
你觉得这个最终配置如何?需要调整哪个仙人的模型选择吗?🎭