toMap method

Map<String, String> toMap()

Converts the current LlamaMessage instance to a map.

This method uses the messageToMap function to transform the LlamaMessage object into a Map<String, String>, which can be useful for serialization or other operations that require a map representation of the message.

Returns a Map<String, String> representation of the LlamaMessage.

Implementation

Map<String, String> toMap() => messageToMap(this);