deep-chat icon indicating copy to clipboard operation
deep-chat copied to clipboard

Enabling annotations

Open leonardocunha2107 opened this issue 1 year ago • 3 comments

Hi, I'm using DeepChat as a frontend for a project using LLM agents. The main feature I wanted was to be able to edit the AI messages to create a dataset for finetuning. Is there a mostly straightforward way to do that using DeepChat? If not, would you be interested that I add this feature and could you give me some advice on how to do that?

leonardocunha2107 avatar Aug 01 '24 14:08 leonardocunha2107

Hi @leonardocunha2107.

Could you elaborate on what you mean by edit the AI messages to create a dataset for finetuning?

Thanks!

OvidijusParsiunas avatar Aug 01 '24 15:08 OvidijusParsiunas

The flow I'm thinking is:

  • user sends message through DeepChat
  • backend answers with LLM response
  • User is unsatisfied with the answer and edits the message or ToolCall to his liking inside DeepChat interface
  • The edited message is sent to my backend where I can orchestrate and save a ChatHistory that I may use for LORA finetuning in the future

leonardocunha2107 avatar Aug 01 '24 15:08 leonardocunha2107

Currently Deep Chat does not support the ability to edit/retry the responses. This feature would also be a little challenging to do. Are you looking to provide the ability to edit AI responses within the chat window itself?

OvidijusParsiunas avatar Aug 01 '24 19:08 OvidijusParsiunas

Hi @OvidijusParsiunas , sorry for the delay in the response. Yes, I'm initially aiming to provide this feature within the chat window itself, though if you believe it to be cleaner to implement this with the callbacks available, "extension style" I'd be thankful of any hint on how to go about that

leonardocunha2107 avatar Aug 12 '24 14:08 leonardocunha2107

Hi @leonardocunha2107. If you are looking to implement it within the chat, then I would recommend you to fork/clone the repository and proceed to implement the necessary changes. Setting up the component is actually pretty easy to do and it is all documented here. I would recommend you to start making your changes on the addNewTextMessage method in the MessageBase class.

OvidijusParsiunas avatar Aug 21 '24 16:08 OvidijusParsiunas

Because this is something that we are currently not going to proceed on implementing in the main packages, I will close this issue. However, please feel free to comment below if you need specific assistance in making changes for this. Thanks!

OvidijusParsiunas avatar Aug 21 '24 16:08 OvidijusParsiunas