mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-03-17 03:00:27 -04:00
fix(backend/copilot): handle blank lines in validate_transcript
Skip empty lines instead of treating them as parse errors, preventing silent data loss from transcripts with blank lines. Addresses PR comment #2894841670
This commit is contained in:
@@ -223,6 +223,8 @@ def validate_transcript(content: str | None) -> bool:
|
||||
has_assistant = False
|
||||
|
||||
for line in lines:
|
||||
if not line.strip():
|
||||
continue
|
||||
try:
|
||||
entry = json.loads(line)
|
||||
if entry.get("type") == "assistant":
|
||||
|
||||
Reference in New Issue
Block a user