🔧 chore: 医药查询轻量化

This commit is contained in:
zhiyu1998 2024-08-24 22:18:25 +08:00
parent 24cf158d22
commit 4376b42f2f
2 changed files with 14 additions and 16 deletions

View File

@ -1,10 +1,10 @@
// 主库 // 主库
// http库 // http库
import axios from "axios"; import axios from "axios";
import fetch from "node-fetch";
import _ from "lodash"; import _ from "lodash";
import fetch from "node-fetch";
// 常量 // 常量
import { CAT_LIMIT, COMMON_USER_AGENT, REDIS_YUNZAI_ANIMELIST } from "../constants/constant.js"; import { CAT_LIMIT, COMMON_USER_AGENT } from "../constants/constant.js";
import { LINUX_AI_PROMPT, LINUX_QUERY, REDIS_YUNZAI_LINUX } from "../constants/query.js"; import { LINUX_AI_PROMPT, LINUX_QUERY, REDIS_YUNZAI_LINUX } from "../constants/query.js";
// 配置文件 // 配置文件
import config from "../model/config.js"; import config from "../model/config.js";

View File

@ -16,7 +16,7 @@ import {
douyinTypeMap, douyinTypeMap,
DOWNLOAD_WAIT_DETECT_FILE_TIME, DOWNLOAD_WAIT_DETECT_FILE_TIME,
HELP_DOC, HELP_DOC,
MESSAGE_RECALL_TIME, REDIS_YUNZAI_ANIMELIST, MESSAGE_RECALL_TIME,
REDIS_YUNZAI_ISOVERSEA, REDIS_YUNZAI_ISOVERSEA,
REDIS_YUNZAI_LAGRANGE, REDIS_YUNZAI_LAGRANGE,
REDIS_YUNZAI_WHITELIST, REDIS_YUNZAI_WHITELIST,
@ -26,19 +26,23 @@ import {
XHS_NO_WATERMARK_HEADER, XHS_NO_WATERMARK_HEADER,
} from "../constants/constant.js"; } from "../constants/constant.js";
import { import {
ANIME_SERIES_SEARCH_LINK, ANIME_SERIES_SEARCH_LINK2, ANIME_SERIES_SEARCH_LINK,
ANIME_SERIES_SEARCH_LINK2,
BILI_EP_INFO, BILI_EP_INFO,
BILI_ONLINE, BILI_SSID_INFO, BILI_ONLINE,
BILI_SSID_INFO,
BILI_STREAM_INFO, BILI_STREAM_INFO,
BILI_SUMMARY, BILI_SUMMARY,
DY_COMMENT, DY_COMMENT,
DY_INFO, DY_INFO,
DY_TOUTIAO_INFO, DY_TOUTIAO_INFO,
GENERAL_REQ_LINK, HIBI_API_SERVICE, GENERAL_REQ_LINK,
HIBI_API_SERVICE,
MIYOUSHE_ARTICLE, MIYOUSHE_ARTICLE,
NETEASE_API_CN, NETEASE_API_CN,
NETEASE_SONG_DOWNLOAD, NETEASE_SONG_DOWNLOAD,
NETEASE_TEMP_API, QISHUI_MUSIC_TEMP_API, NETEASE_TEMP_API,
QISHUI_MUSIC_TEMP_API,
QQ_MUSIC_TEMP_API, QQ_MUSIC_TEMP_API,
TWITTER_TWEET_INFO, TWITTER_TWEET_INFO,
WEIBO_SINGLE_INFO, WEIBO_SINGLE_INFO,
@ -74,10 +78,10 @@ import {
estimateReadingTime, estimateReadingTime,
formatBiliInfo, formatBiliInfo,
retryAxiosReq, retryAxiosReq,
saveJsonToFile,
secondsToTime, secondsToTime,
testProxy, testProxy,
truncateString, urlTransformShortLink truncateString,
urlTransformShortLink
} from "../utils/common.js"; } from "../utils/common.js";
import { checkAndRemoveFile, deleteFolderRecursive, getMediaFilesAndOthers, mkdirIfNotExists } from "../utils/file.js"; import { checkAndRemoveFile, deleteFolderRecursive, getMediaFilesAndOthers, mkdirIfNotExists } from "../utils/file.js";
import GeneralLinkAdapter from "../utils/general-link-adapter.js"; import GeneralLinkAdapter from "../utils/general-link-adapter.js";
@ -85,13 +89,7 @@ import { LagrangeAdapter } from "../utils/lagrange-adapter.js";
import { contentEstimator } from "../utils/link-share-summary-util.js"; import { contentEstimator } from "../utils/link-share-summary-util.js";
import { getDS } from "../utils/mihoyo.js"; import { getDS } from "../utils/mihoyo.js";
import { OpenaiBuilder } from "../utils/openai-builder.js"; import { OpenaiBuilder } from "../utils/openai-builder.js";
import { import { redisExistKey, redisGetKey, redisSetKey } from "../utils/redis-util.js";
redisExistAndGetKey,
redisExistAndInsertObject,
redisExistKey,
redisGetKey,
redisSetKey
} from "../utils/redis-util.js";
import { saveTDL, startTDL } from "../utils/tdl-util.js"; import { saveTDL, startTDL } from "../utils/tdl-util.js";
import Translate from "../utils/trans-strategy.js"; import Translate from "../utils/trans-strategy.js";
import { mid2id } from "../utils/weibo.js"; import { mid2id } from "../utils/weibo.js";