Input BetaResponseModerationInputUnion

Moderation for the response input.

One of the following:
type BetaResponseModerationInputModerationResult struct{…}

A moderation result produced for the response input or output.

Categories map[string, bool]

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

CategoryAppliedInputTypes map[string, []string]

Which modalities of input are reflected by the score for each category.

One of the following:
const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"
const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"
CategoryScores map[string, float64]

A dictionary of moderation categories to scores.

Flagged bool

A boolean indicating whether the content was flagged by any category.

Model string

The moderation model that produced this result.

Type ModerationResult

The object type, which was always moderation_result for successful moderation results.

type BetaResponseModerationInputError struct{…}

An error produced while attempting moderation for the response input or output.

Code string

The error code.

Message string

The error message.

Type Error

The object type, which was always error for moderation failures.

Output BetaResponseModerationOutputUnion

Moderation for the response output.

One of the following:
type BetaResponseModerationOutputModerationResult struct{…}

A moderation result produced for the response input or output.

Categories map[string, bool]

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

CategoryAppliedInputTypes map[string, []string]

Which modalities of input are reflected by the score for each category.

One of the following:
const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"
const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"
CategoryScores map[string, float64]

A dictionary of moderation categories to scores.

Flagged bool

A boolean indicating whether the content was flagged by any category.

Model string

The moderation model that produced this result.

Type ModerationResult

The object type, which was always moderation_result for successful moderation results.

type BetaResponseModerationOutputError struct{…}

An error produced while attempting moderation for the response input or output.

Code string

The error code.

Message string

The error message.

Type Error

The object type, which was always error for moderation failures.