v2026.6.4
All Bundles
Bundle OpenAI API client. Supports Chat Completions (GPT-4o, o1, etc.), Embeddings, Image Generation (DALL-E), and function/tool calling. Set OPENAI_API_KEY environment variable before use. Compile with -lib openai.

ModerationResult

Result of a content moderation check

Operations

GetCategories #

method : public : GetCategories() ~ JsonElement

Return

TypeDescription
JsonElementthe raw categories JSON element

GetCategory #

Check whether a specific category was flagged

method : public : GetCategory(name:String) ~ Bool

Parameters

NameTypeDescription
nameStringcategory name (e.g. 'hate', 'violence', 'sexual')

Return

TypeDescription
Booltrue if flagged

GetId #

method : public : GetId() ~ String

Return

TypeDescription
Stringrequest ID

GetModel #

method : public : GetModel() ~ String

Return

TypeDescription
Stringmodel used for moderation

GetScore #

Get the confidence score for a specific category

method : public : GetScore(name:String) ~ Float

Parameters

NameTypeDescription
nameStringcategory name

Return

TypeDescription
Floatscore in [0.0, 1.0]

GetScores #

method : public : GetScores() ~ JsonElement

Return

TypeDescription
JsonElementthe raw category_scores JSON element

IsFlagged #

method : public : IsFlagged() ~ Bool

Return

TypeDescription
Booltrue if any category was flagged