optimize code for function call handler, fixed bug for dalle plugin

This commit is contained in:
RockYang
2025-09-06 13:12:08 +08:00
parent 1ff0636745
commit 1cb3c42bb9
2 changed files with 64 additions and 131 deletions

View File

@@ -201,10 +201,6 @@ func (s *Service) Image(task types.DallTask, sync bool) (string, error) {
var content string
if sync {
imgURL, err := s.downloadImage(task.Id, res.Data[0].Url)
if err != nil {
return "", fmt.Errorf("error with download image: %v", err)
}
content = fmt.Sprintf("```\n%s\n```\n下面是我为你创作的图片\n\n![](%s)\n", task.Prompt, imgURL)
}