fix(agent): enhance 413 error handling and improve conversation history management in tests
This commit is contained in:
parent
2c817ce4a5
commit
19f28a633a
4 changed files with 23 additions and 5 deletions
|
|
@ -539,6 +539,7 @@ class TelegramAdapter(BasePlatformAdapter):
|
|||
try:
|
||||
text_content = raw_bytes.decode("utf-8")
|
||||
display_name = original_filename or f"document{ext}"
|
||||
display_name = re.sub(r'[^\w.\- ]', '_', display_name)
|
||||
injection = f"[Content of {display_name}]:\n{text_content}"
|
||||
if event.text:
|
||||
event.text = f"{injection}\n\n{event.text}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue