Skip to content

Commit

Permalink
access token information
Browse files Browse the repository at this point in the history
  • Loading branch information
anshulg954 committed Oct 17, 2024
1 parent 4ef0a6f commit 89cba0f
Showing 1 changed file with 21 additions and 0 deletions.
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

0 comments on commit 89cba0f

Please sign in to comment.