AsTextSerializer
A serializer that converts an object implementing the TextSerializable interface into a textual format by utilizing the textForLLM function defined in the interface.
This serializer provides functionality to encode the object into a string format suitable for textual representation and decodes it using a provided serializer for the type.
Parameters
The type of object being serialized/deserialized, constrained to types implementing TextSerializable.
The serializer responsible for handling the underlying type operations.
Properties
Functions
Provides a custom serializer for tools, wrapping and unwrapping values that do not serialize into JsonObject into a custom JsonObject with value key. This wrapping/unwrapping is needed because for LLM APIs tool arguments must always be JsonObject.
Deserializes the provided encoded data using the specified decoder and returns the resulting object of type T.