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.py index 2300b69e49..476e2d01e1 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 @@ -1,8 +1,8 @@ import concurrent.futures import io import random +import warnings from typing import Any, Literal, Optional, Union -from warnings import catch_warnings import openai @@ -10,7 +10,8 @@ from core.tools.entities.tool_entities import ToolInvokeMessage from core.tools.errors import ToolParameterValidationError, ToolProviderCredentialValidationError from core.tools.tool.builtin_tool import BuiltinTool -with catch_warnings(action="ignore", category=RuntimeWarning): +with warnings.catch_warnings(): + warnings.simplefilter("ignore") from pydub import AudioSegment