You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -40,9 +40,18 @@ class AssistantV2 extends BaseService {
40
40
* @param {string} [options.iam_access_token] - An IAM access token fully managed by the application. Responsibility falls on the application to refresh the token, either before it expires or reactively upon receiving a 401 from the service, as any requests made with an expired token will fail.
41
41
* @param {string} [options.iam_apikey] - An API key that can be used to request IAM tokens. If this API key is provided, the SDK will manage the token and handle the refreshing.
42
42
* @param {string} [options.iam_url] - An optional URL for the IAM service API. Defaults to 'https://iam.cloud.ibm.com/identity/token'.
43
-
* @param {boolean} [options.use_unauthenticated] - Set to `true` to avoid including an authorization header. This option may be useful for requests that are proxied.
44
-
* @param {Object} [options.headers] - Default headers that shall be included with every request to the service.
45
-
* @param {boolean} [options.headers.X-Watson-Learning-Opt-Out] - Set to `true` to opt-out of data collection. By default, all IBM Watson services log requests and their results. Logging is done only to improve the services for future users. The logged data is not shared or made public. If you are concerned with protecting the privacy of users' personal information or otherwise do not want your requests to be logged, you can opt out of logging.
43
+
* @param {string} [options.iam_client_id] - client id (username) for request to iam service
44
+
* @param {string} [options.iam_client_secret] - client secret (password) for request to iam service
45
+
* @param {string} [options.icp4d_access_token] - icp for data access token provided and managed by user
46
+
* @param {string} [options.icp4d_url] - icp for data base url - used for authentication
47
+
* @param {string} [options.authentication_type] - authentication pattern to be used. can be iam, basic, or icp4d
48
+
* @param {boolean} [options.use_unauthenticated] - Set to `true` to avoid including an authorization header. This
49
+
* option may be useful for requests that are proxied.
50
+
* @param {OutgoingHttpHeaders} [options.headers] - Default headers that shall be included with every request to the service.
51
+
* @param {boolean} [options.headers.X-Watson-Learning-Opt-Out] - Set to `true` to opt-out of data collection. By
52
+
* default, all IBM Watson services log requests and their results. Logging is done only to improve the services for
53
+
* future users. The logged data is not shared or made public. If you are concerned with protecting the privacy of
54
+
* users' personal information or otherwise do not want your requests to be logged, you can opt out of logging.
46
55
* @constructor
47
56
* @returns {AssistantV2}
48
57
* @throws {Error}
@@ -67,12 +76,13 @@ class AssistantV2 extends BaseService {
67
76
* state of the conversation.
68
77
*
69
78
* @param {Object} params - The parameters to send to the service.
70
-
* @param {string} params.assistant_id - Unique identifier of the assistant. You can find the assistant ID of an
71
-
* assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see
72
-
* the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task).
79
+
* @param {string} params.assistant_id - Unique identifier of the assistant. To find the assistant ID in the Watson
80
+
* Assistant tool, open the assistant settings and click **API Details**. For information about creating assistants,
/** The body of a service request that returns no response data. */
278
305
exportinterfaceEmpty{}
279
306
307
+
/** A standard JS object, defined to avoid the limitations of `Object` and `object` */
308
+
exportinterfaceJsonObject{
309
+
[key: string]: any;
310
+
}
311
+
280
312
/*************************
281
313
* request interfaces
282
314
************************/
283
315
284
316
/** Parameters for the `createSession` operation. */
285
317
exportinterfaceCreateSessionParams{
286
-
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
318
+
/** Unique identifier of the assistant. To find the assistant ID in the Watson Assistant tool, open the assistant settings and click **API Details**. For information about creating assistants, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
287
319
assistant_id: string;
288
-
headers?: Object;
320
+
headers?: OutgoingHttpHeaders;
289
321
return_response?: boolean;
290
322
}
291
323
292
324
/** Parameters for the `deleteSession` operation. */
293
325
exportinterfaceDeleteSessionParams{
294
-
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
326
+
/** Unique identifier of the assistant. To find the assistant ID in the Watson Assistant tool, open the assistant settings and click **API Details**. For information about creating assistants, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
295
327
assistant_id: string;
296
328
/** Unique identifier of the session. */
297
329
session_id: string;
298
-
headers?: Object;
330
+
headers?: OutgoingHttpHeaders;
299
331
return_response?: boolean;
300
332
}
301
333
302
334
/** Parameters for the `message` operation. */
303
335
exportinterfaceMessageParams{
304
-
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
336
+
/** Unique identifier of the assistant. To find the assistant ID in the Watson Assistant tool, open the assistant settings and click **API Details**. For information about creating assistants, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
305
337
assistant_id: string;
306
338
/** Unique identifier of the session. */
307
339
session_id: string;
308
340
/** An input object that includes the input text. */
309
341
input?: MessageInput;
310
342
/** State information for the conversation. The context is stored by the assistant on a per-session basis. You can use this property to set or modify context variables, which can also be accessed by dialog nodes. */
311
343
context?: MessageContext;
312
-
headers?: Object;
344
+
headers?: OutgoingHttpHeaders;
313
345
return_response?: boolean;
314
346
}
315
347
@@ -340,7 +372,7 @@ namespace AssistantV2 {
340
372
/** The type of action to invoke. */
341
373
action_type?: string;
342
374
/** A map of key/value pairs to be provided to the action. */
343
-
parameters?: Object;
375
+
parameters?: JsonObject;
344
376
/** The location in the dialog context where the result of the action is stored. */
345
377
result_variable: string;
346
378
/** The name of the context variable that the client application will use to pass in credentials for the action. */
@@ -406,7 +438,7 @@ namespace AssistantV2 {
406
438
/** An object defining the message input to be sent to the assistant if the user selects the corresponding disambiguation option. */
407
439
value: DialogSuggestionValue;
408
440
/** The dialog output that will be returned from the Watson Assistant service if the user selects the corresponding option. */
409
-
output?: Object;
441
+
output?: JsonObject;
410
442
}
411
443
412
444
/** An object defining the message input to be sent to the assistant if the user selects the corresponding disambiguation option. */
@@ -439,6 +471,12 @@ namespace AssistantV2 {
439
471
turn_count?: number;
440
472
}
441
473
474
+
/** Contains information specific to a particular skill used by the Assistant. */
475
+
exportinterfaceMessageContextSkill{
476
+
/** Arbitrary variables that can be read and written by a particular skill. */
477
+
user_defined?: JsonObject;
478
+
}
479
+
442
480
/** Information specific to particular skills used by the Assistant. **Note:** Currently, only a single property named `main skill` is supported. This object contains variables that apply to the dialog skill used by the assistant. */
/** The type of user input. Currently, only text input is supported. */
451
489
message_type?: string;
452
-
/** The text of the user input. This string cannot contain carriage return, newline, or tab characters, and it must be no longer than 2048 characters. */
490
+
/** The text of the user input. This string cannot contain carriage return, newline, or tab characters. */
453
491
text?: string;
454
492
/** Optional properties that control how the assistant responds. */
455
493
options?: MessageInputOptions;
@@ -486,7 +524,7 @@ namespace AssistantV2 {
486
524
/** Additional detailed information about a message response and how it was generated. */
487
525
debug?: MessageOutputDebug;
488
526
/** An object containing any custom properties included in the response. This object includes any arbitrary properties defined in the dialog JSON editor as part of the dialog node output. */
489
-
user_defined?: Object;
527
+
user_defined?: JsonObject;
490
528
}
491
529
492
530
/** Additional detailed information about a message response and how it was generated. */
@@ -520,7 +558,7 @@ namespace AssistantV2 {
520
558
/** A decimal percentage that represents Watson's confidence in the entity. */
521
559
confidence?: number;
522
560
/** Any metadata for the entity. */
523
-
metadata?: Object;
561
+
metadata?: JsonObject;
524
562
/** The recognized capture groups for the entity, as defined by the entity pattern. */
0 commit comments