chore: format

This commit is contained in:
Timothy Jaeryang Baek
2025-10-26 19:33:39 -07:00
parent 54c05ac6e0
commit a70bc52c34
70 changed files with 378 additions and 1417 deletions

View File

@@ -1556,13 +1556,15 @@ async def chat_completion(
log.info("Chat processing was cancelled")
try:
event_emitter = get_event_emitter(metadata)
await asyncio.shield(event_emitter(
{"type": "chat:tasks:cancel"},
))
await asyncio.shield(
event_emitter(
{"type": "chat:tasks:cancel"},
)
)
except Exception as e:
pass
finally:
raise # re-raise to ensure proper task cancellation handling
raise # re-raise to ensure proper task cancellation handling
except Exception as e:
log.debug(f"Error processing chat payload: {e}")
if metadata.get("chat_id") and metadata.get("message_id"):