[GH-ISSUE #2920] [FEAT]: add option to define the 'created' timestamp units (seconds/miliseconds) #1862

Closed
opened 2026-02-22 18:26:53 -05:00 by yindo · 1 comment
Owner

Originally created by @elad-hefetz on GitHub (Dec 31, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2920

What would you like to see?

not sure it is anything-llm responsibility to handle the situation I am facing,
I am using a .net library (Microsoft.Extensions.AI) to consume the 'openAI' compatible endpoints

every request to the chat endpoint returns an exception regarding the bounds of the expected value:
"Valid values are between -62135596800 and 253402300799, inclusive. (Parameter 'seconds')'"

this is for the 'created" field in the response.

this is because the Microsoft.Extensions.AI OpenAi client expect the value to be in seconds but it returns in milliseconds.

Is it possible to define this somehow in anythingllm settings or should it always be handled by the the consumer (in this case the Microsoft Open Ai Library) ?

Screenshot 2024-12-31 175744

adding the link to open AI response schema definition,
https://platform.openai.com/docs/api-reference/chat/object

image

Originally created by @elad-hefetz on GitHub (Dec 31, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2920 ### What would you like to see? not sure it is anything-llm responsibility to handle the situation I am facing, I am using a .net library (Microsoft.Extensions.AI) to consume the 'openAI' compatible endpoints every request to the chat endpoint returns an exception regarding the bounds of the expected value: "Valid values are between -62135596800 and 253402300799, inclusive. (Parameter 'seconds')'" this is for the 'created" field in the response. this is because the Microsoft.Extensions.AI OpenAi client expect the value to be in seconds but it returns in milliseconds. Is it possible to define this somehow in anythingllm settings or should it always be handled by the the consumer (in this case the Microsoft Open Ai Library) ? ![Screenshot 2024-12-31 175744](https://github.com/user-attachments/assets/2f095a23-11aa-4dec-a7e0-d1d312879fa9) adding the link to open AI response schema definition, https://platform.openai.com/docs/api-reference/chat/object ![image](https://github.com/user-attachments/assets/af086bb0-1f49-46ad-9256-4c27353cdddc)
yindo added the enhancementfeature request labels 2026-02-22 18:26:53 -05:00
yindo closed this issue 2026-02-22 18:26:53 -05:00
Author
Owner

@elad-hefetz commented on GitHub (Jan 1, 2025):

Hi,
Thanks

After the latest change, now the value is in decimal
image

receiving wrong format exception

@elad-hefetz commented on GitHub (Jan 1, 2025): Hi, Thanks After the latest change, now the value is in decimal ![image](https://github.com/user-attachments/assets/8ffc40ab-abf2-41dd-8076-589cb18cb335) receiving wrong format exception
yindo changed title from [FEAT]: add option to define the 'created' timestamp units (seconds/miliseconds) to [GH-ISSUE #2920] [FEAT]: add option to define the 'created' timestamp units (seconds/miliseconds) 2026-06-05 14:43:06 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1862