fix(compressor): skip non-string tool content in dedup pass to prevent AttributeError
This commit is contained in:
parent
5bd937533c
commit
408dd8aa28
1 changed files with 2 additions and 0 deletions
|
|
@ -569,6 +569,8 @@ class ContextCompressor(ContextEngine):
|
|||
# Skip multimodal content (list of content blocks)
|
||||
if isinstance(content, list):
|
||||
continue
|
||||
if not isinstance(content, str):
|
||||
continue
|
||||
if len(content) < 200:
|
||||
continue
|
||||
h = hashlib.md5(content.encode("utf-8", errors="replace")).hexdigest()[:12]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue