统一抽象 封装 模型配置配置管理
This commit is contained in:
@@ -10,7 +10,7 @@ import time
|
||||
from langchain_core.output_parsers import StrOutputParser
|
||||
from langchain_core.prompts import ChatPromptTemplate
|
||||
|
||||
from app.ai.models import LLM
|
||||
from app.ai.model_config import SkillGapModel
|
||||
from app.ai.skill_gap_analyzer.prompts import (
|
||||
SKILL_GAP_PROMPT, SUMMARY_OPTIMIZE_PROMPT, EXPERIENCE_OPTIMIZE_PROMPT,
|
||||
AGENT_PLAN_PROMPT, AGENT_MODULE_EDIT_PROMPT, AGENT_MODULE_ADD_PROMPT, MODULE_SCHEMAS,
|
||||
@@ -23,7 +23,7 @@ from app.tool.json_helper import parse_llm_json
|
||||
|
||||
_skill_gap_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", SKILL_GAP_PROMPT), ("human", "请开始分析。")])
|
||||
| LLM.DOUBAO_LITE_32K.create(temperature=0)
|
||||
| SkillGapModel.ANALYSIS
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@ async def analyze_skill_gap(skill_tags: list[str], resume_json: str) -> list[str
|
||||
|
||||
_summary_optimize_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", SUMMARY_OPTIMIZE_PROMPT), ("human", "请开始优化。")])
|
||||
| LLM.DOUBAO_LITE_32K.create(temperature=0.3)
|
||||
| SkillGapModel.SUMMARY
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@ async def optimize_summary(job_title: str, add_skills: list[str], original_summa
|
||||
|
||||
_experience_optimize_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", EXPERIENCE_OPTIMIZE_PROMPT), ("human", "请开始优化。")])
|
||||
| LLM.DOUBAO_LITE_32K.create(temperature=0.3)
|
||||
| SkillGapModel.EXPERIENCE
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
@@ -94,7 +94,7 @@ async def optimize_module(job_title: str, job_description: str, module_data: str
|
||||
|
||||
_plan_chain = (
|
||||
ChatPromptTemplate.from_messages([("system", AGENT_PLAN_PROMPT), ("human", "请分析用户指令。")])
|
||||
| LLM.ZM_GPT_5_4.create(temperature=0)
|
||||
| SkillGapModel.AGENT_PLAN
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
@@ -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.ZM_GPT_5_4.create(temperature=0.3)
|
||||
| SkillGapModel.AGENT_EDIT
|
||||
| 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.ZM_GPT_5_4.create(temperature=0.3)
|
||||
| SkillGapModel.AGENT_ADD
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user