![]() |
![]()
| ![]() |
![]()
NAMEOpenAI::API::Request::Moderation - Request class for OpenAI API content moderation SYNOPSISuse OpenAI::API::Request::Moderation; my $request = OpenAI::API::Request::Moderation->new( input => "I like turtles", ); my $res = $request->send(); if ( $res->{results}[0]{flagged} ) { die "Input violates our Content Policy"; } DESCRIPTIONThis module provides a request class for interacting with the OpenAI API's content moderation endpoint. It inherits from OpenAI::API::Request. ATTRIBUTESinputThe content to be moderated. Required. modelThe model to use for content moderation. Optional. METHODSendpointThis method returns the API endpoint for content moderation. methodThis method returns the HTTP method for content moderation. INHERITED METHODSThis module inherits the following methods from OpenAI::API::Request: send(%args)send_async(%args)SEE ALSOOpenAI::API::Request, OpenAI::API::Config
|