Revert "(fix) proxy only import dynamo_db when it's being used"

This reverts commit 8d3ca785ae.
This commit is contained in:
ishaan-jaff 2024-01-15 12:07:20 -08:00
parent d999fc794b
commit 8cce2f28ca

View file

@ -7,6 +7,7 @@ from litellm.proxy.hooks.parallel_request_limiter import MaxParallelRequestsHand
from litellm.proxy.hooks.max_budget_limiter import MaxBudgetLimiter
from litellm.integrations.custom_logger import CustomLogger
from litellm.proxy.db.base_client import CustomDB
from litellm.proxy.db.dynamo_db import DynamoDBWrapper
from fastapi import HTTPException, status
import smtplib
from email.mime.text import MIMEText
@ -594,8 +595,6 @@ class DBClient:
self, custom_db_type: Literal["dynamo_db"], custom_db_args: dict
) -> None:
if custom_db_type == "dynamo_db":
from litellm.proxy.db.dynamo_db import DynamoDBWrapper
self.db = DynamoDBWrapper(database_arguments=DynamoDBArgs(**custom_db_args))
async def get_data(self, key: str, table_name: Literal["user", "key", "config"]):