mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Merge branch 'hiddenlayer-guardrail-integration-update' of https://github.com/Ashton-Sidhu/litellm into hiddenlayer-guardrail-integration-update
This commit is contained in:
commit
b3a489825c
1 changed files with 1 additions and 1 deletions
|
|
@ -409,7 +409,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