tomaslucas commited on
Commit
aa2566f
·
verified ·
1 Parent(s): 101fa75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -18
app.py CHANGED
@@ -43,24 +43,6 @@ def get_book() -> List[PotterBook]:
43
  libros = [PotterBook(**libro) for libro in datos]
44
  return libros
45
 
46
- # @tool
47
- # def filter_book(libro, campo, valor, operador='==') -> List:
48
- # """
49
- # Filtra libros según un campo, valor y operador especificados
50
- # operadores permitidos: ==, >, <, >=, <=, contains
51
- # Args:
52
- # libro: name o text title of the book we are looking for
53
- # campo: field of the book we are looking for
54
- # valor: value to compair with the field
55
- # operador: kind of compartive that we want to have over the field and de value
56
- # """
57
- # if operador == 'contains':
58
- # return [libro for libro in libros if valor.lower() in str(getattr(libro, campo)).lower()]
59
- # elif operador in ['==', '>', '<', '>=', '<=']:
60
- # return [libro for libro in libros if eval(f"{getattr(libro, campo)} {operador} {valor}")]
61
- # else:
62
- # raise ValueError("Operador no válido")
63
-
64
 
65
  @tool
66
  def get_current_time_in_timezone(timezone: str) -> str:
 
43
  libros = [PotterBook(**libro) for libro in datos]
44
  return libros
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  @tool
48
  def get_current_time_in_timezone(timezone: str) -> str: