mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
caching use file_checksum
This commit is contained in:
parent
089a4f279a
commit
467c506e33
1 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
import ast
|
||||
import asyncio
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import logging
|
||||
import time
|
||||
|
@ -1889,8 +1890,10 @@ class Cache:
|
|||
metadata = kwargs.get("metadata", {})
|
||||
litellm_params = kwargs.get("litellm_params", {})
|
||||
|
||||
# get checksum of file content
|
||||
param_value = (
|
||||
getattr(file, "name", None)
|
||||
metadata.get("file_checksum")
|
||||
or getattr(file, "name", None)
|
||||
or metadata.get("file_name")
|
||||
or litellm_params.get("file_name")
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue