Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access token Information #44

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions tabpfn_client/prompt_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@ def password_req_to_policy(password_req: list[str]):
requirements[word_part.lower()] = number
return PasswordPolicy.from_names(**requirements)

@staticmethod
def prompt_access_token_information():
"""
Print information about the access token.
Where to find it, how to use it, how to reset it etc.
"""
prompt = "\n".join(
[
"Your access token is a secret key that allows you to use TabPFN-Client services.",
"Please keep it safe and do not share it with anyone.",
"",
"You can find your access token in the ./tabpfn directory in the file 'config'.",
"If you lose your access token, you can reset it using the reset() and log in again.",
"Please Note: The access token expires after an year since you first logged in.",
"",
]
)

print(PromptAgent.indent(prompt))

@classmethod
def prompt_welcome(cls):
prompt = "\n".join(
Expand Down Expand Up @@ -113,6 +133,7 @@ def prompt_and_set_token(cls, user_auth_handler: "UserAuthenticationClient"):
+ "\n"
)

cls.prompt_access_token_information()
# Login
elif choice == "2":
# login to account
Expand Down
Loading