php-llm-agent/tests/07_ExpanderIteratorCompressor.php
2025-09-18 15:42:38 +00:00

32 lines
1.1 KiB
PHP

<?php require_once __DIR__."/../LlamaCli.func.php";
// TEST 07: Expander Iterator Compressor
// $out= LlamaCli_raw(
// file_get_contents(__DIR__."/test_input_data_02.american-foreign-policy.long-text.txt")
// ."\n<l50",
// "Translate the following subtitles to spanish",
// ["debug_level"=>0]
// );
// $out= LlamaCli_raw(
// file_get_contents(__DIR__."/test_input_data_01.american-foreign-policy.short-text.txt")
// ."\n<l10"
// ."\n| summarize in five words"
// ."\n>l",
// "You are a spanish translator that translates things from english.",
// ["debug_level"=>0]
// );
$out= LlamaCli_raw(
file_get_contents(__DIR__."/private_test_data.txt")
."\n<l60"
."\n| You are a legal assistant, reading a chat log of an ex-husband and wife. Count how many times the father (Frederico) visited the children (Matilda and Sebastian), after 2019. Report the dates, and total number of visits."."\n>l",
"You are a legal assistant counting the total number of times ( and dates) the father (Frederico) visited his children (Matilda and Sebastian) living with Elina.",
[
"debug_level"=>2,
"context_size"=>8192
]
);
print_r($out);