mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix(llm_as_a_judge): support Pydantic object in _get_litellm_param fallback chain
This commit is contained in:
parent
2b4a1c4f46
commit
478558b8a9
1 changed files with 4 additions and 0 deletions
|
|
@ -58,6 +58,10 @@ def _get_litellm_param(
|
|||
raw = guardrail.get("litellm_params")
|
||||
if isinstance(raw, dict) and key in raw:
|
||||
return raw[key]
|
||||
if raw is not None and not isinstance(raw, dict):
|
||||
attr = getattr(raw, key, None)
|
||||
if attr is not None:
|
||||
return attr
|
||||
return default
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue