sort and fix backend imports
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from pathlib import Path
|
||||
import hashlib
|
||||
import re
|
||||
from datetime import timedelta
|
||||
from typing import Optional, Callable
|
||||
import uuid
|
||||
import time
|
||||
import uuid
|
||||
from datetime import timedelta
|
||||
from pathlib import Path
|
||||
from typing import Callable, Optional
|
||||
|
||||
from utils.task import prompt_template
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from ast import literal_eval
|
||||
from typing import Any, Literal, Optional, Type
|
||||
|
||||
from pydantic import BaseModel, Field, create_model
|
||||
from typing import Any, Optional, Type, Literal
|
||||
|
||||
|
||||
def json_schema_to_model(tool_dict: dict[str, Any]) -> Type[BaseModel]:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import re
|
||||
import math
|
||||
|
||||
import re
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from typing import Awaitable, Callable, get_type_hints
|
||||
from apps.webui.models.tools import Tools
|
||||
from apps.webui.models.users import UserModel
|
||||
from apps.webui.utils import load_toolkit_module_by_id
|
||||
|
||||
from utils.schemas import json_schema_to_model
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
+10
-11
@@ -1,16 +1,15 @@
|
||||
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
||||
from fastapi import HTTPException, status, Depends, Request
|
||||
|
||||
from apps.webui.models.users import Users
|
||||
|
||||
from typing import Union, Optional
|
||||
from constants import ERROR_MESSAGES
|
||||
from passlib.context import CryptContext
|
||||
from datetime import datetime, timedelta, UTC
|
||||
import jwt
|
||||
import uuid
|
||||
import logging
|
||||
import uuid
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from typing import Optional, Union
|
||||
|
||||
import jwt
|
||||
from apps.webui.models.users import Users
|
||||
from constants import ERROR_MESSAGES
|
||||
from env import WEBUI_SECRET_KEY
|
||||
from fastapi import Depends, HTTPException, Request, status
|
||||
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
|
||||
from passlib.context import CryptContext
|
||||
|
||||
logging.getLogger("passlib").setLevel(logging.ERROR)
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import json
|
||||
import requests
|
||||
import logging
|
||||
|
||||
from config import SRC_LOG_LEVELS, VERSION, WEBUI_FAVICON_URL, WEBUI_NAME
|
||||
import requests
|
||||
from config import WEBUI_FAVICON_URL, WEBUI_NAME
|
||||
from env import SRC_LOG_LEVELS, VERSION
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
log.setLevel(SRC_LOG_LEVELS["WEBHOOK"])
|
||||
|
||||
Reference in New Issue
Block a user