Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -18,6 +18,18 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
18
  """
19
  return "What magic will you build ?"
20
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str:
23
  """A tool that fetches the current local time in a specified timezone.
 
18
  """
19
  return "What magic will you build ?"
20
 
21
+ """@tool
22
+ def generate_image(textprompt: str) -> bitmap:
23
+ """"""A tool that generates an image, based on a text prompt.
24
+ Args:
25
+ textprompt: A string instructing the image to generate
26
+ """"""
27
+ try:
28
+ return image_generation_tool.generate(textprompt)
29
+ except Exception as e:
30
+ return f"Error generating image with prompt '{textprompt}'; {str(e)}"
31
+ """
32
+
33
  @tool
34
  def get_current_time_in_timezone(timezone: str) -> str:
35
  """A tool that fetches the current local time in a specified timezone.