Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor(tools): Avoid warnings. (#10161)
-LAN-3c85136279af
diff --git a/api/core/tools/provider/builtin/chart/chart.py b/api/core/tools/provider/builtin/chart/chart.pyindex 209d6ecba48..dfa3fbea6aa 100644--- a/api/core/tools/provider/builtin/chart/chart.py+++ b/api/core/tools/provider/builtin/chart/chart.py@@ -1,5 +1,5 @@import matplotlib.pyplot as plt-from matplotlib.font_manager import FontProperties+from matplotlib.font_manager import FontProperties, fontManagerfrom core.tools.provider.builtin_tool_provider import BuiltinToolProviderController@@ -17,9 +17,10 @@ def set_chinese_font():]for font in font_list:- chinese_font = FontProperties(font)- if chinese_font.get_name() == font:- return chinese_font+ if font in fontManager.ttflist:+ chinese_font = FontProperties(font)+ if chinese_font.get_name() == font:+ return chinese_fontreturn FontProperties()diff --git a/api/core/tools/provider/builtin/podcast_generator/tools/podcast_audio_generator.py b/api/core/tools/provider/builtin/podcast_generator/tools/podcast_audio_generator.pyindex 8c8dd9bf680..2300b69e49f 100644--- a/api/core/tools/provider/builtin/podcast_generator/tools/podcast_audio_generator.py+++ b/api/core/tools/provider/builtin/podcast_generator/tools/podcast_audio_generator.py@@ -2,14 +2,17 @@ import concurrent.futuresimport ioimport randomfrom typing import Any, Literal, Optional, Union+from warnings import catch_warningsimport openai-from pydub import AudioSegmentfrom core.tools.entities.tool_entities import ToolInvokeMessagefrom core.tools.errors import ToolParameterValidationError, ToolProviderCredentialValidationErrorfrom core.tools.tool.builtin_tool import BuiltinTool+with catch_warnings(action="ignore", category=RuntimeWarning):+ from pydub import AudioSegment+class PodcastAudioGeneratorTool(BuiltinTool):@staticmethod