mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test(responses): return a new inputs mapping from the tool-dropping guardrail
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
7f03c27a2c
commit
d54386740a
1 changed files with 4 additions and 2 deletions
|
|
@ -1245,8 +1245,10 @@ class ToolDroppingGuardrail(CustomGuardrail):
|
|||
input_type: Literal["request", "response"],
|
||||
logging_obj: Optional[Any] = None,
|
||||
) -> GenericGuardrailAPIInputs:
|
||||
inputs["tools"] = [t for t in inputs.get("tools") or [] if t["function"]["name"] != self.drop]
|
||||
return inputs
|
||||
return {
|
||||
**inputs,
|
||||
"tools": [t for t in inputs.get("tools") or [] if t["function"]["name"] != self.drop],
|
||||
}
|
||||
|
||||
|
||||
CODEX_NAMESPACE_TOOL = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue