Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would this work as a library the next version of Drupal uses? #313

Open
jamieaa64 opened this issue Dec 9, 2024 · 8 comments
Open

Would this work as a library the next version of Drupal uses? #313

jamieaa64 opened this issue Dec 9, 2024 · 8 comments
Assignees
Labels
advice Information how to use/implement the component

Comments

@jamieaa64
Copy link

Hi, I don't know if this is the best place to ask. But I work with the Drupal community and we're adding AI into the next major version of Drupal.

You can see it in action about half way through this video: https://www.youtube.com/watch?v=4S-HBFVE2lU

We have an AI Abstraction Layer and an Agents and Assistants Abstractions layer where the Assistant handles all the config of what the chatbot does, but the chatbot is a swappable UI. We have a version of the chatbot in our core module but we made it quickly, its php and jquery and it lacks loads of features and doesn't look good and can't update without a user submission.

A member of our community has created an integration with DeepChat here: https://www.drupal.org/project/ai_deepchat

We were wondering if we could have a conversation? If you'd be up for us including this Library into Drupal CMS itself, if you'd prefer we fork it, whether or not you think this is a good idea and if you'll support features we'd eventually look for? (We're hoping for both threads, multiple assistants that you can pick between and deeper "tools" and ways in which the chatbot can control other things on the page, like moving you towards a DIV it wants you to look at etc).

@OvidijusParsiunas
Copy link
Owner

Hi @jamieaa64.

Thankyou for your interest in Deep Chat! The integration you have looks amazing!

Deep Chat aims to support as many platforms as possible, therefore using the core package is always recommended.
The features that you have described should already be available within the existing Deep Chat's package;
Threads can be maintained by listening to tracking eventshttps://deepchat.dev/docs/events#onMessage) and pre-populated via the history property, and controlling assistants/traversing the DOM can all ultimately be configured by yourself via the handler function, where what goes out and how you act to different responses is controlled by your code.

If you are having issues with configuration please let me know.

Ofcourse, if you want custom functionality such as custom buttons/layout, that may be difficult to configure with the current project, and in that instance you are probably better off forking the project and creating your own solution.

Nevertheless, Deep Chat is being updated all the time, hence something that is not in the project now may be added in the future!

We can definitely continue a conversation here to see if this project meets your needs or any other platform that suits you folks. Thanks!

@OvidijusParsiunas OvidijusParsiunas self-assigned this Dec 9, 2024
@OvidijusParsiunas OvidijusParsiunas added the advice Information how to use/implement the component label Dec 9, 2024
@OvidijusParsiunas
Copy link
Owner

Just to note, there is another release that should be coming up this month that contains features like loadHistory which provides a loading spinner for loading history/threads etc. You can read more about it here and also try it out in your site!

@jamieaa64
Copy link
Author

Ok, things have moved fast because the community member roland who made that specific module I linked to had done so much work it became a no-brainer to go with this instead of any other chatbot! Maybe we'll move to another if its "better" later but I doubt it given the effort vs benefits.

So yeah, I'm spending today getting some more of the people at the top of Drupal CMS to check it today.

I think eventually we'd want a custom button layout but we could do that by supporting a different front-end framework for each layout. We have an abstraction called "Assistants API" which handles the configuration of how the chatbot works so the front-end is hotswappable. The kinds of things I want to eventually support.

  • A Middle of the screen chat + response with no history approach. Something similar to how the google AI works in Search. So you type something in, there is a bit that shows you that its working maybe with updates and then it gives you one written response (perhaps above some search like in google search). If you type something again, with no history it does a new search.

  • I'd like a full height "right hand side toolbar" approach to the chat. It would slide to the left and slide back, perhaps next to other React tools bars.

  • I'd like a full screen "Chat.openai.com" style chatbot like with www.assistants-ui.com with something like artifacts so it can go into half screen.

But we don't support that with out existing chatbot so this is better in every way :) We'll make a video soon showcasing our community of the new chatbot and its features.

Do you have any other method of communication? Do you have a discord or slack? If you're interested we are in #ai on Drupal's slack.

https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack

@OvidijusParsiunas
Copy link
Owner

Hi @jamieaa64.

Thankyou for the information!

I think Deep Chat can provide the features that you envision. Just a few small notes:

  • The custom button layout as I mentioned is something that is inherently difficult to support in a one-for-all chat system.
  • I am not fully sure about the A Middle of the screen chat + response with no history approach, could you perhaps elaborate on what you mean? Thanks!

In terms of communication, I have joined your Slack channel so I can respond to any queries that you may have.
To note, I have a full time job + after work activities, hence I may not always be available to communicate but will try to respond as much as I can. If I don't respond, you can always message me on my email [email protected] and I will get back to you as soon as I can.

I operate in Japanese Standard Time.

@ivanboring
Copy link

Hi @OvidijusParsiunas - I have started with improving the integration with Deepchat for Drupal and the product the will be Drupal CMS. Its an awesome project!

You can see some of its uses in the video below.

deepchat.mp4

I think the thing I saw right away that would help us a lot, where maybe we can help out:

  • feat: Add possibility to add custom Remarkable configuration #271 <- this issue would help us a lot with the buttons you see here, the issue right now is that we need to parse the markdown part in the backend before its sent out, so that the whole message can be HTML, if we could render markdown with HTML components in it, that would help a lot to remove that dependency.

If you need help with something to move things along or need merge requests let me know, I should hopefully be able to help.

@OvidijusParsiunas
Copy link
Owner

OvidijusParsiunas commented Dec 12, 2024

Wow! this looks awesome!

In regards to the PR that you mentioned, I have been meaning to get to it, but because I recently moved countries I have been playing catch-up with all the features/requests that have lined up over the past couple of months.
The timing is great because I just finished implementing a big new feature (changeMessage method that allows devs to dynamically change existing messages), so I can pick this up right away!
However, you mentioned render markdown with HTML components in it, which I'm not sure if Remarkable supports, but if it does that sounds good!

To note, I am hoping 🤞 to make a new release of Deep Chat this month as there are a lot of unreleased features/bug fixes in the dev packages. So look out for that!

@OvidijusParsiunas
Copy link
Owner

It's probably also worth mentioning that I am working on another package called active-chat (repo here) which works exactly like deep-chat but it doesn't have the optional AI dependencies such as the directConnection and webModel properties which allow developers to implement connections to popular AI models with minimal code. The benefit of this is that the active-chat package is a 1/3 smaller than deep-chat (current stats: deep-chat - 323.71KB/ active-chat - 237.77KB). The size difference is also expected to grow as I have plans to add more support for OpenAI/Gemini/Claude APIs to deep-chat in the future. Hence, if you are not using or not planning to use the AI aforementioned properties, active-chat might be the better way to go.

As In mentioned, I am currently working on active-chat and it has not officially been released yet. However, if you are considering to use it - once it has been released all you will need to do is simply change the package to active-chat and all the existing configuration should work as normal.

I currently do not know exactly when I'll be able to launch active-chat, but I hope it will be next month.

@ivanboring
Copy link

Thanks for the heads up!

Webmodels is interesting for us going forward, so I think we are staying on deepchat for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advice Information how to use/implement the component
Projects
None yet
Development

No branches or pull requests

3 participants