mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
fi: timestamp precision to millisec instead of micro
This commit is contained in:
parent
44053d0a6d
commit
058565726b
2 changed files with 10 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ class InMemoryLogsBuffer:
|
|||
|
||||
@staticmethod
|
||||
def _now_iso() -> str:
|
||||
return datetime.now(UTC).isoformat()
|
||||
return datetime.now(UTC).isoformat(timespec="milliseconds")
|
||||
|
||||
def mark_user_started_speaking(self):
|
||||
"""Record when the user started speaking for the current turn."""
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from types import SimpleNamespace
|
||||
import re
|
||||
|
||||
import pytest
|
||||
from pipecat.frames.frames import (
|
||||
|
|
@ -200,6 +201,14 @@ async def test_observer_attaches_backend_speaking_intervals_to_logged_transcript
|
|||
]
|
||||
|
||||
assert user_event["payload"]["timestamp"] != "aggregator-user-start"
|
||||
assert re.match(
|
||||
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+00:00$",
|
||||
user_event["payload"]["timestamp"],
|
||||
)
|
||||
assert user_event["payload"]["end_timestamp"]
|
||||
assert bot_event["payload"]["timestamp"] != "aggregator-bot-start"
|
||||
assert re.match(
|
||||
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+00:00$",
|
||||
bot_event["payload"]["timestamp"],
|
||||
)
|
||||
assert bot_event["payload"]["end_timestamp"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue