|
@@ -271,7 +271,7 @@ func GenerateArticleAbstract(item *rag.WechatArticle) {
|
|
|
|
|
|
// 生成临时文件
|
|
|
dateDir := time.Now().Format("20060102")
|
|
|
- uploadDir := utils.STATIC_DIR + "ai/" + dateDir
|
|
|
+ uploadDir := "./static/ai/" + dateDir
|
|
|
err = os.MkdirAll(uploadDir, utils.DIR_MOD)
|
|
|
if err != nil {
|
|
|
err = fmt.Errorf("存储目录创建失败,Err:" + err.Error())
|
|
@@ -382,7 +382,7 @@ func ReGenerateArticleAbstract(item *rag.WechatArticle) {
|
|
|
|
|
|
// 生成临时文件
|
|
|
dateDir := time.Now().Format("20060102")
|
|
|
- uploadDir := utils.STATIC_DIR + "ai/" + dateDir
|
|
|
+ uploadDir := "./static/ai/" + dateDir
|
|
|
err = os.MkdirAll(uploadDir, utils.DIR_MOD)
|
|
|
if err != nil {
|
|
|
err = fmt.Errorf("存储目录创建失败,Err:" + err.Error())
|
|
@@ -610,8 +610,8 @@ func ArticleToKnowledge(item *rag.WechatArticle) {
|
|
|
|
|
|
// 生成临时文件
|
|
|
//dateDir := time.Now().Format("20060102")
|
|
|
- //uploadDir := utils.STATIC_DIR + "ai/article/" + dateDir
|
|
|
- uploadDir := utils.STATIC_DIR + "ai/article"
|
|
|
+ //uploadDir := "./static/ai/article/" + dateDir
|
|
|
+ uploadDir := "./static/ai/article"
|
|
|
err = os.MkdirAll(uploadDir, utils.DIR_MOD)
|
|
|
if err != nil {
|
|
|
err = fmt.Errorf("存储目录创建失败,Err:" + err.Error())
|
|
@@ -676,8 +676,8 @@ func AbstractToKnowledge(wechatArticleItem *rag.WechatArticle, abstractItem *rag
|
|
|
|
|
|
// 生成临时文件
|
|
|
//dateDir := time.Now().Format("20060102")
|
|
|
- //uploadDir := utils.STATIC_DIR + "ai/article/" + dateDir
|
|
|
- uploadDir := utils.STATIC_DIR + "ai/abstract"
|
|
|
+ //uploadDir := + "./static/ai/article/" + dateDir
|
|
|
+ uploadDir := "./static/ai/abstract"
|
|
|
err = os.MkdirAll(uploadDir, utils.DIR_MOD)
|
|
|
if err != nil {
|
|
|
err = fmt.Errorf("存储目录创建失败,Err:" + err.Error())
|