remove warning

This commit is contained in:
Gaetan Hurel 2025-06-27 10:16:42 +02:00
parent 533bac97fd
commit 1a8d63c5f0
No known key found for this signature in database

View File

@ -1,10 +1,14 @@
import os
import warnings
from langchain.chat_models import init_chat_model
from langchain_community.tools.shell.tool import ShellTool
from langgraph.prebuilt import create_react_agent
from langchain_core.messages import HumanMessage
from custom_tools.poem_tool import print_poem
# Suppress the shell tool warning since we're using it intentionally for sysadmin tasks
warnings.filterwarnings("ignore", message="The shell tool has no safeguards by default. Use at your own risk.")
def create_agent():
"""Create and return a ReAct agent specialized for system administration and debugging."""