perl fixes
This commit is contained in:
@@ -109,7 +109,8 @@ sub llm {
|
||||
if ($i <= $#fib) { print c("[network error: $err, retrying in ${dly}s...]", 31), "\n"; sleep($dly); next; }
|
||||
die "[network error: $err]\n";
|
||||
} else {
|
||||
my ($content, $reas, %tcs, @order, $rh, $ch, $buf) = ('', '', (), (), 0, 0, '');
|
||||
my ($content, $reas, $rh, $ch, $buf) = (q{}, q{}, 0, 0, q{});
|
||||
my (%tcs, @order);
|
||||
my $res = $http->request('POST', $url, {
|
||||
headers => \%h, content => $body,
|
||||
data_callback => sub {
|
||||
@@ -322,6 +323,7 @@ sub main {
|
||||
print c("Bantam Agent ready", 1, 32), c(" (Ctrl+J = new line)", 2), "\n";
|
||||
print c("endpoint: $cfg->{endpoint} model: $cfg->{model} temp: " . ($cfg->{temperature} // '0.7'), 2), "\n";
|
||||
my $term = Term::ReadLine->new('bantam');
|
||||
$Term::ReadLine::termcap_nowarn = 1; # silence termcap warning on stub Term::ReadLine
|
||||
$term->ornaments(0) if $term->can('ornaments');
|
||||
my $prompt_str = ref($term) eq 'Term::ReadLine::Gnu' ? cp("> ", 1, 36) : c("> ", 1, 36);
|
||||
while (1) {
|
||||
|
||||
Reference in New Issue
Block a user