This commit is contained in:
Gaetan Hurel
2025-06-29 16:15:58 +02:00
parent d06dabfa3c
commit 7346f0739f
9 changed files with 24 additions and 18 deletions

View File

@@ -6,7 +6,7 @@ from langchain_community.tools.shell.tool import ShellTool
# Pre-configured SSH tool for your server - only connects when actually used
# TODO: Update these connection details for your actual server
configured_ssh_tool = SSHTool(
configured_remote_server = SSHTool(
host="157.90.211.119", # Replace with your server
port=8081,
username="g", # Replace with your username
@@ -14,4 +14,4 @@ configured_ssh_tool = SSHTool(
ask_human_input=True # Safety confirmation
)
__all__ = ["print_poem", "SSHTool", "ShellTool", "configured_ssh_tool"]
__all__ = ["print_poem", "SSHTool", "ShellTool", "configured_remote_server"]

View File

@@ -77,6 +77,8 @@ class SSHSession:
def execute(self, command: str) -> str:
"""Execute a single command, handling sudo automatically."""
print(f"🔧 Executing command: {command}")
if not self.client:
self.connect()