Group
Extension

Matches 4

OpenAIAsync ( S/SI/SIMCOP/OpenAIAsync-0.01-TRIAL.tar.gz, SIMCOP, 2023; MetaCPAN )
OpenAIAsync/Client.pod ( view source; MetaCPAN )
sa(IO::Async::Notifier) :strict(params) {
  use JSON::MaybeXS qw//;
  use Net::Async::HTTP;
  use Feature::Compat::Try;
  use URI;

  field $_json = JSON::MaybeXS->new(utf8 => 1, convert_blessed => 1)
headers => {
        "Authorization" => "Bearer $api_key",
        "Content-Type" => "application/json",
        $api_org_name ? (
          'OpenAI-Organization' => $api_org_name,
        ) : ()
    
   my $json = $_json->encode($data);

    my $url = URI->new($api_base . $endpoint );

    my $result = await $http->do_request(
      uri => $url,
      method => "POST",
      content => $json,
    
OpenAIAsync ( S/SI/SIMCOP/OpenAIAsync-0.01-TRIAL.tar.gz, SIMCOP, 2023; MetaCPAN )
OpenAIAsync/lib/OpenAIAsync/Types/Requests/ChatCompletion.pod ( view source; MetaCPAN )
n of specific formats of responses.

OpenAI supports two values, null and C<json_object> to force a correctly formatted JSON response.  Needs additional documentation
for how to use this before I enab
OpenAIAsync ( S/SI/SIMCOP/OpenAIAsync-0.01-TRIAL.tar.gz, SIMCOP, 2023; MetaCPAN )
OpenAIAsync/lib/OpenAIAsync/Types/Results.pm ( view source; MetaCPAN )
:Role::AutoJSON;
use Object::Pad::ClassAttr::Struct;

class OpenAIAsync::Types::Results::ToolCall :does(OpenAIAsync::Types::Base) :Struct {
  field $id :JSONStr = undef;
  field $type :JSONStr = undef
does(OpenAIAsync::Types::Base) :Struct {
  field $arguments :JSONStr = undef; # TODO decode the json from this directly?
  field $name :JSONStr = undef;
}

class OpenAIAsync::Types::Results::ChatMessa
uct {
  field $content :JSONStr;
  field $tool_calls :MarshalTo([OpenAIAsync::Types::Results::ToolCall]) = undef; # don't think my local server provides this
  field $role :JSONStr;
  field $function_
OpenAIAsync ( S/SI/SIMCOP/OpenAIAsync-0.01-TRIAL.tar.gz, SIMCOP, 2023; MetaCPAN )
OpenAIAsync/lib/OpenAIAsync/Client.pm ( view source; MetaCPAN )
sa(IO::Async::Notifier) :strict(params) {
  use JSON::MaybeXS qw//;
  use Net::Async::HTTP;
  use Feature::Compat::Try;
  use URI;

  field $_json = JSON::MaybeXS->new(utf8 => 1, convert_blessed => 1)
headers => {
        "Authorization" => "Bearer $api_key",
        "Content-Type" => "application/json",
        $api_org_name ? (
          'OpenAI-Organization' => $api_org_name,
        ) : ()
    
   my $json = $_json->encode($data);

    my $url = URI->new($api_base . $endpoint );

    my $result = await $http->do_request(
      uri => $url,
      method => "POST",
      content => $json,
    

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