This add-on provides helper functions for working with ChatGPT.
It allows you to set an API key for add-ons that work with ChatGPT and avoid loading duplicate dependencies.
Get OpenAI API
Get reply from ChatGPT
Message repository
fetchMessagesFromThread – Loads the context for the bot from the topic. Bot quotes are transformed into his messages for the correct context.
wrapMessage – Generates a message array, preparing content for the bot (removes unnecessary BB codes).
prepareContent– Prepare message content for the bot (removes unnecessary BB codes).
getQuotes – Parses quotes from the text, bringing it to a convenient form.
removeQuotes – Remove quotes from the text. Can be remove quotes for specific posts or users.
It allows you to set an API key for add-ons that work with ChatGPT and avoid loading duplicate dependencies.
Developer usage guide
Get the OpenAI API key
Code:
You must be logged-in to view.
(1 lines)
Code:
You must be logged-in to view.
(2 lines)
Code:
You must be logged-in to view.
(18 lines)
fetchMessagesFromThread – Loads the context for the bot from the topic. Bot quotes are transformed into his messages for the correct context.
Code:
You must be logged-in to view.
(8 lines)
Code:
You must be logged-in to view.
(8 lines)
getQuotes – Parses quotes from the text, bringing it to a convenient form.
Code:
You must be logged-in to view.
(17 lines)
Code:
You must be logged-in to view.
(6 lines)