mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
fix comment, remove unused var, add backward-compat alias for _build_guardrail_inputs
This commit is contained in:
parent
91ac86ec17
commit
2c3ab41248
2 changed files with 5 additions and 2 deletions
|
|
@ -245,8 +245,8 @@ class A2AGuardrailHandler(BaseTranslation):
|
|||
|
||||
# Collect text from each chunk in order (by original index in responses_so_far)
|
||||
text_parts: List[str] = []
|
||||
chunk_indices_with_text: List[int] = [] # indices into valid_parsed
|
||||
for idx, (orig_i, obj) in enumerate(valid_parsed):
|
||||
chunk_indices_with_text: List[int] = [] # indices into responses_so_far
|
||||
for orig_i, obj in valid_parsed:
|
||||
t = extract_text_from_a2a_response(obj)
|
||||
if t:
|
||||
text_parts.append(t)
|
||||
|
|
|
|||
|
|
@ -408,6 +408,9 @@ class AnthropicMessagesHandler(BaseTranslation):
|
|||
inputs["model"] = response_model
|
||||
return inputs
|
||||
|
||||
# Backward-compat alias — subclasses that overrode _build_guardrail_inputs still work
|
||||
_build_guardrail_inputs = _build_output_guardrail_inputs
|
||||
|
||||
async def process_output_streaming_response(
|
||||
self,
|
||||
responses_so_far: List[Any],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue