Spaces:
Build error
Build error
File size: 744 Bytes
873d0cf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import functools
import time
def wrapper(func):
"""A decorator that logs the start and end of the function call."""
@functools.wraps(func)
def wrapped_func(*args, **kwargs):
try:
from .gpt_computer_agent import the_main_window
print("GOOGLE-searching")
function_name = "Tool: " + func.__name__
the_main_window.active_border_animation(function_name)
time.sleep(2)
result = func(*args, **kwargs)
the_main_window.deactive_border_animation(function_name)
time.sleep(1)
print("GOOGLE SEARCHİNG COMPLEATES")
return result
except:
return func(*args, **kwargs)
return wrapped_func
|