manasajanj commited on
Commit
1cfdee1
·
verified ·
1 Parent(s): d28bdae

Update tools logic in app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -13,8 +13,9 @@ def calculator(args:dict)-> dict: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
  """A tool that does nothing yet
15
  Args:
16
- arg1: the first argument
17
- arg2: the second argument
 
18
  """
19
  arg1=args["arg1"]
20
  arg2=args["arg2"]
@@ -38,6 +39,11 @@ def get_current_time_in_timezone(timezone: str) -> str:
38
 
39
  @tool
40
  def generate_image(args):
 
 
 
 
 
41
  try:
42
  prompt = args["prompt"]
43
  image = image_generation_tool(prompt)
 
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
  """A tool that does nothing yet
15
  Args:
16
+ args: A dictionary containing:
17
+ - arg1: the first argument
18
+ - arg2: the second argument
19
  """
20
  arg1=args["arg1"]
21
  arg2=args["arg2"]
 
39
 
40
  @tool
41
  def generate_image(args):
42
+ """A tool that generate the image based on text prompt.
43
+ Args:
44
+ args: A dictionary containing:
45
+ - prompt(str): The text description used to generate the image.
46
+ """
47
  try:
48
  prompt = args["prompt"]
49
  image = image_generation_tool(prompt)