INNER CODE UNIT · Python

get_user_id

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

def get_user_id():
    # Unique user identifier for authentication and load balancing
    # Gorilla-CLI is hosted by UC Berkeley Sky lab for FREE as a
    #  research prototype. Please don't spam the system or use it
    #  for commercial serving. If you would like to request rate
    #  limit increases for your GitHub handle, please raise an issue.
    try:
        with open(USERID_FILE, "r") as f:
            user_id = f.read().strip()
        if not user_id:
            user_id = generate_random_uid()
        return user_id
    except FileNotFoundError:
        try:
            user_id = get_git_email()
            print(WELCOME_TEXT)
            response = input(f"Use your Github handle ({user_id}) as user id? [Y/n]: ").strip().lower()
            if response in ["n", "no"]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…