mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-02-01 20:23:34 +08:00
fixed isort
This commit is contained in:
parent
c8e8088422
commit
7dc41ec69b
@ -1,23 +1,13 @@
|
||||
from decouple import config
|
||||
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
|
||||
from fastapi import (
|
||||
APIRouter,
|
||||
WebSocketDisconnect
|
||||
)
|
||||
|
||||
from fastapi import WebSocket, WebSocketDisconnect
|
||||
|
||||
from decouple import config
|
||||
from fastapi import APIRouter, WebSocket, WebSocketDisconnect
|
||||
from langchain_deepseek import ChatDeepSeek
|
||||
|
||||
from models.adaptive_rag import grading, query, routing
|
||||
|
||||
from .utils import ConnectionManager
|
||||
from models.adaptive_rag import (
|
||||
query,
|
||||
routing,
|
||||
grading
|
||||
)
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
from typing import List
|
||||
import json
|
||||
from typing import List
|
||||
|
||||
from fastapi import WebSocket
|
||||
|
||||
|
||||
class ConnectionManager:
|
||||
def __init__(self):
|
||||
self.active_connections: List[WebSocket] = []
|
||||
|
||||
@ -3,7 +3,6 @@ from functools import lru_cache
|
||||
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
log = logging.getLogger("uvicorn")
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
import logging
|
||||
|
||||
import uvicorn
|
||||
from fastapi import FastAPI, Depends
|
||||
from fastapi import Depends, FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
|
||||
from config import get_settings, Settings
|
||||
|
||||
from api import ping, chatbot
|
||||
from api import chatbot, ping
|
||||
from config import Settings, get_settings
|
||||
|
||||
log = logging.getLogger("uvicorn")
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
import unittest
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
from unittest.mock import AsyncMock
|
||||
from fastapi import WebSocket, WebSocketDisconnect
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
|
||||
from api.chatbot import websocket_endpoint, manager, llm_chat
|
||||
|
||||
from api.chatbot import llm_chat, manager, websocket_endpoint
|
||||
|
||||
@ -2,12 +2,14 @@ import os
|
||||
import sys
|
||||
import unittest
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
from fastapi import WebSocket
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
|
||||
from api.utils import ConnectionManager
|
||||
|
||||
|
||||
class TestConnectionManager(unittest.IsolatedAsyncioTestCase):
|
||||
async def asyncSetUp(self):
|
||||
self.manager = ConnectionManager()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
from starlette.testclient import TestClient
|
||||
|
||||
from config import get_settings, Settings
|
||||
from config import Settings, get_settings
|
||||
from main import create_application
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user