Return timestamps in OpenAI compat endpoints in proper format (#2921)

This commit is contained in:
Timothy Carambat
2024-12-31 09:35:52 -08:00
committed by GitHub
parent fa3079bbbf
commit ef71b95cf9

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: [
{