moderation

package
v0.0.0-...-da38182 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:   "moderation",
	Action: cmdModeration,
	Flags: []cli.Flag{
		flagInput,
		flagModel,
	},
}

Functions

This section is empty.

Types

type Request

type Request struct {
	Input string `json:"input"`
	Model string `json:"model"`
}

type Response

type Response struct {
	ID      string   `json:"id"`
	Model   string   `json:"model"`
	Results []Result `json:"results"`
}

type Result

type Result struct {
	Categories struct {
		Hate            bool `json:"hate"`
		HateThreatening bool `json:"hate/threatening"`
		SelfHarm        bool `json:"self-harm"`
		Sexual          bool `json:"sexual"`
		SexualMinors    bool `json:"sexual/minors"`
		Violence        bool `json:"violence"`
		ViolenceGraphic bool `json:"violence/graphic"`
	} `json:"category"`
	CategoryScores struct {
		Hate            float64 `json:"hate"`
		HateThreatening float64 `json:"hate/threatening"`
		SelfHarm        float64 `json:"self-harm"`
		Sexual          float64 `json:"sexual"`
		SexualMinors    float64 `json:"sexual/minors"`
		Violence        float64 `json:"violence"`
		ViolenceGraphic float64 `json:"violence/graphic"`
	} `json:"category_scores"`
	Flagged bool `json:"flagged"`
}

Jump to

Keyboard shortcuts

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