iProsto commited on
Commit
8836d9e
·
verified ·
1 Parent(s): 70fbfaa

Update app.py

Browse files

fix get_list_of_people_on_iss tool function

Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -8,8 +8,18 @@ from tools.final_answer import FinalAnswerTool
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
- def get_list_of_people_on_iss() -> str:
12
- """A tool that fetches the current number of people in space. When known it also fetches the names and spacecraft those people are on. The tool takes no args."""
 
 
 
 
 
 
 
 
 
 
13
 
14
  url = "http://api.open-notify.org/astros.json"
15
  response = requests.get(url)
 
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
+ def get_list_of_people_on_iss() -> dict:
12
+ """A tool that fetches the current number of people in space. When known it also fetches the names and spacecraft those people are on. Returns.
13
+ Returns:
14
+ dict: A JSON object containing the following keys:
15
+ - "message" (str): Status message (e.g., "success").
16
+ - "number" (int): The number of astronauts currently in space.
17
+ - "people" (list of dict): A list of astronauts, where each entry contains:
18
+ - "name" (str): The astronaut's name.
19
+ - "craft" (str): The name of the spacecraft they are on.
20
+
21
+ Args: None
22
+ """
23
 
24
  url = "http://api.open-notify.org/astros.json"
25
  response = requests.get(url)