The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
use file size _ name to get file check sum
Ishaan Jaffaa06df410135
diff --git a/litellm/utils.py b/litellm/utils.pyindex c859a962d70..20beb47dc2f 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -555,8 +555,11 @@ def function_setup():_file_name: BinaryIO = args[1] if len(args) > 1 else kwargs["file"]file_name = getattr(_file_name, "name", "audio_file")- # Add file checksum to metadata- file_checksum = hashlib.sha256(_file_name.read()).hexdigest()+ file_descriptor = _file_name.fileno()+ file_stat = os.fstat(file_descriptor)+ file_size = str(file_stat.st_size)++ file_checksum = _file_name.name + file_sizeif "metadata" in kwargs:kwargs["metadata"]["file_checksum"] = file_checksumelse: