Implemented appending arbitrary messages
Implemented appending arbitrary messages to the base chat message history, the in-memory and cosmos ones.
As discussed this is the alternative way instead of #4480, with a add_message method added that takes a BaseMessage as input, so that the user can control what is in the base message like kwargs.
Fixes # (issue)
Before submitting
Who can review?
Community members can review the PR once tests pass. Tag maintainers/contributors who might be interested:
@hwchase17
@hwchase17 -- Proposal seems to add an abstract method to add a custom message which seems reasonable to me -- it looks like a more appropriate method for the base schema than add_ai_message or add_human_message. Waiting for your :eye:
Thanks @hwchase17
@amitmukh this has been merged and release and will allow you to override the regular append_message behaviour