-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add gemini audio input support + handle special tokens in sagemaker response #9640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…point no team/org split on daily user endpoint
enables passing google cloud bucket urls
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
] | ||
} | ||
) | ||
print("raw_request: ", raw_request) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High test
sensitive data (secret)
This expression logs
sensitive data (password)
This expression logs
sensitive data (secret)
This expression logs
sensitive data (password)
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to ensure that sensitive information is not logged. This can be achieved by scrubbing the raw_request
object of any sensitive data before logging it. We can use a utility function to remove or mask sensitive information from the raw_request
object before printing it.
- Add a utility function to scrub sensitive information from the
raw_request
object. - Use this utility function to clean the
raw_request
object before logging it. - Ensure that the changes are made in the
tests/llm_translation/base_llm_unit_tests.py
file.
-
Copy modified lines R12-R18 -
Copy modified line R962
@@ -11,2 +11,9 @@ | ||
|
||
def scrub_sensitive_data(data): | ||
if isinstance(data, dict): | ||
for key in ["client_secret", "api_key", "azure_ad_token", "azure_username", "azure_password"]: | ||
if key in data: | ||
data[key] = "REDACTED" | ||
return data | ||
|
||
sys.path.insert( | ||
@@ -954,2 +961,3 @@ | ||
) | ||
raw_request = scrub_sensitive_data(raw_request) | ||
print("raw_request: ", raw_request) |
…when counting sagemaker tokens
I'm getting |
Title
Relevant issues
Feature - enables calling gemini with audio input (b64 + file)
Fixes #9574 (comment)
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/
directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit
)[https://docs.litellm.ai/docs/extras/contributing_code]Type
🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test
Changes