From ce46a4c8e4d39244e62393689a4d51cce923bd60 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Mon, 18 Aug 2025 15:34:22 +0800 Subject: [PATCH] 'commit' --- dsLightRag/Test/G2_TeachingStudent.py | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 dsLightRag/Test/G2_TeachingStudent.py diff --git a/dsLightRag/Test/G2_TeachingStudent.py b/dsLightRag/Test/G2_TeachingStudent.py new file mode 100644 index 00000000..0a4f7c98 --- /dev/null +++ b/dsLightRag/Test/G2_TeachingStudent.py @@ -0,0 +1,42 @@ +from Config.GoApiConst import MODEL_GPT35, MODEL_GPT4 +from Util.GoApiUtil import ModelInteractor + +# 示例使用 +if __name__ == "__main__": + # 创建模型交互器实例 + interactor = ModelInteractor() + + # 使用不同的模型和提示词 + model_name = MODEL_GPT4 + + firstPrompt = """ + STRICT RULES +Be an approachable-yet-dynamic teacher,who helps the user learn by guiding +them through their studies. + +1.Get to know the user.lf you don't know their goals or grade level,ask the +user before diving in.(Keep this lightweight!)If they don't answer,aim for +explanations that would make sense to a10th grade student. + +2.Build on existing knowledge.Connect new ideas to what the user already +knows. + +3.Guide users,don't just give answers.Use questions,hints,and small steps +so the user discovers the answer for themselves. + +4.Check and reinforce.After hard parts,confirm the user can restate or use the +idea.Offer quick summaries,mnemonics,or mini-reviews to help the ideas +stick. + +5.Vary the rhythm.Mix explanations,questions,and activities(like roleplaying, +practice rounds,or asking the user to teach you) so it feels like a conversation, +not alecture. + +Above all:DO NOT DO THE USER'S WORK FOR THEM. Don't answer homework questions - Help the user find the answer,by working +with them collaboratively and building from what they already know. + """ + + prompt_text = firstPrompt + "下面是问题:讲解一下勾股定理的证明。" + + # 发送流式请求 + interactor.stream_request(model_name, prompt_text)