blib/lib/Langertha/Role/ParallelToolUse.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 10 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 26 / 26 CC 6 SCAR 16.7
CC
6
Cov
100%
__ANON__
6.0
BEGIN
1.0
CRAP 5.3
« blib/lib/Langertha/Input/Tools.pm ↑ Summary blib/lib/Langertha/Engine/OpenAI.pm »
1 package Langertha::Role::ParallelToolUse;
2 # ABSTRACT: Role for an engine that supports parallel tool calling control
3 198 our $VERSION = '0.505';
4 198 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 198 has parallel_tool_use => (
7 is => 'ro',
8 isa => 'Bool',
9 predicate => 'has_parallel_tool_use',
10 );
11  
12 4436 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=6 SCAR=17.9
13 4436 my ( $orig, $class, @args ) = @_;
14 4436 my $params = $class->$orig(@args);
15  
16 4427 ▶ return $params if exists $params->{parallel_tool_use};
Branch: 1 branch
BranchTrueFalseTotal
if exists $params->{"parallel_tool_use"} 40 4387 4427
17  
18 4387 ▶ if ( exists $params->{parallel_tool_calls} ) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $params->{'parallel_tool_calls'}) { } 2 4385 4387
elsif (exists $params->{'disable_parallel_tool_use'}) { } 2 4383 4385
19 2 ▶ $params->{parallel_tool_use} = delete $params->{parallel_tool_calls} ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
delete $params->{'parallel_tool_calls'} ? : 1 1 2
20 }
21 elsif ( exists $params->{disable_parallel_tool_use} ) {
22 2 ▶ $params->{parallel_tool_use} = delete $params->{disable_parallel_tool_use} ? 0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
delete $params->{'disable_parallel_tool_use'} ? : 1 1 2
23 }
24  
25 4387 return $params;
26 198 };
27  
28  
29  
30 198 1;
31  
32 __END__
« blib/lib/Langertha/Input/Tools.pm ↑ Summary blib/lib/Langertha/Engine/OpenAI.pm »