Return timestamps in OpenAI compat endpoints in proper format ()

This commit is contained in:
Timothy Carambat 2024-12-31 09:35:52 -08:00 committed by GitHub
parent fa3079bbbf
commit ef71b95cf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -475,7 +475,7 @@ function formatJSON(
const data = {
id: chat.uuid ?? chat.id,
object: "chat.completion",
created: Number(new Date()),
created: Number(new Date()) / 1000, // in seconds
model: model,
choices: [
{