mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
style(anthropic-adapter): drop added comments per repo convention
Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
This commit is contained in:
parent
e1ace00ca0
commit
9a5987b055
1 changed files with 0 additions and 5 deletions
|
|
@ -844,10 +844,6 @@ class AnthropicStreamWrapper(AdapterCompletionStreamWrapper):
|
|||
"""
|
||||
Async version of anthropic_sse_wrapper.
|
||||
Convert AnthropicStreamWrapper dict chunks to Server-Sent Events format.
|
||||
|
||||
A failure raised while iterating the upstream stream is surfaced as an
|
||||
Anthropic ``error`` event so the SSE stream stays well-formed instead of
|
||||
the connection being torn down.
|
||||
"""
|
||||
try:
|
||||
async for chunk in self:
|
||||
|
|
@ -856,7 +852,6 @@ class AnthropicStreamWrapper(AdapterCompletionStreamWrapper):
|
|||
payload = f"event: {event_type}\ndata: {json.dumps(chunk)}\n\n"
|
||||
yield payload.encode()
|
||||
else:
|
||||
# For non-dict chunks, forward the original value unchanged
|
||||
yield chunk
|
||||
except Exception as e: # noqa: BLE001 # boundary before the socket: any upstream failure becomes an Anthropic error event
|
||||
verbose_logger.exception("Anthropic Adapter - mid-stream error, emitting Anthropic error event: %s", e)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue