Skip to content

Commit

Permalink
Fix created timestamps (ms -> s)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnd0e committed Apr 11, 2024
1 parent 745a007 commit 26d09dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/worker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const processResponse = async (candidates, model, id) => {
return JSON.stringify({
id,
object: "chat.completion",
created: Date.now(),
created: Math.floor(Date.now()/1000),
model,
// system_fingerprint: "fp_69829325d0",
choices: candidates.map(transformCandidatesMessage),
Expand Down Expand Up @@ -288,7 +288,7 @@ function transformResponseStream (cand, stop, first) {
const data = {
id: this.id,
object: "chat.completion.chunk",
created: Date.now(),
created: Math.floor(Date.now()/1000),
model: this.MODEL,
// system_fingerprint: "fp_69829325d0",
choices: [item],
Expand Down

0 comments on commit 26d09dc

Please sign in to comment.