Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ books_service = build("books", "v1", developerKey=google_api_key)
|
|
22 |
|
23 |
# I want to try connect to a google API to get some recommendation of audiobooks!
|
24 |
@tool
|
25 |
-
def search_audiobooks(topic:str, limit:int=3)-> str: #it's import to specify the return type
|
26 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
27 |
"""The tool is designed to connect to the google API platform and retrieve some audiobooks recommendations
|
28 |
Args:
|
@@ -52,7 +52,7 @@ def search_audiobooks(topic:str, limit:int=3)-> str: #it's import to specify the
|
|
52 |
|
53 |
@tool
|
54 |
# Function to estimate if audiobook fits time constraint
|
55 |
-
def filter_by_time(audiobooks, free_time):
|
56 |
"""The tool is designed to match the time in terms of duration of the audiobook which is called estimated_minutes and the free time that the person have
|
57 |
Args:
|
58 |
audiobooks: the list of the audiobooks
|
|
|
22 |
|
23 |
# I want to try connect to a google API to get some recommendation of audiobooks!
|
24 |
@tool
|
25 |
+
def search_audiobooks(topic: str, limit: int = 3)-> List[Dict[str, Any]]: #it's import to specify the return type
|
26 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
27 |
"""The tool is designed to connect to the google API platform and retrieve some audiobooks recommendations
|
28 |
Args:
|
|
|
52 |
|
53 |
@tool
|
54 |
# Function to estimate if audiobook fits time constraint
|
55 |
+
def filter_by_time(audiobooks: List[Dict[str, Any]], free_time: str) -> List[Dict[str, Any]]:
|
56 |
"""The tool is designed to match the time in terms of duration of the audiobook which is called estimated_minutes and the free time that the person have
|
57 |
Args:
|
58 |
audiobooks: the list of the audiobooks
|