优化意图识别模块,新增文档相关性判断功能,更新DifyQueryRetrieval类以支持多线程检索,增强数据模型,改进日志记录,调整Excel数据验证逻辑,更新多个提示词模板以提升用户体验。
This commit is contained in:
@@ -308,4 +308,25 @@ class IntentAndSlotResult(BaseModel):
|
||||
InstallationDownloadSlots,
|
||||
ProblemDiagnosisSlots,
|
||||
OtherSlots
|
||||
]
|
||||
]
|
||||
|
||||
# 意图优化环节数据模型
|
||||
class StepBackPrompt(BaseModel):
|
||||
"""后退提示数据模型"""
|
||||
original_query: str = Field(description="原始查询")
|
||||
step_back_query: str = Field(description="后退提示生成的抽象查询")
|
||||
|
||||
class FollowUpQuestions(BaseModel):
|
||||
"""后续问题数据模型"""
|
||||
original_query: str = Field(description="原始查询")
|
||||
follow_up_query: str = Field(description="基于历史对话生成的独立问题")
|
||||
|
||||
class HypotheticalDocument(BaseModel):
|
||||
"""假设文档数据模型"""
|
||||
original_query: str = Field(description="原始查询")
|
||||
hypothetical_answer: str = Field(description="假设性回答")
|
||||
|
||||
class MultiQuestions(BaseModel):
|
||||
"""多问题查询数据模型"""
|
||||
original_query: str = Field(description="原始查询")
|
||||
sub_questions: List[str] = Field(description="从不同角度生成的子问题列表")
|
||||
Reference in New Issue
Block a user