llmModerateMessage
fun llmModerateMessage(moderatingModel: LLModel? = null, includeCurrentPrompt: Boolean = false, name: String? = null): AIAgentNodeBase<Message, ModeratedMessage>(source)
Creates an AI agent node for moderating messages using a specified language model.
Return
An instance of AIAgentNodeBase configured to process input messages of type Message and produce moderated messages of type ModeratedMessage.
Parameters
name
The optional name for the node. If null, the name will be generated automatically.
moderatingModel
The language model to be used for moderation. If null, a default model will be used.
includeCurrentPrompt
Indicates whether the current prompt should be included in the moderation process. Defaults to false.