aymnsk commited on
Commit
3ab9860
·
verified ·
1 Parent(s): d9e25cb

Update agents/base_agent.py

Browse files
Files changed (1) hide show
  1. agents/base_agent.py +5 -9
agents/base_agent.py CHANGED
@@ -1,8 +1,5 @@
1
- # agents/base_agent.py
2
  from typing import Literal
3
  from dataclasses import dataclass
4
- import json
5
- import os
6
 
7
  @dataclass
8
  class ACPMessage:
@@ -32,9 +29,8 @@ class BaseAgent:
32
  content=content
33
  )
34
 
35
- @staticmethod
36
- def load_prompts(json_path="prompts.json"):
37
- if os.path.exists(json_path):
38
- with open(json_path, "r") as f:
39
- return json.load(f)
40
- return []
 
 
1
  from typing import Literal
2
  from dataclasses import dataclass
 
 
3
 
4
  @dataclass
5
  class ACPMessage:
 
29
  content=content
30
  )
31
 
32
+ def is_greeting(self, text: str) -> bool:
33
+ return text.lower().strip() in {
34
+ "hi", "hello", "hey", "yo", "hii", "hiii", "sup", "👋", "🖐️", "🫱",
35
+ "how are you", "how are you both", "hi! how are you both doing today?"
36
+ }