mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix: fix linting errors
This commit is contained in:
parent
81abb9c6a4
commit
f2d0aaacbc
2 changed files with 2 additions and 31 deletions
|
@ -1,18 +1,11 @@
|
||||||
import uuid
|
from typing import Any, Union
|
||||||
from datetime import datetime, timezone
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import litellm
|
|
||||||
from litellm.proxy._types import (
|
from litellm.proxy._types import (
|
||||||
AUDIT_ACTIONS,
|
|
||||||
GenerateKeyRequest,
|
GenerateKeyRequest,
|
||||||
LiteLLM_AuditLogs,
|
|
||||||
LiteLLM_ManagementEndpoint_MetadataFields_Premium,
|
LiteLLM_ManagementEndpoint_MetadataFields_Premium,
|
||||||
LiteLLM_TeamTable,
|
LiteLLM_TeamTable,
|
||||||
LitellmTableNames,
|
|
||||||
UserAPIKeyAuth,
|
UserAPIKeyAuth,
|
||||||
)
|
)
|
||||||
from litellm.proxy.management_helpers.audit_logs import create_audit_log_for_update
|
|
||||||
from litellm.proxy.utils import _premium_user_check
|
from litellm.proxy.utils import _premium_user_check
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,19 +13,15 @@ model/{model_id}/update - PATCH endpoint for model update.
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
from datetime import datetime, timezone
|
|
||||||
from typing import Optional, cast
|
from typing import Optional, cast
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends, HTTPException, Request, status
|
from fastapi import APIRouter, Depends, HTTPException, Request, status
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
import litellm
|
|
||||||
from litellm._logging import verbose_proxy_logger
|
from litellm._logging import verbose_proxy_logger
|
||||||
from litellm.constants import LITELLM_PROXY_ADMIN_NAME
|
from litellm.constants import LITELLM_PROXY_ADMIN_NAME
|
||||||
from litellm.proxy._types import (
|
from litellm.proxy._types import (
|
||||||
AUDIT_ACTIONS,
|
|
||||||
CommonProxyErrors,
|
CommonProxyErrors,
|
||||||
LiteLLM_AuditLogs,
|
|
||||||
LiteLLM_ProxyModelTable,
|
LiteLLM_ProxyModelTable,
|
||||||
LitellmTableNames,
|
LitellmTableNames,
|
||||||
LitellmUserRoles,
|
LitellmUserRoles,
|
||||||
|
@ -350,13 +346,7 @@ async def delete_model(
|
||||||
model_info: ModelInfoDelete,
|
model_info: ModelInfoDelete,
|
||||||
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
||||||
):
|
):
|
||||||
from litellm.proxy.proxy_server import (
|
from litellm.proxy.proxy_server import llm_router
|
||||||
general_settings,
|
|
||||||
llm_model_list,
|
|
||||||
llm_router,
|
|
||||||
proxy_config,
|
|
||||||
user_config_file_path,
|
|
||||||
)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
"""
|
"""
|
||||||
|
@ -457,19 +447,14 @@ async def add_new_model(
|
||||||
):
|
):
|
||||||
from litellm.proxy.proxy_server import (
|
from litellm.proxy.proxy_server import (
|
||||||
general_settings,
|
general_settings,
|
||||||
llm_model_list,
|
|
||||||
llm_router,
|
|
||||||
master_key,
|
|
||||||
premium_user,
|
premium_user,
|
||||||
prisma_client,
|
prisma_client,
|
||||||
proxy_config,
|
proxy_config,
|
||||||
proxy_logging_obj,
|
proxy_logging_obj,
|
||||||
store_model_in_db,
|
store_model_in_db,
|
||||||
user_config_file_path,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import base64
|
|
||||||
|
|
||||||
if prisma_client is None:
|
if prisma_client is None:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
@ -607,19 +592,12 @@ async def update_model(
|
||||||
"""
|
"""
|
||||||
from litellm.proxy.proxy_server import (
|
from litellm.proxy.proxy_server import (
|
||||||
LITELLM_PROXY_ADMIN_NAME,
|
LITELLM_PROXY_ADMIN_NAME,
|
||||||
general_settings,
|
|
||||||
llm_model_list,
|
|
||||||
llm_router,
|
llm_router,
|
||||||
master_key,
|
|
||||||
prisma_client,
|
prisma_client,
|
||||||
proxy_config,
|
|
||||||
proxy_logging_obj,
|
|
||||||
store_model_in_db,
|
store_model_in_db,
|
||||||
user_config_file_path,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import base64
|
|
||||||
|
|
||||||
if prisma_client is None:
|
if prisma_client is None:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue