Refactored gemini, openai and claude into one file and removed logic from the base class, also made helper class definable from command line

This commit is contained in:
2025-06-03 13:04:42 -05:00
parent bd0ce3e340
commit f15228fa58
36 changed files with 487 additions and 3847 deletions
-3
View File
@@ -1,6 +1,5 @@
# tools/log_tool.py
from .base_tool import BaseTool
from .metrics import metrics
import logging
import os
from datetime import datetime, timedelta
@@ -44,7 +43,6 @@ class LogTool(BaseTool):
}
]
@metrics.measure
def execute(self, function_name, **kwargs):
self.logger.info(f"Executing LogTool function: {function_name} with args: {kwargs}")
if function_name == "get_log_contents":
@@ -55,7 +53,6 @@ class LogTool(BaseTool):
self.logger.error(error_message)
return error_message
@metrics.measure
def _get_log_contents(self, line_count=None): # Default line_count is None to trigger 24h logic if not specified
self.logger.info(f"Attempting to get log contents from: {self.configured_log_file_path}. Line count: {line_count if line_count is not None else 'Last 24 hours'}")