Package de.presti.ree6.utils.apis
Class ChatGPTAPI
java.lang.Object
de.presti.ree6.utils.apis.ChatGPTAPI
API Handler class for the ChatGPT API Wrapper.
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.lilittlecat.chatgpt.offical.ChatGPT
Instance of the ChatGPT API. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getResponse
(List<com.lilittlecat.chatgpt.offical.entity.Message> messages) Get a response based on a list of messages.static String
getResponse
(net.dv8tion.jda.api.entities.Member member, String message) Method used to get a response from the AI and storing the message in the in-memory List.void
initGPT()
Method to initialise and create the API Wrapper Instance.void
updatePreDefinedText
(String addition) Method used to add more information to the predefined text.
-
Field Details
-
chatGPT
public static com.lilittlecat.chatgpt.offical.ChatGPT chatGPTInstance of the ChatGPT API.
-
-
Constructor Details
-
ChatGPTAPI
public ChatGPTAPI()Constructor to initialise.
-
-
Method Details
-
updatePreDefinedText
Method used to add more information to the predefined text.- Parameters:
addition
- the addition.
-
initGPT
public void initGPT()Method to initialise and create the API Wrapper Instance. -
getResponse
Method used to get a response from the AI and storing the message in the in-memory List.- Parameters:
member
- the Member who send it.message
- the Message of the Member.- Returns:
- the response by the Model.
-
getResponse
Get a response based on a list of messages.- Parameters:
messages
- the messages.- Returns:
- the response by the Model.
-