Skip to content

Commit

Permalink
feat add safe_memory_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Jul 13, 2024
1 parent fd743aa commit 08efef5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions litellm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
ssl_certificate: Optional[str] = None
disable_streaming_logging: bool = False
in_memory_llm_clients_cache: dict = {}
safe_memory_mode: bool = False
### DEFAULT AZURE API VERSION ###
AZURE_DEFAULT_API_VERSION = "2024-02-01" # this is updated to the latest
### GUARDRAILS ###
Expand Down
2 changes: 2 additions & 0 deletions litellm/proxy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def safe_deep_copy(data):
Use this function to safely deep copy the LiteLLM Request
"""
if litellm.safe_memory_mode is True:
return data

# Step 1: Remove the litellm_parent_otel_span
if isinstance(data, dict):
Expand Down

0 comments on commit 08efef5

Please sign in to comment.