Matty-Sam commited on
Commit
fbeda37
·
verified ·
1 Parent(s): 6ad46e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -36,17 +36,13 @@ def get_current_time_in_timezone(timezone: str) -> str:
36
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
37
 
38
  @tool
39
- def search_for_books(author: str = '') -> str:
40
  """A tool that searches for books by author keywords or words in the title of the book
41
  Args:
42
  author: A string representing an authors name.
43
- title: A string representing a book title.
44
  Returns:
45
  List of dictionaries. Each list item is a book and dictionaries ahve keys 'title', 'authors', 'subjects', and 'summaries'
46
  """
47
-
48
- if not author and not title:
49
- return 'Must provide at least one of author or title.'
50
 
51
  try:
52
  params = {"search": author}
 
36
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
37
 
38
  @tool
39
+ def search_for_books(author) -> str:
40
  """A tool that searches for books by author keywords or words in the title of the book
41
  Args:
42
  author: A string representing an authors name.
 
43
  Returns:
44
  List of dictionaries. Each list item is a book and dictionaries ahve keys 'title', 'authors', 'subjects', and 'summaries'
45
  """
 
 
 
46
 
47
  try:
48
  params = {"search": author}