phspoden commited on
Commit
dcf4485
·
1 Parent(s): 8894d38

Added agent tool "get_techy_phrases_text"

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py CHANGED
@@ -43,6 +43,27 @@ def get_corporate_bullshit_text()-> str:
43
  return "Error - get_corporate_bullshit_text() -> Exception - Well this didn't work"
44
 
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  @tool
47
  def get_current_time_in_timezone(timezone: str) -> str:
48
  """A tool that fetches the current local time in a specified timezone.
 
43
  return "Error - get_corporate_bullshit_text() -> Exception - Well this didn't work"
44
 
45
 
46
+ @tool
47
+ def get_techy_phrases_text()-> str:
48
+ #Keep this format for the description / args / args description but feel free to modify the tool
49
+ """A tool that generates cool tech-savvy sounding phrases as text.
50
+ Args:
51
+ None
52
+ """
53
+ try:
54
+ url = 'https://techy-api.vercel.app/api/json'
55
+ response = requests.get(url)
56
+
57
+ if response.status_code == 200:
58
+ data = response.json()
59
+ return data['message']
60
+ else:
61
+ return f'Error - get_techy_bullshit_text() -> Response status code was not good ({response.status_code})'
62
+
63
+ except Exception as e:
64
+ return "Error - get_techy_bullshit_text() -> Exception - Well this didn't work"
65
+
66
+
67
  @tool
68
  def get_current_time_in_timezone(timezone: str) -> str:
69
  """A tool that fetches the current local time in a specified timezone.