camel icon indicating copy to clipboard operation
camel copied to clipboard

[Refactor] Refactor OpenAIMessage in camel/memories to be BaseMessage

Open MuggleJinx opened this issue 9 months ago • 5 comments

In camel/memories module, by default it's using OpenAIMessage style, however, that's not ideal in design, which force all parts using the memory module using OpenAIMessage, which can be refactor into BaseMessage, for a clean and unified interface.

MuggleJinx avatar Mar 11 '25 09:03 MuggleJinx

Hi @MuggleJinx can i pick this up, incase you havent already started working on it?

JINO-ROHIT avatar Mar 13 '25 13:03 JINO-ROHIT

Sure, go ahead! Thank you very much @JINO-ROHIT

MuggleJinx avatar Mar 13 '25 14:03 MuggleJinx

alrighty!

JINO-ROHIT avatar Mar 13 '25 14:03 JINO-ROHIT

@MuggleJinx coulld you guide me on the modules that needs to be changed, running into a bit of a pickle.

thanks

JINO-ROHIT avatar Mar 17 '25 07:03 JINO-ROHIT

Hi @JINO-ROHIT, Thanks for asking. I believe the 1st step should be the PR u addressed. Just update OpenAIMessage to be BaseMessage.

Then check the part where the memories modules are used, e.g., in the ChatAgent, we import the memories module, thus the message is OpenAIMessage, which can be replaced by BaseMessage for unified interface.

Finally just test if all tests are passed etc

MuggleJinx avatar Mar 17 '25 14:03 MuggleJinx