@rapidaai/react 1.1.46 → 1.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,28 +22,25 @@ var require_common_pb = __commonJS({
22
22
  goog.object.extend(proto, google_protobuf_struct_pb);
23
23
  goog.exportSymbol("proto.Argument", null, global);
24
24
  goog.exportSymbol("proto.AssistantConversation", null, global);
25
+ goog.exportSymbol("proto.AssistantConversationAction", null, global);
26
+ goog.exportSymbol("proto.AssistantConversationAction.ActionType", null, global);
25
27
  goog.exportSymbol("proto.AssistantConversationAssistantMessage", null, global);
26
28
  goog.exportSymbol("proto.AssistantConversationAssistantMessage.MessageCase", null, global);
27
- goog.exportSymbol("proto.AssistantConversationAssistantTransferAction", null, global);
28
29
  goog.exportSymbol("proto.AssistantConversationConfiguration", null, global);
29
30
  goog.exportSymbol("proto.AssistantConversationContext", null, global);
30
- goog.exportSymbol("proto.AssistantConversationDeviationAction", null, global);
31
- goog.exportSymbol("proto.AssistantConversationDisconnectAction", null, global);
31
+ goog.exportSymbol("proto.AssistantConversationError", null, global);
32
32
  goog.exportSymbol("proto.AssistantConversationInterruption", null, global);
33
33
  goog.exportSymbol("proto.AssistantConversationInterruption.InterruptionType", null, global);
34
34
  goog.exportSymbol("proto.AssistantConversationMessage", null, global);
35
35
  goog.exportSymbol("proto.AssistantConversationMessageAudioContent", null, global);
36
36
  goog.exportSymbol("proto.AssistantConversationMessageTextContent", null, global);
37
- goog.exportSymbol("proto.AssistantConversationPhoneCallTransferAction", null, global);
38
37
  goog.exportSymbol("proto.AssistantConversationRecording", null, global);
39
38
  goog.exportSymbol("proto.AssistantConversationTelephonyEvent", null, global);
40
39
  goog.exportSymbol("proto.AssistantConversationUserMessage", null, global);
41
40
  goog.exportSymbol("proto.AssistantConversationUserMessage.MessageCase", null, global);
42
- goog.exportSymbol("proto.AssistantConverstationApiRequestAction", null, global);
43
- goog.exportSymbol("proto.AssistantConverstationEndpointAction", null, global);
44
- goog.exportSymbol("proto.AssistantConverstationHoldAction", null, global);
45
- goog.exportSymbol("proto.AssistantConverstationKnowledgeRetrievalAction", null, global);
46
41
  goog.exportSymbol("proto.AssistantDefinition", null, global);
42
+ goog.exportSymbol("proto.AudioConfig", null, global);
43
+ goog.exportSymbol("proto.AudioConfig.AudioFormat", null, global);
47
44
  goog.exportSymbol("proto.BaseResponse", null, global);
48
45
  goog.exportSymbol("proto.Content", null, global);
49
46
  goog.exportSymbol("proto.Criteria", null, global);
@@ -63,9 +60,11 @@ var require_common_pb = __commonJS({
63
60
  goog.exportSymbol("proto.Paginate", null, global);
64
61
  goog.exportSymbol("proto.Paginated", null, global);
65
62
  goog.exportSymbol("proto.Source", null, global);
63
+ goog.exportSymbol("proto.StreamConfig", null, global);
66
64
  goog.exportSymbol("proto.Tag", null, global);
67
65
  goog.exportSymbol("proto.Telemetry", null, global);
68
66
  goog.exportSymbol("proto.TextChatCompletePrompt", null, global);
67
+ goog.exportSymbol("proto.TextConfig", null, global);
69
68
  goog.exportSymbol("proto.TextPrompt", null, global);
70
69
  goog.exportSymbol("proto.ToolCall", null, global);
71
70
  goog.exportSymbol("proto.User", null, global);
@@ -301,61 +300,40 @@ var require_common_pb = __commonJS({
301
300
  if (goog.DEBUG && !COMPILED) {
302
301
  proto.AssistantConversationConfiguration.displayName = "proto.AssistantConversationConfiguration";
303
302
  }
304
- proto.AssistantConversationDisconnectAction = function(opt_data) {
303
+ proto.AssistantConversationError = function(opt_data) {
305
304
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
306
305
  };
307
- goog.inherits(proto.AssistantConversationDisconnectAction, jspb.Message);
306
+ goog.inherits(proto.AssistantConversationError, jspb.Message);
308
307
  if (goog.DEBUG && !COMPILED) {
309
- proto.AssistantConversationDisconnectAction.displayName = "proto.AssistantConversationDisconnectAction";
308
+ proto.AssistantConversationError.displayName = "proto.AssistantConversationError";
310
309
  }
311
- proto.AssistantConverstationHoldAction = function(opt_data) {
310
+ proto.StreamConfig = function(opt_data) {
312
311
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
313
312
  };
314
- goog.inherits(proto.AssistantConverstationHoldAction, jspb.Message);
313
+ goog.inherits(proto.StreamConfig, jspb.Message);
315
314
  if (goog.DEBUG && !COMPILED) {
316
- proto.AssistantConverstationHoldAction.displayName = "proto.AssistantConverstationHoldAction";
315
+ proto.StreamConfig.displayName = "proto.StreamConfig";
317
316
  }
318
- proto.AssistantConverstationKnowledgeRetrievalAction = function(opt_data) {
317
+ proto.AudioConfig = function(opt_data) {
319
318
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
320
319
  };
321
- goog.inherits(proto.AssistantConverstationKnowledgeRetrievalAction, jspb.Message);
320
+ goog.inherits(proto.AudioConfig, jspb.Message);
322
321
  if (goog.DEBUG && !COMPILED) {
323
- proto.AssistantConverstationKnowledgeRetrievalAction.displayName = "proto.AssistantConverstationKnowledgeRetrievalAction";
322
+ proto.AudioConfig.displayName = "proto.AudioConfig";
324
323
  }
325
- proto.AssistantConverstationApiRequestAction = function(opt_data) {
324
+ proto.TextConfig = function(opt_data) {
326
325
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
327
326
  };
328
- goog.inherits(proto.AssistantConverstationApiRequestAction, jspb.Message);
327
+ goog.inherits(proto.TextConfig, jspb.Message);
329
328
  if (goog.DEBUG && !COMPILED) {
330
- proto.AssistantConverstationApiRequestAction.displayName = "proto.AssistantConverstationApiRequestAction";
329
+ proto.TextConfig.displayName = "proto.TextConfig";
331
330
  }
332
- proto.AssistantConverstationEndpointAction = function(opt_data) {
331
+ proto.AssistantConversationAction = function(opt_data) {
333
332
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
334
333
  };
335
- goog.inherits(proto.AssistantConverstationEndpointAction, jspb.Message);
334
+ goog.inherits(proto.AssistantConversationAction, jspb.Message);
336
335
  if (goog.DEBUG && !COMPILED) {
337
- proto.AssistantConverstationEndpointAction.displayName = "proto.AssistantConverstationEndpointAction";
338
- }
339
- proto.AssistantConversationDeviationAction = function(opt_data) {
340
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
341
- };
342
- goog.inherits(proto.AssistantConversationDeviationAction, jspb.Message);
343
- if (goog.DEBUG && !COMPILED) {
344
- proto.AssistantConversationDeviationAction.displayName = "proto.AssistantConversationDeviationAction";
345
- }
346
- proto.AssistantConversationAssistantTransferAction = function(opt_data) {
347
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
348
- };
349
- goog.inherits(proto.AssistantConversationAssistantTransferAction, jspb.Message);
350
- if (goog.DEBUG && !COMPILED) {
351
- proto.AssistantConversationAssistantTransferAction.displayName = "proto.AssistantConversationAssistantTransferAction";
352
- }
353
- proto.AssistantConversationPhoneCallTransferAction = function(opt_data) {
354
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
355
- };
356
- goog.inherits(proto.AssistantConversationPhoneCallTransferAction, jspb.Message);
357
- if (goog.DEBUG && !COMPILED) {
358
- proto.AssistantConversationPhoneCallTransferAction.displayName = "proto.AssistantConversationPhoneCallTransferAction";
336
+ proto.AssistantConversationAction.displayName = "proto.AssistantConversationAction";
359
337
  }
360
338
  proto.AssistantConversationInterruption = function(opt_data) {
361
339
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
@@ -5969,7 +5947,9 @@ var require_common_pb = __commonJS({
5969
5947
  time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
5970
5948
  metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
5971
5949
  argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
5972
- optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : []
5950
+ optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
5951
+ inputconfig: (f = msg.getInputconfig()) && proto.StreamConfig.toObject(includeInstance, f),
5952
+ outputconfig: (f = msg.getOutputconfig()) && proto.StreamConfig.toObject(includeInstance, f)
5973
5953
  };
5974
5954
  if (includeInstance) {
5975
5955
  obj.$jspbMessageInstance = msg;
@@ -6024,6 +6004,16 @@ var require_common_pb = __commonJS({
6024
6004
  jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any());
6025
6005
  });
6026
6006
  break;
6007
+ case 7:
6008
+ var value = new proto.StreamConfig();
6009
+ reader.readMessage(value, proto.StreamConfig.deserializeBinaryFromReader);
6010
+ msg.setInputconfig(value);
6011
+ break;
6012
+ case 8:
6013
+ var value = new proto.StreamConfig();
6014
+ reader.readMessage(value, proto.StreamConfig.deserializeBinaryFromReader);
6015
+ msg.setOutputconfig(value);
6016
+ break;
6027
6017
  default:
6028
6018
  reader.skipField();
6029
6019
  break;
@@ -6073,6 +6063,22 @@ var require_common_pb = __commonJS({
6073
6063
  if (f && f.getLength() > 0) {
6074
6064
  f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter);
6075
6065
  }
6066
+ f = message.getInputconfig();
6067
+ if (f != null) {
6068
+ writer.writeMessage(
6069
+ 7,
6070
+ f,
6071
+ proto.StreamConfig.serializeBinaryToWriter
6072
+ );
6073
+ }
6074
+ f = message.getOutputconfig();
6075
+ if (f != null) {
6076
+ writer.writeMessage(
6077
+ 8,
6078
+ f,
6079
+ proto.StreamConfig.serializeBinaryToWriter
6080
+ );
6081
+ }
6076
6082
  };
6077
6083
  proto.AssistantConversationConfiguration.prototype.getAssistantconversationid = function() {
6078
6084
  return (
@@ -6158,13 +6164,43 @@ var require_common_pb = __commonJS({
6158
6164
  this.getOptionsMap().clear();
6159
6165
  return this;
6160
6166
  };
6167
+ proto.AssistantConversationConfiguration.prototype.getInputconfig = function() {
6168
+ return (
6169
+ /** @type{?proto.StreamConfig} */
6170
+ jspb.Message.getWrapperField(this, proto.StreamConfig, 7)
6171
+ );
6172
+ };
6173
+ proto.AssistantConversationConfiguration.prototype.setInputconfig = function(value) {
6174
+ return jspb.Message.setWrapperField(this, 7, value);
6175
+ };
6176
+ proto.AssistantConversationConfiguration.prototype.clearInputconfig = function() {
6177
+ return this.setInputconfig(void 0);
6178
+ };
6179
+ proto.AssistantConversationConfiguration.prototype.hasInputconfig = function() {
6180
+ return jspb.Message.getField(this, 7) != null;
6181
+ };
6182
+ proto.AssistantConversationConfiguration.prototype.getOutputconfig = function() {
6183
+ return (
6184
+ /** @type{?proto.StreamConfig} */
6185
+ jspb.Message.getWrapperField(this, proto.StreamConfig, 8)
6186
+ );
6187
+ };
6188
+ proto.AssistantConversationConfiguration.prototype.setOutputconfig = function(value) {
6189
+ return jspb.Message.setWrapperField(this, 8, value);
6190
+ };
6191
+ proto.AssistantConversationConfiguration.prototype.clearOutputconfig = function() {
6192
+ return this.setOutputconfig(void 0);
6193
+ };
6194
+ proto.AssistantConversationConfiguration.prototype.hasOutputconfig = function() {
6195
+ return jspb.Message.getField(this, 8) != null;
6196
+ };
6161
6197
  if (jspb.Message.GENERATE_TO_OBJECT) {
6162
- proto.AssistantConversationDisconnectAction.prototype.toObject = function(opt_includeInstance) {
6163
- return proto.AssistantConversationDisconnectAction.toObject(opt_includeInstance, this);
6198
+ proto.AssistantConversationError.prototype.toObject = function(opt_includeInstance) {
6199
+ return proto.AssistantConversationError.toObject(opt_includeInstance, this);
6164
6200
  };
6165
- proto.AssistantConversationDisconnectAction.toObject = function(includeInstance, msg) {
6201
+ proto.AssistantConversationError.toObject = function(includeInstance, msg) {
6166
6202
  var f, obj = {
6167
- reason: jspb.Message.getFieldWithDefault(msg, 1, "")
6203
+ error: (f = msg.getError()) && proto.Error.toObject(includeInstance, f)
6168
6204
  };
6169
6205
  if (includeInstance) {
6170
6206
  obj.$jspbMessageInstance = msg;
@@ -6172,12 +6208,12 @@ var require_common_pb = __commonJS({
6172
6208
  return obj;
6173
6209
  };
6174
6210
  }
6175
- proto.AssistantConversationDisconnectAction.deserializeBinary = function(bytes) {
6211
+ proto.AssistantConversationError.deserializeBinary = function(bytes) {
6176
6212
  var reader = new jspb.BinaryReader(bytes);
6177
- var msg = new proto.AssistantConversationDisconnectAction();
6178
- return proto.AssistantConversationDisconnectAction.deserializeBinaryFromReader(msg, reader);
6213
+ var msg = new proto.AssistantConversationError();
6214
+ return proto.AssistantConversationError.deserializeBinaryFromReader(msg, reader);
6179
6215
  };
6180
- proto.AssistantConversationDisconnectAction.deserializeBinaryFromReader = function(msg, reader) {
6216
+ proto.AssistantConversationError.deserializeBinaryFromReader = function(msg, reader) {
6181
6217
  while (reader.nextField()) {
6182
6218
  if (reader.isEndGroup()) {
6183
6219
  break;
@@ -6185,11 +6221,9 @@ var require_common_pb = __commonJS({
6185
6221
  var field = reader.getFieldNumber();
6186
6222
  switch (field) {
6187
6223
  case 1:
6188
- var value = (
6189
- /** @type {string} */
6190
- reader.readString()
6191
- );
6192
- msg.setReason(value);
6224
+ var value = new proto.Error();
6225
+ reader.readMessage(value, proto.Error.deserializeBinaryFromReader);
6226
+ msg.setError(value);
6193
6227
  break;
6194
6228
  default:
6195
6229
  reader.skipField();
@@ -6198,37 +6232,45 @@ var require_common_pb = __commonJS({
6198
6232
  }
6199
6233
  return msg;
6200
6234
  };
6201
- proto.AssistantConversationDisconnectAction.prototype.serializeBinary = function() {
6235
+ proto.AssistantConversationError.prototype.serializeBinary = function() {
6202
6236
  var writer = new jspb.BinaryWriter();
6203
- proto.AssistantConversationDisconnectAction.serializeBinaryToWriter(this, writer);
6237
+ proto.AssistantConversationError.serializeBinaryToWriter(this, writer);
6204
6238
  return writer.getResultBuffer();
6205
6239
  };
6206
- proto.AssistantConversationDisconnectAction.serializeBinaryToWriter = function(message, writer) {
6240
+ proto.AssistantConversationError.serializeBinaryToWriter = function(message, writer) {
6207
6241
  var f = void 0;
6208
- f = message.getReason();
6209
- if (f.length > 0) {
6210
- writer.writeString(
6242
+ f = message.getError();
6243
+ if (f != null) {
6244
+ writer.writeMessage(
6211
6245
  1,
6212
- f
6246
+ f,
6247
+ proto.Error.serializeBinaryToWriter
6213
6248
  );
6214
6249
  }
6215
6250
  };
6216
- proto.AssistantConversationDisconnectAction.prototype.getReason = function() {
6251
+ proto.AssistantConversationError.prototype.getError = function() {
6217
6252
  return (
6218
- /** @type {string} */
6219
- jspb.Message.getFieldWithDefault(this, 1, "")
6253
+ /** @type{?proto.Error} */
6254
+ jspb.Message.getWrapperField(this, proto.Error, 1)
6220
6255
  );
6221
6256
  };
6222
- proto.AssistantConversationDisconnectAction.prototype.setReason = function(value) {
6223
- return jspb.Message.setProto3StringField(this, 1, value);
6257
+ proto.AssistantConversationError.prototype.setError = function(value) {
6258
+ return jspb.Message.setWrapperField(this, 1, value);
6259
+ };
6260
+ proto.AssistantConversationError.prototype.clearError = function() {
6261
+ return this.setError(void 0);
6262
+ };
6263
+ proto.AssistantConversationError.prototype.hasError = function() {
6264
+ return jspb.Message.getField(this, 1) != null;
6224
6265
  };
6225
6266
  if (jspb.Message.GENERATE_TO_OBJECT) {
6226
- proto.AssistantConverstationHoldAction.prototype.toObject = function(opt_includeInstance) {
6227
- return proto.AssistantConverstationHoldAction.toObject(opt_includeInstance, this);
6267
+ proto.StreamConfig.prototype.toObject = function(opt_includeInstance) {
6268
+ return proto.StreamConfig.toObject(opt_includeInstance, this);
6228
6269
  };
6229
- proto.AssistantConverstationHoldAction.toObject = function(includeInstance, msg) {
6270
+ proto.StreamConfig.toObject = function(includeInstance, msg) {
6230
6271
  var f, obj = {
6231
- holdtime: jspb.Message.getFieldWithDefault(msg, 1, 0)
6272
+ audio: (f = msg.getAudio()) && proto.AudioConfig.toObject(includeInstance, f),
6273
+ text: (f = msg.getText()) && proto.TextConfig.toObject(includeInstance, f)
6232
6274
  };
6233
6275
  if (includeInstance) {
6234
6276
  obj.$jspbMessageInstance = msg;
@@ -6236,12 +6278,12 @@ var require_common_pb = __commonJS({
6236
6278
  return obj;
6237
6279
  };
6238
6280
  }
6239
- proto.AssistantConverstationHoldAction.deserializeBinary = function(bytes) {
6281
+ proto.StreamConfig.deserializeBinary = function(bytes) {
6240
6282
  var reader = new jspb.BinaryReader(bytes);
6241
- var msg = new proto.AssistantConverstationHoldAction();
6242
- return proto.AssistantConverstationHoldAction.deserializeBinaryFromReader(msg, reader);
6283
+ var msg = new proto.StreamConfig();
6284
+ return proto.StreamConfig.deserializeBinaryFromReader(msg, reader);
6243
6285
  };
6244
- proto.AssistantConverstationHoldAction.deserializeBinaryFromReader = function(msg, reader) {
6286
+ proto.StreamConfig.deserializeBinaryFromReader = function(msg, reader) {
6245
6287
  while (reader.nextField()) {
6246
6288
  if (reader.isEndGroup()) {
6247
6289
  break;
@@ -6249,11 +6291,14 @@ var require_common_pb = __commonJS({
6249
6291
  var field = reader.getFieldNumber();
6250
6292
  switch (field) {
6251
6293
  case 1:
6252
- var value = (
6253
- /** @type {number} */
6254
- reader.readUint64()
6255
- );
6256
- msg.setHoldtime(value);
6294
+ var value = new proto.AudioConfig();
6295
+ reader.readMessage(value, proto.AudioConfig.deserializeBinaryFromReader);
6296
+ msg.setAudio(value);
6297
+ break;
6298
+ case 2:
6299
+ var value = new proto.TextConfig();
6300
+ reader.readMessage(value, proto.TextConfig.deserializeBinaryFromReader);
6301
+ msg.setText(value);
6257
6302
  break;
6258
6303
  default:
6259
6304
  reader.skipField();
@@ -6262,37 +6307,69 @@ var require_common_pb = __commonJS({
6262
6307
  }
6263
6308
  return msg;
6264
6309
  };
6265
- proto.AssistantConverstationHoldAction.prototype.serializeBinary = function() {
6310
+ proto.StreamConfig.prototype.serializeBinary = function() {
6266
6311
  var writer = new jspb.BinaryWriter();
6267
- proto.AssistantConverstationHoldAction.serializeBinaryToWriter(this, writer);
6312
+ proto.StreamConfig.serializeBinaryToWriter(this, writer);
6268
6313
  return writer.getResultBuffer();
6269
6314
  };
6270
- proto.AssistantConverstationHoldAction.serializeBinaryToWriter = function(message, writer) {
6315
+ proto.StreamConfig.serializeBinaryToWriter = function(message, writer) {
6271
6316
  var f = void 0;
6272
- f = message.getHoldtime();
6273
- if (f !== 0) {
6274
- writer.writeUint64(
6317
+ f = message.getAudio();
6318
+ if (f != null) {
6319
+ writer.writeMessage(
6275
6320
  1,
6276
- f
6321
+ f,
6322
+ proto.AudioConfig.serializeBinaryToWriter
6323
+ );
6324
+ }
6325
+ f = message.getText();
6326
+ if (f != null) {
6327
+ writer.writeMessage(
6328
+ 2,
6329
+ f,
6330
+ proto.TextConfig.serializeBinaryToWriter
6277
6331
  );
6278
6332
  }
6279
6333
  };
6280
- proto.AssistantConverstationHoldAction.prototype.getHoldtime = function() {
6334
+ proto.StreamConfig.prototype.getAudio = function() {
6281
6335
  return (
6282
- /** @type {number} */
6283
- jspb.Message.getFieldWithDefault(this, 1, 0)
6336
+ /** @type{?proto.AudioConfig} */
6337
+ jspb.Message.getWrapperField(this, proto.AudioConfig, 1)
6284
6338
  );
6285
6339
  };
6286
- proto.AssistantConverstationHoldAction.prototype.setHoldtime = function(value) {
6287
- return jspb.Message.setProto3IntField(this, 1, value);
6340
+ proto.StreamConfig.prototype.setAudio = function(value) {
6341
+ return jspb.Message.setWrapperField(this, 1, value);
6342
+ };
6343
+ proto.StreamConfig.prototype.clearAudio = function() {
6344
+ return this.setAudio(void 0);
6345
+ };
6346
+ proto.StreamConfig.prototype.hasAudio = function() {
6347
+ return jspb.Message.getField(this, 1) != null;
6348
+ };
6349
+ proto.StreamConfig.prototype.getText = function() {
6350
+ return (
6351
+ /** @type{?proto.TextConfig} */
6352
+ jspb.Message.getWrapperField(this, proto.TextConfig, 2)
6353
+ );
6354
+ };
6355
+ proto.StreamConfig.prototype.setText = function(value) {
6356
+ return jspb.Message.setWrapperField(this, 2, value);
6357
+ };
6358
+ proto.StreamConfig.prototype.clearText = function() {
6359
+ return this.setText(void 0);
6360
+ };
6361
+ proto.StreamConfig.prototype.hasText = function() {
6362
+ return jspb.Message.getField(this, 2) != null;
6288
6363
  };
6289
6364
  if (jspb.Message.GENERATE_TO_OBJECT) {
6290
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.toObject = function(opt_includeInstance) {
6291
- return proto.AssistantConverstationKnowledgeRetrievalAction.toObject(opt_includeInstance, this);
6365
+ proto.AudioConfig.prototype.toObject = function(opt_includeInstance) {
6366
+ return proto.AudioConfig.toObject(opt_includeInstance, this);
6292
6367
  };
6293
- proto.AssistantConverstationKnowledgeRetrievalAction.toObject = function(includeInstance, msg) {
6368
+ proto.AudioConfig.toObject = function(includeInstance, msg) {
6294
6369
  var f, obj = {
6295
- query: jspb.Message.getFieldWithDefault(msg, 1, "")
6370
+ samplerate: jspb.Message.getFieldWithDefault(msg, 1, 0),
6371
+ audioformat: jspb.Message.getFieldWithDefault(msg, 2, 0),
6372
+ channels: jspb.Message.getFieldWithDefault(msg, 3, 0)
6296
6373
  };
6297
6374
  if (includeInstance) {
6298
6375
  obj.$jspbMessageInstance = msg;
@@ -6300,12 +6377,12 @@ var require_common_pb = __commonJS({
6300
6377
  return obj;
6301
6378
  };
6302
6379
  }
6303
- proto.AssistantConverstationKnowledgeRetrievalAction.deserializeBinary = function(bytes) {
6380
+ proto.AudioConfig.deserializeBinary = function(bytes) {
6304
6381
  var reader = new jspb.BinaryReader(bytes);
6305
- var msg = new proto.AssistantConverstationKnowledgeRetrievalAction();
6306
- return proto.AssistantConverstationKnowledgeRetrievalAction.deserializeBinaryFromReader(msg, reader);
6382
+ var msg = new proto.AudioConfig();
6383
+ return proto.AudioConfig.deserializeBinaryFromReader(msg, reader);
6307
6384
  };
6308
- proto.AssistantConverstationKnowledgeRetrievalAction.deserializeBinaryFromReader = function(msg, reader) {
6385
+ proto.AudioConfig.deserializeBinaryFromReader = function(msg, reader) {
6309
6386
  while (reader.nextField()) {
6310
6387
  if (reader.isEndGroup()) {
6311
6388
  break;
@@ -6314,10 +6391,24 @@ var require_common_pb = __commonJS({
6314
6391
  switch (field) {
6315
6392
  case 1:
6316
6393
  var value = (
6317
- /** @type {string} */
6318
- reader.readString()
6394
+ /** @type {number} */
6395
+ reader.readUint32()
6319
6396
  );
6320
- msg.setQuery(value);
6397
+ msg.setSamplerate(value);
6398
+ break;
6399
+ case 2:
6400
+ var value = (
6401
+ /** @type {!proto.AudioConfig.AudioFormat} */
6402
+ reader.readEnum()
6403
+ );
6404
+ msg.setAudioformat(value);
6405
+ break;
6406
+ case 3:
6407
+ var value = (
6408
+ /** @type {number} */
6409
+ reader.readUint32()
6410
+ );
6411
+ msg.setChannels(value);
6321
6412
  break;
6322
6413
  default:
6323
6414
  reader.skipField();
@@ -6326,93 +6417,99 @@ var require_common_pb = __commonJS({
6326
6417
  }
6327
6418
  return msg;
6328
6419
  };
6329
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.serializeBinary = function() {
6420
+ proto.AudioConfig.prototype.serializeBinary = function() {
6330
6421
  var writer = new jspb.BinaryWriter();
6331
- proto.AssistantConverstationKnowledgeRetrievalAction.serializeBinaryToWriter(this, writer);
6422
+ proto.AudioConfig.serializeBinaryToWriter(this, writer);
6332
6423
  return writer.getResultBuffer();
6333
6424
  };
6334
- proto.AssistantConverstationKnowledgeRetrievalAction.serializeBinaryToWriter = function(message, writer) {
6425
+ proto.AudioConfig.serializeBinaryToWriter = function(message, writer) {
6335
6426
  var f = void 0;
6336
- f = message.getQuery();
6337
- if (f.length > 0) {
6338
- writer.writeString(
6427
+ f = message.getSamplerate();
6428
+ if (f !== 0) {
6429
+ writer.writeUint32(
6339
6430
  1,
6340
6431
  f
6341
6432
  );
6342
6433
  }
6434
+ f = message.getAudioformat();
6435
+ if (f !== 0) {
6436
+ writer.writeEnum(
6437
+ 2,
6438
+ f
6439
+ );
6440
+ }
6441
+ f = message.getChannels();
6442
+ if (f !== 0) {
6443
+ writer.writeUint32(
6444
+ 3,
6445
+ f
6446
+ );
6447
+ }
6448
+ };
6449
+ proto.AudioConfig.AudioFormat = {
6450
+ LINEAR16: 0,
6451
+ MULAW8: 1
6343
6452
  };
6344
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.getQuery = function() {
6453
+ proto.AudioConfig.prototype.getSamplerate = function() {
6345
6454
  return (
6346
- /** @type {string} */
6347
- jspb.Message.getFieldWithDefault(this, 1, "")
6455
+ /** @type {number} */
6456
+ jspb.Message.getFieldWithDefault(this, 1, 0)
6348
6457
  );
6349
6458
  };
6350
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.setQuery = function(value) {
6351
- return jspb.Message.setProto3StringField(this, 1, value);
6459
+ proto.AudioConfig.prototype.setSamplerate = function(value) {
6460
+ return jspb.Message.setProto3IntField(this, 1, value);
6352
6461
  };
6353
- if (jspb.Message.GENERATE_TO_OBJECT) {
6354
- proto.AssistantConverstationApiRequestAction.prototype.toObject = function(opt_includeInstance) {
6355
- return proto.AssistantConverstationApiRequestAction.toObject(opt_includeInstance, this);
6356
- };
6357
- proto.AssistantConverstationApiRequestAction.toObject = function(includeInstance, msg) {
6358
- var f, obj = {};
6359
- if (includeInstance) {
6360
- obj.$jspbMessageInstance = msg;
6361
- }
6362
- return obj;
6363
- };
6364
- }
6365
- proto.AssistantConverstationApiRequestAction.deserializeBinary = function(bytes) {
6366
- var reader = new jspb.BinaryReader(bytes);
6367
- var msg = new proto.AssistantConverstationApiRequestAction();
6368
- return proto.AssistantConverstationApiRequestAction.deserializeBinaryFromReader(msg, reader);
6462
+ proto.AudioConfig.prototype.getAudioformat = function() {
6463
+ return (
6464
+ /** @type {!proto.AudioConfig.AudioFormat} */
6465
+ jspb.Message.getFieldWithDefault(this, 2, 0)
6466
+ );
6369
6467
  };
6370
- proto.AssistantConverstationApiRequestAction.deserializeBinaryFromReader = function(msg, reader) {
6371
- while (reader.nextField()) {
6372
- if (reader.isEndGroup()) {
6373
- break;
6374
- }
6375
- var field = reader.getFieldNumber();
6376
- switch (field) {
6377
- default:
6378
- reader.skipField();
6379
- break;
6380
- }
6381
- }
6382
- return msg;
6468
+ proto.AudioConfig.prototype.setAudioformat = function(value) {
6469
+ return jspb.Message.setProto3EnumField(this, 2, value);
6383
6470
  };
6384
- proto.AssistantConverstationApiRequestAction.prototype.serializeBinary = function() {
6385
- var writer = new jspb.BinaryWriter();
6386
- proto.AssistantConverstationApiRequestAction.serializeBinaryToWriter(this, writer);
6387
- return writer.getResultBuffer();
6471
+ proto.AudioConfig.prototype.getChannels = function() {
6472
+ return (
6473
+ /** @type {number} */
6474
+ jspb.Message.getFieldWithDefault(this, 3, 0)
6475
+ );
6388
6476
  };
6389
- proto.AssistantConverstationApiRequestAction.serializeBinaryToWriter = function(message, writer) {
6390
- var f = void 0;
6477
+ proto.AudioConfig.prototype.setChannels = function(value) {
6478
+ return jspb.Message.setProto3IntField(this, 3, value);
6391
6479
  };
6392
6480
  if (jspb.Message.GENERATE_TO_OBJECT) {
6393
- proto.AssistantConverstationEndpointAction.prototype.toObject = function(opt_includeInstance) {
6394
- return proto.AssistantConverstationEndpointAction.toObject(opt_includeInstance, this);
6481
+ proto.TextConfig.prototype.toObject = function(opt_includeInstance) {
6482
+ return proto.TextConfig.toObject(opt_includeInstance, this);
6395
6483
  };
6396
- proto.AssistantConverstationEndpointAction.toObject = function(includeInstance, msg) {
6397
- var f, obj = {};
6484
+ proto.TextConfig.toObject = function(includeInstance, msg) {
6485
+ var f, obj = {
6486
+ charset: jspb.Message.getFieldWithDefault(msg, 1, "")
6487
+ };
6398
6488
  if (includeInstance) {
6399
6489
  obj.$jspbMessageInstance = msg;
6400
6490
  }
6401
6491
  return obj;
6402
6492
  };
6403
6493
  }
6404
- proto.AssistantConverstationEndpointAction.deserializeBinary = function(bytes) {
6494
+ proto.TextConfig.deserializeBinary = function(bytes) {
6405
6495
  var reader = new jspb.BinaryReader(bytes);
6406
- var msg = new proto.AssistantConverstationEndpointAction();
6407
- return proto.AssistantConverstationEndpointAction.deserializeBinaryFromReader(msg, reader);
6496
+ var msg = new proto.TextConfig();
6497
+ return proto.TextConfig.deserializeBinaryFromReader(msg, reader);
6408
6498
  };
6409
- proto.AssistantConverstationEndpointAction.deserializeBinaryFromReader = function(msg, reader) {
6499
+ proto.TextConfig.deserializeBinaryFromReader = function(msg, reader) {
6410
6500
  while (reader.nextField()) {
6411
6501
  if (reader.isEndGroup()) {
6412
6502
  break;
6413
6503
  }
6414
6504
  var field = reader.getFieldNumber();
6415
6505
  switch (field) {
6506
+ case 1:
6507
+ var value = (
6508
+ /** @type {string} */
6509
+ reader.readString()
6510
+ );
6511
+ msg.setCharset(value);
6512
+ break;
6416
6513
  default:
6417
6514
  reader.skipField();
6418
6515
  break;
@@ -6420,77 +6517,78 @@ var require_common_pb = __commonJS({
6420
6517
  }
6421
6518
  return msg;
6422
6519
  };
6423
- proto.AssistantConverstationEndpointAction.prototype.serializeBinary = function() {
6520
+ proto.TextConfig.prototype.serializeBinary = function() {
6424
6521
  var writer = new jspb.BinaryWriter();
6425
- proto.AssistantConverstationEndpointAction.serializeBinaryToWriter(this, writer);
6522
+ proto.TextConfig.serializeBinaryToWriter(this, writer);
6426
6523
  return writer.getResultBuffer();
6427
6524
  };
6428
- proto.AssistantConverstationEndpointAction.serializeBinaryToWriter = function(message, writer) {
6525
+ proto.TextConfig.serializeBinaryToWriter = function(message, writer) {
6429
6526
  var f = void 0;
6430
- };
6431
- if (jspb.Message.GENERATE_TO_OBJECT) {
6432
- proto.AssistantConversationDeviationAction.prototype.toObject = function(opt_includeInstance) {
6433
- return proto.AssistantConversationDeviationAction.toObject(opt_includeInstance, this);
6434
- };
6435
- proto.AssistantConversationDeviationAction.toObject = function(includeInstance, msg) {
6436
- var f, obj = {};
6437
- if (includeInstance) {
6438
- obj.$jspbMessageInstance = msg;
6439
- }
6440
- return obj;
6441
- };
6442
- }
6443
- proto.AssistantConversationDeviationAction.deserializeBinary = function(bytes) {
6444
- var reader = new jspb.BinaryReader(bytes);
6445
- var msg = new proto.AssistantConversationDeviationAction();
6446
- return proto.AssistantConversationDeviationAction.deserializeBinaryFromReader(msg, reader);
6447
- };
6448
- proto.AssistantConversationDeviationAction.deserializeBinaryFromReader = function(msg, reader) {
6449
- while (reader.nextField()) {
6450
- if (reader.isEndGroup()) {
6451
- break;
6452
- }
6453
- var field = reader.getFieldNumber();
6454
- switch (field) {
6455
- default:
6456
- reader.skipField();
6457
- break;
6458
- }
6527
+ f = message.getCharset();
6528
+ if (f.length > 0) {
6529
+ writer.writeString(
6530
+ 1,
6531
+ f
6532
+ );
6459
6533
  }
6460
- return msg;
6461
6534
  };
6462
- proto.AssistantConversationDeviationAction.prototype.serializeBinary = function() {
6463
- var writer = new jspb.BinaryWriter();
6464
- proto.AssistantConversationDeviationAction.serializeBinaryToWriter(this, writer);
6465
- return writer.getResultBuffer();
6535
+ proto.TextConfig.prototype.getCharset = function() {
6536
+ return (
6537
+ /** @type {string} */
6538
+ jspb.Message.getFieldWithDefault(this, 1, "")
6539
+ );
6466
6540
  };
6467
- proto.AssistantConversationDeviationAction.serializeBinaryToWriter = function(message, writer) {
6468
- var f = void 0;
6541
+ proto.TextConfig.prototype.setCharset = function(value) {
6542
+ return jspb.Message.setProto3StringField(this, 1, value);
6469
6543
  };
6470
6544
  if (jspb.Message.GENERATE_TO_OBJECT) {
6471
- proto.AssistantConversationAssistantTransferAction.prototype.toObject = function(opt_includeInstance) {
6472
- return proto.AssistantConversationAssistantTransferAction.toObject(opt_includeInstance, this);
6545
+ proto.AssistantConversationAction.prototype.toObject = function(opt_includeInstance) {
6546
+ return proto.AssistantConversationAction.toObject(opt_includeInstance, this);
6473
6547
  };
6474
- proto.AssistantConversationAssistantTransferAction.toObject = function(includeInstance, msg) {
6475
- var f, obj = {};
6548
+ proto.AssistantConversationAction.toObject = function(includeInstance, msg) {
6549
+ var f, obj = {
6550
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
6551
+ action: jspb.Message.getFieldWithDefault(msg, 2, 0),
6552
+ argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : []
6553
+ };
6476
6554
  if (includeInstance) {
6477
6555
  obj.$jspbMessageInstance = msg;
6478
6556
  }
6479
6557
  return obj;
6480
6558
  };
6481
6559
  }
6482
- proto.AssistantConversationAssistantTransferAction.deserializeBinary = function(bytes) {
6560
+ proto.AssistantConversationAction.deserializeBinary = function(bytes) {
6483
6561
  var reader = new jspb.BinaryReader(bytes);
6484
- var msg = new proto.AssistantConversationAssistantTransferAction();
6485
- return proto.AssistantConversationAssistantTransferAction.deserializeBinaryFromReader(msg, reader);
6562
+ var msg = new proto.AssistantConversationAction();
6563
+ return proto.AssistantConversationAction.deserializeBinaryFromReader(msg, reader);
6486
6564
  };
6487
- proto.AssistantConversationAssistantTransferAction.deserializeBinaryFromReader = function(msg, reader) {
6565
+ proto.AssistantConversationAction.deserializeBinaryFromReader = function(msg, reader) {
6488
6566
  while (reader.nextField()) {
6489
6567
  if (reader.isEndGroup()) {
6490
6568
  break;
6491
6569
  }
6492
6570
  var field = reader.getFieldNumber();
6493
6571
  switch (field) {
6572
+ case 1:
6573
+ var value = (
6574
+ /** @type {string} */
6575
+ reader.readString()
6576
+ );
6577
+ msg.setName(value);
6578
+ break;
6579
+ case 2:
6580
+ var value = (
6581
+ /** @type {!proto.AssistantConversationAction.ActionType} */
6582
+ reader.readEnum()
6583
+ );
6584
+ msg.setAction(value);
6585
+ break;
6586
+ case 3:
6587
+ var value = msg.getArgsMap();
6588
+ reader.readMessage(value, function(message, reader2) {
6589
+ jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any());
6590
+ });
6591
+ break;
6494
6592
  default:
6495
6593
  reader.skipField();
6496
6594
  break;
@@ -6498,52 +6596,72 @@ var require_common_pb = __commonJS({
6498
6596
  }
6499
6597
  return msg;
6500
6598
  };
6501
- proto.AssistantConversationAssistantTransferAction.prototype.serializeBinary = function() {
6599
+ proto.AssistantConversationAction.prototype.serializeBinary = function() {
6502
6600
  var writer = new jspb.BinaryWriter();
6503
- proto.AssistantConversationAssistantTransferAction.serializeBinaryToWriter(this, writer);
6601
+ proto.AssistantConversationAction.serializeBinaryToWriter(this, writer);
6504
6602
  return writer.getResultBuffer();
6505
6603
  };
6506
- proto.AssistantConversationAssistantTransferAction.serializeBinaryToWriter = function(message, writer) {
6604
+ proto.AssistantConversationAction.serializeBinaryToWriter = function(message, writer) {
6507
6605
  var f = void 0;
6606
+ f = message.getName();
6607
+ if (f.length > 0) {
6608
+ writer.writeString(
6609
+ 1,
6610
+ f
6611
+ );
6612
+ }
6613
+ f = message.getAction();
6614
+ if (f !== 0) {
6615
+ writer.writeEnum(
6616
+ 2,
6617
+ f
6618
+ );
6619
+ }
6620
+ f = message.getArgsMap(true);
6621
+ if (f && f.getLength() > 0) {
6622
+ f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter);
6623
+ }
6508
6624
  };
6509
- if (jspb.Message.GENERATE_TO_OBJECT) {
6510
- proto.AssistantConversationPhoneCallTransferAction.prototype.toObject = function(opt_includeInstance) {
6511
- return proto.AssistantConversationPhoneCallTransferAction.toObject(opt_includeInstance, this);
6512
- };
6513
- proto.AssistantConversationPhoneCallTransferAction.toObject = function(includeInstance, msg) {
6514
- var f, obj = {};
6515
- if (includeInstance) {
6516
- obj.$jspbMessageInstance = msg;
6517
- }
6518
- return obj;
6519
- };
6520
- }
6521
- proto.AssistantConversationPhoneCallTransferAction.deserializeBinary = function(bytes) {
6522
- var reader = new jspb.BinaryReader(bytes);
6523
- var msg = new proto.AssistantConversationPhoneCallTransferAction();
6524
- return proto.AssistantConversationPhoneCallTransferAction.deserializeBinaryFromReader(msg, reader);
6625
+ proto.AssistantConversationAction.ActionType = {
6626
+ ACTION_UNSPECIFIED: 0,
6627
+ KNOWLEDGE_RETRIEVAL: 1,
6628
+ API_REQUEST: 2,
6629
+ ENDPOINT_CALL: 3,
6630
+ PUT_ON_HOLD: 4,
6631
+ END_CONVERSATION: 5
6525
6632
  };
6526
- proto.AssistantConversationPhoneCallTransferAction.deserializeBinaryFromReader = function(msg, reader) {
6527
- while (reader.nextField()) {
6528
- if (reader.isEndGroup()) {
6529
- break;
6530
- }
6531
- var field = reader.getFieldNumber();
6532
- switch (field) {
6533
- default:
6534
- reader.skipField();
6535
- break;
6536
- }
6537
- }
6538
- return msg;
6633
+ proto.AssistantConversationAction.prototype.getName = function() {
6634
+ return (
6635
+ /** @type {string} */
6636
+ jspb.Message.getFieldWithDefault(this, 1, "")
6637
+ );
6539
6638
  };
6540
- proto.AssistantConversationPhoneCallTransferAction.prototype.serializeBinary = function() {
6541
- var writer = new jspb.BinaryWriter();
6542
- proto.AssistantConversationPhoneCallTransferAction.serializeBinaryToWriter(this, writer);
6543
- return writer.getResultBuffer();
6639
+ proto.AssistantConversationAction.prototype.setName = function(value) {
6640
+ return jspb.Message.setProto3StringField(this, 1, value);
6544
6641
  };
6545
- proto.AssistantConversationPhoneCallTransferAction.serializeBinaryToWriter = function(message, writer) {
6546
- var f = void 0;
6642
+ proto.AssistantConversationAction.prototype.getAction = function() {
6643
+ return (
6644
+ /** @type {!proto.AssistantConversationAction.ActionType} */
6645
+ jspb.Message.getFieldWithDefault(this, 2, 0)
6646
+ );
6647
+ };
6648
+ proto.AssistantConversationAction.prototype.setAction = function(value) {
6649
+ return jspb.Message.setProto3EnumField(this, 2, value);
6650
+ };
6651
+ proto.AssistantConversationAction.prototype.getArgsMap = function(opt_noLazyCreate) {
6652
+ return (
6653
+ /** @type {!jspb.Map<string,!proto.google.protobuf.Any>} */
6654
+ jspb.Message.getMapField(
6655
+ this,
6656
+ 3,
6657
+ opt_noLazyCreate,
6658
+ proto.google.protobuf.Any
6659
+ )
6660
+ );
6661
+ };
6662
+ proto.AssistantConversationAction.prototype.clearArgsMap = function() {
6663
+ this.getArgsMap().clear();
6664
+ return this;
6547
6665
  };
6548
6666
  if (jspb.Message.GENERATE_TO_OBJECT) {
6549
6667
  proto.AssistantConversationInterruption.prototype.toObject = function(opt_includeInstance) {
@@ -7401,7 +7519,7 @@ var require_talk_api_pb = __commonJS({
7401
7519
  proto.talk_api.AssistantMessagingRequest.prototype.hasMessage = function() {
7402
7520
  return jspb.Message.getField(this, 3) != null;
7403
7521
  };
7404
- proto.talk_api.AssistantMessagingResponse.oneofGroups_ = [[9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]];
7522
+ proto.talk_api.AssistantMessagingResponse.oneofGroups_ = [[9, 10, 11, 12, 13, 14, 15]];
7405
7523
  proto.talk_api.AssistantMessagingResponse.DataCase = {
7406
7524
  DATA_NOT_SET: 0,
7407
7525
  CONFIGURATION: 9,
@@ -7409,14 +7527,8 @@ var require_talk_api_pb = __commonJS({
7409
7527
  USER: 11,
7410
7528
  ASSISTANT: 12,
7411
7529
  MESSAGE: 13,
7412
- DISCONNECTACTION: 14,
7413
- HOLDACTION: 15,
7414
- KNOWLEDGERETRIEVALACTION: 16,
7415
- APIREQUESTACTION: 17,
7416
- ENDPOINTACTION: 18,
7417
- DEVIATIONACTION: 19,
7418
- ASSISTANTTRANSFERACTION: 20,
7419
- PHONECALLTRANSFERACTION: 21
7530
+ ACTION: 14,
7531
+ ERROR: 15
7420
7532
  };
7421
7533
  proto.talk_api.AssistantMessagingResponse.prototype.getDataCase = function() {
7422
7534
  return (
@@ -7432,20 +7544,13 @@ var require_talk_api_pb = __commonJS({
7432
7544
  var f, obj = {
7433
7545
  code: jspb.Message.getFieldWithDefault(msg, 1, 0),
7434
7546
  success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
7435
- error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f),
7436
7547
  configuration: (f = msg.getConfiguration()) && common_pb.AssistantConversationConfiguration.toObject(includeInstance, f),
7437
7548
  interruption: (f = msg.getInterruption()) && common_pb.AssistantConversationInterruption.toObject(includeInstance, f),
7438
7549
  user: (f = msg.getUser()) && common_pb.AssistantConversationUserMessage.toObject(includeInstance, f),
7439
7550
  assistant: (f = msg.getAssistant()) && common_pb.AssistantConversationAssistantMessage.toObject(includeInstance, f),
7440
7551
  message: (f = msg.getMessage()) && common_pb.AssistantConversationMessage.toObject(includeInstance, f),
7441
- disconnectaction: (f = msg.getDisconnectaction()) && common_pb.AssistantConversationDisconnectAction.toObject(includeInstance, f),
7442
- holdaction: (f = msg.getHoldaction()) && common_pb.AssistantConverstationHoldAction.toObject(includeInstance, f),
7443
- knowledgeretrievalaction: (f = msg.getKnowledgeretrievalaction()) && common_pb.AssistantConverstationKnowledgeRetrievalAction.toObject(includeInstance, f),
7444
- apirequestaction: (f = msg.getApirequestaction()) && common_pb.AssistantConverstationApiRequestAction.toObject(includeInstance, f),
7445
- endpointaction: (f = msg.getEndpointaction()) && common_pb.AssistantConverstationEndpointAction.toObject(includeInstance, f),
7446
- deviationaction: (f = msg.getDeviationaction()) && common_pb.AssistantConversationDeviationAction.toObject(includeInstance, f),
7447
- assistanttransferaction: (f = msg.getAssistanttransferaction()) && common_pb.AssistantConversationAssistantTransferAction.toObject(includeInstance, f),
7448
- phonecalltransferaction: (f = msg.getPhonecalltransferaction()) && common_pb.AssistantConversationPhoneCallTransferAction.toObject(includeInstance, f)
7552
+ action: (f = msg.getAction()) && common_pb.AssistantConversationAction.toObject(includeInstance, f),
7553
+ error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f)
7449
7554
  };
7450
7555
  if (includeInstance) {
7451
7556
  obj.$jspbMessageInstance = msg;
@@ -7479,11 +7584,6 @@ var require_talk_api_pb = __commonJS({
7479
7584
  );
7480
7585
  msg.setSuccess(value);
7481
7586
  break;
7482
- case 4:
7483
- var value = new common_pb.Error();
7484
- reader.readMessage(value, common_pb.Error.deserializeBinaryFromReader);
7485
- msg.setError(value);
7486
- break;
7487
7587
  case 9:
7488
7588
  var value = new common_pb.AssistantConversationConfiguration();
7489
7589
  reader.readMessage(value, common_pb.AssistantConversationConfiguration.deserializeBinaryFromReader);
@@ -7510,44 +7610,14 @@ var require_talk_api_pb = __commonJS({
7510
7610
  msg.setMessage(value);
7511
7611
  break;
7512
7612
  case 14:
7513
- var value = new common_pb.AssistantConversationDisconnectAction();
7514
- reader.readMessage(value, common_pb.AssistantConversationDisconnectAction.deserializeBinaryFromReader);
7515
- msg.setDisconnectaction(value);
7613
+ var value = new common_pb.AssistantConversationAction();
7614
+ reader.readMessage(value, common_pb.AssistantConversationAction.deserializeBinaryFromReader);
7615
+ msg.setAction(value);
7516
7616
  break;
7517
7617
  case 15:
7518
- var value = new common_pb.AssistantConverstationHoldAction();
7519
- reader.readMessage(value, common_pb.AssistantConverstationHoldAction.deserializeBinaryFromReader);
7520
- msg.setHoldaction(value);
7521
- break;
7522
- case 16:
7523
- var value = new common_pb.AssistantConverstationKnowledgeRetrievalAction();
7524
- reader.readMessage(value, common_pb.AssistantConverstationKnowledgeRetrievalAction.deserializeBinaryFromReader);
7525
- msg.setKnowledgeretrievalaction(value);
7526
- break;
7527
- case 17:
7528
- var value = new common_pb.AssistantConverstationApiRequestAction();
7529
- reader.readMessage(value, common_pb.AssistantConverstationApiRequestAction.deserializeBinaryFromReader);
7530
- msg.setApirequestaction(value);
7531
- break;
7532
- case 18:
7533
- var value = new common_pb.AssistantConverstationEndpointAction();
7534
- reader.readMessage(value, common_pb.AssistantConverstationEndpointAction.deserializeBinaryFromReader);
7535
- msg.setEndpointaction(value);
7536
- break;
7537
- case 19:
7538
- var value = new common_pb.AssistantConversationDeviationAction();
7539
- reader.readMessage(value, common_pb.AssistantConversationDeviationAction.deserializeBinaryFromReader);
7540
- msg.setDeviationaction(value);
7541
- break;
7542
- case 20:
7543
- var value = new common_pb.AssistantConversationAssistantTransferAction();
7544
- reader.readMessage(value, common_pb.AssistantConversationAssistantTransferAction.deserializeBinaryFromReader);
7545
- msg.setAssistanttransferaction(value);
7546
- break;
7547
- case 21:
7548
- var value = new common_pb.AssistantConversationPhoneCallTransferAction();
7549
- reader.readMessage(value, common_pb.AssistantConversationPhoneCallTransferAction.deserializeBinaryFromReader);
7550
- msg.setPhonecalltransferaction(value);
7618
+ var value = new common_pb.Error();
7619
+ reader.readMessage(value, common_pb.Error.deserializeBinaryFromReader);
7620
+ msg.setError(value);
7551
7621
  break;
7552
7622
  default:
7553
7623
  reader.skipField();
@@ -7577,14 +7647,6 @@ var require_talk_api_pb = __commonJS({
7577
7647
  f
7578
7648
  );
7579
7649
  }
7580
- f = message.getError();
7581
- if (f != null) {
7582
- writer.writeMessage(
7583
- 4,
7584
- f,
7585
- common_pb.Error.serializeBinaryToWriter
7586
- );
7587
- }
7588
7650
  f = message.getConfiguration();
7589
7651
  if (f != null) {
7590
7652
  writer.writeMessage(
@@ -7625,68 +7687,20 @@ var require_talk_api_pb = __commonJS({
7625
7687
  common_pb.AssistantConversationMessage.serializeBinaryToWriter
7626
7688
  );
7627
7689
  }
7628
- f = message.getDisconnectaction();
7690
+ f = message.getAction();
7629
7691
  if (f != null) {
7630
7692
  writer.writeMessage(
7631
7693
  14,
7632
7694
  f,
7633
- common_pb.AssistantConversationDisconnectAction.serializeBinaryToWriter
7695
+ common_pb.AssistantConversationAction.serializeBinaryToWriter
7634
7696
  );
7635
7697
  }
7636
- f = message.getHoldaction();
7698
+ f = message.getError();
7637
7699
  if (f != null) {
7638
7700
  writer.writeMessage(
7639
7701
  15,
7640
7702
  f,
7641
- common_pb.AssistantConverstationHoldAction.serializeBinaryToWriter
7642
- );
7643
- }
7644
- f = message.getKnowledgeretrievalaction();
7645
- if (f != null) {
7646
- writer.writeMessage(
7647
- 16,
7648
- f,
7649
- common_pb.AssistantConverstationKnowledgeRetrievalAction.serializeBinaryToWriter
7650
- );
7651
- }
7652
- f = message.getApirequestaction();
7653
- if (f != null) {
7654
- writer.writeMessage(
7655
- 17,
7656
- f,
7657
- common_pb.AssistantConverstationApiRequestAction.serializeBinaryToWriter
7658
- );
7659
- }
7660
- f = message.getEndpointaction();
7661
- if (f != null) {
7662
- writer.writeMessage(
7663
- 18,
7664
- f,
7665
- common_pb.AssistantConverstationEndpointAction.serializeBinaryToWriter
7666
- );
7667
- }
7668
- f = message.getDeviationaction();
7669
- if (f != null) {
7670
- writer.writeMessage(
7671
- 19,
7672
- f,
7673
- common_pb.AssistantConversationDeviationAction.serializeBinaryToWriter
7674
- );
7675
- }
7676
- f = message.getAssistanttransferaction();
7677
- if (f != null) {
7678
- writer.writeMessage(
7679
- 20,
7680
- f,
7681
- common_pb.AssistantConversationAssistantTransferAction.serializeBinaryToWriter
7682
- );
7683
- }
7684
- f = message.getPhonecalltransferaction();
7685
- if (f != null) {
7686
- writer.writeMessage(
7687
- 21,
7688
- f,
7689
- common_pb.AssistantConversationPhoneCallTransferAction.serializeBinaryToWriter
7703
+ common_pb.Error.serializeBinaryToWriter
7690
7704
  );
7691
7705
  }
7692
7706
  };
@@ -7708,21 +7722,6 @@ var require_talk_api_pb = __commonJS({
7708
7722
  proto.talk_api.AssistantMessagingResponse.prototype.setSuccess = function(value) {
7709
7723
  return jspb.Message.setProto3BooleanField(this, 2, value);
7710
7724
  };
7711
- proto.talk_api.AssistantMessagingResponse.prototype.getError = function() {
7712
- return (
7713
- /** @type{?proto.Error} */
7714
- jspb.Message.getWrapperField(this, common_pb.Error, 4)
7715
- );
7716
- };
7717
- proto.talk_api.AssistantMessagingResponse.prototype.setError = function(value) {
7718
- return jspb.Message.setWrapperField(this, 4, value);
7719
- };
7720
- proto.talk_api.AssistantMessagingResponse.prototype.clearError = function() {
7721
- return this.setError(void 0);
7722
- };
7723
- proto.talk_api.AssistantMessagingResponse.prototype.hasError = function() {
7724
- return jspb.Message.getField(this, 4) != null;
7725
- };
7726
7725
  proto.talk_api.AssistantMessagingResponse.prototype.getConfiguration = function() {
7727
7726
  return (
7728
7727
  /** @type{?proto.AssistantConversationConfiguration} */
@@ -7798,126 +7797,36 @@ var require_talk_api_pb = __commonJS({
7798
7797
  proto.talk_api.AssistantMessagingResponse.prototype.hasMessage = function() {
7799
7798
  return jspb.Message.getField(this, 13) != null;
7800
7799
  };
7801
- proto.talk_api.AssistantMessagingResponse.prototype.getDisconnectaction = function() {
7800
+ proto.talk_api.AssistantMessagingResponse.prototype.getAction = function() {
7802
7801
  return (
7803
- /** @type{?proto.AssistantConversationDisconnectAction} */
7804
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationDisconnectAction, 14)
7802
+ /** @type{?proto.AssistantConversationAction} */
7803
+ jspb.Message.getWrapperField(this, common_pb.AssistantConversationAction, 14)
7805
7804
  );
7806
7805
  };
7807
- proto.talk_api.AssistantMessagingResponse.prototype.setDisconnectaction = function(value) {
7806
+ proto.talk_api.AssistantMessagingResponse.prototype.setAction = function(value) {
7808
7807
  return jspb.Message.setOneofWrapperField(this, 14, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7809
7808
  };
7810
- proto.talk_api.AssistantMessagingResponse.prototype.clearDisconnectaction = function() {
7811
- return this.setDisconnectaction(void 0);
7809
+ proto.talk_api.AssistantMessagingResponse.prototype.clearAction = function() {
7810
+ return this.setAction(void 0);
7812
7811
  };
7813
- proto.talk_api.AssistantMessagingResponse.prototype.hasDisconnectaction = function() {
7812
+ proto.talk_api.AssistantMessagingResponse.prototype.hasAction = function() {
7814
7813
  return jspb.Message.getField(this, 14) != null;
7815
7814
  };
7816
- proto.talk_api.AssistantMessagingResponse.prototype.getHoldaction = function() {
7815
+ proto.talk_api.AssistantMessagingResponse.prototype.getError = function() {
7817
7816
  return (
7818
- /** @type{?proto.AssistantConverstationHoldAction} */
7819
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationHoldAction, 15)
7817
+ /** @type{?proto.Error} */
7818
+ jspb.Message.getWrapperField(this, common_pb.Error, 15)
7820
7819
  );
7821
7820
  };
7822
- proto.talk_api.AssistantMessagingResponse.prototype.setHoldaction = function(value) {
7821
+ proto.talk_api.AssistantMessagingResponse.prototype.setError = function(value) {
7823
7822
  return jspb.Message.setOneofWrapperField(this, 15, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7824
7823
  };
7825
- proto.talk_api.AssistantMessagingResponse.prototype.clearHoldaction = function() {
7826
- return this.setHoldaction(void 0);
7824
+ proto.talk_api.AssistantMessagingResponse.prototype.clearError = function() {
7825
+ return this.setError(void 0);
7827
7826
  };
7828
- proto.talk_api.AssistantMessagingResponse.prototype.hasHoldaction = function() {
7827
+ proto.talk_api.AssistantMessagingResponse.prototype.hasError = function() {
7829
7828
  return jspb.Message.getField(this, 15) != null;
7830
7829
  };
7831
- proto.talk_api.AssistantMessagingResponse.prototype.getKnowledgeretrievalaction = function() {
7832
- return (
7833
- /** @type{?proto.AssistantConverstationKnowledgeRetrievalAction} */
7834
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationKnowledgeRetrievalAction, 16)
7835
- );
7836
- };
7837
- proto.talk_api.AssistantMessagingResponse.prototype.setKnowledgeretrievalaction = function(value) {
7838
- return jspb.Message.setOneofWrapperField(this, 16, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7839
- };
7840
- proto.talk_api.AssistantMessagingResponse.prototype.clearKnowledgeretrievalaction = function() {
7841
- return this.setKnowledgeretrievalaction(void 0);
7842
- };
7843
- proto.talk_api.AssistantMessagingResponse.prototype.hasKnowledgeretrievalaction = function() {
7844
- return jspb.Message.getField(this, 16) != null;
7845
- };
7846
- proto.talk_api.AssistantMessagingResponse.prototype.getApirequestaction = function() {
7847
- return (
7848
- /** @type{?proto.AssistantConverstationApiRequestAction} */
7849
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationApiRequestAction, 17)
7850
- );
7851
- };
7852
- proto.talk_api.AssistantMessagingResponse.prototype.setApirequestaction = function(value) {
7853
- return jspb.Message.setOneofWrapperField(this, 17, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7854
- };
7855
- proto.talk_api.AssistantMessagingResponse.prototype.clearApirequestaction = function() {
7856
- return this.setApirequestaction(void 0);
7857
- };
7858
- proto.talk_api.AssistantMessagingResponse.prototype.hasApirequestaction = function() {
7859
- return jspb.Message.getField(this, 17) != null;
7860
- };
7861
- proto.talk_api.AssistantMessagingResponse.prototype.getEndpointaction = function() {
7862
- return (
7863
- /** @type{?proto.AssistantConverstationEndpointAction} */
7864
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationEndpointAction, 18)
7865
- );
7866
- };
7867
- proto.talk_api.AssistantMessagingResponse.prototype.setEndpointaction = function(value) {
7868
- return jspb.Message.setOneofWrapperField(this, 18, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7869
- };
7870
- proto.talk_api.AssistantMessagingResponse.prototype.clearEndpointaction = function() {
7871
- return this.setEndpointaction(void 0);
7872
- };
7873
- proto.talk_api.AssistantMessagingResponse.prototype.hasEndpointaction = function() {
7874
- return jspb.Message.getField(this, 18) != null;
7875
- };
7876
- proto.talk_api.AssistantMessagingResponse.prototype.getDeviationaction = function() {
7877
- return (
7878
- /** @type{?proto.AssistantConversationDeviationAction} */
7879
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationDeviationAction, 19)
7880
- );
7881
- };
7882
- proto.talk_api.AssistantMessagingResponse.prototype.setDeviationaction = function(value) {
7883
- return jspb.Message.setOneofWrapperField(this, 19, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7884
- };
7885
- proto.talk_api.AssistantMessagingResponse.prototype.clearDeviationaction = function() {
7886
- return this.setDeviationaction(void 0);
7887
- };
7888
- proto.talk_api.AssistantMessagingResponse.prototype.hasDeviationaction = function() {
7889
- return jspb.Message.getField(this, 19) != null;
7890
- };
7891
- proto.talk_api.AssistantMessagingResponse.prototype.getAssistanttransferaction = function() {
7892
- return (
7893
- /** @type{?proto.AssistantConversationAssistantTransferAction} */
7894
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationAssistantTransferAction, 20)
7895
- );
7896
- };
7897
- proto.talk_api.AssistantMessagingResponse.prototype.setAssistanttransferaction = function(value) {
7898
- return jspb.Message.setOneofWrapperField(this, 20, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7899
- };
7900
- proto.talk_api.AssistantMessagingResponse.prototype.clearAssistanttransferaction = function() {
7901
- return this.setAssistanttransferaction(void 0);
7902
- };
7903
- proto.talk_api.AssistantMessagingResponse.prototype.hasAssistanttransferaction = function() {
7904
- return jspb.Message.getField(this, 20) != null;
7905
- };
7906
- proto.talk_api.AssistantMessagingResponse.prototype.getPhonecalltransferaction = function() {
7907
- return (
7908
- /** @type{?proto.AssistantConversationPhoneCallTransferAction} */
7909
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationPhoneCallTransferAction, 21)
7910
- );
7911
- };
7912
- proto.talk_api.AssistantMessagingResponse.prototype.setPhonecalltransferaction = function(value) {
7913
- return jspb.Message.setOneofWrapperField(this, 21, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7914
- };
7915
- proto.talk_api.AssistantMessagingResponse.prototype.clearPhonecalltransferaction = function() {
7916
- return this.setPhonecalltransferaction(void 0);
7917
- };
7918
- proto.talk_api.AssistantMessagingResponse.prototype.hasPhonecalltransferaction = function() {
7919
- return jspb.Message.getField(this, 21) != null;
7920
- };
7921
7830
  proto.talk_api.CreateMessageMetricRequest.repeatedFields_ = [4];
7922
7831
  if (jspb.Message.GENERATE_TO_OBJECT) {
7923
7832
  proto.talk_api.CreateMessageMetricRequest.prototype.toObject = function(opt_includeInstance) {
@@ -28472,7 +28381,7 @@ var Agent = class extends EventEmitter {
28472
28381
  _conversationId;
28473
28382
  // connection
28474
28383
  talkingConnection;
28475
- // Agent Configuration
28384
+ // // Agent Configuration
28476
28385
  agentConfig;
28477
28386
  // callbacks can have multiple callback
28478
28387
  agentCallbacks;
@@ -28581,6 +28490,8 @@ var Agent = class extends EventEmitter {
28581
28490
  this.agentConfig = config;
28582
28491
  const switchRequest = this._createAssistantConfigureRequest(
28583
28492
  this.agentConfig.definition,
28493
+ this.agentConfig.inputOptions.defaultInputStreamOption,
28494
+ this.agentConfig.outputOptions.defaultOutputStreamOption,
28584
28495
  this.agentConfig.arguments,
28585
28496
  this.agentConfig.metadata,
28586
28497
  this.agentConfig.options
@@ -28745,7 +28656,7 @@ var Agent = class extends EventEmitter {
28745
28656
  /**
28746
28657
  * Creates an assistant configuration request
28747
28658
  */
28748
- _createAssistantConfigureRequest(definition, args, metadatas, options) {
28659
+ _createAssistantConfigureRequest(definition, inputStreamConfig, outputStreamConfig, args, metadatas, options) {
28749
28660
  const request = new import_talk_api_pb.AssistantMessagingRequest();
28750
28661
  const assistantConfiguration = new import_common_pb6.AssistantConversationConfiguration();
28751
28662
  if (this._conversationId) {
@@ -28761,6 +28672,8 @@ var Agent = class extends EventEmitter {
28761
28672
  args?.forEach((v, k) => {
28762
28673
  assistantConfiguration.getArgsMap().set(k, v);
28763
28674
  });
28675
+ assistantConfiguration.setOutputconfig(outputStreamConfig);
28676
+ assistantConfiguration.setInputconfig(inputStreamConfig);
28764
28677
  request.setConfiguration(assistantConfiguration);
28765
28678
  return request;
28766
28679
  }
@@ -28798,6 +28711,8 @@ var Agent = class extends EventEmitter {
28798
28711
  await this.talkingConnection.write(
28799
28712
  this._createAssistantConfigureRequest(
28800
28713
  this.agentConfig.definition,
28714
+ this.agentConfig.inputOptions.defaultInputStreamOption,
28715
+ this.agentConfig.outputOptions.defaultOutputStreamOption,
28801
28716
  this.agentConfig.arguments,
28802
28717
  this.agentConfig.metadata,
28803
28718
  this.agentConfig.options
@@ -29323,18 +29238,11 @@ var VoiceAgent = class extends Agent {
29323
29238
  volume = 1;
29324
29239
  inputFrequencyData;
29325
29240
  outputFrequencyData;
29326
- /**
29327
- * input media device id
29328
- */
29329
- inputChannel = "audio" /* Audio */;
29330
- outputChannel = "audio" /* Audio */;
29331
29241
  /**
29332
29242
  * @param options
29333
29243
  */
29334
29244
  constructor(connection, agentConfig, agentCallback) {
29335
29245
  super(connection, agentConfig, agentCallback);
29336
- this.outputChannel = agentConfig.outputOptions.defaultChannel;
29337
- this.inputChannel = agentConfig.inputOptions.defaultChannel;
29338
29246
  }
29339
29247
  /**
29340
29248
  * disconnecting the agent and voice if it is connected
@@ -29427,7 +29335,7 @@ var VoiceAgent = class extends Agent {
29427
29335
  console.log("Please call connect first, agent is not connected");
29428
29336
  return;
29429
29337
  }
29430
- if (this.inputChannel == "audio" /* Audio */)
29338
+ if (this.agentConfig.inputOptions.channel == "audio" /* Audio */)
29431
29339
  this.talkingConnection?.write(
29432
29340
  this.createAssistantAudioMessage(
29433
29341
  arrayBufferToUint8(rawAudioPcmData.buffer)
@@ -29492,7 +29400,7 @@ var VoiceAgent = class extends Agent {
29492
29400
  */
29493
29401
  connect = async () => {
29494
29402
  try {
29495
- if (this.inputChannel == "audio" /* Audio */) {
29403
+ if (this.agentConfig.inputOptions.channel == "audio" /* Audio */) {
29496
29404
  await this.connectAudio();
29497
29405
  }
29498
29406
  await this.connectAgent();
@@ -29506,7 +29414,7 @@ var VoiceAgent = class extends Agent {
29506
29414
  */
29507
29415
  onSendText = async (text) => {
29508
29416
  if (!this.isConnected) await this.connect();
29509
- if (this.inputChannel == "text" /* Text */) {
29417
+ if (this.agentConfig.inputOptions.channel == "text" /* Text */) {
29510
29418
  this.talkingConnection?.write(this.createAssistantTextMessage(text));
29511
29419
  }
29512
29420
  };
@@ -29548,22 +29456,22 @@ var VoiceAgent = class extends Agent {
29548
29456
  get inputMediaDevice() {
29549
29457
  return this.agentConfig.inputOptions.recorderOption.device;
29550
29458
  }
29551
- /**
29552
- *
29553
- * @param input
29554
- * @returns
29555
- */
29556
29459
  setInputChannel = async (input) => {
29557
- if (this.inputChannel == input) {
29460
+ if (this.agentConfig.inputOptions.channel === input) {
29558
29461
  return;
29559
29462
  }
29560
- if (input == "audio" /* Audio */) {
29561
- await this.connectAudio();
29562
- } else {
29563
- await this.disconnectAudio();
29463
+ await this.disconnectAudio();
29464
+ this.agentConfig.inputOptions.channel = input;
29465
+ this.agentConfig.outputOptions.channel = input;
29466
+ if (input === "audio" /* Audio */) {
29467
+ if (this.isConnected) {
29468
+ await this.connectAudio();
29469
+ await this.switchAgent(this.agentConfig);
29470
+ } else {
29471
+ console.log("Audio initialization deferred until connect()");
29472
+ }
29564
29473
  }
29565
- this.inputChannel = input;
29566
- this.emit("onInputChannelChangeEvent" /* InputChannelChangeEvent */, this.inputChannel);
29474
+ this.emit("onInputChannelChangeEvent" /* InputChannelChangeEvent */, this.agentConfig.inputOptions.channel);
29567
29475
  };
29568
29476
  /**
29569
29477
  *
@@ -29598,6 +29506,10 @@ var VoiceAgent = class extends Agent {
29598
29506
  );
29599
29507
  }
29600
29508
  };
29509
+ /**
29510
+ * on handle user content
29511
+ * @param userContent
29512
+ */
29601
29513
  onHandleUser = (userContent) => {
29602
29514
  if (userContent) {
29603
29515
  switch (userContent.getMessageCase()) {
@@ -29628,6 +29540,10 @@ var VoiceAgent = class extends Agent {
29628
29540
  );
29629
29541
  }
29630
29542
  };
29543
+ /**
29544
+ * on handle assistant content
29545
+ * @param systemContent
29546
+ */
29631
29547
  onHandleAssistant = (systemContent) => {
29632
29548
  if (systemContent) {
29633
29549
  switch (systemContent.getMessageCase()) {
@@ -29701,7 +29617,7 @@ var VoiceAgent = class extends Agent {
29701
29617
  }
29702
29618
  };
29703
29619
  /**
29704
- *
29620
+ * streaming response from the server
29705
29621
  * @param response
29706
29622
  * @returns
29707
29623
  */
@@ -29737,16 +29653,13 @@ var VoiceAgent = class extends Agent {
29737
29653
  switch (response.getDataCase()) {
29738
29654
  case import_talk_api_pb2.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
29739
29655
  break;
29740
- case import_talk_api_pb2.AssistantMessagingResponse.DataCase.APIREQUESTACTION:
29741
- if (agentCallback && agentCallback?.onAction) {
29742
- agentCallback.onAction(response.getApirequestaction()?.toObject());
29656
+ case import_talk_api_pb2.AssistantMessagingResponse.DataCase.ACTION:
29657
+ if (response.getAction()?.getAction() === import_common_pb9.AssistantConversationAction.ActionType.END_CONVERSATION) {
29658
+ await this.disconnect();
29743
29659
  }
29744
- break;
29745
- case import_talk_api_pb2.AssistantMessagingResponse.DataCase.DISCONNECTACTION:
29746
29660
  if (agentCallback && agentCallback?.onAction) {
29747
- agentCallback.onAction(response.getDisconnectaction()?.toObject());
29661
+ agentCallback.onAction(response.getAction()?.toObject());
29748
29662
  }
29749
- await this.disconnect();
29750
29663
  break;
29751
29664
  case import_talk_api_pb2.AssistantMessagingResponse.DataCase.INTERRUPTION:
29752
29665
  if (agentCallback && agentCallback?.onInterrupt) {
@@ -29789,7 +29702,7 @@ var VoiceAgent = class extends Agent {
29789
29702
  }
29790
29703
  };
29791
29704
  /**
29792
- *
29705
+ * to get byte frequency data from input
29793
29706
  * @returns
29794
29707
  */
29795
29708
  getInputByteFrequencyData = () => {
@@ -29804,7 +29717,7 @@ var VoiceAgent = class extends Agent {
29804
29717
  return this.inputFrequencyData;
29805
29718
  };
29806
29719
  /**
29807
- *
29720
+ * output byte frequency data
29808
29721
  * @returns
29809
29722
  */
29810
29723
  getOutputByteFrequencyData = () => {
@@ -30180,4 +30093,4 @@ export {
30180
30093
  useSelectInputDeviceAgent,
30181
30094
  DeviceSelectorComponent
30182
30095
  };
30183
- //# sourceMappingURL=chunk-CKIZ6YUP.mjs.map
30096
+ //# sourceMappingURL=chunk-K6VHOUSP.mjs.map