Add timestamp frames and include timestamps in the transcription event and frame
This commit is contained in:
@@ -207,6 +207,20 @@ class InterimTranscriptionFrame(TextFrame):
|
||||
return f"{self.name}(user: {self.user_id}, text: [{self.text}], language: {self.language}, timestamp: {self.timestamp})"
|
||||
|
||||
|
||||
@dataclass
|
||||
class OpenAILLMContextUserTimestampFrame(DataFrame):
|
||||
"""Timestamp information for user message in LLM context."""
|
||||
|
||||
timestamp: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class OpenAILLMContextAssistantTimestampFrame(DataFrame):
|
||||
"""Timestamp information for assistant message in LLM context."""
|
||||
|
||||
timestamp: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class TranscriptionMessage:
|
||||
"""A message in a conversation transcript containing the role and content.
|
||||
|
||||
Reference in New Issue
Block a user