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)
|
||||
}
|
||||
if len(multiContent) > 0 {
|
||||
multiContent = append(multiContent, schema.ChatMessagePart{
|
||||
Type: schema.ChatMessagePartTypeText,
|
||||
Text: msgDO.Content,
|
||||
})
|
||||
if len(msgDO.Content) > 0 {
|
||||
multiContent = append(multiContent, schema.ChatMessagePart{
|
||||
Type: schema.ChatMessagePartTypeText,
|
||||
Text: msgDO.Content,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
modelContentObj.Content = msgDO.Content
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue