https://github.com/generative-computing/mellea/blob/main/mellea/stdlib/components/chat.py#L237
The as_chat_history only works on a context that is composed of Messages and ModelOutputThunks. We should provide a general purpose function that outputs contexts in a "general" message format.
It should take an optional formatter parameter but default to a generic one with a log/warning for ease of use.
We can either make this a new function with a new name or change the implementation of as_chat_history. Basically, we should make the interface sensible for end users to output a list of messages that matches closely to what the model gets.
https://github.com/generative-computing/mellea/blob/main/mellea/stdlib/components/chat.py#L237
The
as_chat_historyonly works on a context that is composed of Messages and ModelOutputThunks. We should provide a general purpose function that outputs contexts in a "general" message format.It should take an optional formatter parameter but default to a generic one with a log/warning for ease of use.
We can either make this a new function with a new name or change the implementation of
as_chat_history. Basically, we should make the interface sensible for end users to output a list of messages that matches closely to what the model gets.