mirror of https://github.com/kortix-ai/suna.git
FIX
This commit is contained in:
parent
4ff1b438eb
commit
8271e0dbd3
|
@ -38,8 +38,8 @@ async def run_agent(
|
|||
):
|
||||
"""Run the development agent with specified configuration."""
|
||||
|
||||
if not thread_manager:
|
||||
thread_manager = ThreadManager()
|
||||
thread_manager = ThreadManager()
|
||||
|
||||
client = await thread_manager.db.client
|
||||
|
||||
# Get account ID from thread for billing checks
|
||||
|
|
|
@ -21,16 +21,11 @@ class ToolRegistry:
|
|||
get_xml_examples: Get examples of XML tool usage
|
||||
"""
|
||||
|
||||
_instance = None
|
||||
|
||||
def __new__(cls):
|
||||
"""Create or return singleton instance."""
|
||||
if cls._instance is None:
|
||||
cls._instance = super().__new__(cls)
|
||||
cls._instance.tools = {}
|
||||
cls._instance.xml_tools = {}
|
||||
logger.debug("Initialized new ToolRegistry instance")
|
||||
return cls._instance
|
||||
def __init__(self):
|
||||
"""Initialize a new ToolRegistry instance."""
|
||||
self.tools = {}
|
||||
self.xml_tools = {}
|
||||
logger.debug("Initialized new ToolRegistry instance")
|
||||
|
||||
def register_tool(self, tool_class: Type[Tool], function_names: Optional[List[str]] = None, **kwargs):
|
||||
"""Register a tool with optional function filtering.
|
||||
|
|
|
@ -8,7 +8,7 @@ from dotenv import load_dotenv
|
|||
from agentpress.tool import Tool
|
||||
from utils.logger import logger
|
||||
from utils.files_utils import clean_path
|
||||
from utils.thread_manager import ThreadManager
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
|
Loading…
Reference in New Issue