Skip to content

OpenAI.Moderation

Andrew Lambert edited this page Jan 20, 2024 · 12 revisions

OpenAI.Moderation

Class Declaration

 Protected Class Moderation
 Inherits OpenAI.Response

Remarks

This class represents an API content moderation response. Refer to the OpenAI documentation on the /v1/moderations endpoint for further details.

 OpenAI.APIKey = "YOUR API KEY"
 Dim result As OpenAI.Response = OpenAI.Moderation.Create("I will kill that bitch")
 Dim response As JSONItem = result.GetResult()
 If response.Value("flagged") = True Then
   Dim categories As JSONItem = response.Value("categories")
   Dim scores As JSONItem = response.Value("category_scores")
   ' etc
 End If

Methods

Properties

Shared methods

Shared properties

Clone this wiki locally