diff --git a/utils/const.ts b/utils/const.ts index 3d5b656..cba0b67 100644 --- a/utils/const.ts +++ b/utils/const.ts @@ -1,10 +1,11 @@ import { readFileSync, writeFile } from 'fs'; +import path from 'path'; /** private ket to encript message, this is just a demo */ export const privateKey = 'secret key'; -const filePath = 'F:/桌面/gptPorkerPrompt.txt'; // customable -const filePromptContent = readFileSync(filePath, 'utf8'); +const filePath = 'gptPorkerPrompt.txt'; // customable +const filePromptContent = readFileSync(path.join(__dirname, filePath), 'utf8'); export const addCaseToGptPrompt = (str: string) => { return new Promise((resolve, reject) => { writeFile(filePath, filePromptContent + str, 'utf8', (err) => { diff --git a/utils/gptPorkerPrompt.txt b/utils/gptPorkerPrompt.txt new file mode 100644 index 0000000..e69de29