Check typed's interruption only over the text parts non_text cleared
This commit was merged in pull request #74.
This commit is contained in:
+1
-1
@@ -419,7 +419,7 @@ def typed(entry):
|
||||
command = isinstance(content, str) and content.startswith("<")
|
||||
no_content = not isinstance(content, str) and not parts
|
||||
non_text = any(not isinstance(part, dict) or part.get("type") != "text" for part in parts)
|
||||
interruption = any(isinstance(part, dict) and part.get("type") == "text" and part.get("text", "").startswith("[Request interrupted") for part in parts)
|
||||
interruption = not non_text and any(part.get("text", "").startswith("[Request interrupted") for part in parts)
|
||||
return not (meta or loop_prompt or command or no_content or non_text or interruption)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user