XDYB / SGPT

Simple & light weighted chatGPT (openAi API-based library), chat with openai for free and endlessly..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SChatGPT Library

Simple & light weighted chatGPT (openAi API-based library), chat with openai for free and endlessly..

Installation

Step 1. Add the JitPack repository to your build file

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.smith8h:SGPT:1.0.0'
}

Documentation

Step 1. got to this website here and get your api-token to use it in this library Step 2. create new instance of SGPT class and pass your token:

SGPT chat = new SGPT("token here");

Step 3. now you can chat with AI by:

// create a callback to interact with chat
SGPT.ChatCallBack callback = new SGPT.ChatCallBack() {
    @Override public void onResponse(String response) {
        // do your stuff on response
    }
    @Override public void onFailure(String message) {
        // do your stuff on failure
    }
};
// now chat with AI
chat.chat("your message/question", callback);

And that's it!

Donations ❤

If you would like to support this project's further development, the creator of this projects or the continuous maintenance of the project feel free to donate. Your donation is highly appreciated. Thank you!


You can choose what you want to donate, all donations are awesome!

PayPal Buy me a coffee Ko-fi


With ❤️

About

Simple & light weighted chatGPT (openAi API-based library), chat with openai for free and endlessly..


Languages

Language:Java 100.0%