sundance-solutions/larachain-trim-text

This will help short text for prompts

1.0.1 2023-05-19 18:07 UTC

This package is auto-updated.

Last update: 2024-10-30 01:59:26 UTC


README

Latest Version on Packagist Fix PHP code style issues GitHub Code Style Action Status Total Downloads

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

Installation

You can install the package via composer:

composer require sundance-solutions/larachain-trim-text

Usage

<?php

it('test trims', function () {
    $example = 'Lots of text......';

    $trimmer = new SundanceSolutions\LarachainTrimText\LarachainTrimText();
    $results = $trimmer->trim($example);
    expect($results)->toBe($expected);
});

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.