fix(singleagent): multi input without text input error (#353)
This commit is contained in:
parent
74f222c2e1
commit
7ff025eef5
|
|
@ -309,10 +309,12 @@ func (dao *MessageDAO) buildModelContent(msgDO *entity.Message) (string, error)
|
||||||
multiContent = append(multiContent, one)
|
multiContent = append(multiContent, one)
|
||||||
}
|
}
|
||||||
if len(multiContent) > 0 {
|
if len(multiContent) > 0 {
|
||||||
|
if len(msgDO.Content) > 0 {
|
||||||
multiContent = append(multiContent, schema.ChatMessagePart{
|
multiContent = append(multiContent, schema.ChatMessagePart{
|
||||||
Type: schema.ChatMessagePartTypeText,
|
Type: schema.ChatMessagePartTypeText,
|
||||||
Text: msgDO.Content,
|
Text: msgDO.Content,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
modelContentObj.Content = msgDO.Content
|
modelContentObj.Content = msgDO.Content
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue