Skip to content

Commit

Permalink
feat(discovery): add new methods: createTokenizationDictionary, `de…
Browse files Browse the repository at this point in the history
…leteTokenizationDictionary`, and `getTokenizationDictionaryStatus`
  • Loading branch information
dpopp07 committed Oct 29, 2018
1 parent 0d93955 commit d5ba660
Show file tree
Hide file tree
Showing 10 changed files with 1,314 additions and 278 deletions.
213 changes: 213 additions & 0 deletions assistant/v1.ts

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions assistant/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@ class AssistantV2 extends BaseService {
const _params = extend({}, params);
const _callback = (callback) ? callback : () => { /* noop */ };
const requiredParams = ['assistant_id'];

const missingParams = getMissingParams(_params, requiredParams);
if (missingParams) {
return _callback(missingParams);
}

const path = {
'assistant_id': _params.assistant_id
};

const parameters = {
options: {
url: '/v2/assistants/{assistant_id}/sessions',
Expand All @@ -100,6 +103,7 @@ class AssistantV2 extends BaseService {
}, _params.headers),
}),
};

return this.createRequest(parameters, _callback);
};

Expand All @@ -123,14 +127,17 @@ class AssistantV2 extends BaseService {
const _params = extend({}, params);
const _callback = (callback) ? callback : () => { /* noop */ };
const requiredParams = ['assistant_id', 'session_id'];

const missingParams = getMissingParams(_params, requiredParams);
if (missingParams) {
return _callback(missingParams);
}

const path = {
'assistant_id': _params.assistant_id,
'session_id': _params.session_id
};

const parameters = {
options: {
url: '/v2/assistants/{assistant_id}/sessions/{session_id}',
Expand All @@ -143,6 +150,7 @@ class AssistantV2 extends BaseService {
}, _params.headers),
}),
};

return this.createRequest(parameters, _callback);
};

Expand Down Expand Up @@ -174,18 +182,22 @@ class AssistantV2 extends BaseService {
const _params = extend({}, params);
const _callback = (callback) ? callback : () => { /* noop */ };
const requiredParams = ['assistant_id', 'session_id'];

const missingParams = getMissingParams(_params, requiredParams);
if (missingParams) {
return _callback(missingParams);
}

const body = {
'input': _params.input,
'context': _params.context
};

const path = {
'assistant_id': _params.assistant_id,
'session_id': _params.session_id
};

const parameters = {
options: {
url: '/v2/assistants/{assistant_id}/sessions/{session_id}/message',
Expand All @@ -201,6 +213,7 @@ class AssistantV2 extends BaseService {
}, _params.headers),
}),
};

return this.createRequest(parameters, _callback);
};

Expand Down Expand Up @@ -387,9 +400,9 @@ namespace AssistantV2 {
export interface MessageContextGlobalSystem {
/** The user time zone. The assistant uses the time zone to correctly resolve relative time references. */
timezone?: string;
/** String value provided by the API client that should be unique per each distinct end user of the service powered by Assistant. */
/** A string value that identifies the user who is interacting with the assistant. The client must provide a unique identifier for each individual end user who accesses the application. This user ID may be used for billing and other purposes. */
user_id?: string;
/** This property is normally set by the Assistant which sets this to 1 during the first conversation turn and then increments it by 1 with every subsequent turn. A turn count equal to 0 (or > 0) informs the Assistant that this is (or is not) the first turn in a conversation which influences the behavior of some skills. The Conversation skill uses this to evaluate its `welcome` and `conversation_start` conditions. */
/** A counter that is automatically incremented with each turn of the conversation. A value of 1 indicates that this is the the first turn of a new conversation, which can affect the behavior of some skills. */
turn_count?: number;
}

Expand Down
Loading

0 comments on commit d5ba660

Please sign in to comment.