[3.2][3.3][RC] AI Labs with Midjourney, FaceSwap, PixVerse, Pika, Claude, ChatGPT, Gemini, DALL-E, Stable Diffusion

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
privet.fun
Registered User
Posts: 118
Joined: Sun May 07, 2023 8:46 pm
Location: https://privet.fun

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

Version:1.0.10 (May 5, 2024) see changelog for details:
- Added Discord CDN smart proxy setup
- Added Italian transaction by Lord Phobos

Extension Download: https://github.com/privet-fun/phpbb_ailabs
User avatar
privet.fun
Registered User
Posts: 118
Joined: Sun May 07, 2023 8:46 pm
Location: https://privet.fun

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

nou nou wrote: Sun May 05, 2024 8:41 pm How long can a ChatGPT request be?

Code: Select all

General Error
SQL ERROR [ mysqli ]

Data too long for column 'request' at row 1 [1406]

SQL
😅
Currently request field is TEXT which is 5,535 bytes in MySQL, I should probably update it to MEDIUMTEXT with 16,777,215 characters max.
I just recently updated log field from TEXT to MEDIUMTEXT for this exact reason :)

Will release update with the fix for request/response fields and perhaps with support for Gemini v1.5 1M multi-model along with File API for large files processing. Still need investigate more how File API works with REST API and the whole integration part, may take awhile.

Meanwhile you can just change field type yourself, it's really easy.
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

privet.fun wrote: Mon May 06, 2024 12:54 am - Added Discord CDN smart proxy setup
This works great, apart from the SQL commands in your how-to, like
UPDATE <you_prefix>_posts
SET post_text = REGEXP_REPLACE(post_text,
'https://cdn\\.discordapp\\.com/attachments/([0-9]+)/([0-9]+)/([^.]+)\\.([A-Za-z0-9]+)(\\?ex=)?',
'<your_website_root_url>/ailabs/discord_cdn/cdn.discordapp.com/attachments/\\1/\\2/\\3?ext=\\4&amp;ex=')
WHERE post_text LIKE "%https://cdn.discordapp.com/attachments/%"
I end up with links like

Code: Select all

https://www.mywebsite.com/ailabs/discord_cdn/cdn.discordapp.com/attachments/1/2/3?ext=4&ex=660dcd2f&is=65fb582f&hm=e5c7767448adb0846e2edf8862b446aa352f77d6d7a9ea89b493e6fdbd35c8d3&
where 1 and 2 and 3 should be the server/channel/imagename information I imagine...

I get this as an error instead:
Screenshot 2024-05-07 202128.png
You do not have the required permissions to view the files attached to this post.
User avatar
privet.fun
Registered User
Posts: 118
Joined: Sun May 07, 2023 8:46 pm
Location: https://privet.fun

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

nou nou wrote: Tue May 07, 2024 6:22 pm I get this as an error instead:
Most likely that REGEXP_REPLACE may need to be adjusted to the match you MySQL/MariaDB version.
You can try to generate new Midjourney / Pika and see how those look like, should not be an issue there.
I assume you added Discord CDN config https://github.com/privet-fun/phpbb_ail ... roxy-setup
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

Yes, the new ones look like this:

Code: Select all

<website_root>/ailabs/discord_cdn/cdn.discordapp.com/attachments/<discord_server>/<discord_channel>/secondman__It_looks_like_hell_is_freezing_over_in_a_very_good_w_c32608e0-a60a-4647-a557-1b1ebee7963f?ext=png&ex=663bb53c&is=663a63bc&hm=65448e8385664a0165142b4c58182a90c36768bcb0ecb06772aca1032036ff88&
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

Yaaaaay got Claude to work! Claude is pretty fast... :)
Changelog wrote:You can edit the original conversation after it has been posted and add more @mention AI bot tags if you missed them example
Does this work with the Quickedit extension? It doesn't seem to on my test board.
User avatar
privet.fun
Registered User
Posts: 118
Joined: Sun May 07, 2023 8:46 pm
Location: https://privet.fun

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

nou nou wrote: Wed May 08, 2024 10:32 pm Yaaaaay got Claude to work! Claude is pretty fast... :)
👍
nou nou wrote: Wed May 08, 2024 10:32 pm
Changelog wrote:You can edit the original conversation after it has been posted and add more @mention AI bot tags if you missed them example
Does this work with the Quickedit extension? It doesn't seem to on my test board.
Sorry, I'm not familiar with Quickedit, I'd imagine it should, just make sure you update @mention code. I probably should reach out to Paul and suggest that change.
User avatar
privet.fun
Registered User
Posts: 118
Joined: Sun May 07, 2023 8:46 pm
Location: https://privet.fun

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

nou nou wrote: Wed May 08, 2024 8:27 am Yes, the new ones look like this:

Code: Select all

<website_root>/ailabs/discord_cdn/cdn.discordapp.com/attachments/<discord_server>/<discord_channel>/secondman__It_looks_like_hell_is_freezing_over_in_a_very_good_w_c32608e0-a60a-4647-a557-1b1ebee7963f?ext=png&ex=663bb53c&is=663a63bc&hm=65448e8385664a0165142b4c58182a90c36768bcb0ecb06772aca1032036ff88&
Great, you should be good to go with new generations.
Sorry about messed up old ones, you may need to play with that regex to see what exactly needs to be done.
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

