-
Notifications
You must be signed in to change notification settings - Fork 11
Configuration Before Usage (1.1)
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.
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'),
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.
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'),
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,
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