Group
Extension

Matches 1

OpenAIGPT4 ( S/SH/SHINGO/OpenAIGPT4-0.18.tar.gz, SHINGO, 2023; MetaCPAN )
OpenAIGPT4/lib/OpenAIGPT4.pm ( view source; MetaCPAN )
ion number

use LWP::UserAgent;
use LWP::Protocol::https;
use HTTP::Request::Common qw(POST);
use JSON;

=head1 NAME

OpenAIGPT4 - Interact with the OpenAI GPT-3,4 API

=head1 VERSION

Version 0.18

=
POST $self->{api_host}.'/v1/chat/completions',
        Content_Type => 'application/json',
        Content => to_json({
            model => $model,
            messages => $self->{history},
         
t "Response: ", $res->as_string, "\n";
    }

    if ($res->is_success) {
        my $data = from_json($res->decoded_content);
        my $reply = $data->{choices}[0]{message}{content};

        # Add

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.