INNER CODE UNIT · Python

raise_issue

gorilla-llm/gorilla-cli · go_cli.py:97

def raise_issue(title, body):
    issue_title = urllib.parse.quote(title)
    issue_body = urllib.parse.quote(body)
    issue_url = f"{ISSUE_URL}?title={issue_title}&body={issue_body}"
    print(f"If the problem persists, please raise an issue: {issue_url}")

def check_for_updates():
    # Check if a new version of gorilla-cli is available once a day
    try:
        with open(UPDATE_CHECK_FILE, "r") as f:
            last_check_date = datetime.datetime.strptime(f.read(), "%Y-%m-%d")
    except FileNotFoundError:
        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"]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…