Container File
You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.
=back
See L<OpenAPI::Client::OpenAI::Path::containers-container_id-fil
s://platform.openai.com/docs/assistants/tools> for details.
The Fine-tuning API only supports C<.jsonl> files. The input also has certain required formats for fine-tuning L<chat|https://platform.open
nai.com/docs/api-reference/fine-tuning/completions-input> models.
The Batch API only supports C<.jsonl> files up to 200 MB in size. The input also has a specific required L<format|https://platform.op
sponses
=head4 Status Code: C<200>
OK
=head4 Content Types:
=over 4
=item * C<application/json>
Example (See the L<OpenAI spec for more detail|https://github.com/openai/openai-openapi/blob/ma
sponses
=head4 Status Code: C<200>
OK
=head4 Content Types:
=over 4
=item * C<application/json>
Example (See the L<OpenAI spec for more detail|https://github.com/openai/openai-openapi/blob/ma
,
"bytes": 2147483648,
"created_at": 1719184911,
"filename": "training_examples.jsonl",
"purpose": "fine-tune",
"status": "completed",
"expires_at": 1719127296,
"bytes": 2147483648,
"created_at": 1719186911,
"filename": "training_examples.jsonl",
"purpose": "fine-tune",
}
}
=back
=head1 SEE ALSO
L<OpenAPI::Client::Ope
200>
Usage data retrieved successfully.
=head4 Content Types:
=over 4
=item * C<application/json>
Example (See the L<OpenAI spec for more detail|https://github.com/openai/openai-openapi/blob/ma
<200>
Certificates listed successfully.
=head4 Content Types:
=over 4
=item * C<application/json>
Example (See the L<OpenAI spec for more detail|https://github.com/openai/openai-openapi/blob/ma
ication/json>
=head3 Responses
=head4 Status Code: C<200>
Certificate uploaded successfully.
=head4 Content Types:
=over 4
=item * C<application/json>
Exam
= (
uuid => 'DBIx::QuickORM::Conflator::UUID',
json => 'DBIx::QuickORM::Conflator::JSON',
jsonb => 'DBIx::QuickORM::Conflator::JSON',
map {$_ => 'DBIx::QuickORM::Conflator::DateTime'
conflate($conflate);
if ($conflate eq 'DBIx::QuickORM::Conflator::JSON') {
omit();
}
}
elsif ($col->{is_date
sponses
=head4 Status Code: C<200>
OK
=head4 Content Types:
=over 4
=item * C<application/json>
Example (See the L<OpenAI spec for more detail|https://github.com/openai/openai-openapi/blob/ma
k
=head4 Status Code: C<404>
Not Found
=head4 Content Types:
=over 4
=item * C<application/json>
Example (See the L<OpenAI spec for more detail|https://github.com/openai/openai-openapi/blob/ma
Carp qw/croak confess/;
use POSIX();
use IO::Select();
use Scope::Guard();
use Cpanel::JSON::XS qw/decode_json/;
use parent 'DBIx::QuickORM::Select';
use DBIx::QuickORM::Util::HashBase qw{
+rea
{ POSIX::_exit(42) };
my $guard = Scope::Guard->new(sub { POSIX::_exit(1) });
my $json = Cpanel::JSON::XS->new->ascii(1)->convert_blessed(1)->allow_nonref(1);
$wh->autoflush(1);
$sel
print $wh $json->encode({cols => $cols}), "\n";
print $wh $json->encode({relmap => $cols}), "\n";
while (my $data = $sth->fetchrow_arrayref) {
print $wh $json->encode({ro
package PLS::Server::Message;
use strict;
use warnings;
use PLS::JSON;
=head1 NAME
PLS::Server::Message
=head1 DESCRIPTION
This class is the abstract base class for all messages sent between
ser
) = @_;
my %content = (
jsonrpc => '2.0',
%{$self}
);
my $json = encode_json \%content;
return \$json;
} ## end sub serialize
1;
IO::Async::Signal;
use IO::Async::Stream;
use IO::Handle;
use Scalar::Util qw(blessed);
use PLS::JSON;
use PLS::Server::Request::Factory;
use PLS::Server::Response;
use PLS::Server::Response::Cancell
$buffref}) < $size);
my $json = substr ${$buffref}, 0, $size, '';
$size = 0;
my $content = decode_json $json;
$self->handle_client_me
('PLS::Server::Message'));
my $json = $message->serialize();
my $length = length ${$json};
$self->{stream}->write("Content-Length: $length\r\n\r\n$$json")->retain();
return;
} ## en
arnings;
use feature 'state';
use Future;
use IO::Async::Loop;
use IO::Async::Process;
use PLS::JSON;
=head1 NAME
PLS::Parser::PackageSymbols
=head1 DESCRIPTION
This package executes a Perl proc
@_;
$data = encode_json $data;
return $process->stdin->write("$data\n")->then(sub { $process->stdout->read_until("\n") })->then(
sub {
my ($json) = @_;
retu
rn Future->done(eval { decode_json $json } // {});
},
sub { Future->done({}) }
);
} ## end sub _send_data_and_recv_result
sub start_package_symbols_process
{
my ($config) = @_
etter if you have an XS JSON module installed.
If you install L<Cpanel::JSON::XS> or L<JSON::XS>, it will use one of those
before falling back to L<JSON::PP>, similar to L<JSON::MaybeXS>.
=head1 NOTE
nse::InitializeResult;
use strict;
use warnings;
use parent q(PLS::Server::Response);
use PLS::JSON;
use PLS::Server::State;
=head1 NAME
PLS::Server::Response::InitializeResult
=head1 DESCRIPTIO
DetailsSupport => PLS::JSON::true
},
definitionProvider => PLS::JSON::true,
documentSymbolProvider => PLS::JSON::true,
hoverProvider => PLS::JSON::true,
si
etter if you have an XS JSON module installed.
If you install L<Cpanel::JSON::XS> or L<JSON::XS>, it will use one of those
before falling back to L<JSON::PP>, similar to L<JSON::MaybeXS>.
=head1 NOTE
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use JSON::XS qw/decode_json/;
use Pod::Usage;
use Schedule::Easing;
# todo: expiration (need to verify this works)
# todo: check (need a
loadjson {
my ($fn)=@_;
my $t=load($fn);
my @res=@{ decode_json($t) };
foreach my $E (@res) { $$E{match}//=''; $$E{match}=qr/$$E{match}/ }
return @res;
}
my %opt=(
schedule =>undef,
json
0,
help =>0,
time =>undef,
);
GetOptions(
'schedule=s'=>\$opt{schedule},
'json=s' =>\$opt{json},
'timestamps'=>\$opt{expiration},
'expiration'=>\$opt{expiration},
'check' =>\$
=> $handle // *STDERR,
encoder => sub { ... } // \&Data::Dumper::Dumper || \&encode_json,
);
Create a new exporter. Takes an optional C<handle> parameter which will be
used as the t
_FORMAT> environment variable. Currently, the
only supported value is C<json>, in which case the data will be encoded
with L<JSON::MaybeXS/encode>.
The behaviour of the default encoder can be further
the keys or values they fall into. The resulting pairs will
be passed directly as arguments to L<JSON::MaybeXS/new> or L<Data::Dumper> as
appropriate.
The default configuration for L<Data::Dumper> i
=> 'json',
list => 'search',
srsearch => $search_string
})
->result
->json;
autotype 'UUID'; # Automatically handle UUID fields
autotype 'JSON'; # Automatically handle JSON fields
# Do not autofill these tables
autoskip
database connection fields.
This is mainly useful if you credentials are in an encrypted YAML or JSON file
and you have a method to decrypt and read it returning it as a hash.
db mydb => sub {
ific hook points
};
=item C<autotype $TYPE_CLASS>
=item C<autotype 'JSON'>
=item C<autotype '+DBIx::QuickORM::Type::JSON'>
=item C<autotype 'UUID'>
=item C<autotype '+DBIx::QuickORM::Type::UU
use Carp qw(croak carp);
#######################
# LOAD CPAN MODULES
#######################
use JSON::MaybeXS;
use Encode qw();
use HTTP::Tiny qw();
use URI::Encode qw();
use Params::Validate qw(val
des::Language qw(all_language_codes);
use Object::Tiny qw(apikey apiurl lang debug client encoder json);
#######################
# VERSION
#######################
our $VERSION = '1.3.0';
###########
# Default Headers
my $default_headers = {
'Accept' => 'application/json',
'Content-Type' => 'application/json',
};
# Default User Agent
my $default_ua = 'perl-tmdb-client';
###########
arams{'json_db'} ) {
my $data = do {
local $/;
open my($fh), '<:raw', $params{'json_db'}
or die "could not read file <$params{json_db}>\n";
<$fh>;
};
state $rc = require JSON;
my
$decoded = eval { JSON::decode_json($data) };
die "could not decode JSON from <$params{json_db}>: @_\n" unless defined $decoded;
return $decoded;
}
my $rc = eval { require CPANSA::DB };
if (