mirror of https://github.com/kortix-ai/suna.git
wip
This commit is contained in:
parent
1896208f12
commit
998b4a310e
|
@ -1966,7 +1966,7 @@ async def create_agent(
|
|||
|
||||
try:
|
||||
version_service = await _get_version_service()
|
||||
from agent.suna.config import SUNA_CONFIG
|
||||
from agent.suna_config import SUNA_CONFIG
|
||||
system_prompt = SUNA_CONFIG["system_prompt"]
|
||||
|
||||
version = await version_service.create_version(
|
||||
|
|
|
@ -18,7 +18,7 @@ def extract_agent_config(agent_data: Dict[str, Any], version_data: Optional[Dict
|
|||
|
||||
def _extract_suna_agent_config(agent_data: Dict[str, Any], version_data: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
||||
"""Extract config for Suna agents - always use central config with user customizations."""
|
||||
from agent.suna.config import SUNA_CONFIG
|
||||
from agent.suna_config import SUNA_CONFIG
|
||||
|
||||
agent_id = agent_data.get('agent_id', 'Unknown')
|
||||
logger.debug(f"Using Suna central config for agent {agent_id}")
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
from .config import get_suna_config, validate_config
|
||||
|
||||
__all__ = [
|
||||
'get_suna_config',
|
||||
'validate_config'
|
||||
]
|
|
@ -34,17 +34,3 @@ SUNA_CONFIG = {
|
|||
"is_default": True
|
||||
}
|
||||
|
||||
|
||||
def get_suna_config():
|
||||
"""Get current Suna configuration."""
|
||||
return SUNA_CONFIG.copy()
|
||||
|
||||
|
||||
def validate_config(config: dict) -> tuple[bool, list[str]]:
|
||||
"""Validate configuration data"""
|
||||
errors = []
|
||||
|
||||
if not config.get("name", "").strip():
|
||||
errors.append("Name cannot be empty")
|
||||
|
||||
return len(errors) == 0, errors
|
|
@ -13,7 +13,7 @@ class SunaDefaultAgentService:
|
|||
|
||||
async def get_suna_default_config(self) -> Dict[str, Any]:
|
||||
"""Get the current Suna configuration."""
|
||||
from agent.suna.config import SUNA_CONFIG
|
||||
from agent.suna_config import SUNA_CONFIG
|
||||
return SUNA_CONFIG.copy()
|
||||
|
||||
async def install_for_all_users(self) -> Dict[str, Any]:
|
||||
|
@ -130,7 +130,7 @@ class SunaDefaultAgentService:
|
|||
|
||||
async def _create_suna_agent_for_user(self, account_id: str) -> str:
|
||||
"""Create a Suna agent for a user."""
|
||||
from agent.suna.config import SUNA_CONFIG
|
||||
from agent.suna_config import SUNA_CONFIG
|
||||
|
||||
client = await self._db.client
|
||||
|
||||
|
@ -166,7 +166,7 @@ class SunaDefaultAgentService:
|
|||
"""Create initial version for Suna agent."""
|
||||
try:
|
||||
from agent.versioning.version_service import get_version_service
|
||||
from agent.suna.config import SUNA_CONFIG
|
||||
from agent.suna_config import SUNA_CONFIG
|
||||
|
||||
version_service = await get_version_service()
|
||||
await version_service.create_version(
|
||||
|
|
Loading…
Reference in New Issue