ai_content_moderation

package
v1.16.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ApiKey      string `json:"api_key" yaml:"api_key"`
	SourceField string `json:"source_field" yaml:"source_field"`
	TargetField string `json:"target_field" yaml:"target_field"`
	StreamName  string `json:"stream_name" yaml:"stream_name"`
}

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func NewAIContentModerationPlugin

func NewAIContentModerationPlugin(appctx *stream_context.Context, config Config) (*Plugin, error)

func (*Plugin) EvolveSchema

func (p *Plugin) EvolveSchema(streamSchema *schema.StreamSchemaObj) error

EvolveSchema will add a string column to the schema in order to store OpenAI response

func (*Plugin) Process

func (p *Plugin) Process(context context.Context, msg *message.Message) (*message.Message, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL