OvidijusParsiunas / deep-chat

Fully customizable AI chatbot component for your website
https://deepchat.dev
MIT License
1.27k stars 176 forks source link

Multiple AI Avatars, especially for use in multiple ai systems. #29

Closed pillowsoft closed 7 months ago

pillowsoft commented 8 months ago

I'm using your wonderful package and it's great. Thanks! I am now working on AI agents, where a conversation may have a user and multiple AI agents conversing. It would be great if, in messages returned, we could specify different AIs. I.e. right now you have 'ai' or 'user' and their corresponding name and icon/avatar definitions. Might it be possible for message roles to be extended to something like "ai:ai-name", like "ai:coder", "ai:reviewer", etc. and have associated config for setting different names and avatars/icons to mape to those? I could create a custom component, but then I would lose or have to create the rendering for markdown, prism, and custom elements as are in standard messages.

OvidijusParsiunas commented 8 months ago

Hi @pillowsoft, that is very likely possible, only issue right now is that Deep Chat is architected to work around the 'ai' role string for ai response messages, hence there would need to be a good bit of decoupling done + new logic to handle different type of roles.

I am currently working on a feature to disable the submit button and directly after that I will be picking up the integration of OpenAI API function calling. I am more than happy to implement your feature, but can only start it after these have been completed which will likely be some-time next week. I think there are other people who would find this useful so I will definitely try to add it. I will be closing this issue for now and will re-open it when I start the work on it. Thanks!

OvidijusParsiunas commented 8 months ago

You can continue to use this component at the moment as-is and then simply flip the role names when I will implement this feature.

pillowsoft commented 8 months ago

Thanks and thanks for the quick response!

OvidijusParsiunas commented 7 months ago

Thankyou for your patience. I have now released the aforementioned features and will now be focusing on implementing multiple role types. I will update this thread on the latest progress.

OvidijusParsiunas commented 7 months ago

I have now refactored most of the logic to allow custom roles. This code affects most services so I will need to do a lot of testing to make sure things still work as expected and finalise the new code. Will report on progress tomorrow.

OvidijusParsiunas commented 7 months ago

All of the code has now been polished up to allow custom roles. I will update the documentation and hopefully release the new functionality tomorrow. Will update this thread when this is done.

OvidijusParsiunas commented 7 months ago

Custom roles are now live in Deep Chat version 1.4.2 :tada: :tada: :tada: :tada: These roles can be customized to your preference using the messageStyles, avatars and names properties.

I will be closing this issue, however if you experience any issues or have uncertainties about custom roles, feel free to comment below. For everything else you can create a new issue. Thanks!

pillowsoft commented 7 months ago

Thank you!!!!!🎉 🎉 I will give it a test.