mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
refactor(s3_v2): read cold storage metadata without an empty dict default
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e999a4e0b6
commit
fc6060e118
1 changed files with 3 additions and 2 deletions
|
|
@ -840,9 +840,10 @@ class S3Logger(CustomBatchLogger, BaseAWSLLM):
|
|||
partition_granularity=partition_granularity,
|
||||
)
|
||||
|
||||
metadata: Final = standard_logging_payload.get("metadata")
|
||||
cold_storage_object_key: Final = (
|
||||
standard_logging_payload.get("metadata", {}).get("cold_storage_object_key")
|
||||
if litellm.cold_storage_custom_logger == "s3_v2"
|
||||
metadata.get("cold_storage_object_key")
|
||||
if metadata is not None and litellm.cold_storage_custom_logger == "s3_v2"
|
||||
else None
|
||||
)
|
||||
s3_object_key: Final = (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue