Record Response • AI Agent SDK
record_response: Record model response text for content streaming loop detection.
record_response
Method
</div>
This is a method of the DoomLoopDetector class in the doom_loop module.
Record model response text for content streaming loop detection.
Hashes sliding window chunks and tracks repetition counts. Inspired by gemini-cli’s sliding window approach.
Signature
def record_response(text: str) -> AnyParameters
ParamField
strThe model’s response text
Returns
ResponseField
AnyThe result of the operation.
Uses
hexdigesthashlib.sha256chunk.encode
Used By
Source
View on GitHubpraisonaiagents/escalation/doom_loop.py at line 170