Fix/content reasoning

* fix: concat
* fix: concat
* fix: concat sep
* fix: concat content & url
* fix: opimized
* fix: test
* fix: test
* fix: multi content parse with uri
* fix: multi content combine
* fix: remove unused func
* fix: multi content with content & reasoning content
* fix: multi content with content & reasoning content

See merge request: !886
This commit is contained in:
李俊文
2025-07-21 11:23:48 +00:00
parent 82e55ffdb8
commit 249c23c64b
16 changed files with 263 additions and 92 deletions

View File

@@ -19,6 +19,7 @@ package message
import (
"context"
"testing"
"time"
"github.com/cloudwego/eino/schema"
"github.com/stretchr/testify/assert"
@@ -74,8 +75,10 @@ func TestCreateMessage(t *testing.T) {
ctrl := gomock.NewController(t)
idGen := mock.NewMockIDGenerator(ctrl)
idGen.EXPECT().GenID(gomock.Any()).Return(int64(10), nil).Times(1)
idGen.EXPECT().GenID(gomock.Any()).DoAndReturn(func(_ context.Context) (int64, error) {
newID := time.Now().UnixNano()
return newID, nil
}).AnyTimes()
mockDBGen := orm.NewMockDB()
mockDBGen.AddTable(&model.Message{})
mockDB, err := mockDBGen.DB()
@@ -92,10 +95,12 @@ func TestCreateMessage(t *testing.T) {
imageInput := &message.FileData{
Url: "https://xxxxx.xxxx/image",
Name: "test_img",
URI: "",
}
fileInput := &message.FileData{
Url: "https://xxxxx.xxxx/file",
Name: "test_file",
URI: "",
}
content := []*message.InputMetaData{
{