1
1
# coding: utf-8
2
2
3
- # (C) Copyright IBM Corp. 2016, 2020.
3
+ # (C) Copyright IBM Corp. 2020.
4
4
#
5
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
6
# you may not use this file except in compliance with the License.
25
25
timestamped, can report temporal behavior.
26
26
* For information about the meaning of the models that the service uses to describe
27
27
personality characteristics, see [Personality
28
- models](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-models#models).
28
+ models](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-models#models).
29
29
* For information about the meaning of the consumption preferences, see [Consumption
30
- preferences](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-preferences#preferences).
30
+ preferences](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-preferences#preferences).
31
31
**Note:** Request logging is disabled for the Personality Insights service. Regardless of
32
32
whether you set the `X-Watson-Learning-Opt-Out` request header, the service does not log
33
33
or retain data from requests and responses.
38
38
from .common import get_sdk_headers
39
39
from enum import Enum
40
40
from ibm_cloud_sdk_core import BaseService
41
- from ibm_cloud_sdk_core import get_authenticator_from_environment
41
+ from ibm_cloud_sdk_core import DetailedResponse
42
+ from ibm_cloud_sdk_core .get_authenticator import get_authenticator_from_environment
42
43
from typing import Dict
43
44
from typing import List
44
45
@@ -110,9 +111,9 @@ def profile(self,
110
111
Japanese, Korean, or Spanish. It can return its results in a variety of languages.
111
112
**See also:**
112
113
* [Requesting a
113
- profile](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-input#input)
114
+ profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#input)
114
115
* [Providing sufficient
115
- input](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-input#sufficient)
116
+ input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient)
116
117
### Content types
117
118
You can provide input content as plain text (`text/plain`), HTML (`text/html`),
118
119
or JSON (`application/json`) by specifying the **Content-Type** parameter. The
@@ -125,22 +126,22 @@ def profile(self,
125
126
parameter to indicate the character encoding of the input text; for example,
126
127
`Content-Type: text/plain;charset=utf-8`.
127
128
**See also:** [Specifying request and response
128
- formats](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-input#formats)
129
+ formats](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#formats)
129
130
### Accept types
130
131
You must request a response as JSON (`application/json`) or comma-separated
131
132
values (`text/csv`) by specifying the **Accept** parameter. CSV output includes a
132
133
fixed number of columns. Set the **csv_headers** parameter to `true` to request
133
134
optional column headers for CSV output.
134
135
**See also:**
135
136
* [Understanding a JSON
136
- profile](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-output#output)
137
+ profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-output#output)
137
138
* [Understanding a CSV
138
- profile](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-outputCSV#outputCSV).
139
+ profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-outputCSV#outputCSV).
139
140
140
141
:param Content content: A maximum of 20 MB of content to analyze, though
141
142
the service requires much less text; for more information, see [Providing
142
143
sufficient
143
- input](https://cloud.ibm.com/docs/services/ personality-insights?topic=personality-insights-input#sufficient).
144
+ input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient).
144
145
For JSON input, provide an object of type `Content`.
145
146
:param str accept: The type of the response. For more information, see
146
147
**Accept types** in the method description.
0 commit comments