mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-18 04:44:37 +00:00
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:
parent
614aa849fc
commit
3baeb79179
1 changed files with 1 additions and 1 deletions
|
|
@ -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 [],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue