mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Merge pull request #4065 from BerriAI/litellm_use_common_func
[Refactor] - Refactor proxy_server.py to use common function for `add_litellm_data_to_request`
This commit is contained in:
commit
d9dacc1f43
8 changed files with 264 additions and 806 deletions
|
@ -73,7 +73,8 @@ def print_verbose(print_statement):
|
|||
def safe_deep_copy(data):
|
||||
if isinstance(data, dict):
|
||||
# remove litellm_parent_otel_span since this is not picklable
|
||||
data.pop("litellm_parent_otel_span", None)
|
||||
if "metadata" in data and "litellm_parent_otel_span" in data["metadata"]:
|
||||
data["metadata"].pop("litellm_parent_otel_span")
|
||||
new_data = copy.deepcopy(data)
|
||||
return new_data
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue