22 lines
620 B
Go
22 lines
620 B
Go
package dingtalk
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"gitea.zheromiku.top/Weknora/dobotai-platform/internal/reasoningmode"
|
|
)
|
|
|
|
func TestDecorateReasoningPartialMarksReasoningFromFirstChunk(t *testing.T) {
|
|
got := decorateReasoningPartial("部分答案", string(reasoningmode.ExecutionReasoning))
|
|
want := "【智能推理模式】\n\n部分答案"
|
|
if got != want {
|
|
t.Fatalf("got=%q want=%q", got, want)
|
|
}
|
|
}
|
|
|
|
func TestDecorateReasoningPartialLeavesQuickAnswerUnchanged(t *testing.T) {
|
|
if got := decorateReasoningPartial("快速答案", string(reasoningmode.ExecutionQuick)); got != "快速答案" {
|
|
t.Fatalf("got=%q", got)
|
|
}
|
|
}
|