mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
style: ruff format after greploop fixes
This commit is contained in:
parent
84de0ce655
commit
735b14f591
2 changed files with 2 additions and 6 deletions
|
|
@ -132,9 +132,7 @@ class AnthropicMessagesHandler(BaseTranslation):
|
|||
def _sse(event_type: str, payload: dict) -> bytes:
|
||||
return f"event: {event_type}\ndata: {json.dumps(payload)}\n\n".encode()
|
||||
|
||||
output_tokens = blocked_response_usage(getattr(exc, "original_response", None))[
|
||||
"output_tokens"
|
||||
]
|
||||
output_tokens = blocked_response_usage(getattr(exc, "original_response", None))["output_tokens"]
|
||||
open_index, max_index = self._content_block_state(responses_so_far)
|
||||
new_index = (max_index + 1) if max_index is not None else 0
|
||||
chunks: list[bytes] = []
|
||||
|
|
|
|||
|
|
@ -166,9 +166,7 @@ async def test_buffered_mode_disabled_for_content_rewriting_guardrail():
|
|||
the client would get the unredacted original instead of the moderated
|
||||
output. mask_response_content=True must force buffering off so the
|
||||
request falls back to the (correctly moderated) non-buffered path."""
|
||||
guardrail = _PassingGuardrail(
|
||||
guardrail_name="masker", event_hook="post_call", mask_response_content=True
|
||||
)
|
||||
guardrail = _PassingGuardrail(guardrail_name="masker", event_hook="post_call", mask_response_content=True)
|
||||
raw = await _run(guardrail)
|
||||
assert guardrail.streaming_buffer_until_moderated is True # request asked for buffering
|
||||
assert ORIGINAL_MARKER in raw
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue