mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-07 12:23:51 +00:00
Revert "fix get_tags_from_request_body"
This reverts commit 1c044dad999500b5c11ec96f528212c248f72f61.
This commit is contained in:
@@ -263,17 +263,8 @@ def get_tags_from_request_body(request_body: dict) -> List[str]:
|
||||
"""
|
||||
metadata_variable_name = get_metadata_variable_name_from_kwargs(request_body)
|
||||
metadata = request_body.get(metadata_variable_name, {})
|
||||
tags_in_metadata: Any = metadata.get("tags", [])
|
||||
tags_in_request_body: Any = request_body.get("tags", [])
|
||||
combined_tags: List[str] = []
|
||||
|
||||
######################################
|
||||
# Only combine tags if they are lists
|
||||
######################################
|
||||
if isinstance(tags_in_metadata, list):
|
||||
combined_tags.extend(tags_in_metadata)
|
||||
if isinstance(tags_in_request_body, list):
|
||||
combined_tags.extend(tags_in_request_body)
|
||||
######################################
|
||||
tags_in_metadata: List[str] = metadata.get("tags", [])
|
||||
tags_in_request_body: List[str] = request_body.get("tags", [])
|
||||
combined_tags: List[str] = tags_in_metadata + tags_in_request_body
|
||||
return [tag for tag in combined_tags if isinstance(tag, str)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user