Interface PromptConfigJsonMarshaller
public interface PromptConfigJsonMarshaller
Internal service interface for marshalling and unmarshalling prompt configuration objects to and from JSON. Used by
PromptServiceHandlerMixin_JsonConfig.- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescription<Config> ConfigdeserializeConfig(SerializedPromptConfig config, String version, Class<Config> configClass, Supplier<Config> newEmptyConnectionConfig, IPromptConfigUpdater updater, IPromptConfigProcessor<Config> postProcessor) Deserializes a prompt configuration object from aSerializedPromptConfiginto the model class as needed by the prompt service implementation.<Config> SerializedPromptConfigserializeConfig(Config config, Class<Config> configClass, String version, IPromptConfigProcessor<Config> preProcessor) Serializes a prompt configuration object from the model class used by the prompt service implementation into aSerializedPromptConfig.
-
Method Details
-
deserializeConfig
<Config> Config deserializeConfig(SerializedPromptConfig config, String version, Class<Config> configClass, Supplier<Config> newEmptyConnectionConfig, IPromptConfigUpdater updater, IPromptConfigProcessor<Config> postProcessor) Deserializes a prompt configuration object from aSerializedPromptConfiginto the model class as needed by the prompt service implementation.- Type Parameters:
Config- The type of the configuration object.- Parameters:
config- The serialized prompt configuration.version- The current version of the configuration format.configClass- The class of the configuration object to deserialize.newEmptyConnectionConfig- A supplier that creates a new empty configuration object.updater- A prompt configuration updater that can update old versions of the configuration to the current version.postProcessor- A post-processor that can process the deserialized configuration object.- Returns:
- The deserialized prompt configuration object.
-
serializeConfig
<Config> SerializedPromptConfig serializeConfig(Config config, Class<Config> configClass, String version, IPromptConfigProcessor<Config> preProcessor) Serializes a prompt configuration object from the model class used by the prompt service implementation into aSerializedPromptConfig.- Type Parameters:
Config- The type of the configuration object.- Parameters:
config- The configuration object to serialize.configClass- The class of the configuration object.version- The current version of the configuration format.preProcessor- A pre-processor that can process the configuration object before serialization.- Returns:
- The serialized prompt configuration.
-