This is basically a copy of a LangChain library that reduces the text so that an LLM can read it and it saves characaters. Some of the ideas can be seen here
You can install the package via composer:
composer require sundance-solutions/larachain-trim-text
<?php
it('test trims', function () {
$example = 'Lots of text......';
$trimmer = new SundanceSolutions\LarachainTrimText\LarachainTrimText();
$results = $trimmer->trim($example);
expect($results)->toBe($expected);
});
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.