serialize
Serializes an object of type T
into its textual representation.
This method uses the provided encoder to encode the textForLLM
representation of the value
.
Parameters
encoder
The encoder used to serialize the object.
value
The object of type T
to be serialized.