mend
This commit is contained in:
@@ -62,6 +62,12 @@ def _build_prompt(message: str, context: SessionContext) -> str:
|
||||
tm2, ts2 = divmod(int(t.end), 60)
|
||||
lines.append(f" {t.id} [{tm1:02d}:{ts1:02d}-{tm2:02d}:{ts2:02d}] {t.text}")
|
||||
|
||||
if context.history:
|
||||
lines.append("\nConversation history:")
|
||||
for role, text in context.history:
|
||||
prefix = "User" if role == "user" else "Assistant"
|
||||
lines.append(f" {prefix}: {text}")
|
||||
|
||||
lines.append(f"\nUser message: {message}")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user