This commit is contained in:
@@ -30,7 +30,7 @@ from .visualization import (
|
||||
# 为了兼容性,添加 classify_intent 函数
|
||||
def classify_intent(user_input: str, context: str = None):
|
||||
"""兼容旧代码的 classify_intent 函数"""
|
||||
from app.core.intent_classifier import get_intent_classifier
|
||||
from backend.app.core.intent_classifier import get_intent_classifier
|
||||
import asyncio
|
||||
classifier = get_intent_classifier()
|
||||
try:
|
||||
|
||||
@@ -94,7 +94,7 @@ class ReactIntentReasoner:
|
||||
def _get_llm_service(self):
|
||||
"""懒加载 LLM 服务(避免循环导入)"""
|
||||
if self._llm_service is None:
|
||||
from app.model_services.chat_services import get_chat_service, get_small_llm_service
|
||||
from backend.app.model_services.chat_services import get_chat_service, get_small_llm_service
|
||||
if self._use_small_llm:
|
||||
self._llm_service = get_small_llm_service()
|
||||
else:
|
||||
|
||||
@@ -89,7 +89,7 @@ class WebSearchTool:
|
||||
def _search_tavily(self, query: str, max_results: int) -> List[SearchResult]:
|
||||
"""使用 Tavily API 搜索"""
|
||||
from tavily import TavilyClient
|
||||
from app.config import TAVILY_API_KEY, TAVILY_MAX_RESULTS
|
||||
from backend.app.config import TAVILY_API_KEY, TAVILY_MAX_RESULTS
|
||||
|
||||
if not TAVILY_API_KEY:
|
||||
raise ValueError("TAVILY_API_KEY 未配置")
|
||||
|
||||
Reference in New Issue
Block a user