✨Feat: 完成前端工程场景

This commit is contained in:
2026-03-29 10:10:32 +08:00
parent 51e71da224
commit 8e4b0e4060
5 changed files with 236 additions and 6 deletions
+2
View File
@@ -100,6 +100,8 @@ func CallWithAgentDefined[T any](llm llms.Model, ctx context.Context, topic stri
"用户正在学习Go语言和React框架,你是用户的助手。\n"+prompt,
)
fmt.Printf("Raw output: %v\n\n", responseString)
if err != nil {
log.Fatal(err)
}
+2 -2
View File
@@ -33,8 +33,8 @@ func GetQuiz(llm llms.Model, ctx context.Context, topic string) (response respon
return
}
func GetScenario(llm llms.Model, ctx context.Context, topic string) (response response_struct.Scenario) {
func GetScenario(llm llms.Model, ctx context.Context, topic string) (response response_struct.ScenarioResponse) {
file := files[3]
response = agent.CallWithAgentDefined(llm, ctx, topic, file, response_struct.Scenario{})
response = agent.CallWithAgentDefined(llm, ctx, topic, file, response_struct.ScenarioResponse{})
return
}
+1 -1
View File
@@ -40,7 +40,7 @@ func TestQuiz(t *testing.T) {
}
func TestScenario(t *testing.T) {
definedScenario, err := outputparser.NewDefined(Scenario{})
definedScenario, err := outputparser.NewDefined(ScenarioResponse{})
if err != nil {
t.Fatalf("%v", err)