Skip to content
sushka edited this page Dec 24, 2023 · 2 revisions

Welcome to the SuvvyAPI wiki!

Getting started

Installation 🛠

To install SuvvyAPI, simply use pip:

pip install -U suvvyapi

Usage

To start, begin with

from suvvyapi import Suvvy, Message

suvvy = Suvvy("YOUR_TOKEN")

Note: Replace "YOUR_TOKEN" with your actual token from Suvvy AI.

Sync / Async

All methods have an asynchronous pair. They have same parameters and output

For example:

suvvy.check_connection()

and

await suvvy.acheck_connection()

All of the sync/async pairs

For Suvvy() class
await suvvy.acheck_connection() == suvvy.check_connection()
await suvvy.aget_history(...) == suvvy.get_history(...)
await suvvy.areset_history(...) == suvvy.reset_history(...)
await suvvy.async_add_message_to_history(...) == suvvy.add_message_to_history(...)
await suvvy.apredict_history(...) == suvvy.predict_history(...)
await suvvy.apredict_history_add_message(...) == suvvy.predict_history_add_message(...)
For History() class
await history.aget() == history.get()
await history.areset() == history.reset()
await history.async_add_message(...) == history.add_message(...)
await history.apredict(...) == history.predict(...)
await history.apredict_add_message(...) == history.predict_add_message(...)