Upload tool
Browse files
    	
        tool.py
    CHANGED
    
    | @@ -30,6 +30,8 @@ class SimpleTool(Tool): | |
| 30 | 
             
                            mode=transportation_mode,
         | 
| 31 | 
             
                            departure_time=datetime(2025, 12, 6, 11, 0), # At 11, date far in the future
         | 
| 32 | 
             
                        )
         | 
|  | |
|  | |
| 33 | 
             
                        return directions_result[0]["legs"][0]["duration"]["text"]
         | 
| 34 | 
             
                    except Exception as e:
         | 
| 35 | 
             
                        print(e)
         | 
|  | |
| 30 | 
             
                            mode=transportation_mode,
         | 
| 31 | 
             
                            departure_time=datetime(2025, 12, 6, 11, 0), # At 11, date far in the future
         | 
| 32 | 
             
                        )
         | 
| 33 | 
            +
                        if len(directions_result) == 0:
         | 
| 34 | 
            +
                            return "No way found between these places with the required transportation mode."
         | 
| 35 | 
             
                        return directions_result[0]["legs"][0]["duration"]["text"]
         | 
| 36 | 
             
                    except Exception as e:
         | 
| 37 | 
             
                        print(e)
         | 
 
			
