remove warning
This commit is contained in:
parent
533bac97fd
commit
1a8d63c5f0
@ -1,10 +1,14 @@
|
|||||||
import os
|
import os
|
||||||
|
import warnings
|
||||||
from langchain.chat_models import init_chat_model
|
from langchain.chat_models import init_chat_model
|
||||||
from langchain_community.tools.shell.tool import ShellTool
|
from langchain_community.tools.shell.tool import ShellTool
|
||||||
from langgraph.prebuilt import create_react_agent
|
from langgraph.prebuilt import create_react_agent
|
||||||
from langchain_core.messages import HumanMessage
|
from langchain_core.messages import HumanMessage
|
||||||
from custom_tools.poem_tool import print_poem
|
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():
|
def create_agent():
|
||||||
"""Create and return a ReAct agent specialized for system administration and debugging."""
|
"""Create and return a ReAct agent specialized for system administration and debugging."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user