audio and transcript
This commit is contained in:
@@ -47,6 +47,21 @@ def _build_prompt(message: str, context: SessionContext) -> str:
|
||||
fm, fs = divmod(int(f.timestamp), 60)
|
||||
lines.append(f" {f.id} at {fm:02d}:{fs:02d} — {f.path}")
|
||||
|
||||
# Transcript
|
||||
if context.transcript_segments:
|
||||
lines.append(f"\nTranscript ({len(context.transcript_segments)} segments):")
|
||||
for t in context.transcript_segments:
|
||||
tm1, ts1 = divmod(int(t.start), 60)
|
||||
tm2, ts2 = divmod(int(t.end), 60)
|
||||
lines.append(f" {t.id} [{tm1:02d}:{ts1:02d}-{tm2:02d}:{ts2:02d}] {t.text}")
|
||||
|
||||
if context.mentioned_transcripts:
|
||||
lines.append("\nTranscript segments referenced in this message:")
|
||||
for t in context.mentioned_transcripts:
|
||||
tm1, ts1 = divmod(int(t.start), 60)
|
||||
tm2, ts2 = divmod(int(t.end), 60)
|
||||
lines.append(f" {t.id} [{tm1:02d}:{ts1:02d}-{tm2:02d}:{ts2:02d}] {t.text}")
|
||||
|
||||
lines.append(f"\nUser message: {message}")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user