) {
$maskobj->mask($s);
}
$s;
}
sub cache_file {
my $file = sprintf("%s.xlate-%s-%s.json",
$current_file, $xlate_engine, $lang_to);
if ($cache_method eq 'auto') {
-f $file
Custom Tools Support
GPT-5 supports custom tools that can receive plaintext payloads instead
of JSON, enabling more flexible integration with external systems.
=head3 Context-Free Grammar (CFG)
Al
<App::Greple::xlate>
=item * L<App::cdif::Command> - For gpty command execution
=item * L<JSON> - For JSON array processing
=back
=head1 SEE ALSO
=over 4
=item * L<App::Greple::xlate>
=item * L
verbosity => 'low', max_completion_tokens => 4000,
prompt => <<END
Translate the following JSON array into %s.
For each input array element, output only the corresponding translated element at
t-4.1', temp => '0.0', max => 3000, sub => \&gpty,
prompt => <<END
Translate the following JSON array into %s.
For each input array element, output only the corresponding translated element at
pond to input element n.
Output only the translated elements or unchanged tags/blank strings as a JSON array.
Do not leave any unnecessary spaces or tabs at the end of any array element in your output
ult as a JSON array and nothing else.
Your entire output must be valid JSON.
Do not include any explanations, code blocks, or text outside of the JSON array.
If you cannot produce a valid JSON array,
package App::Greple::xlate::Cache;
use v5.14;
use warnings;
use Data::Dumper;
use JSON;
use List::Util qw(pairmap mesh);
use Hash::Util qw(lock_keys);
sub TIEHASH {
my $self = shift;
my $ob
ne $b) {
$obj->current->{$a} = $b;
$obj->updated++;
}
}
} @_;
$obj;
}
sub json {
JSON->new->utf8->canonical->pretty;
}
sub open {
my $obj = shift;
my $file = $obj->name
my $json_obj //= &json;
if (CORE::open my $fh, $file) {
my $data = do { local $/; <$fh> };
my $json = $data eq '' ? {} : $json_obj->decode($data);
$obj->{saved} = do {
if (ref $json eq