Skip to content

FlyUltra/TheChatGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TheChatGPT

badge badge badge badge badge badge badge

Very small API only about getting answer from ChatGPT from OpenAI!
By using OpenAI-GPT3
Only Spigot support!

Table of contents

Getting started

  1. Add depedency into your maven/gradle
  2. Create instance for ChatGPT
  3. Use login, and register method
  4. And have fun!

Dependencies

Here you can see the configuration interface

Maven
<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.Fly_Ultra</groupId>
    <artifactId>TheChatGPT</artifactId>
    <version>VERSION</version>
    <scope>compile</scope>
</dependency>
Gradle
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.Fly_Ultra:TheChatGPT:VERSION'
}

Example

    private ChatGPT chatGPT;
    
    @Override
    public void onEnable() {
        instance = this;
        
        // How to register ChatGPT
        chatGPT = new ChatGPT(this);
        chatGPT.login("your token", 0);
        chatGPT.register("AI", "You", "text-davinci-003", 0.9D, 50, 1.0D, 0D, 0.6D);
        
    }

    // Getter for ChatGPT
    public ChatGPT getChatGPT() {
        return chatGPT;
    }

    // How to get answer from AI
    getChatGPT().getAnswer(player, "How are you bro?");

License

TheChatGPT is licensed under the permissive MIT license. Please see LICENSE.txt for more information.