:AddTicketSentiment;
use RT;
use strict;
use warnings;
use base qw(RT::Action);
use Encode;
use JSON;
sub Prepare {
return 1;
}
sub Commit {
my $self = shift;
my $ticket = $sel
n::AI::Provider::OpenAI;
use strict;
use warnings;
use base 'RT::Extension::AI::Provider';
use JSON;
sub process_request {
my ( $self, %args ) = @_;
my $ua = $self->{ua};
my $request_
Content => encode_json($request_payload),
Content_Type => 'application/json'
);
if ( $response->is_success ) {
my $content = decode_json( $response->decoded_content
{
'Authorization' => "Bearer $config->{api_key}",
'Content-Type' => 'application/json'
};
}
=head2 new config => %config
Accepts a hash that is the main AI config for the curren
n::AI::Provider::Gemini;
use strict;
use warnings;
use base 'RT::Extension::AI::Provider';
use JSON;
sub default_headers {
my ( $class, $config ) = @_;
return { 'x-goog-api-key' => $config
Content => encode_json($request_payload),
Content_Type => 'application/json'
);
if ( $response->is_success ) {
my $content = decode_json( $response->decoded_content
n::AddTicketSummary;
use RT;
use strict;
use warnings;
use base qw(RT::Action);
use Encode;
use JSON;
sub Prepare {
return 1;
}
sub Commit {
my $self = shift;
my $ticket = $sel