Skip to content

Commit d5ba660

Browse files
committed
feat(discovery): add new methods: createTokenizationDictionary, deleteTokenizationDictionary, and getTokenizationDictionaryStatus
1 parent 0d93955 commit d5ba660

File tree

10 files changed

+1314
-278
lines changed

10 files changed

+1314
-278
lines changed

assistant/v1.ts

+213
Large diffs are not rendered by default.

assistant/v2.ts

+15-2
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,16 @@ class AssistantV2 extends BaseService {
8080
const _params = extend({}, params);
8181
const _callback = (callback) ? callback : () => { /* noop */ };
8282
const requiredParams = ['assistant_id'];
83+
8384
const missingParams = getMissingParams(_params, requiredParams);
8485
if (missingParams) {
8586
return _callback(missingParams);
8687
}
88+
8789
const path = {
8890
'assistant_id': _params.assistant_id
8991
};
92+
9093
const parameters = {
9194
options: {
9295
url: '/v2/assistants/{assistant_id}/sessions',
@@ -100,6 +103,7 @@ class AssistantV2 extends BaseService {
100103
}, _params.headers),
101104
}),
102105
};
106+
103107
return this.createRequest(parameters, _callback);
104108
};
105109

@@ -123,14 +127,17 @@ class AssistantV2 extends BaseService {
123127
const _params = extend({}, params);
124128
const _callback = (callback) ? callback : () => { /* noop */ };
125129
const requiredParams = ['assistant_id', 'session_id'];
130+
126131
const missingParams = getMissingParams(_params, requiredParams);
127132
if (missingParams) {
128133
return _callback(missingParams);
129134
}
135+
130136
const path = {
131137
'assistant_id': _params.assistant_id,
132138
'session_id': _params.session_id
133139
};
140+
134141
const parameters = {
135142
options: {
136143
url: '/v2/assistants/{assistant_id}/sessions/{session_id}',
@@ -143,6 +150,7 @@ class AssistantV2 extends BaseService {
143150
}, _params.headers),
144151
}),
145152
};
153+
146154
return this.createRequest(parameters, _callback);
147155
};
148156

@@ -174,18 +182,22 @@ class AssistantV2 extends BaseService {
174182
const _params = extend({}, params);
175183
const _callback = (callback) ? callback : () => { /* noop */ };
176184
const requiredParams = ['assistant_id', 'session_id'];
185+
177186
const missingParams = getMissingParams(_params, requiredParams);
178187
if (missingParams) {
179188
return _callback(missingParams);
180189
}
190+
181191
const body = {
182192
'input': _params.input,
183193
'context': _params.context
184194
};
195+
185196
const path = {
186197
'assistant_id': _params.assistant_id,
187198
'session_id': _params.session_id
188199
};
200+
189201
const parameters = {
190202
options: {
191203
url: '/v2/assistants/{assistant_id}/sessions/{session_id}/message',
@@ -201,6 +213,7 @@ class AssistantV2 extends BaseService {
201213
}, _params.headers),
202214
}),
203215
};
216+
204217
return this.createRequest(parameters, _callback);
205218
};
206219

@@ -387,9 +400,9 @@ namespace AssistantV2 {
387400
export interface MessageContextGlobalSystem {
388401
/** The user time zone. The assistant uses the time zone to correctly resolve relative time references. */
389402
timezone?: string;
390-
/** String value provided by the API client that should be unique per each distinct end user of the service powered by Assistant. */
403+
/** 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. */
391404
user_id?: string;
392-
/** 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. */
405+
/** 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. */
393406
turn_count?: number;
394407
}
395408

0 commit comments

Comments
 (0)