导入方式修改
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m44s

This commit is contained in:
2026-05-05 23:17:00 +08:00
parent b5c15ef445
commit 3ae9daa01a
51 changed files with 445 additions and 532 deletions

View File

@@ -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:

View File

@@ -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:

View File

@@ -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 未配置")