mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Update litellm/proxy/guardrails/guardrail_hooks/hiddenlayer/hiddenlayer.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
fcb16d91af
commit
7afa6a01cc
1 changed files with 1 additions and 1 deletions
|
|
@ -406,7 +406,7 @@ class HiddenlayerGuardrailV2(CustomGuardrail):
|
|||
inputs["texts"] = new_texts
|
||||
|
||||
elif input_type == "response" and inputs.get("texts"):
|
||||
inputs["texts"] = [output["choices"][-1]["message"]["content"]]
|
||||
inputs["texts"] = [output.get("choices", [{}])[-1].get("message", {}).get("content", "")]
|
||||
elif input_type == "response" and inputs.get("tool_calls"):
|
||||
inputs["tool_calls"] = output
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue