Merge pull request #91 from Crescent617/fix_created

Fix response timestamp
This commit is contained in:
Pawan Osman
2024-04-14 14:12:42 +03:00
committed by GitHub
+1 -1
View File
@@ -172,7 +172,7 @@ async function handleChatCompletion(req: Request, res: Response) {
let fullContent = "";
let requestId = GenerateCompletionId("chatcmpl-");
let created = Date.now();
let created = Math.floor(Date.now() / 1000); // Unix timestamp in seconds
let finish_reason = null;
for await (const message of StreamCompletion(response.data)) {