mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
fix: truncate long response IDs in get_logging_id to prevent S3 filename too long errors (#24628)
This commit is contained in:
parent
5be0797d24
commit
388a9f5094
1 changed files with 1 additions and 1 deletions
|
|
@ -7678,7 +7678,7 @@ def print_args_passed_to_litellm(original_function, args, kwargs):
|
|||
def get_logging_id(start_time, response_obj):
|
||||
try:
|
||||
response_id = (
|
||||
"time-" + start_time.strftime("%H-%M-%S-%f") + "_" + response_obj.get("id")
|
||||
"time-" + start_time.strftime("%H-%M-%S-%f") + "_" + str(response_obj.get("id"))[:150] if response_obj.get("id") else ""
|
||||
)
|
||||
return response_id
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue