A Wrapper for ScarletAPI
still a work in progress
these are the docs
note-to-self: Need to find someone that knows how to write good docs
scarlet = Scarlet()
now we need a user to pass in to start working with the api
this should be a one time thing
user: 'ScarletUser' = await Scarlet.create(username, password, email)
Example:
user = await Scarlet.create(
username="Amashi",
password="*******",
email="example@gmail.com"
)
user.export_to_file(outfile=".user.json")
scarlet.set_user(user)
We export this data naturally to a json so that we can get the data later on
If we were to then want to later initialize the scarlet instance with the user object in place we can do so.
scarlet = Scarlet(
user=ScarletUser.from_file(".user.json")
)
ai_token=os.environ["AI_TOKEN"]
scarlet.set_user(ScarletUser.from_file(".user.json"))
print(scarlet.current_user)
res = await scarlet.sentience("Hello Bitch", ai_token=ai_token)
print(res.message)
This shit uses typings for everything and all the responses are typed out.
most methods are asynchronous but if you add sync_
before the function name it should be supported for synchonous
Email: amashisenpai386@gmail.com
Discord Tag: Amashi#2686
Support Discord: