Skip to content

Commit

Permalink
fix: Modify code details
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleurxxx committed Oct 30, 2024
1 parent 9ff3170 commit 22dc6b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/service/app-center/aiChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export default class AiChat extends Service {

async requestFileContentFromAi(file: any, chatConfig: ConfigModel) {
const { ctx } = this;
const filename = Math.random().toString(36).substr(2) + new Date().getTime() + path.extname(file.filename).toLocaleLowerCase();
const filename = Date.now() + path.extname(file.filename).toLowerCase();
const savePath = path.join(__dirname, filename);
const writeStream = fs.createWriteStream(savePath);
file.pipe(writeStream);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"http-status-codes": "^2.2.0",
"koa-connect": "^2.1.0",
"moment": "^2.29.4",
"openai": "^4.68.4",
"proxy-agent": "^5.0.0",
"qs": "^6.10.1",
"typescript": "^4.0.0",
Expand Down

0 comments on commit 22dc6b5

Please sign in to comment.