- Views: 1K
- Replies: 1
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.
Developer usage guide
Get the OpenAI API key
PHP:
You must log in to view
(1 lines)
Get OpenAI API
PHP:
You must log in to view
(2 lines)
Get reply from ChatGPT
PHP:
You must log in to view
(18 lines)
Message repository
fetchMessagesFromThread – Loads the context for the bot from the topic. Bot quotes are transformed into his messages for the correct context.
PHP:
You must log in to view
(8 lines)
wrapMessage – Generates a message array, preparing content for the bot (removes unnecessary BB codes).
PHP:
You must log in to view
(8 lines)
prepareContent – Prepare message content for the bot (removes unnecessary BB codes).
getQuotes – Parses quotes from the text, bringing it to a convenient form.
PHP:
You must log in to view
(17 lines)
removeQuotes – Remove quotes from the text. Can be remove quotes for specific posts or users.
PHP:
You must log in to view
(6 lines)
Attachments
Last edited: