导入方式修改
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

@@ -20,7 +20,7 @@ def web_search_tool(query: str, max_results: int = 5) -> str:
格式化的搜索结果,包含引用溯源
"""
try:
from app.core import web_search
from backend.app.core import web_search
return web_search(query, max_results)
except Exception as e:
return f"联网搜索出错:{str(e)}"
@@ -40,7 +40,7 @@ def generate_chart_tool(data_text: str, chart_type: str = "bar") -> str:
格式化的图表输出Mermaid 格式)
"""
try:
from app.core import generate_chart
from backend.app.core import generate_chart
return generate_chart(data_text, chart_type)
except Exception as e:
return f"生成图表出错:{str(e)}\n\n请使用格式:标题,标签1:值1,标签2:值2,..."

View File

@@ -22,13 +22,13 @@ def dictionary_tool(query: str, action: Optional[str] = None) -> str:
格式化的结果文本
"""
try:
from app.subgraphs.dictionary import (
from backend.app.subgraphs.dictionary import (
DictionaryState,
DictionaryAction,
parse_intent,
format_result
)
from app.subgraphs.dictionary.nodes import (
from backend.app.subgraphs.dictionary.nodes import (
query_word, translate_text, extract_terms, get_daily_word
)
@@ -87,13 +87,13 @@ def news_analysis_tool(query: str, action: Optional[str] = None) -> str:
格式化的结果文本
"""
try:
from app.subgraphs.news_analysis import (
from backend.app.subgraphs.news_analysis import (
NewsAnalysisState,
NewsAction,
parse_intent,
format_result
)
from app.subgraphs.news_analysis.nodes import (
from backend.app.subgraphs.news_analysis.nodes import (
query_news, analyze_url, extract_keywords, generate_report
)
@@ -150,13 +150,13 @@ def contact_tool(query: str, action: Optional[str] = None) -> str:
格式化的结果文本
"""
try:
from app.subgraphs.contact import (
from backend.app.subgraphs.contact import (
ContactState,
ContactAction,
parse_intent,
format_result
)
from app.subgraphs.contact.nodes import (
from backend.app.subgraphs.contact.nodes import (
query_contact, add_contact, list_contacts
)