mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -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
|
has_assistant = False
|
||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
if not line.strip():
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
entry = json.loads(line)
|
entry = json.loads(line)
|
||||||
if entry.get("type") == "assistant":
|
if entry.get("type") == "assistant":
|
||||||
|
|||||||
Reference in New Issue
Block a user