2026-03-27 19:30:04 +08:00
|
|
|
package response_struct
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
"github.com/tmc/langchaingo/outputparser"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestCard(t *testing.T) {
|
|
|
|
|
definedCard, err := outputparser.NewDefined(Card{})
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output := definedCard.GetFormatInstructions()
|
|
|
|
|
t.Log(output)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestGuodegang(t *testing.T) {
|
|
|
|
|
definedGuodegang, err := outputparser.NewDefined(Guodegang{})
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output := definedGuodegang.GetFormatInstructions()
|
|
|
|
|
t.Log(output)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestQuiz(t *testing.T) {
|
|
|
|
|
definedQuiz, err := outputparser.NewDefined(Quiz{})
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output := definedQuiz.GetFormatInstructions()
|
|
|
|
|
t.Log(output)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestScenario(t *testing.T) {
|
2026-03-29 10:10:32 +08:00
|
|
|
definedScenario, err := outputparser.NewDefined(ScenarioResponse{})
|
2026-03-27 19:30:04 +08:00
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output := definedScenario.GetFormatInstructions()
|
|
|
|
|
t.Log(output)
|
2026-03-28 20:01:22 +08:00
|
|
|
}
|