Download the PHP package maeandrew/laya-laravel without Composer

On this page you can find all versions of the php package maeandrew/laya-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laya-laravel

Laya Laravel

An unofficial Laravel AI provider for Laya. It lets laravel/ai send typed classification questions to a self-hosted laya-serve server.

This is a community package. It is not affiliated with or endorsed by Laravel, Convai Innovations/Laya, or TypeSafe.

The provider supports Laya's choice, score, and noul answers and uses Laya's automatic script and language routing by default.

Requirements

The Classification API is not available in the latest tagged laravel/ai release yet. Composer applies your application's stability policy to transitive dependencies, so explicitly require the 1.x-dev branch while it remains untagged.

Install

Until the first Packagist release, add the GitHub repository to your application's composer.json and require its main branch:

Laravel discovers the service provider automatically. To publish its configuration file, run:

Configure

Set the connection in .env:

The provider is registered as laya in laravel/ai. Pass it to classify() explicitly, or set ai.default_for_classification to laya in your application's config/ai.php. If you also add a laya entry under providers in config/ai.php, the values it sets override config/laya.php; values it leaves empty or null fall back to it.

Use

Use the same fake API provided by laravel/ai in application tests:

Laya server

The package is a client; it does not install or start the Python model server. Install and run Laya with its optional HTTP dependencies on a machine reachable by Laravel:

The default URL is http://localhost:8000/v1. Set LAYA_URL to the corresponding base URL in your Laravel environment. If the server uses LAYA_API_KEY, set the same value in Laravel; the package adds the matching bearer token. With no key configured, it omits the Authorization header.

Keep LAYA_PRELOAD=1 for multilingual routing in a production service. The Router otherwise keeps one checkpoint loaded and may need to cold-load another after a language switch, which can exceed the Laravel AI classification request's default 30-second timeout. The multilingual checkpoint's accuracy is weaker than the English checkpoint on some tasks; evaluate it on your own data before relying on automated decisions.

By default, LAYA_MODEL=auto lets Laya route each request based on its state. Set it to english, multilingual, or typed-decisions only when you need to pin a checkpoint.

Development

The Testbench suite fakes HTTP and makes no model downloads or external API calls.

License

MIT. See LICENSE.


All versions of laya-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
laravel/ai Version ^1.0@dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maeandrew/laya-laravel contains the following files

Loading the files please wait ...