diff --git a/litellm/proxy/guardrails/guardrail_endpoints.py b/litellm/proxy/guardrails/guardrail_endpoints.py index 5163b212b2..b38b5bb1f6 100644 --- a/litellm/proxy/guardrails/guardrail_endpoints.py +++ b/litellm/proxy/guardrails/guardrail_endpoints.py @@ -5,14 +5,15 @@ CRUD ENDPOINTS FOR GUARDRAILS import concurrent.futures import inspect import json +import os from datetime import datetime, timezone from typing import Any, Dict, List, Optional, Type, TypeVar, Union, cast from urllib.parse import urlparse from fastapi import APIRouter, Depends, HTTPException +from pydantic import BaseModel from litellm.proxy.common_utils.path_utils import safe_join -from pydantic import BaseModel from litellm._logging import verbose_proxy_logger from litellm.constants import DEFAULT_MAX_RECURSE_DEPTH @@ -1350,8 +1351,6 @@ async def get_category_yaml(category_name: str): Returns: The raw YAML or JSON content of the category file with file type indicator """ - import os - # Get the categories directory path categories_dir = os.path.join( os.path.dirname(__file__), @@ -1408,8 +1407,6 @@ async def get_major_airlines(): Get the major airlines list from IATA (competitor intent, airline type). Returns airline id, match variants (pipe-separated), and tags. """ - import os - airlines_path = os.path.join( os.path.dirname(__file__), "guardrail_hooks",