privet.fun wrote: Thu May 09, 2024 5:11 pm Sorry, I'm not familiar with Quickedit, I'd imagine it should, just make sure you update @mention code. I probably should reach out to Paul and suggest that change.
I'm an idiot. I literally just re-installed the extension because of some old BBCode thing that snuck in from years ago and I forgot to re-update that file.

Should work now - I'll test, sorry for the hassle!
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

privet.fun wrote: Thu May 09, 2024 5:12 pm
nou nou wrote: Wed May 08, 2024 8:27 am Yes, the new ones look like this:

Code: Select all

<website_root>/ailabs/discord_cdn/cdn.discordapp.com/attachments/<discord_server>/<discord_channel>/secondman__It_looks_like_hell_is_freezing_over_in_a_very_good_w_c32608e0-a60a-4647-a557-1b1ebee7963f?ext=png&ex=663bb53c&is=663a63bc&hm=65448e8385664a0165142b4c58182a90c36768bcb0ecb06772aca1032036ff88&
Great, you should be good to go with new generations.
Sorry about messed up old ones, you may need to play with that regex to see what exactly needs to be done.
I don't regex at all - it's about 40 posts, I'll put some headphones on and do it manually.

Good to know the new links should be good at least! :)
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

Quick (perhaps) feature request.

Is it possible, in addition to the {request} variable in the response template, to have a {short_request} (or something) that is a quote with a maximum length of X characters?

It's handy to have some context especially when different bots are replying at the same time, but full quotes are often too long IMO.
User avatar
privet.fun
Registered User
Posts: 118
Joined: Sun May 07, 2023 8:46 pm
Location: https://privet.fun

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

nou nou wrote: Thu May 09, 2024 8:22 pm Quick (perhaps) feature request.

Is it possible, in addition to the {request} variable in the response template, to have a {short_request} (or something) that is a quote with a maximum length of X characters?

It's handy to have some context especially when different bots are replying at the same time, but full quotes are often too long IMO.
See https://github.com/privet-fun/phpbb_ail ... mini-setup:
max_quote_length, if provided, the quoted response text will be truncated to the number of words defined by the max_quote_length value. Set it to 0 to remove all quoted text entirely.

Is that what you want?
User avatar
privet.fun
Registered User
Posts: 118
Joined: Sun May 07, 2023 8:46 pm
Location: https://privet.fun

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

nou nou wrote: Thu May 09, 2024 5:52 pm Good to know the new links should be good at least! :)
I really hope so!
I have about 10K images on my board which users generated with Midjourney, 99% of them via that useapi.net service.
Naturally it will be very upsetting to "lose" them.
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

privet.fun wrote: Fri May 10, 2024 12:37 am
nou nou wrote: Thu May 09, 2024 8:22 pm Quick (perhaps) feature request.

Is it possible, in addition to the {request} variable in the response template, to have a {short_request} (or something) that is a quote with a maximum length of X characters?

It's handy to have some context especially when different bots are replying at the same time, but full quotes are often too long IMO.
See https://github.com/privet-fun/phpbb_ail ... mini-setup:
max_quote_length, if provided, the quoted response text will be truncated to the number of words defined by the max_quote_length value. Set it to 0 to remove all quoted text entirely.

Is that what you want?
Yes! Totally missed that 🤦‍♂️

Thank you :) - does this work with all bots including the image generator ones?
User avatar
nou nou
Registered User
Posts: 676
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

privet.fun wrote: Fri May 10, 2024 12:40 am
nou nou wrote: Thu May 09, 2024 5:52 pm Good to know the new links should be good at least! :)
I really hope so!
I have about 10K images on my board which users generated with Midjourney, 99% of them via that useapi.net service.
Naturally it will be very upsetting to "lose" them.
🤞

Coincidentally - I ran your regex through ChatGPT (on my forum obviously ;)) to see if it could interpret it and suggest some changes. This is (part of) what came out - it can actually explain regex to you, it's really quite mind blowing.

I'll run it on a local test board and see what happens :)

Code: Select all

UPDATE <you_prefix>_posts
SET post_text = REGEXP_REPLACE(
post_text,
'https://cdn\\.discordapp\\.com/attachments/([0-9]+)/([0-9]+)/([^.]+)\\.([a-zA-Z0-9]+)(\\?ex=)?',
CONCAT('<your_website_root_url>', '/ailabs/discord_cdn/cdn.discordapp.com/attachments/', '\\1', '/', '\\2', '/', '\\3', '?ext=', '\\4', '&ex=')
)
WHERE post_text LIKE '%https://cdn.discordapp.com/attachments/%';
### Key Changes Made:
1. **String Literal Handling**: Ensured that backslashes in the replacement pattern are correctly escaped.
2. **Usage of `CONCAT` Function**: Sometimes breaking down the construction of the replacement string using `CONCAT()` can help clarify issues related to the handling of escape characters and string literals.
3. **General Cleanup**: Ensured the regex and replacement strings are clear and correctly formatted.

Return to “Extensions in Development”