Commit 325e6061 authored by Kantz's avatar Kantz
Browse files

es wird der erste und nicht der letzte Input für die Zusammenfassung genutzt.

parent c10aed50
...@@ -49,7 +49,7 @@ def archive_chat(messages: list[dict[str, Any]], draft: str | None = None) -> st ...@@ -49,7 +49,7 @@ def archive_chat(messages: list[dict[str, Any]], draft: str | None = None) -> st
def _summarize_record(record: dict[str, Any]) -> dict[str, Any]: def _summarize_record(record: dict[str, Any]) -> dict[str, Any]:
history = record.get("history", []) history = record.get("history", [])
preview = "" preview = ""
for entry in reversed(history): for entry in history:
if entry.get("role") == "user" and entry.get("content"): if entry.get("role") == "user" and entry.get("content"):
preview = entry["content"][:120] preview = entry["content"][:120]
break break
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment