Schmitz005 commited on
Commit
dddee86
·
verified ·
1 Parent(s): 807c3dd

Update whalecore/agents.py

Browse files
Files changed (1) hide show
  1. whalecore/agents.py +4 -6
whalecore/agents.py CHANGED
@@ -7,19 +7,17 @@ class Agent:
7
  self.instructions = instructions
8
 
9
  def chat(self, message):
10
- # Placeholder logic for chatting
11
- return f"Hello from {self.name}! You said: {message[:260]}..."
12
 
13
  def load_agents(config_path="config.yaml"):
14
- print("📄 Parsed doc:", doc)
15
- print("📄 Type of doc:", type(doc))
16
  with open(config_path, 'r') as f:
17
  config = yaml.safe_load(f)
18
 
19
- assert isinstance(config, dict), "YAML file must return a dict with 'agents' key"
20
  assert 'agents' in config, "Missing 'agents' key in YAML file"
21
 
22
- print("🧠 YAML loaded:", config)
23
 
24
  agents = []
25
  for agent_conf in config['agents']:
 
7
  self.instructions = instructions
8
 
9
  def chat(self, message):
10
+ # Placeholder logic replace with real LLM call later
11
+ return f"🧠 {self.name} says:\n{self.instructions}\n\n{self.persona}\n\nYou said: {message[:260]}..."
12
 
13
  def load_agents(config_path="config.yaml"):
 
 
14
  with open(config_path, 'r') as f:
15
  config = yaml.safe_load(f)
16
 
17
+ assert isinstance(config, dict), "YAML must contain a top-level 'agents:' key"
18
  assert 'agents' in config, "Missing 'agents' key in YAML file"
19
 
20
+ print("🧠 YAML loaded successfully:", config)
21
 
22
  agents = []
23
  for agent_conf in config['agents']: