mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
address greptile review feedback (greploop iteration 3)
- bias_hallucination_estimator: forward remaining session routing options (on_sensitive_data, sensitive_data_route_to_model, sticky_session_routing) - gemini: use continue pattern for null text guard in _extract_audio_response_from_parts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dd9884ef27
commit
8dd7e165e3
2 changed files with 6 additions and 1 deletions
|
|
@ -1542,8 +1542,10 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
for part in parts:
|
||||
if "text" in part:
|
||||
text_content = part["text"]
|
||||
if text_content is None:
|
||||
continue
|
||||
# Check if text content contains audio data URI
|
||||
if text_content is not None and text_content.startswith("data:audio") and ";base64," in text_content:
|
||||
if text_content.startswith("data:audio") and ";base64," in text_content:
|
||||
try:
|
||||
if is_base64_encoded(text_content):
|
||||
media_type, audio_data = text_content.split("data:")[1].split(";base64,")
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ def initialize_guardrail(
|
|||
end_session_after_n_fails=getattr(litellm_params, "end_session_after_n_fails", None),
|
||||
on_violation=getattr(litellm_params, "on_violation", None),
|
||||
realtime_violation_message=getattr(litellm_params, "realtime_violation_message", None),
|
||||
on_sensitive_data=getattr(litellm_params, "on_sensitive_data", None),
|
||||
sensitive_data_route_to_model=getattr(litellm_params, "sensitive_data_route_to_model", None),
|
||||
sticky_session_routing=getattr(litellm_params, "sticky_session_routing", True),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue