[ABD] AI Bot - Chat like ChatGPT

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
PT-NGS-
Registered User
Posts: 35
Joined: Sun Jun 12, 2005 1:12 pm

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by PT-NGS- »

Andy wrote: Sat Apr 08, 2023 6:14 pm Hi PT-NGS,

did you enter a valid Open AI API Key in the ACP under Extensions - AI Bot Module - API - Open AI API settings - Open AI KEY?

Did you perform Test and run - Test connection there? What was the output?

Best regards
Andy
Hello, yes..
Screenshot_1.png
Screenshot_1.png (7.97 KiB) Viewed 2466 times
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Miri4ever »

Yes, the API Check needed some seconds to show off now and anything is green like in the first version even if it takes much longer.

But neverless from the API Key the Chat Bot did not replay to anything and still bring out the not configured message. He doesn't tell the API was wrong because the Bot Settings Page have some more inputs as only the API Key. Or did this page provide several API Keys for different Chat Bots? And no Logs are made to see any success or errors.

And may question about the white coloring is also open and how to fix it the system only uses the system main style setting instead of only white.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
Andy
Registered User
Posts: 14
Joined: Fri Mar 31, 2023 11:32 am

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Andy »

I've sent you a PM yesterday, Miri.

And please download the extension and reinstall it again: andy-aibot-0-0-1-dev.zip. The problem is fixed.

In Addition: Only the chat module is implemented at the moment. Therefore just the "API settings" and "Chat settings" are used. The other features will be developed step by step (see my first post). My experience shows that a "paid" API key is faster than a "free" API key.
PT-NGS-
Registered User
Posts: 35
Joined: Sun Jun 12, 2005 1:12 pm

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by PT-NGS- »

Hello!
Works! Thanks :)
PT-NGS-
Registered User
Posts: 35
Joined: Sun Jun 12, 2005 1:12 pm

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by PT-NGS- »

Hello Andy, I made some changes to the template for myself and also translated it into PT-PT.

What I did:

1- Removed the automatic scroll (was driving me crazy)
2- Put the translation on the "send" button
3- Changed the chat model a bit (aibot_body.html)

What I tried to do:
I tried to translate "you" and "AI" but it gave me an error. I would like to add our avatar, I think it would be funny. And also have the ChatGPT avatar for the AI.

When the chat talks to us, everything stays on the same line. But it looks strange when asking for a recipe or code, etc. I couldn't separate them into separate lines.

Here are some images.
Screenshot_1.png
Screenshot_2.png
Screenshot_3.png
Screenshot_3.png (2.56 KiB) Viewed 2309 times
https://www.mediafire.com/file/p582pulj ... y.zip/file
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Miri4ever »

You should number your updates and not keep all at 0.0.1. So, I could not see if there was a change. The last version did the job for got it working. But it was the problem with the dark styles and I found some bugs I fixed to make it compatible for each style.

I added the missing class="bg1" attribute for the input field to get the current forum color.
I added the missing class="button" attribute to create the exact forum used buttons.
There was a bug in view topic with this link you added, and it broke my style. Don't mix '....' and "..." inside the same line.
I created a next text line to translate this button text.
And I added some additional text to explain a bit more about this system
I wanted to connect this BOT with my existing BOTs and give them a bit of personality with a name instead only AI.
I made German translations and fixing to match my PBWOW3 Style.

@PT-NGS: But I really like this design with the button right of the input field. It looks like the main chat with this kind of style. I needed to look at the code to try the same.

Moreover, this scrolling and if the input line is above the last input text should scroll from top to bottom down. If the input box is at the bottom, the current up scrolling is ok, but I would like to revert the direction.

As I developed my Chat Games I know it's possible to get the username with color, avatar inside the input text and not only this YOU. For the AI-Bot should be the same, and it should be possible to adjust it to the username used as current BOT for the forum. Maybe I would appreciate it if other people could see the latest inputs from others.

The AI-BOT is called forumlink/aibot inside the browser line. I wanted to create some more links to connect from several text and locations to this BOT. If I use forumlink/aibot or just aibot the system will not find any page. For the moment, it only works over your link, but I do not see why not work the same using URL tag to redirect.

Besides the forum names, there is ** BOT Event ** displayed inside my forum names even if I did not want this to happen. And this link inside view topic seems to have no function at all and just reload the last post. I saw inside the translations something about permissions and also a HTML for the UCP but found nothing there.

It also would be nice to control who can use and open this link to the bot and who not. For now, I have a working patch for PBWOW3 Style and a workaround for all dark styles if somebody needs some help here.
Attachments
3.jpg
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
PT-NGS-
Registered User
Posts: 35
Joined: Sun Jun 12, 2005 1:12 pm

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by PT-NGS- »

@Miri4ever, thank you!

Actually, my idea was to make it as similar as possible to the original chatGPT. Anyway, you have the code above.
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Miri4ever »

Thank you, yes I got your code and could find a solution for some parts, but I also noticed some things you should not do:

If adding translations and creating new entries there they should update for each language, I noticed they seem missing on the original English version for the send button.

Not use CSS Colors and try to work with the Prosilver provided colors. Define white colors at dark boards made result problem. I needed to rewrite the code for to use basic prosilver colors and also to use the class="button" attribute to coming along with prosilver themes.

Did you remove these last lines from the JavaScript file? Those line got called 3x time and as it was missing my enter or send button just did nothing whatsoever. After backup the original file, it worked again. Yes this scrolling to the bottom for each answer is bad, and I could do a workaround with just having a simple footer. As the extension working inside this popup window on its own, I think it's ok because no other operates in this instance. This makes the jump down scrolling acceptable.

But I think using a system with customize up and drown scrolling like in MChat would be nice. Aswell take over the users and the AI-Bot-Users names for the chat. But let's see what coming with next updates.
Attachments
a.jpg
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
Andy
Registered User
Posts: 14
Joined: Fri Mar 31, 2023 11:32 am

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Andy »

New release is out now: andy-aibot-0-0-2-dev.zip

New installation requires the following steps:
1. Unzip to ext/andy/aibot.
2. Enable extension "AI Bot" in ACP - "Customize".
3. Enter valid Open AI API key in "Extensions - AI Bot - Open AI KEY".

Upgrade from 0-0-1-dev requires the following steps to be done before:
1. Disable extension in ACP.
2. Delete data.
3. Delete table "phpbb_aibot_chat" via phpMyAdmin or another DBMS tool manually (phpbb_ has possibly to be replaced by your table prefix). This step will not be necessary from 0-0-2-dev and onwards as it will be done automatically.

New features:
+ Chats are stored, can be continued and deleted
+ Chat responses are rendered via Parsedown to highlight code, lists, ... (has to be slightly improved)
+ Creating responses can be cancelled
+ User icon is used instead of text "You"
+ Context can be passed to API via setting "Maximum messages as context (number)" in ACP - "API". Default is 1. Increasing this number increases accuracy of responses but also the costs/tokens.
+ Minor bug fixes and enhancements, e.g. passing language vars to JS "apibot.js"

Image
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Miri4ever »

I have updated yesterday my version to the latest release and checked my file if some error got fixed. Firstly, thank you so much for this one, I think we love it, and it closes the gap between MChat Bot and talking in a private session. The scrolling inside the window has improved and even to store last texts posted. And to review and delete things, but I believe this not working properly right now. I was unable to delete some messages.

But thus many new bugs and remain errors from the first release.

I think nothing was changed in View topic, so I keep mine before it breaks my style again. But for now, I see no reason for this icon there as it only jumps top to the page. The white background remains and this buttons for the chat due to a missing class="bg1" or class="button"

For now there is a replacement from You in to an image. It's still not the username chatting, and the AI Name has been removed complete? I put the AI-Name until there is a solution to add my bot name there via user ID. But icons ? The icons did not show up to me, I tested on 2 different styles. I just see there are missing images even if uploaded all images to all folders. But icons in the time of Font Awesome? I replace the images with Font Awesome Icons in the Chat and where you can delete the messages.

I will see if I can add the username chatting the same way I did in my MChat Games.

Did the buttons work ? I can enter something in chat and pressing enter, and the AI responds. If I press the Chat Button it just displays my input without my user icon and the AI-Bot does nothing. There is no cancel message display if submit via Chat Button. Even the New Chat Button seems not to delete the complete chat and only empty the input field. It this correct way? The delete message button displays me a Sure Message, but the text's not removed from the list. And only getting a sure without any explain what will happen. But I need to do more tests, and maybe it works, but there is no live update if messages got deleted.

I always have some explain to text for the Bot System. May a field inside settings, people can add a custom message to explain a bit what this chat does.

Sporadically, the output texts have: <p>.......</p>

But the worst thing for me is how the texts split into so many pieces. If your bot is telling you a story, it got cut into so many segments but only at the final preview.

However, I need to do more tests and need to find out how to adapt the styling this behave is not noticed as bad it looks at the moment. I have changed this value from 1 to something higher, but I see no result for getting the longer texts back.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
Andy
Registered User
Posts: 14
Joined: Fri Mar 31, 2023 11:32 am

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Andy »

Hello Miri,

please see the following video that shows that the new features work well in general (tested with Chrome, Firefox and Opera, not with Safari):

https://files.fm/u/j7hj6rmef#/view/fnb3ud4ta (Video)

You're free to change templates according to your personal needs including minor changes as class names and CSS. But i can't support individual changes.

Best regards
Andy
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Miri4ever »

I'm still having this error with calling this extension via ./aibot what result this error: No route found for "GET /aibot"

So, I could not create links to directly call it. I could do some more tests today as I updated your code. The delete works yes, but one session will always remain no matter if I delete it. So, the only button is the chat button itself send my question directly as AI answer, that's the reason the Bot will not react to it. I also made some nice buttons with Icons, but just needed to some more translations. But I improved the main translations as well, with a more clear security question.

This part splitting might result in the system posting all messages with <p>...</p> that split anything in parts? If somebody wants to test, sure with agreement by the developer I can provide the improved style parts.

Andy: I don't want to watch videos, and your system is not everyone's system. You can't compare your car with anybodies car. We here for testing and trying to do improvements. My improvements have nothing to do with my personal used style or additions. They are general improvements for all pro silver based styles. And not sure on how many styles and server configurations it has been tested. I extra tested anything on a base style and got the same results there. We can together develop a great small masterpiece anyone could love and enjoy. Without any special theming just keeping up today's used standards for most of all themes.

I just did not finish the translations for the added buttons yet, as I'm still doing the testing and more German translations.
Attachments
a.jpg
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
Andy
Registered User
Posts: 14
Joined: Fri Mar 31, 2023 11:32 am

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Andy »

Hi Miri, please respond to my PM so i'm able to support your requests based on facts as logs. The extension works fine on phpbb boards with 3.3.x standard installations (server) and in browsers that implement HTML5, CSS and JS on current levels (client).
Miri4ever wrote: Mon Apr 17, 2023 7:11 pmI'm still having this error with calling this extension via ./aibot what result this error: No route found for "GET /aibot"
What do you mean by calling via "./aibot"? Calling it via https://your-board-fqdn/aibot? The extension is only working if you call it via https://your-board-fqdn/app.php/aibot for security reasons. So AJAX requests won't be responded to if a user is not logged in.
Miri4ever wrote: Mon Apr 17, 2023 7:11 pmThe delete works yes, but one session will always remain no matter if I delete it.
What do you mean concerning to "one session"? A session is user related information stored in your server's file system or database. Do you mean a chat with a specific user_id and chat_no stored in phpbb_aibot_chat?
Miri4ever wrote: Mon Apr 17, 2023 7:11 pmSo, the only button is the chat button itself send my question directly as AI answer, that's the reason the Bot will not react to it.
Sorry, i don't understand.
Miri4ever wrote: Mon Apr 17, 2023 7:11 pmThis part splitting might result in the system posting all messages with <p>...</p> that split anything in parts? If somebody wants to test, sure with agreement by the developer I can provide the improved style parts.
I assume this is due to the adaptions of your theme and could easily be fixed by using a "namespace" (aibot specific CSS p-rule). It would be helpful to have a look on your installation as mentioned before (PM).
Miri4ever wrote: Mon Apr 17, 2023 7:11 pmAndy: I don't want to watch videos, and your system is not everyone's system. You can't compare your car with anybodies car. We here for testing and trying to do improvements. My improvements have nothing to do with my personal used style or additions. They are general improvements for all pro silver based styles.
A single CSS rule overwriting another one used in the base style (e.g. by using !important) can lead to delusive results. It's very important to debug how the DOM tree is built up.
User avatar
Traction
Registered User
Posts: 345
Joined: Fri Jun 06, 2003 8:42 pm
Location: Staten Island, New York
Contact:

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Traction »

Outstanding!
Attachments
screencapture-zaponline-org-forums-app-php-aibot-2023-04-17-22_40_45.png
Failure is not an option.
Zap! Classic Video Game Forums
Andy
Registered User
Posts: 14
Joined: Fri Mar 31, 2023 11:32 am

Re: [3.3][DEV] AI Bot - Chat like ChatGPT

Post by Andy »

Because of viewtopic.php?t=2642534 i'm not planning any more development at the moment. I hope you understand.
Locked

Return to “Abandoned Extensions”