### What problem does this PR solve? Close #5761 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)tags/v0.17.1
| msg[0]["content"] = m | msg[0]["content"] = m | ||||
| return max_length, msg | return max_length, msg | ||||
| m = msg_[1]["content"] | |||||
| m = msg_[-1]["content"] | |||||
| m = encoder.decode(encoder.encode(m)[:max_length - ll2]) | m = encoder.decode(encoder.encode(m)[:max_length - ll2]) | ||||
| msg[1]["content"] = m | |||||
| msg[-1]["content"] = m | |||||
| return max_length, msg | return max_length, msg | ||||