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
fix: remove redundant import os, use Path().name instead
Chesarsd7c253213702
diff --git a/litellm/litellm_core_utils/prompt_templates/common_utils.py b/litellm/litellm_core_utils/prompt_templates/common_utils.pyindex 12447b39e1e..3e639e79b6d 100644--- a/litellm/litellm_core_utils/prompt_templates/common_utils.py+++ b/litellm/litellm_core_utils/prompt_templates/common_utils.py@@ -5,7 +5,6 @@ Common utility functions used for translating messages across providersimport ioimport mimetypesimport re-import osfrom os import PathLikefrom pathlib import Pathfrom typing import (@@ -647,7 +646,7 @@ def extract_file_data(file_data: FileTypes) -> ExtractedFileData:# If it's a file-like object# Try to get filename from file handle if not already setif not filename and hasattr(file_content, 'name'):- filename = os.path.basename(file_content.name)+ filename = Path(file_content.name).namecontent = file_content.read()