feat(dingtalk): enable secure multimodal image QA

This commit is contained in:
姚章浩
2026-07-16 00:17:16 +08:00
parent 4022040e98
commit c9c4f0aaa5
59 changed files with 3279 additions and 429 deletions
+18
View File
@@ -0,0 +1,18 @@
package agent
import (
"testing"
"github.com/Tencent/WeKnora/internal/models/chat"
)
func TestCollectAgentImageURLsForFinalSynthesis(t *testing.T) {
messages := []chat.Message{
{Role: "system", Content: "system"},
{Role: "user", Content: "question", Images: []string{"data:image/png;base64,YWJj"}},
}
got := collectAgentImageURLs(messages)
if len(got) != 1 || got[0] != "data:image/png;base64,YWJj" {
t.Fatalf("collectAgentImageURLs() = %#v", got)
}
}