[021] ChatGPT Bots - Xenforo 2

[021] ChatGPT Bots - Xenforo 2 1.1.0

[021] ChatGPT Bots - Xenforo 2.webp


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.

[021] ChatGPT Bots - Xenforo 2.webp


Developer usage guide:

Get the OpenAI API key
PHP:
You must log in to view content
(1 lines)

Get OpenAI API
PHP:
You must log in to view content
(2 lines)

Get reply from ChatGPT
PHP:
You must log in to view content
(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 content
(8 lines)

wrapMessage – Generates a message array, preparing content for the bot (removes unnecessary BB codes).
PHP:
You must log in to view content
(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 content
(17 lines)

removeQuotes – Remove quotes from the text. Can be remove quotes for specific posts or users.
PHP:
You must log in to view content
(6 lines)
 

Attachments

Last edited:
Top