Skip to content

Commit 0756878

Browse files
committed
feat(visual-recognition-v4): new method added - getTrainingUsage
* models `TrainingEvent` and `TrainingEvents` added
1 parent c61b794 commit 0756878

File tree

8 files changed

+429
-72
lines changed

8 files changed

+429
-72
lines changed

assistant/v2.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ class AssistantV2 extends BaseService {
7272
* Create a session.
7373
*
7474
* Create a new session. A session is used to send user input to a skill and receive responses. It also maintains the
75-
* state of the conversation.
75+
* state of the conversation. A session persists until it is deleted, or until it times out because of inactivity.
76+
* (For more information, see the
77+
* [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-settings).
7678
*
7779
* @param {Object} params - The parameters to send to the service.
7880
* @param {string} params.assistantId - Unique identifier of the assistant. To find the assistant ID in the Watson
@@ -141,7 +143,8 @@ class AssistantV2 extends BaseService {
141143
/**
142144
* Delete session.
143145
*
144-
* Deletes a session explicitly before it times out.
146+
* Deletes a session explicitly before it times out. (For more information about the session inactivity timeout, see
147+
* the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-settings)).
145148
*
146149
* @param {Object} params - The parameters to send to the service.
147150
* @param {string} params.assistantId - Unique identifier of the assistant. To find the assistant ID in the Watson
@@ -439,8 +442,8 @@ namespace AssistantV2 {
439442

440443
/** DialogSuggestion. */
441444
export interface DialogSuggestion {
442-
/** The user-facing label for the disambiguation option. This label is taken from the **user_label** property of
443-
* the corresponding dialog node.
445+
/** The user-facing label for the disambiguation option. This label is taken from the **title** or
446+
* **user_label** property of the corresponding dialog node, depending on the disambiguation options.
444447
*/
445448
label: string;
446449
/** An object defining the message input to be sent to the assistant if the user selects the corresponding

discovery/v1.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6973,8 +6973,6 @@ namespace DiscoveryV1 {
69736973
collection_id?: string;
69746974
/** Metadata of a query result. */
69756975
result_metadata?: QueryResultMetadata;
6976-
/** Automatically extracted result title. */
6977-
title?: string;
69786976
/** The internal status code returned by the ingestion subsystem indicating the overall result of ingesting the
69796977
* source document.
69806978
*/
@@ -7041,8 +7039,6 @@ namespace DiscoveryV1 {
70417039
collection_id?: string;
70427040
/** Metadata of a query result. */
70437041
result_metadata?: QueryResultMetadata;
7044-
/** Automatically extracted result title. */
7045-
title?: string;
70467042
/** QueryResult accepts additional properties. */
70477043
[propName: string]: any;
70487044
}

speech-to-text/v1-generated.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,10 @@ class SpeechToTextV1 extends BaseService {
11621162
* base model for which it is created. The model is owned by the instance of the service whose credentials are used to
11631163
* create it.
11641164
*
1165+
* You can create a maximum of 1024 custom language models, per credential. The service returns an error if you
1166+
* attempt to create more than 1024 models. You do not lose any models, but you cannot create any more until your
1167+
* model count is below the limit.
1168+
*
11651169
* **See also:** [Create a custom language
11661170
* model](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-languageCreate#createModel-language).
11671171
*
@@ -2935,6 +2939,10 @@ class SpeechToTextV1 extends BaseService {
29352939
* base model for which it is created. The model is owned by the instance of the service whose credentials are used to
29362940
* create it.
29372941
*
2942+
* You can create a maximum of 1024 custom acoustic models, per credential. The service returns an error if you
2943+
* attempt to create more than 1024 models. You do not lose any models, but you cannot create any more until your
2944+
* model count is below the limit.
2945+
*
29382946
* **See also:** [Create a custom acoustic
29392947
* model](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-acoustic#createModel-acoustic).
29402948
*

test/integration/assistant.v2.test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ describe('assistant v2 integration', () => {
7979
expect(res).toBeDefined();
8080
expect(result.output).toBeDefined();
8181
expect(Array.isArray(result.output.generic)).toBe(true);
82-
expect(result.output.generic[0].response_type).toBe('text');
83-
expect(result.output.generic[0].text).toBeDefined();
84-
expect(Array.isArray(result.output.intents)).toBe(true);
85-
expect(Array.isArray(result.output.entities)).toBe(true);
82+
expect(result.output.generic[0].response_type).toBe('search');
8683
done();
8784
});
8885
});

test/integration/visual-recognition.v4.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,20 @@ describe('visual recognition v4 integration', () => {
298298

299299
done();
300300
});
301+
302+
test('getTrainingUsage', async done => {
303+
let res;
304+
try {
305+
res = await visualRecognition.getTrainingUsage();
306+
} catch (err) {
307+
return done(err);
308+
}
309+
310+
expect(res).toBeDefined();
311+
const { result } = res || {};
312+
expect(result).toBeDefined();
313+
done();
314+
});
301315
});
302316

303317
describe('userData', () => {

0 commit comments

Comments
 (0)