Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runagent/sdk/template_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _create_project_config(self, folder_path: Path):
existing_config.created_at = time.strftime("%Y-%m-%d %H:%M:%S")

config_content = existing_config.model_dump(
exclude={"agent_architecture"}
exclude={"agent_architecture", "framework"}
)

Config.create_config(str(folder_path), config_content)
11 changes: 9 additions & 2 deletions runagent/utils/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from runagent.constants import AGENT_CONFIG_FILE_NAME
from runagent.utils.imports import PackageImporter
from runagent.utils.schema import RunAgentConfig
from runagent.utils.schema import RunAgentConfig, PythonicEntryPoint
from .enums import FrameworkType


Expand Down Expand Up @@ -130,7 +130,14 @@ def validate_agent(

config = get_agent_config(folder_path)

is_valid, details = validate_pythonic_agent(config, dynamic_loading, folder_path)
if isinstance(config.agent_architecture.entrypoints[0], PythonicEntryPoint):
is_valid, details = validate_pythonic_agent(config, dynamic_loading, folder_path)
return is_valid, details
else:
return True, {
"valid": True,
"error_msgs": [],
}


def validate_pythonic_agent(config, dynamic_loading, folder_path):
Expand Down
1 change: 1 addition & 0 deletions runagent/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def create_config(project_dir: str, config_content: t.Dict[str, t.Any]) -> str:

# Write config file
with config_file.open("w") as f:

json.dump(config_content, f, indent=2)

return str(config_file)
Expand Down
1 change: 1 addition & 0 deletions runagent/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class PythonicType(Enum):
AGNO = "agno"
AUTOGEN = "autogen"
CREWAI = "crewai"
DEFAULT = "default"
LANGCHAIN = "langchain"
LANGGRAPH = "langgraph"
LETTA = "letta"
Expand Down
4 changes: 2 additions & 2 deletions templates/default/default/email_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def chat_completion_create(self,
model: str = None,
stream: bool = False,
max_tokens: int = 1000,
temperature: float = 0.7) -> Iterator[StreamChunk] | CompletionResponse:
temperature: float = 0.7):
"""
Main method to simulate AI chat completion
"""
Expand Down Expand Up @@ -379,7 +379,7 @@ def create(self,
model: str = "gpt-4",
messages: list = None,
stream: bool = False,
**kwargs) -> Iterator[StreamChunk] | CompletionResponse:
**kwargs):
"""OpenAI-compatible create method"""
return self.agent.chat_completion_create(
messages=messages or [],
Expand Down