feat: download image which ai generated in dialog and replace the image url

This commit is contained in:
RockYang
2024-02-20 18:38:03 +08:00
parent 35ef5674ff
commit 9988dff885
4 changed files with 80 additions and 13 deletions

View File

@@ -233,7 +233,7 @@ func (h *ChatHandler) sendOpenAiMessage(
RoleId: role.Id,
Type: types.ReplyMsg,
Icon: role.Icon,
Content: message.Content,
Content: h.extractImgUrl(message.Content),
Tokens: totalTokens,
UseContext: useContext,
Model: req.Model,