.. | ||
acp | ||
adm/style | ||
config | ||
controller | ||
docs | ||
event | ||
includes | ||
language | ||
migrations/v1x | ||
styles | ||
composer.json | ||
license.txt | ||
README.md |
AI Labs v 1.0.2 RC
Changelog
Incorporate AI into your phpBB board and get ready for an exciting experience.
Currently supported ChatGPT, DALL-E (OpenAI) and Stable Diffusion (Stability AI).
Midjourney support coming soon.
Examples:
- ChatGPT
- ChatGPT, custom prompt
- DALL-E
- Stable Diffusion by Stability AI
- Midjourney, coming soon 🚀
- Stable Diffusion by Leonardo AI, coming soon 🚀
Also available as Telegram bot https://t.me/stable_diffusion_superbot
Requirements
- php >=7.1
- phpbb >= 3.2
Important notes
-
Installing of Simple mentions phpBB extension strongly suggested.
@mention feature makes it really easy to talk to AI bots and other board users. -
If you are planning to use image generation AI (eg DALL-E or Stable Diffusion) make sure to adjust attachment settings to support large images and verify that
webp
image extension configured.Go to
ACP
>General
>Attachment settings
and adjustTotal attachment quota
,Maximum file size
andMaximum file size messaging
:Go to
ACP
>Posting
>Manage attachment extensions
, look forwebp
, add it if missing:
Installation
Download https://github.com/privet-fun/phpbb_ailabs and copy /privet/ailabs
to phppp/ext
folder:
Go to ACP
> Customise
> Manage extensions
and enable the AI Labs
extension.
Finally go to ACP
> Extensions
> AI Labs
> Settings
and add desired AI configurations:
ChatGPT basic setup
-
You will need OpenAI account, sign up at https://platform.openai.com/.
To obtain API key go to https://platform.openai.com/account/api-keys, click onCreate new secret key
, copy and save in a safe place generated API key.
Open AI key starts withsk-
and look something like thissk-rb5yW9j6Nm2kP3Fhe7CPzT1QczwDZ5LvnlBfYU2EoqyX1dWs
. -
Create new board user who will act as AI bot, for our example we will use user
ChatGPT
.
Make sure this user account is activated and fully functional. -
Got to
ACP
>Extensions
>AI Labs
>Settings
and add new configuration, selectchatgpt
from AI dropdown:- Use
Load default configuration/template
to get defaults.
Replace Configuration JSONapi-key
with your Open AI key. - Select forums where you want
ChatGPT
AI user to reply to new posts and/or to quoted and @mention (if you are using Simple mentions extension) posts.
- Use
-
Save changes, navigate to forum configured above and create new post (if you configured
Reply on a post
) or quote/@mentionChatGPT
user: -
Fine-tuning can be done by adjusting following OpenAI API chat parameters https://platform.openai.com/docs/api-reference/chat
model
, defaultgpt-3.5-turbo
, full list of models available at https://platform.openai.com/docs/modelstemperature
,top_p
,frequency_penalty
andpresence_penalty
- see https://platform.openai.com/docs/api-reference/chat/create
-
Additional setting used by ChatGPT AI
message_tokens
, default 4096, limit maximum size of the entire conversation threadmax_tokens
, default 1024, define size reserved for AI reply when quotedprefix
, default empty, can be used to prompt modelprefix_tokens
, default 0, copy aboveprefix
to https://platform.openai.com/tokenizer to get size of yourprefix
in tokens and updateprefix_tokens
with number returned by tokenizer
ChatGPT advanced setup
You can setup ChatGPT to pretend it is somebody else.
Let's create new board user Bender
and configure as shown below:
Notice we used prefix
and prefix_tokens
to fine-tune ChatGPT AI behaviour.
Our AI bot Bender
will provide responses like this, mostly staying in a character.
DALL-E setup
Setup mostly the same as for ChatGPT above:
Refer to https://platform.openai.com/docs/api-reference/images/create to learn more about n
and size
parameters.
Examples
DALL-E advanced features
-
To generate an image of the desired size, you can specify one of the following sizes anywhere within the prompt, example:
- 1024x1024
- 512x512
- 256x256
-
To create variations of the image simply post image url to the prompt, example
Stable Diffusion setup
-
You will need Stability AI account, follow official instructions https://platform.stability.ai/docs/getting-started/authentication to create account and obtain API key.
-
Create new board user, let's say
Stable Diffusion
and create configuration:
Examples -
Refer to https://api.stability.ai/docs#tag/v1generation/operation/textToImage to learn more about configuration JSON parameters.
Support and suggestions
This extension is currently being actively developed. For communication, please use https://github.com/privet-fun/phpbb_ailabs/issues.
Changelog
-
1.0.2 June 1, 2023
- Only apply
utf8_encode_ucr
if present, reported by Vlad__
This will allow phpBB 3.2.1 support without any modifications. - Removed
...
andarray
to support php 7.1, reported by Vlad__ - Added missing
reply
processing for chatgpt controller, reported by Vlad__ - Added board prefix to all links, reported by Miri4ever
- Only apply
-
1.0.1 May 29, 2023
- Fixed issues reported by Miri4ever
- Removed all MySQL specific SQL, going forward extension should be SQL server agnostic
- Better language management
- Minor code cleanup
-
1.0.0 May 28, 2023
- Public release