New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

sundance-solutions/larachain-trim-text

This will help short text for prompts
4,476 3
Install
composer require sundance-solutions/larachain-trim-text
Latest Version:1.0.1
PHP:^8.1
Laravel:10
License:MIT
Last Updated:Jun 30, 2023
Links: GitHub  ·  Packagist
Maintainer: alnutile

This will help short text for prompts

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.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607

Version History

Version Released PHP Laravel License
1.0.1 ^8.1 ^10.0 MIT
1.0.0 ^8.1 ^10.0 MIT