Update litellm/proxy/guardrails/guardrail_hooks/singulr/singulr.py

Co-authored-by: veria-ai[bot] <224490171+veria-ai[bot]@users.noreply.github.com>
This commit is contained in:
aniket-kardile 2026-07-14 16:57:17 +05:30 • committed by GitHub
parent 614aa849fc
commit 3baeb79179
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,7 @@ class SingulrGuardrail(CustomGuardrail):
) -> dict[str, Any]:
singulr_request = SingulrGuardrailRequest(
model=inputs.get("model") or request_data.get("model"),
prompts=self._extract_texts_by_role(inputs, ("user", "system")) if input_type == "request" else None,
prompts=inputs.get("texts") or [] if input_type == "request" else None,
completions=self._extract_texts_by_role(inputs, ("assistant",)) if input_type == "response" else None,
tools=inputs.get("tools") or [],
tool_calls=cast(Optional[List[ChatCompletionMessageToolCall]], inputs.get("tool_calls")) or [],