模型全面切换值 ZM 模型
This commit is contained in:
@@ -32,7 +32,7 @@ async def agent_chat(resume_text: str, message: str, history: list[dict],
|
||||
|
||||
# 3. 调 LLM
|
||||
try:
|
||||
llm = LLM.JIAYU_CLAUDE_SONNET_4_5.create(temperature=0.7)
|
||||
llm = LLM.ZM_GPT_5_4.create(temperature=0.7)
|
||||
result = await llm.ainvoke(messages)
|
||||
raw = result.content
|
||||
except Exception as e:
|
||||
|
||||
@@ -16,7 +16,7 @@ from app.tool.json_helper import parse_llm_json
|
||||
|
||||
_summary_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", RESUME_SUMMARY_OPTIMIZE_PROMPT), ("human", "请开始优化。")])
|
||||
| LLM.JIAYU_CLAUDE_SONNET_4_5.create(temperature=0.3)
|
||||
| LLM.ZM_GPT_5_4.create(temperature=0.3)
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
@@ -37,7 +37,7 @@ async def optimize_summary(job_title: str, job_description: str, original_summar
|
||||
|
||||
_experience_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", RESUME_EXPERIENCE_OPTIMIZE_PROMPT), ("human", "请开始优化。")])
|
||||
| LLM.JIAYU_CLAUDE_SONNET_4_5.create(temperature=0.3)
|
||||
| LLM.ZM_GPT_5_4.create(temperature=0.3)
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ class LLM(Enum):
|
||||
ZM_GPT_5_4 = ("gpt-5.4", *_ZM)
|
||||
ZM_GPT_5_4_MINI = ("gpt-5.4-mini", *_ZM)
|
||||
ZM_GPT_5_2 = ("gpt-5.2", *_ZM)
|
||||
ZM_GPT_4O = ("gpt-5.5", *_ZM)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ async def nova_chat(resume_text: str, message: str, history: list[dict],
|
||||
messages.append(("human", message))
|
||||
|
||||
try:
|
||||
llm = LLM.JIAYU_CLAUDE_SONNET_4_5.create(temperature=0.7)
|
||||
llm = LLM.ZM_GPT_5_2.create(temperature=0.7)
|
||||
result = await llm.ainvoke(messages)
|
||||
return result.content.strip()
|
||||
except Exception as e:
|
||||
|
||||
@@ -14,14 +14,14 @@ from app.tool.json_helper import parse_llm_json
|
||||
# 诊断链(StrOutputParser 拿原始文本,再手动解析 JSON,避免 markdown 代码块导致解析失败)
|
||||
_diagnose_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", DIAGNOSE_MODULE_PROMPT), ("human", "请开始诊断。")])
|
||||
| LLM.ZM_GPT_5_5.create(temperature=0)
|
||||
| LLM.ZM_GPT_5_4_MINI.create(temperature=0)
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
# 汇总评价链(纯文本输出)
|
||||
_summary_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", SUMMARY_PROMPT), ("human", "请生成整体评价。")])
|
||||
| LLM.ZM_GPT_5_5.create(temperature=0.3)
|
||||
| LLM.ZM_GPT_5_4_MINI.create(temperature=0.3)
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ SUMMARY_PROMPT = """你是一位资深简历顾问。请根据以下简历诊断
|
||||
3. 主要问题(最需要改进的方面)
|
||||
4. 一句鼓励或行动建议
|
||||
|
||||
直接输出评价文本,不要输出JSON或其他格式标记。控制在300字以内。"""
|
||||
直接输出评价文本,不要输出JSON或其他格式标记。控制在200字以内。"""
|
||||
|
||||
POLISH_PROMPT = """你是一位资深简历顾问。请对用户提供的简历描述文本进行润色优化,让语言更精练、更专业。
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ async def plan_edit(job_title: str, job_description: str, resume_json: str,
|
||||
|
||||
_record_edit_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", AGENT_MODULE_EDIT_PROMPT), ("human", "请执行修改。")])
|
||||
| LLM.JIAYU_CLAUDE_SONNET_4_5.create(temperature=0.3)
|
||||
| LLM.ZM_GPT_5_4_MINI.create(temperature=0.3)
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
@@ -144,7 +144,7 @@ async def execute_record_edit(job_title: str, job_description: str, instruction:
|
||||
|
||||
_record_add_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", AGENT_MODULE_ADD_PROMPT), ("human", "请生成新记录。")])
|
||||
| LLM.JIAYU_CLAUDE_SONNET_4_5.create(temperature=0.3)
|
||||
| LLM.ZM_GPT_5_4_MINI.create(temperature=0.3)
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
|
||||
@@ -85,9 +85,9 @@ AGENT_PLAN_PROMPT = """你是一个简历编辑助手。你的唯一职责是根
|
||||
|
||||
操作类型:
|
||||
1. 删除记录:{{"type": "delete", "module": "模块名", "id": "记录id"}}
|
||||
2. 修改记录:{{"type": "update", "module": "模块名", "id": "记录id", "instruction": "修改说明(50字内)"}}
|
||||
3. 修改主表:{{"type": "update", "module": "resume", "instruction": "修改说明(50字内)"}}
|
||||
4. 新增记录:{{"type": "add", "module": "模块名", "instruction": "新增说明(50字内)"}}
|
||||
2. 修改记录:{{"type": "update", "module": "模块名", "id": "记录id", "instruction": "修改说明(30字内)"}}
|
||||
3. 修改主表:{{"type": "update", "module": "resume", "instruction": "修改说明(30字内)"}}
|
||||
4. 新增记录:{{"type": "add", "module": "模块名", "instruction": "新增说明(30字内)"}}
|
||||
|
||||
模块名可选:resume(主表,包含 name、email、mobileNumber、city、wechatNumber、portfolioUrl、skills、certificates、summary、avatarUrl)、education(教育)、work(工作)、internship(实习)、project(项目)、competition(竞赛)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user