INNER CODE UNIT · Python
last_check_date
gorilla-llm/gorilla-cli · go_cli.py:109
last_check_date = datetime.datetime.now() - datetime.timedelta(days=1)
if datetime.datetime.now() - last_check_date >= datetime.timedelta(days=1):
try:
response = requests.get("https://pypi.org/pypi/gorilla-cli/json")
latest_version = response.json()["info"]["version"]
if latest_version > __version__:
print(f"A new version is available: {latest_version}. Update with `pip install --upgrade gorilla-cli`")
except Exception as e:
print("Unable to check for updates:", e)
try:
with open(UPDATE_CHECK_FILE, "w") as f:
f.write(datetime.datetime.now().strftime("%Y-%m-%d"))
except Exception as e:
print("Unable to write update check file:", e)
def get_user_id():