Skip to content

Commit 5db84f4

Browse files
committed
better default values for entities
1 parent a941305 commit 5db84f4

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

app/my_agent.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
from datetime import datetime
88

99
class MyAgent:
10-
def __init__(self, id=None, role='Agent role', backstory='Backstory of agent', goal='Goal of agent', temperature=0.5, allow_delegation=False, verbose=False, llm_provider_model=None, max_iter=25, created_at=None):
11-
self.id = id or rnd_id()
12-
self.role = role
13-
self.backstory = backstory
14-
self.goal = goal
15-
self.temperature = temperature
10+
def __init__(self, id=None, role=None, backstory=None, goal=None, temperature=None, allow_delegation=False, verbose=False, llm_provider_model=None, max_iter=None, created_at=None, tools=None):
11+
self.id = id or "A_" + rnd_id()
12+
self.role = role or "Senior Researcher"
13+
self.backstory = backstory or "Driven by curiosity, you're at the forefront of innovation, eager to explore and share knowledge that could change the world."
14+
self.goal = goal or "Uncover groundbreaking technologies in AI"
15+
self.temperature = temperature or 0.1
1616
self.allow_delegation = allow_delegation
1717
self.verbose = verbose
1818
self.llm_provider_model = llm_provider_model or llm_providers_and_models()[0]
1919
self.created_at = created_at or datetime.now().isoformat()
20-
self.tools = []
21-
self.max_iter = max_iter
20+
self.tools = tools or []
21+
self.max_iter = max_iter or 25
2222
self.edit_key = f'edit_{self.id}'
2323
if self.edit_key not in ss:
2424
ss[self.edit_key] = False

app/my_crew.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
import db_utils
88

99
class MyCrew:
10-
def __init__(self, id=None, name="Crew name", agents=None, tasks=None, process=Process.sequential, cache=False, max_rpm=4999, verbose=2, manager_llm=None, manager_agent=None, created_at=None, memory=False):
11-
self.id = id or rnd_id()
12-
self.name = name
13-
self.agents = agents if agents is not None else []
14-
self.tasks = tasks if tasks is not None else []
15-
self.process = process
16-
self.verbose = verbose
10+
def __init__(self, id=None, name=None, agents=None, tasks=None, process=None, cache=None, max_rpm=None, verbose=None, manager_llm=None, manager_agent=None, created_at=None, memory=False):
11+
self.id = id or "C_" + rnd_id()
12+
self.name = name or "Crew 1"
13+
self.agents = agents or []
14+
self.tasks = tasks or []
15+
self.process = process or Process.sequential
16+
self.verbose = verbose or 2
1717
self.manager_llm = manager_llm
1818
self.manager_agent = manager_agent
1919
self.memory = memory
20-
self.cache = cache
21-
self.max_rpm = max_rpm
20+
self.cache = cache or False
21+
self.max_rpm = max_rpm or 1000
2222
self.created_at = created_at or datetime.now().isoformat()
2323
self.edit_key = f'edit_{self.id}'
2424
if self.edit_key not in ss:

app/my_task.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from datetime import datetime
77

88
class MyTask:
9-
def __init__(self, id=None, description="Task Description", expected_output="Expected output", agent=None, created_at=None):
10-
self.id = id or rnd_id()
11-
self.description = description
12-
self.expected_output = expected_output
13-
self.agent = agent
9+
def __init__(self, id=None, description=None, expected_output=None, agent=None, created_at=None):
10+
self.id = id or "T_" + rnd_id()
11+
self.description = description or "Identify the next big trend in AI. Focus on identifying pros and cons and the overall narrative."
12+
self.expected_output = expected_output or "A comprehensive 3 paragraphs long report on the latest AI trends."
13+
self.agent = agent or ss.agents[0] if ss.agents else None
1414
self.created_at = created_at or datetime.now().isoformat()
1515
self.edit_key = f'edit_{self.id}'
1616
if self.edit_key not in ss:

app/my_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from custom_tools import CustomFileWriteTool
66
class MyTool:
77
def __init__(self, tool_id, name, description, parameters, **kwargs):
8-
self.tool_id = tool_id or rnd_id()
8+
self.tool_id = tool_id or "T_" +rnd_id()
99
self.name = name
1010
self.description = description
1111
self.parameters = kwargs

0 commit comments

Comments
 (0)