Browse Source

fix: 图片加载路径错误

eryajf 2 years ago
parent
commit
b9f6e10d98
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/chatgpt/context.go

+ 1 - 1
pkg/chatgpt/context.go

@@ -246,7 +246,7 @@ func (c *ChatGPT) GenreateImage(prompt string) (string, error) {
 		}
 
 		imageName := time.Now().Format("20060102-150405") + ".png"
-		err = os.MkdirAll("images", 0755)
+		err = os.MkdirAll("data/images", 0755)
 		if err != nil {
 			return "", err
 		}