Download the PHP package christopherarter/dream without Composer

On this page you can find all versions of the php package christopherarter/dream. 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 dream

The AI/ML Toolbox for Laravel

Latest Version on Packagist Total Downloads GitHub Actions

Dream is a package for Laravel that brings common AI/ML tools into your Laravel application without all the boilerplate.

It currently supports:

Requirements

Getting Started

Installation

You can install the package via composer:

Next, publish the vendor config file:

Authentication

OpenAI

AWS

To use AWS Comprehend, you can add your AWS credentials in your .env file. Note: the user must have access to the AWS Comprehend service.


Usage

To use this package, you can rely on the Dream facade. This facade will automatically use the default driver you have set in your config/dream.php file.

Sentiment Analysis

Sentiment analysis is the process of determining whether a piece of writing is positive, negative, or neutral. It's also known as opinion mining, deriving the opinion or attitude of a speaker. Dream includes several helper methods to make it easy to use sentiment analysis.

Example:

Available Methods:

Entity Extraction

Entity extraction is the process of detecting and classifying key information from text and other unstructured data sources. It's also known as named entity recognition (NER).

Available Methods:

Key Phrase Extraction

Key phrase extraction is the process of identifying the most important phrases in a block of text. Dream includes the ability to extract key phrases from a string.

Language Detection

Language detection is the process of identifying the language of a given text. Dream includes the ability to detect the language of a string.

The language code will be the ISO 639-1 code for the language. The return type is a value backed enum Dream\Enums\Language to ensure consistency across clients.

Image Text Detection

Dream can detect the text inside of an image. To do this, we'll use the imageText() method.

Note: Currently only available using AWS

Image Label Detection

Dream can determine labels for an image using the imageLabels() method.

Note: Currently only available using AWS


Clients

AWS Comprehend

IAM Configuration

The AWS user you provide will need to have access to the Comprehend service.

Here's a policy example:

If you'd like to strictly adhere to least privilege, you can limit the Actions in the role to just the ones you need. For example, if you only need to use the entities method, you can limit the Actions to just comprehend:DetectEntities.

AWS Rekognition

To use the image detection methods, you'll need to enable the AWS Rekognition service for your user as well. You can add this to the example policy above:

Environment Variables

By default, Dream will use the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables to authenticate with AWS Comprehend. If you would like to specify a different AWS key & secret to use with Dream, you can do so by setting the keys with the DREAM_ prefix.

For example,

Azure Cognitive Services

Coming soon :)


Building Custom Clients

If you would like to build your own client, or contribute to this project by adding another client from a different provider, you can do so by extending the base classes:

A client should have both image and text capabilities. These capabilities are handled in their own respective client classes.

Next, you'll add your client to the config/dream.php file.

Finally, you'll set your client as the default driver in your environment. Here's an example in your .env:

Testing

Roadmap

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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


All versions of dream with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0
aws/aws-sdk-php Version ^3.240
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 christopherarter/dream contains the following files

Loading the files please wait ....