Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/GPT3Discord/commit/b47d52f2178d694a0522bb76303a03309d839c3f
You should set ROOT_URL correctly, otherwise the web may not work correctly.
awaitinteraction.response.send_message("Your API key looks invalid, please check that it is correct before proceeding. Please run the /setup command to set your key.",ephemeral=True,delete_after=100)
awaitinteraction.response.send_message(
"Your API key looks invalid, please check that it is correct before proceeding. Please run the /setup command to set your key.",
ephemeral=True,
delete_after=100,
)
else:
# We can save the key for the user to the database.
# Make a test request using the api key to ensure that it is valid.
try:
awaitModel.send_test_request(api_key)
awaitinteraction.response.send_message("Your API key was successfully validated.",ephemeral=True,delete_after=10)
awaitinteraction.response.send_message(
"Your API key was successfully validated.",
ephemeral=True,
delete_after=10,
)
exceptExceptionase:
awaitinteraction.response.send_message(f"Your API key looks invalid, the API returned: {e}. Please check that your API key is correct before proceeding",ephemeral=True,delete_after=30)
awaitinteraction.response.send_message(
f"Your API key looks invalid, the API returned: {e}. Please check that your API key is correct before proceeding",
ephemeral=True,
delete_after=30,
)
return
# Save the key to the database
try:
USER_KEY_DB[user.id]=api_key
USER_KEY_DB.commit()
awaitinteraction.followup.send("Your API key was successfully saved.",ephemeral=True,delete_after=10)
awaitinteraction.followup.send(
"Your API key was successfully saved.",
ephemeral=True,
delete_after=10,
)
exceptExceptionase:
traceback.print_exc()
awaitinteraction.followup.send("There was an error saving your API key.",ephemeral=True,delete_after=30)