Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Configuration Before Usage (1.1)

Percy Mamedy edited this page May 28, 2017 · 3 revisions

Overview

The config file located at config/personality-insights.php contains all the package's configurations. You can explore this file to get a sense of what is configurable.

Default Credentials

This is the default credentials name to use for performing API calls to Personality Insights, you may change the name and replace it with a more appropriate name for your project.

'default_credentials' => env('PERSONALITY_INSIGHTS_DEFAULT_CREDENTIALS', 'default'),

Credentials

The credentials key contains an array of Watson Service Credentials. A sensible default credential has been defined for you.

'credentials' => [

        'default' => [
            'url'      => env('PERSONALITY_INSIGHTS_URL', 'https://gateway.watsonplatform.net/personality-insights/api/'),
            'password' => env('PERSONALITY_INSIGHTS_PASSWORD', 'SomePassword'),
            'username' => env('PERSONALITY_INSIGHTS_USERNAME', 'SomeUsername'),
        ],

 ],

The default credential is the one used for all communication with Watson.

Feel free to add as many credentials as needed. You can then use defined credentials by specifying them when making API calls.

API version

Use this setting to specfiy which version of the Personality Insights API you are using for your project. The default version as of Laravel Personality Insights 1.1 is version 3.

'api_version' => env('PERSONALITY_INSIGHTS_API_VERSION', 'v3'),

Machine Learning

By default, Watson collects data from all requests and uses the data to improve the service. If you do not want to share your data, set this value to true.

'x_watson_learning_opt_out' => false,

Caching for convenience

You can cache the insights retrieved so that you can reduce number of calls made to Watson. Set cache_on to true

'cache_on' => env('PERSONALITY_INSIGHTS_CACHE', false),

You can also specify the number of minutes the cache will stay active

'cache_expiration' => 60