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."""
|
"""Run the development agent with specified configuration."""
|
||||||
|
|
||||||
if not thread_manager:
|
thread_manager = ThreadManager()
|
||||||
thread_manager = ThreadManager()
|
|
||||||
client = await thread_manager.db.client
|
client = await thread_manager.db.client
|
||||||
|
|
||||||
# Get account ID from thread for billing checks
|
# Get account ID from thread for billing checks
|
||||||
|
|
|
@ -21,16 +21,11 @@ class ToolRegistry:
|
||||||
get_xml_examples: Get examples of XML tool usage
|
get_xml_examples: Get examples of XML tool usage
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_instance = None
|
def __init__(self):
|
||||||
|
"""Initialize a new ToolRegistry instance."""
|
||||||
def __new__(cls):
|
self.tools = {}
|
||||||
"""Create or return singleton instance."""
|
self.xml_tools = {}
|
||||||
if cls._instance is None:
|
logger.debug("Initialized new ToolRegistry instance")
|
||||||
cls._instance = super().__new__(cls)
|
|
||||||
cls._instance.tools = {}
|
|
||||||
cls._instance.xml_tools = {}
|
|
||||||
logger.debug("Initialized new ToolRegistry instance")
|
|
||||||
return cls._instance
|
|
||||||
|
|
||||||
def register_tool(self, tool_class: Type[Tool], function_names: Optional[List[str]] = None, **kwargs):
|
def register_tool(self, tool_class: Type[Tool], function_names: Optional[List[str]] = None, **kwargs):
|
||||||
"""Register a tool with optional function filtering.
|
"""Register a tool with optional function filtering.
|
||||||
|
|
|
@ -8,7 +8,7 @@ from dotenv import load_dotenv
|
||||||
from agentpress.tool import Tool
|
from agentpress.tool import Tool
|
||||||
from utils.logger import logger
|
from utils.logger import logger
|
||||||
from utils.files_utils import clean_path
|
from utils.files_utils import clean_path
|
||||||
from utils.thread_manager import ThreadManager
|
from agentpress.thread_manager import ThreadManager
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue