重构七天训练营老师
This commit is contained in:
@@ -99,4 +99,13 @@ class HuiYuBaseAgent(LlmAgent):
|
||||
kwargs["before_model_callback"] = before_chain
|
||||
kwargs["after_model_callback"] = after_chain
|
||||
|
||||
# 强制模型用中文思考:在 instruction 前附加系统级要求
|
||||
instruction = kwargs.get("instruction", "")
|
||||
if instruction:
|
||||
kwargs["instruction"] = (
|
||||
"【系统要求:你的所有思考过程、分析推理、内心独白必须使用中文,"
|
||||
"禁止在思考中使用英文。你的最终回复也使用中文。】\n\n"
|
||||
+ instruction
|
||||
)
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user