@rapidaai/react 1.1.47 → 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.
@@ -47,28 +47,25 @@ var require_common_pb = __commonJS({
47
47
  goog.object.extend(proto, google_protobuf_struct_pb);
48
48
  goog.exportSymbol("proto.Argument", null, global);
49
49
  goog.exportSymbol("proto.AssistantConversation", null, global);
50
+ goog.exportSymbol("proto.AssistantConversationAction", null, global);
51
+ goog.exportSymbol("proto.AssistantConversationAction.ActionType", null, global);
50
52
  goog.exportSymbol("proto.AssistantConversationAssistantMessage", null, global);
51
53
  goog.exportSymbol("proto.AssistantConversationAssistantMessage.MessageCase", null, global);
52
- goog.exportSymbol("proto.AssistantConversationAssistantTransferAction", null, global);
53
54
  goog.exportSymbol("proto.AssistantConversationConfiguration", null, global);
54
55
  goog.exportSymbol("proto.AssistantConversationContext", null, global);
55
- goog.exportSymbol("proto.AssistantConversationDeviationAction", null, global);
56
- goog.exportSymbol("proto.AssistantConversationDisconnectAction", null, global);
56
+ goog.exportSymbol("proto.AssistantConversationError", null, global);
57
57
  goog.exportSymbol("proto.AssistantConversationInterruption", null, global);
58
58
  goog.exportSymbol("proto.AssistantConversationInterruption.InterruptionType", null, global);
59
59
  goog.exportSymbol("proto.AssistantConversationMessage", null, global);
60
60
  goog.exportSymbol("proto.AssistantConversationMessageAudioContent", null, global);
61
61
  goog.exportSymbol("proto.AssistantConversationMessageTextContent", null, global);
62
- goog.exportSymbol("proto.AssistantConversationPhoneCallTransferAction", null, global);
63
62
  goog.exportSymbol("proto.AssistantConversationRecording", null, global);
64
63
  goog.exportSymbol("proto.AssistantConversationTelephonyEvent", null, global);
65
64
  goog.exportSymbol("proto.AssistantConversationUserMessage", null, global);
66
65
  goog.exportSymbol("proto.AssistantConversationUserMessage.MessageCase", null, global);
67
- goog.exportSymbol("proto.AssistantConverstationApiRequestAction", null, global);
68
- goog.exportSymbol("proto.AssistantConverstationEndpointAction", null, global);
69
- goog.exportSymbol("proto.AssistantConverstationHoldAction", null, global);
70
- goog.exportSymbol("proto.AssistantConverstationKnowledgeRetrievalAction", null, global);
71
66
  goog.exportSymbol("proto.AssistantDefinition", null, global);
67
+ goog.exportSymbol("proto.AudioConfig", null, global);
68
+ goog.exportSymbol("proto.AudioConfig.AudioFormat", null, global);
72
69
  goog.exportSymbol("proto.BaseResponse", null, global);
73
70
  goog.exportSymbol("proto.Content", null, global);
74
71
  goog.exportSymbol("proto.Criteria", null, global);
@@ -88,9 +85,11 @@ var require_common_pb = __commonJS({
88
85
  goog.exportSymbol("proto.Paginate", null, global);
89
86
  goog.exportSymbol("proto.Paginated", null, global);
90
87
  goog.exportSymbol("proto.Source", null, global);
88
+ goog.exportSymbol("proto.StreamConfig", null, global);
91
89
  goog.exportSymbol("proto.Tag", null, global);
92
90
  goog.exportSymbol("proto.Telemetry", null, global);
93
91
  goog.exportSymbol("proto.TextChatCompletePrompt", null, global);
92
+ goog.exportSymbol("proto.TextConfig", null, global);
94
93
  goog.exportSymbol("proto.TextPrompt", null, global);
95
94
  goog.exportSymbol("proto.ToolCall", null, global);
96
95
  goog.exportSymbol("proto.User", null, global);
@@ -326,61 +325,40 @@ var require_common_pb = __commonJS({
326
325
  if (goog.DEBUG && !COMPILED) {
327
326
  proto.AssistantConversationConfiguration.displayName = "proto.AssistantConversationConfiguration";
328
327
  }
329
- proto.AssistantConversationDisconnectAction = function(opt_data) {
328
+ proto.AssistantConversationError = function(opt_data) {
330
329
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
331
330
  };
332
- goog.inherits(proto.AssistantConversationDisconnectAction, jspb.Message);
331
+ goog.inherits(proto.AssistantConversationError, jspb.Message);
333
332
  if (goog.DEBUG && !COMPILED) {
334
- proto.AssistantConversationDisconnectAction.displayName = "proto.AssistantConversationDisconnectAction";
333
+ proto.AssistantConversationError.displayName = "proto.AssistantConversationError";
335
334
  }
336
- proto.AssistantConverstationHoldAction = function(opt_data) {
335
+ proto.StreamConfig = function(opt_data) {
337
336
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
338
337
  };
339
- goog.inherits(proto.AssistantConverstationHoldAction, jspb.Message);
338
+ goog.inherits(proto.StreamConfig, jspb.Message);
340
339
  if (goog.DEBUG && !COMPILED) {
341
- proto.AssistantConverstationHoldAction.displayName = "proto.AssistantConverstationHoldAction";
340
+ proto.StreamConfig.displayName = "proto.StreamConfig";
342
341
  }
343
- proto.AssistantConverstationKnowledgeRetrievalAction = function(opt_data) {
342
+ proto.AudioConfig = function(opt_data) {
344
343
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
345
344
  };
346
- goog.inherits(proto.AssistantConverstationKnowledgeRetrievalAction, jspb.Message);
345
+ goog.inherits(proto.AudioConfig, jspb.Message);
347
346
  if (goog.DEBUG && !COMPILED) {
348
- proto.AssistantConverstationKnowledgeRetrievalAction.displayName = "proto.AssistantConverstationKnowledgeRetrievalAction";
347
+ proto.AudioConfig.displayName = "proto.AudioConfig";
349
348
  }
350
- proto.AssistantConverstationApiRequestAction = function(opt_data) {
349
+ proto.TextConfig = function(opt_data) {
351
350
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
352
351
  };
353
- goog.inherits(proto.AssistantConverstationApiRequestAction, jspb.Message);
352
+ goog.inherits(proto.TextConfig, jspb.Message);
354
353
  if (goog.DEBUG && !COMPILED) {
355
- proto.AssistantConverstationApiRequestAction.displayName = "proto.AssistantConverstationApiRequestAction";
354
+ proto.TextConfig.displayName = "proto.TextConfig";
356
355
  }
357
- proto.AssistantConverstationEndpointAction = function(opt_data) {
356
+ proto.AssistantConversationAction = function(opt_data) {
358
357
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
359
358
  };
360
- goog.inherits(proto.AssistantConverstationEndpointAction, jspb.Message);
359
+ goog.inherits(proto.AssistantConversationAction, jspb.Message);
361
360
  if (goog.DEBUG && !COMPILED) {
362
- proto.AssistantConverstationEndpointAction.displayName = "proto.AssistantConverstationEndpointAction";
363
- }
364
- proto.AssistantConversationDeviationAction = function(opt_data) {
365
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
366
- };
367
- goog.inherits(proto.AssistantConversationDeviationAction, jspb.Message);
368
- if (goog.DEBUG && !COMPILED) {
369
- proto.AssistantConversationDeviationAction.displayName = "proto.AssistantConversationDeviationAction";
370
- }
371
- proto.AssistantConversationAssistantTransferAction = function(opt_data) {
372
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
373
- };
374
- goog.inherits(proto.AssistantConversationAssistantTransferAction, jspb.Message);
375
- if (goog.DEBUG && !COMPILED) {
376
- proto.AssistantConversationAssistantTransferAction.displayName = "proto.AssistantConversationAssistantTransferAction";
377
- }
378
- proto.AssistantConversationPhoneCallTransferAction = function(opt_data) {
379
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
380
- };
381
- goog.inherits(proto.AssistantConversationPhoneCallTransferAction, jspb.Message);
382
- if (goog.DEBUG && !COMPILED) {
383
- proto.AssistantConversationPhoneCallTransferAction.displayName = "proto.AssistantConversationPhoneCallTransferAction";
361
+ proto.AssistantConversationAction.displayName = "proto.AssistantConversationAction";
384
362
  }
385
363
  proto.AssistantConversationInterruption = function(opt_data) {
386
364
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
@@ -5994,7 +5972,9 @@ var require_common_pb = __commonJS({
5994
5972
  time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
5995
5973
  metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
5996
5974
  argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
5997
- optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : []
5975
+ optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
5976
+ inputconfig: (f = msg.getInputconfig()) && proto.StreamConfig.toObject(includeInstance, f),
5977
+ outputconfig: (f = msg.getOutputconfig()) && proto.StreamConfig.toObject(includeInstance, f)
5998
5978
  };
5999
5979
  if (includeInstance) {
6000
5980
  obj.$jspbMessageInstance = msg;
@@ -6049,6 +6029,16 @@ var require_common_pb = __commonJS({
6049
6029
  jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any());
6050
6030
  });
6051
6031
  break;
6032
+ case 7:
6033
+ var value = new proto.StreamConfig();
6034
+ reader.readMessage(value, proto.StreamConfig.deserializeBinaryFromReader);
6035
+ msg.setInputconfig(value);
6036
+ break;
6037
+ case 8:
6038
+ var value = new proto.StreamConfig();
6039
+ reader.readMessage(value, proto.StreamConfig.deserializeBinaryFromReader);
6040
+ msg.setOutputconfig(value);
6041
+ break;
6052
6042
  default:
6053
6043
  reader.skipField();
6054
6044
  break;
@@ -6098,6 +6088,22 @@ var require_common_pb = __commonJS({
6098
6088
  if (f && f.getLength() > 0) {
6099
6089
  f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter);
6100
6090
  }
6091
+ f = message.getInputconfig();
6092
+ if (f != null) {
6093
+ writer.writeMessage(
6094
+ 7,
6095
+ f,
6096
+ proto.StreamConfig.serializeBinaryToWriter
6097
+ );
6098
+ }
6099
+ f = message.getOutputconfig();
6100
+ if (f != null) {
6101
+ writer.writeMessage(
6102
+ 8,
6103
+ f,
6104
+ proto.StreamConfig.serializeBinaryToWriter
6105
+ );
6106
+ }
6101
6107
  };
6102
6108
  proto.AssistantConversationConfiguration.prototype.getAssistantconversationid = function() {
6103
6109
  return (
@@ -6183,13 +6189,43 @@ var require_common_pb = __commonJS({
6183
6189
  this.getOptionsMap().clear();
6184
6190
  return this;
6185
6191
  };
6192
+ proto.AssistantConversationConfiguration.prototype.getInputconfig = function() {
6193
+ return (
6194
+ /** @type{?proto.StreamConfig} */
6195
+ jspb.Message.getWrapperField(this, proto.StreamConfig, 7)
6196
+ );
6197
+ };
6198
+ proto.AssistantConversationConfiguration.prototype.setInputconfig = function(value) {
6199
+ return jspb.Message.setWrapperField(this, 7, value);
6200
+ };
6201
+ proto.AssistantConversationConfiguration.prototype.clearInputconfig = function() {
6202
+ return this.setInputconfig(void 0);
6203
+ };
6204
+ proto.AssistantConversationConfiguration.prototype.hasInputconfig = function() {
6205
+ return jspb.Message.getField(this, 7) != null;
6206
+ };
6207
+ proto.AssistantConversationConfiguration.prototype.getOutputconfig = function() {
6208
+ return (
6209
+ /** @type{?proto.StreamConfig} */
6210
+ jspb.Message.getWrapperField(this, proto.StreamConfig, 8)
6211
+ );
6212
+ };
6213
+ proto.AssistantConversationConfiguration.prototype.setOutputconfig = function(value) {
6214
+ return jspb.Message.setWrapperField(this, 8, value);
6215
+ };
6216
+ proto.AssistantConversationConfiguration.prototype.clearOutputconfig = function() {
6217
+ return this.setOutputconfig(void 0);
6218
+ };
6219
+ proto.AssistantConversationConfiguration.prototype.hasOutputconfig = function() {
6220
+ return jspb.Message.getField(this, 8) != null;
6221
+ };
6186
6222
  if (jspb.Message.GENERATE_TO_OBJECT) {
6187
- proto.AssistantConversationDisconnectAction.prototype.toObject = function(opt_includeInstance) {
6188
- return proto.AssistantConversationDisconnectAction.toObject(opt_includeInstance, this);
6223
+ proto.AssistantConversationError.prototype.toObject = function(opt_includeInstance) {
6224
+ return proto.AssistantConversationError.toObject(opt_includeInstance, this);
6189
6225
  };
6190
- proto.AssistantConversationDisconnectAction.toObject = function(includeInstance, msg) {
6226
+ proto.AssistantConversationError.toObject = function(includeInstance, msg) {
6191
6227
  var f, obj = {
6192
- reason: jspb.Message.getFieldWithDefault(msg, 1, "")
6228
+ error: (f = msg.getError()) && proto.Error.toObject(includeInstance, f)
6193
6229
  };
6194
6230
  if (includeInstance) {
6195
6231
  obj.$jspbMessageInstance = msg;
@@ -6197,12 +6233,12 @@ var require_common_pb = __commonJS({
6197
6233
  return obj;
6198
6234
  };
6199
6235
  }
6200
- proto.AssistantConversationDisconnectAction.deserializeBinary = function(bytes) {
6236
+ proto.AssistantConversationError.deserializeBinary = function(bytes) {
6201
6237
  var reader = new jspb.BinaryReader(bytes);
6202
- var msg = new proto.AssistantConversationDisconnectAction();
6203
- return proto.AssistantConversationDisconnectAction.deserializeBinaryFromReader(msg, reader);
6238
+ var msg = new proto.AssistantConversationError();
6239
+ return proto.AssistantConversationError.deserializeBinaryFromReader(msg, reader);
6204
6240
  };
6205
- proto.AssistantConversationDisconnectAction.deserializeBinaryFromReader = function(msg, reader) {
6241
+ proto.AssistantConversationError.deserializeBinaryFromReader = function(msg, reader) {
6206
6242
  while (reader.nextField()) {
6207
6243
  if (reader.isEndGroup()) {
6208
6244
  break;
@@ -6210,11 +6246,9 @@ var require_common_pb = __commonJS({
6210
6246
  var field = reader.getFieldNumber();
6211
6247
  switch (field) {
6212
6248
  case 1:
6213
- var value = (
6214
- /** @type {string} */
6215
- reader.readString()
6216
- );
6217
- msg.setReason(value);
6249
+ var value = new proto.Error();
6250
+ reader.readMessage(value, proto.Error.deserializeBinaryFromReader);
6251
+ msg.setError(value);
6218
6252
  break;
6219
6253
  default:
6220
6254
  reader.skipField();
@@ -6223,37 +6257,45 @@ var require_common_pb = __commonJS({
6223
6257
  }
6224
6258
  return msg;
6225
6259
  };
6226
- proto.AssistantConversationDisconnectAction.prototype.serializeBinary = function() {
6260
+ proto.AssistantConversationError.prototype.serializeBinary = function() {
6227
6261
  var writer = new jspb.BinaryWriter();
6228
- proto.AssistantConversationDisconnectAction.serializeBinaryToWriter(this, writer);
6262
+ proto.AssistantConversationError.serializeBinaryToWriter(this, writer);
6229
6263
  return writer.getResultBuffer();
6230
6264
  };
6231
- proto.AssistantConversationDisconnectAction.serializeBinaryToWriter = function(message, writer) {
6265
+ proto.AssistantConversationError.serializeBinaryToWriter = function(message, writer) {
6232
6266
  var f = void 0;
6233
- f = message.getReason();
6234
- if (f.length > 0) {
6235
- writer.writeString(
6267
+ f = message.getError();
6268
+ if (f != null) {
6269
+ writer.writeMessage(
6236
6270
  1,
6237
- f
6271
+ f,
6272
+ proto.Error.serializeBinaryToWriter
6238
6273
  );
6239
6274
  }
6240
6275
  };
6241
- proto.AssistantConversationDisconnectAction.prototype.getReason = function() {
6276
+ proto.AssistantConversationError.prototype.getError = function() {
6242
6277
  return (
6243
- /** @type {string} */
6244
- jspb.Message.getFieldWithDefault(this, 1, "")
6278
+ /** @type{?proto.Error} */
6279
+ jspb.Message.getWrapperField(this, proto.Error, 1)
6245
6280
  );
6246
6281
  };
6247
- proto.AssistantConversationDisconnectAction.prototype.setReason = function(value) {
6248
- return jspb.Message.setProto3StringField(this, 1, value);
6282
+ proto.AssistantConversationError.prototype.setError = function(value) {
6283
+ return jspb.Message.setWrapperField(this, 1, value);
6284
+ };
6285
+ proto.AssistantConversationError.prototype.clearError = function() {
6286
+ return this.setError(void 0);
6287
+ };
6288
+ proto.AssistantConversationError.prototype.hasError = function() {
6289
+ return jspb.Message.getField(this, 1) != null;
6249
6290
  };
6250
6291
  if (jspb.Message.GENERATE_TO_OBJECT) {
6251
- proto.AssistantConverstationHoldAction.prototype.toObject = function(opt_includeInstance) {
6252
- return proto.AssistantConverstationHoldAction.toObject(opt_includeInstance, this);
6292
+ proto.StreamConfig.prototype.toObject = function(opt_includeInstance) {
6293
+ return proto.StreamConfig.toObject(opt_includeInstance, this);
6253
6294
  };
6254
- proto.AssistantConverstationHoldAction.toObject = function(includeInstance, msg) {
6295
+ proto.StreamConfig.toObject = function(includeInstance, msg) {
6255
6296
  var f, obj = {
6256
- holdtime: jspb.Message.getFieldWithDefault(msg, 1, 0)
6297
+ audio: (f = msg.getAudio()) && proto.AudioConfig.toObject(includeInstance, f),
6298
+ text: (f = msg.getText()) && proto.TextConfig.toObject(includeInstance, f)
6257
6299
  };
6258
6300
  if (includeInstance) {
6259
6301
  obj.$jspbMessageInstance = msg;
@@ -6261,12 +6303,12 @@ var require_common_pb = __commonJS({
6261
6303
  return obj;
6262
6304
  };
6263
6305
  }
6264
- proto.AssistantConverstationHoldAction.deserializeBinary = function(bytes) {
6306
+ proto.StreamConfig.deserializeBinary = function(bytes) {
6265
6307
  var reader = new jspb.BinaryReader(bytes);
6266
- var msg = new proto.AssistantConverstationHoldAction();
6267
- return proto.AssistantConverstationHoldAction.deserializeBinaryFromReader(msg, reader);
6308
+ var msg = new proto.StreamConfig();
6309
+ return proto.StreamConfig.deserializeBinaryFromReader(msg, reader);
6268
6310
  };
6269
- proto.AssistantConverstationHoldAction.deserializeBinaryFromReader = function(msg, reader) {
6311
+ proto.StreamConfig.deserializeBinaryFromReader = function(msg, reader) {
6270
6312
  while (reader.nextField()) {
6271
6313
  if (reader.isEndGroup()) {
6272
6314
  break;
@@ -6274,11 +6316,14 @@ var require_common_pb = __commonJS({
6274
6316
  var field = reader.getFieldNumber();
6275
6317
  switch (field) {
6276
6318
  case 1:
6277
- var value = (
6278
- /** @type {number} */
6279
- reader.readUint64()
6280
- );
6281
- msg.setHoldtime(value);
6319
+ var value = new proto.AudioConfig();
6320
+ reader.readMessage(value, proto.AudioConfig.deserializeBinaryFromReader);
6321
+ msg.setAudio(value);
6322
+ break;
6323
+ case 2:
6324
+ var value = new proto.TextConfig();
6325
+ reader.readMessage(value, proto.TextConfig.deserializeBinaryFromReader);
6326
+ msg.setText(value);
6282
6327
  break;
6283
6328
  default:
6284
6329
  reader.skipField();
@@ -6287,37 +6332,69 @@ var require_common_pb = __commonJS({
6287
6332
  }
6288
6333
  return msg;
6289
6334
  };
6290
- proto.AssistantConverstationHoldAction.prototype.serializeBinary = function() {
6335
+ proto.StreamConfig.prototype.serializeBinary = function() {
6291
6336
  var writer = new jspb.BinaryWriter();
6292
- proto.AssistantConverstationHoldAction.serializeBinaryToWriter(this, writer);
6337
+ proto.StreamConfig.serializeBinaryToWriter(this, writer);
6293
6338
  return writer.getResultBuffer();
6294
6339
  };
6295
- proto.AssistantConverstationHoldAction.serializeBinaryToWriter = function(message, writer) {
6340
+ proto.StreamConfig.serializeBinaryToWriter = function(message, writer) {
6296
6341
  var f = void 0;
6297
- f = message.getHoldtime();
6298
- if (f !== 0) {
6299
- writer.writeUint64(
6342
+ f = message.getAudio();
6343
+ if (f != null) {
6344
+ writer.writeMessage(
6300
6345
  1,
6301
- f
6346
+ f,
6347
+ proto.AudioConfig.serializeBinaryToWriter
6348
+ );
6349
+ }
6350
+ f = message.getText();
6351
+ if (f != null) {
6352
+ writer.writeMessage(
6353
+ 2,
6354
+ f,
6355
+ proto.TextConfig.serializeBinaryToWriter
6302
6356
  );
6303
6357
  }
6304
6358
  };
6305
- proto.AssistantConverstationHoldAction.prototype.getHoldtime = function() {
6359
+ proto.StreamConfig.prototype.getAudio = function() {
6306
6360
  return (
6307
- /** @type {number} */
6308
- jspb.Message.getFieldWithDefault(this, 1, 0)
6361
+ /** @type{?proto.AudioConfig} */
6362
+ jspb.Message.getWrapperField(this, proto.AudioConfig, 1)
6309
6363
  );
6310
6364
  };
6311
- proto.AssistantConverstationHoldAction.prototype.setHoldtime = function(value) {
6312
- return jspb.Message.setProto3IntField(this, 1, value);
6365
+ proto.StreamConfig.prototype.setAudio = function(value) {
6366
+ return jspb.Message.setWrapperField(this, 1, value);
6367
+ };
6368
+ proto.StreamConfig.prototype.clearAudio = function() {
6369
+ return this.setAudio(void 0);
6370
+ };
6371
+ proto.StreamConfig.prototype.hasAudio = function() {
6372
+ return jspb.Message.getField(this, 1) != null;
6373
+ };
6374
+ proto.StreamConfig.prototype.getText = function() {
6375
+ return (
6376
+ /** @type{?proto.TextConfig} */
6377
+ jspb.Message.getWrapperField(this, proto.TextConfig, 2)
6378
+ );
6379
+ };
6380
+ proto.StreamConfig.prototype.setText = function(value) {
6381
+ return jspb.Message.setWrapperField(this, 2, value);
6382
+ };
6383
+ proto.StreamConfig.prototype.clearText = function() {
6384
+ return this.setText(void 0);
6385
+ };
6386
+ proto.StreamConfig.prototype.hasText = function() {
6387
+ return jspb.Message.getField(this, 2) != null;
6313
6388
  };
6314
6389
  if (jspb.Message.GENERATE_TO_OBJECT) {
6315
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.toObject = function(opt_includeInstance) {
6316
- return proto.AssistantConverstationKnowledgeRetrievalAction.toObject(opt_includeInstance, this);
6390
+ proto.AudioConfig.prototype.toObject = function(opt_includeInstance) {
6391
+ return proto.AudioConfig.toObject(opt_includeInstance, this);
6317
6392
  };
6318
- proto.AssistantConverstationKnowledgeRetrievalAction.toObject = function(includeInstance, msg) {
6393
+ proto.AudioConfig.toObject = function(includeInstance, msg) {
6319
6394
  var f, obj = {
6320
- query: jspb.Message.getFieldWithDefault(msg, 1, "")
6395
+ samplerate: jspb.Message.getFieldWithDefault(msg, 1, 0),
6396
+ audioformat: jspb.Message.getFieldWithDefault(msg, 2, 0),
6397
+ channels: jspb.Message.getFieldWithDefault(msg, 3, 0)
6321
6398
  };
6322
6399
  if (includeInstance) {
6323
6400
  obj.$jspbMessageInstance = msg;
@@ -6325,12 +6402,12 @@ var require_common_pb = __commonJS({
6325
6402
  return obj;
6326
6403
  };
6327
6404
  }
6328
- proto.AssistantConverstationKnowledgeRetrievalAction.deserializeBinary = function(bytes) {
6405
+ proto.AudioConfig.deserializeBinary = function(bytes) {
6329
6406
  var reader = new jspb.BinaryReader(bytes);
6330
- var msg = new proto.AssistantConverstationKnowledgeRetrievalAction();
6331
- return proto.AssistantConverstationKnowledgeRetrievalAction.deserializeBinaryFromReader(msg, reader);
6407
+ var msg = new proto.AudioConfig();
6408
+ return proto.AudioConfig.deserializeBinaryFromReader(msg, reader);
6332
6409
  };
6333
- proto.AssistantConverstationKnowledgeRetrievalAction.deserializeBinaryFromReader = function(msg, reader) {
6410
+ proto.AudioConfig.deserializeBinaryFromReader = function(msg, reader) {
6334
6411
  while (reader.nextField()) {
6335
6412
  if (reader.isEndGroup()) {
6336
6413
  break;
@@ -6339,10 +6416,24 @@ var require_common_pb = __commonJS({
6339
6416
  switch (field) {
6340
6417
  case 1:
6341
6418
  var value = (
6342
- /** @type {string} */
6343
- reader.readString()
6419
+ /** @type {number} */
6420
+ reader.readUint32()
6344
6421
  );
6345
- msg.setQuery(value);
6422
+ msg.setSamplerate(value);
6423
+ break;
6424
+ case 2:
6425
+ var value = (
6426
+ /** @type {!proto.AudioConfig.AudioFormat} */
6427
+ reader.readEnum()
6428
+ );
6429
+ msg.setAudioformat(value);
6430
+ break;
6431
+ case 3:
6432
+ var value = (
6433
+ /** @type {number} */
6434
+ reader.readUint32()
6435
+ );
6436
+ msg.setChannels(value);
6346
6437
  break;
6347
6438
  default:
6348
6439
  reader.skipField();
@@ -6351,93 +6442,99 @@ var require_common_pb = __commonJS({
6351
6442
  }
6352
6443
  return msg;
6353
6444
  };
6354
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.serializeBinary = function() {
6445
+ proto.AudioConfig.prototype.serializeBinary = function() {
6355
6446
  var writer = new jspb.BinaryWriter();
6356
- proto.AssistantConverstationKnowledgeRetrievalAction.serializeBinaryToWriter(this, writer);
6447
+ proto.AudioConfig.serializeBinaryToWriter(this, writer);
6357
6448
  return writer.getResultBuffer();
6358
6449
  };
6359
- proto.AssistantConverstationKnowledgeRetrievalAction.serializeBinaryToWriter = function(message, writer) {
6450
+ proto.AudioConfig.serializeBinaryToWriter = function(message, writer) {
6360
6451
  var f = void 0;
6361
- f = message.getQuery();
6362
- if (f.length > 0) {
6363
- writer.writeString(
6452
+ f = message.getSamplerate();
6453
+ if (f !== 0) {
6454
+ writer.writeUint32(
6364
6455
  1,
6365
6456
  f
6366
6457
  );
6367
6458
  }
6459
+ f = message.getAudioformat();
6460
+ if (f !== 0) {
6461
+ writer.writeEnum(
6462
+ 2,
6463
+ f
6464
+ );
6465
+ }
6466
+ f = message.getChannels();
6467
+ if (f !== 0) {
6468
+ writer.writeUint32(
6469
+ 3,
6470
+ f
6471
+ );
6472
+ }
6473
+ };
6474
+ proto.AudioConfig.AudioFormat = {
6475
+ LINEAR16: 0,
6476
+ MULAW8: 1
6368
6477
  };
6369
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.getQuery = function() {
6478
+ proto.AudioConfig.prototype.getSamplerate = function() {
6370
6479
  return (
6371
- /** @type {string} */
6372
- jspb.Message.getFieldWithDefault(this, 1, "")
6480
+ /** @type {number} */
6481
+ jspb.Message.getFieldWithDefault(this, 1, 0)
6373
6482
  );
6374
6483
  };
6375
- proto.AssistantConverstationKnowledgeRetrievalAction.prototype.setQuery = function(value) {
6376
- return jspb.Message.setProto3StringField(this, 1, value);
6484
+ proto.AudioConfig.prototype.setSamplerate = function(value) {
6485
+ return jspb.Message.setProto3IntField(this, 1, value);
6377
6486
  };
6378
- if (jspb.Message.GENERATE_TO_OBJECT) {
6379
- proto.AssistantConverstationApiRequestAction.prototype.toObject = function(opt_includeInstance) {
6380
- return proto.AssistantConverstationApiRequestAction.toObject(opt_includeInstance, this);
6381
- };
6382
- proto.AssistantConverstationApiRequestAction.toObject = function(includeInstance, msg) {
6383
- var f, obj = {};
6384
- if (includeInstance) {
6385
- obj.$jspbMessageInstance = msg;
6386
- }
6387
- return obj;
6388
- };
6389
- }
6390
- proto.AssistantConverstationApiRequestAction.deserializeBinary = function(bytes) {
6391
- var reader = new jspb.BinaryReader(bytes);
6392
- var msg = new proto.AssistantConverstationApiRequestAction();
6393
- return proto.AssistantConverstationApiRequestAction.deserializeBinaryFromReader(msg, reader);
6487
+ proto.AudioConfig.prototype.getAudioformat = function() {
6488
+ return (
6489
+ /** @type {!proto.AudioConfig.AudioFormat} */
6490
+ jspb.Message.getFieldWithDefault(this, 2, 0)
6491
+ );
6394
6492
  };
6395
- proto.AssistantConverstationApiRequestAction.deserializeBinaryFromReader = function(msg, reader) {
6396
- while (reader.nextField()) {
6397
- if (reader.isEndGroup()) {
6398
- break;
6399
- }
6400
- var field = reader.getFieldNumber();
6401
- switch (field) {
6402
- default:
6403
- reader.skipField();
6404
- break;
6405
- }
6406
- }
6407
- return msg;
6493
+ proto.AudioConfig.prototype.setAudioformat = function(value) {
6494
+ return jspb.Message.setProto3EnumField(this, 2, value);
6408
6495
  };
6409
- proto.AssistantConverstationApiRequestAction.prototype.serializeBinary = function() {
6410
- var writer = new jspb.BinaryWriter();
6411
- proto.AssistantConverstationApiRequestAction.serializeBinaryToWriter(this, writer);
6412
- return writer.getResultBuffer();
6496
+ proto.AudioConfig.prototype.getChannels = function() {
6497
+ return (
6498
+ /** @type {number} */
6499
+ jspb.Message.getFieldWithDefault(this, 3, 0)
6500
+ );
6413
6501
  };
6414
- proto.AssistantConverstationApiRequestAction.serializeBinaryToWriter = function(message, writer) {
6415
- var f = void 0;
6502
+ proto.AudioConfig.prototype.setChannels = function(value) {
6503
+ return jspb.Message.setProto3IntField(this, 3, value);
6416
6504
  };
6417
6505
  if (jspb.Message.GENERATE_TO_OBJECT) {
6418
- proto.AssistantConverstationEndpointAction.prototype.toObject = function(opt_includeInstance) {
6419
- return proto.AssistantConverstationEndpointAction.toObject(opt_includeInstance, this);
6506
+ proto.TextConfig.prototype.toObject = function(opt_includeInstance) {
6507
+ return proto.TextConfig.toObject(opt_includeInstance, this);
6420
6508
  };
6421
- proto.AssistantConverstationEndpointAction.toObject = function(includeInstance, msg) {
6422
- var f, obj = {};
6509
+ proto.TextConfig.toObject = function(includeInstance, msg) {
6510
+ var f, obj = {
6511
+ charset: jspb.Message.getFieldWithDefault(msg, 1, "")
6512
+ };
6423
6513
  if (includeInstance) {
6424
6514
  obj.$jspbMessageInstance = msg;
6425
6515
  }
6426
6516
  return obj;
6427
6517
  };
6428
6518
  }
6429
- proto.AssistantConverstationEndpointAction.deserializeBinary = function(bytes) {
6519
+ proto.TextConfig.deserializeBinary = function(bytes) {
6430
6520
  var reader = new jspb.BinaryReader(bytes);
6431
- var msg = new proto.AssistantConverstationEndpointAction();
6432
- return proto.AssistantConverstationEndpointAction.deserializeBinaryFromReader(msg, reader);
6521
+ var msg = new proto.TextConfig();
6522
+ return proto.TextConfig.deserializeBinaryFromReader(msg, reader);
6433
6523
  };
6434
- proto.AssistantConverstationEndpointAction.deserializeBinaryFromReader = function(msg, reader) {
6524
+ proto.TextConfig.deserializeBinaryFromReader = function(msg, reader) {
6435
6525
  while (reader.nextField()) {
6436
6526
  if (reader.isEndGroup()) {
6437
6527
  break;
6438
6528
  }
6439
6529
  var field = reader.getFieldNumber();
6440
6530
  switch (field) {
6531
+ case 1:
6532
+ var value = (
6533
+ /** @type {string} */
6534
+ reader.readString()
6535
+ );
6536
+ msg.setCharset(value);
6537
+ break;
6441
6538
  default:
6442
6539
  reader.skipField();
6443
6540
  break;
@@ -6445,77 +6542,78 @@ var require_common_pb = __commonJS({
6445
6542
  }
6446
6543
  return msg;
6447
6544
  };
6448
- proto.AssistantConverstationEndpointAction.prototype.serializeBinary = function() {
6545
+ proto.TextConfig.prototype.serializeBinary = function() {
6449
6546
  var writer = new jspb.BinaryWriter();
6450
- proto.AssistantConverstationEndpointAction.serializeBinaryToWriter(this, writer);
6547
+ proto.TextConfig.serializeBinaryToWriter(this, writer);
6451
6548
  return writer.getResultBuffer();
6452
6549
  };
6453
- proto.AssistantConverstationEndpointAction.serializeBinaryToWriter = function(message, writer) {
6550
+ proto.TextConfig.serializeBinaryToWriter = function(message, writer) {
6454
6551
  var f = void 0;
6455
- };
6456
- if (jspb.Message.GENERATE_TO_OBJECT) {
6457
- proto.AssistantConversationDeviationAction.prototype.toObject = function(opt_includeInstance) {
6458
- return proto.AssistantConversationDeviationAction.toObject(opt_includeInstance, this);
6459
- };
6460
- proto.AssistantConversationDeviationAction.toObject = function(includeInstance, msg) {
6461
- var f, obj = {};
6462
- if (includeInstance) {
6463
- obj.$jspbMessageInstance = msg;
6464
- }
6465
- return obj;
6466
- };
6467
- }
6468
- proto.AssistantConversationDeviationAction.deserializeBinary = function(bytes) {
6469
- var reader = new jspb.BinaryReader(bytes);
6470
- var msg = new proto.AssistantConversationDeviationAction();
6471
- return proto.AssistantConversationDeviationAction.deserializeBinaryFromReader(msg, reader);
6472
- };
6473
- proto.AssistantConversationDeviationAction.deserializeBinaryFromReader = function(msg, reader) {
6474
- while (reader.nextField()) {
6475
- if (reader.isEndGroup()) {
6476
- break;
6477
- }
6478
- var field = reader.getFieldNumber();
6479
- switch (field) {
6480
- default:
6481
- reader.skipField();
6482
- break;
6483
- }
6552
+ f = message.getCharset();
6553
+ if (f.length > 0) {
6554
+ writer.writeString(
6555
+ 1,
6556
+ f
6557
+ );
6484
6558
  }
6485
- return msg;
6486
6559
  };
6487
- proto.AssistantConversationDeviationAction.prototype.serializeBinary = function() {
6488
- var writer = new jspb.BinaryWriter();
6489
- proto.AssistantConversationDeviationAction.serializeBinaryToWriter(this, writer);
6490
- return writer.getResultBuffer();
6560
+ proto.TextConfig.prototype.getCharset = function() {
6561
+ return (
6562
+ /** @type {string} */
6563
+ jspb.Message.getFieldWithDefault(this, 1, "")
6564
+ );
6491
6565
  };
6492
- proto.AssistantConversationDeviationAction.serializeBinaryToWriter = function(message, writer) {
6493
- var f = void 0;
6566
+ proto.TextConfig.prototype.setCharset = function(value) {
6567
+ return jspb.Message.setProto3StringField(this, 1, value);
6494
6568
  };
6495
6569
  if (jspb.Message.GENERATE_TO_OBJECT) {
6496
- proto.AssistantConversationAssistantTransferAction.prototype.toObject = function(opt_includeInstance) {
6497
- return proto.AssistantConversationAssistantTransferAction.toObject(opt_includeInstance, this);
6570
+ proto.AssistantConversationAction.prototype.toObject = function(opt_includeInstance) {
6571
+ return proto.AssistantConversationAction.toObject(opt_includeInstance, this);
6498
6572
  };
6499
- proto.AssistantConversationAssistantTransferAction.toObject = function(includeInstance, msg) {
6500
- var f, obj = {};
6573
+ proto.AssistantConversationAction.toObject = function(includeInstance, msg) {
6574
+ var f, obj = {
6575
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
6576
+ action: jspb.Message.getFieldWithDefault(msg, 2, 0),
6577
+ argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : []
6578
+ };
6501
6579
  if (includeInstance) {
6502
6580
  obj.$jspbMessageInstance = msg;
6503
6581
  }
6504
6582
  return obj;
6505
6583
  };
6506
6584
  }
6507
- proto.AssistantConversationAssistantTransferAction.deserializeBinary = function(bytes) {
6585
+ proto.AssistantConversationAction.deserializeBinary = function(bytes) {
6508
6586
  var reader = new jspb.BinaryReader(bytes);
6509
- var msg = new proto.AssistantConversationAssistantTransferAction();
6510
- return proto.AssistantConversationAssistantTransferAction.deserializeBinaryFromReader(msg, reader);
6587
+ var msg = new proto.AssistantConversationAction();
6588
+ return proto.AssistantConversationAction.deserializeBinaryFromReader(msg, reader);
6511
6589
  };
6512
- proto.AssistantConversationAssistantTransferAction.deserializeBinaryFromReader = function(msg, reader) {
6590
+ proto.AssistantConversationAction.deserializeBinaryFromReader = function(msg, reader) {
6513
6591
  while (reader.nextField()) {
6514
6592
  if (reader.isEndGroup()) {
6515
6593
  break;
6516
6594
  }
6517
6595
  var field = reader.getFieldNumber();
6518
6596
  switch (field) {
6597
+ case 1:
6598
+ var value = (
6599
+ /** @type {string} */
6600
+ reader.readString()
6601
+ );
6602
+ msg.setName(value);
6603
+ break;
6604
+ case 2:
6605
+ var value = (
6606
+ /** @type {!proto.AssistantConversationAction.ActionType} */
6607
+ reader.readEnum()
6608
+ );
6609
+ msg.setAction(value);
6610
+ break;
6611
+ case 3:
6612
+ var value = msg.getArgsMap();
6613
+ reader.readMessage(value, function(message, reader2) {
6614
+ jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any());
6615
+ });
6616
+ break;
6519
6617
  default:
6520
6618
  reader.skipField();
6521
6619
  break;
@@ -6523,52 +6621,72 @@ var require_common_pb = __commonJS({
6523
6621
  }
6524
6622
  return msg;
6525
6623
  };
6526
- proto.AssistantConversationAssistantTransferAction.prototype.serializeBinary = function() {
6624
+ proto.AssistantConversationAction.prototype.serializeBinary = function() {
6527
6625
  var writer = new jspb.BinaryWriter();
6528
- proto.AssistantConversationAssistantTransferAction.serializeBinaryToWriter(this, writer);
6626
+ proto.AssistantConversationAction.serializeBinaryToWriter(this, writer);
6529
6627
  return writer.getResultBuffer();
6530
6628
  };
6531
- proto.AssistantConversationAssistantTransferAction.serializeBinaryToWriter = function(message, writer) {
6629
+ proto.AssistantConversationAction.serializeBinaryToWriter = function(message, writer) {
6532
6630
  var f = void 0;
6631
+ f = message.getName();
6632
+ if (f.length > 0) {
6633
+ writer.writeString(
6634
+ 1,
6635
+ f
6636
+ );
6637
+ }
6638
+ f = message.getAction();
6639
+ if (f !== 0) {
6640
+ writer.writeEnum(
6641
+ 2,
6642
+ f
6643
+ );
6644
+ }
6645
+ f = message.getArgsMap(true);
6646
+ if (f && f.getLength() > 0) {
6647
+ f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter);
6648
+ }
6533
6649
  };
6534
- if (jspb.Message.GENERATE_TO_OBJECT) {
6535
- proto.AssistantConversationPhoneCallTransferAction.prototype.toObject = function(opt_includeInstance) {
6536
- return proto.AssistantConversationPhoneCallTransferAction.toObject(opt_includeInstance, this);
6537
- };
6538
- proto.AssistantConversationPhoneCallTransferAction.toObject = function(includeInstance, msg) {
6539
- var f, obj = {};
6540
- if (includeInstance) {
6541
- obj.$jspbMessageInstance = msg;
6542
- }
6543
- return obj;
6544
- };
6545
- }
6546
- proto.AssistantConversationPhoneCallTransferAction.deserializeBinary = function(bytes) {
6547
- var reader = new jspb.BinaryReader(bytes);
6548
- var msg = new proto.AssistantConversationPhoneCallTransferAction();
6549
- return proto.AssistantConversationPhoneCallTransferAction.deserializeBinaryFromReader(msg, reader);
6650
+ proto.AssistantConversationAction.ActionType = {
6651
+ ACTION_UNSPECIFIED: 0,
6652
+ KNOWLEDGE_RETRIEVAL: 1,
6653
+ API_REQUEST: 2,
6654
+ ENDPOINT_CALL: 3,
6655
+ PUT_ON_HOLD: 4,
6656
+ END_CONVERSATION: 5
6550
6657
  };
6551
- proto.AssistantConversationPhoneCallTransferAction.deserializeBinaryFromReader = function(msg, reader) {
6552
- while (reader.nextField()) {
6553
- if (reader.isEndGroup()) {
6554
- break;
6555
- }
6556
- var field = reader.getFieldNumber();
6557
- switch (field) {
6558
- default:
6559
- reader.skipField();
6560
- break;
6561
- }
6562
- }
6563
- return msg;
6658
+ proto.AssistantConversationAction.prototype.getName = function() {
6659
+ return (
6660
+ /** @type {string} */
6661
+ jspb.Message.getFieldWithDefault(this, 1, "")
6662
+ );
6564
6663
  };
6565
- proto.AssistantConversationPhoneCallTransferAction.prototype.serializeBinary = function() {
6566
- var writer = new jspb.BinaryWriter();
6567
- proto.AssistantConversationPhoneCallTransferAction.serializeBinaryToWriter(this, writer);
6568
- return writer.getResultBuffer();
6664
+ proto.AssistantConversationAction.prototype.setName = function(value) {
6665
+ return jspb.Message.setProto3StringField(this, 1, value);
6569
6666
  };
6570
- proto.AssistantConversationPhoneCallTransferAction.serializeBinaryToWriter = function(message, writer) {
6571
- var f = void 0;
6667
+ proto.AssistantConversationAction.prototype.getAction = function() {
6668
+ return (
6669
+ /** @type {!proto.AssistantConversationAction.ActionType} */
6670
+ jspb.Message.getFieldWithDefault(this, 2, 0)
6671
+ );
6672
+ };
6673
+ proto.AssistantConversationAction.prototype.setAction = function(value) {
6674
+ return jspb.Message.setProto3EnumField(this, 2, value);
6675
+ };
6676
+ proto.AssistantConversationAction.prototype.getArgsMap = function(opt_noLazyCreate) {
6677
+ return (
6678
+ /** @type {!jspb.Map<string,!proto.google.protobuf.Any>} */
6679
+ jspb.Message.getMapField(
6680
+ this,
6681
+ 3,
6682
+ opt_noLazyCreate,
6683
+ proto.google.protobuf.Any
6684
+ )
6685
+ );
6686
+ };
6687
+ proto.AssistantConversationAction.prototype.clearArgsMap = function() {
6688
+ this.getArgsMap().clear();
6689
+ return this;
6572
6690
  };
6573
6691
  if (jspb.Message.GENERATE_TO_OBJECT) {
6574
6692
  proto.AssistantConversationInterruption.prototype.toObject = function(opt_includeInstance) {
@@ -7426,7 +7544,7 @@ var require_talk_api_pb = __commonJS({
7426
7544
  proto.talk_api.AssistantMessagingRequest.prototype.hasMessage = function() {
7427
7545
  return jspb.Message.getField(this, 3) != null;
7428
7546
  };
7429
- proto.talk_api.AssistantMessagingResponse.oneofGroups_ = [[9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]];
7547
+ proto.talk_api.AssistantMessagingResponse.oneofGroups_ = [[9, 10, 11, 12, 13, 14, 15]];
7430
7548
  proto.talk_api.AssistantMessagingResponse.DataCase = {
7431
7549
  DATA_NOT_SET: 0,
7432
7550
  CONFIGURATION: 9,
@@ -7434,14 +7552,8 @@ var require_talk_api_pb = __commonJS({
7434
7552
  USER: 11,
7435
7553
  ASSISTANT: 12,
7436
7554
  MESSAGE: 13,
7437
- DISCONNECTACTION: 14,
7438
- HOLDACTION: 15,
7439
- KNOWLEDGERETRIEVALACTION: 16,
7440
- APIREQUESTACTION: 17,
7441
- ENDPOINTACTION: 18,
7442
- DEVIATIONACTION: 19,
7443
- ASSISTANTTRANSFERACTION: 20,
7444
- PHONECALLTRANSFERACTION: 21
7555
+ ACTION: 14,
7556
+ ERROR: 15
7445
7557
  };
7446
7558
  proto.talk_api.AssistantMessagingResponse.prototype.getDataCase = function() {
7447
7559
  return (
@@ -7457,20 +7569,13 @@ var require_talk_api_pb = __commonJS({
7457
7569
  var f, obj = {
7458
7570
  code: jspb.Message.getFieldWithDefault(msg, 1, 0),
7459
7571
  success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
7460
- error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f),
7461
7572
  configuration: (f = msg.getConfiguration()) && common_pb.AssistantConversationConfiguration.toObject(includeInstance, f),
7462
7573
  interruption: (f = msg.getInterruption()) && common_pb.AssistantConversationInterruption.toObject(includeInstance, f),
7463
7574
  user: (f = msg.getUser()) && common_pb.AssistantConversationUserMessage.toObject(includeInstance, f),
7464
7575
  assistant: (f = msg.getAssistant()) && common_pb.AssistantConversationAssistantMessage.toObject(includeInstance, f),
7465
7576
  message: (f = msg.getMessage()) && common_pb.AssistantConversationMessage.toObject(includeInstance, f),
7466
- disconnectaction: (f = msg.getDisconnectaction()) && common_pb.AssistantConversationDisconnectAction.toObject(includeInstance, f),
7467
- holdaction: (f = msg.getHoldaction()) && common_pb.AssistantConverstationHoldAction.toObject(includeInstance, f),
7468
- knowledgeretrievalaction: (f = msg.getKnowledgeretrievalaction()) && common_pb.AssistantConverstationKnowledgeRetrievalAction.toObject(includeInstance, f),
7469
- apirequestaction: (f = msg.getApirequestaction()) && common_pb.AssistantConverstationApiRequestAction.toObject(includeInstance, f),
7470
- endpointaction: (f = msg.getEndpointaction()) && common_pb.AssistantConverstationEndpointAction.toObject(includeInstance, f),
7471
- deviationaction: (f = msg.getDeviationaction()) && common_pb.AssistantConversationDeviationAction.toObject(includeInstance, f),
7472
- assistanttransferaction: (f = msg.getAssistanttransferaction()) && common_pb.AssistantConversationAssistantTransferAction.toObject(includeInstance, f),
7473
- phonecalltransferaction: (f = msg.getPhonecalltransferaction()) && common_pb.AssistantConversationPhoneCallTransferAction.toObject(includeInstance, f)
7577
+ action: (f = msg.getAction()) && common_pb.AssistantConversationAction.toObject(includeInstance, f),
7578
+ error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f)
7474
7579
  };
7475
7580
  if (includeInstance) {
7476
7581
  obj.$jspbMessageInstance = msg;
@@ -7504,11 +7609,6 @@ var require_talk_api_pb = __commonJS({
7504
7609
  );
7505
7610
  msg.setSuccess(value);
7506
7611
  break;
7507
- case 4:
7508
- var value = new common_pb.Error();
7509
- reader.readMessage(value, common_pb.Error.deserializeBinaryFromReader);
7510
- msg.setError(value);
7511
- break;
7512
7612
  case 9:
7513
7613
  var value = new common_pb.AssistantConversationConfiguration();
7514
7614
  reader.readMessage(value, common_pb.AssistantConversationConfiguration.deserializeBinaryFromReader);
@@ -7535,44 +7635,14 @@ var require_talk_api_pb = __commonJS({
7535
7635
  msg.setMessage(value);
7536
7636
  break;
7537
7637
  case 14:
7538
- var value = new common_pb.AssistantConversationDisconnectAction();
7539
- reader.readMessage(value, common_pb.AssistantConversationDisconnectAction.deserializeBinaryFromReader);
7540
- msg.setDisconnectaction(value);
7638
+ var value = new common_pb.AssistantConversationAction();
7639
+ reader.readMessage(value, common_pb.AssistantConversationAction.deserializeBinaryFromReader);
7640
+ msg.setAction(value);
7541
7641
  break;
7542
7642
  case 15:
7543
- var value = new common_pb.AssistantConverstationHoldAction();
7544
- reader.readMessage(value, common_pb.AssistantConverstationHoldAction.deserializeBinaryFromReader);
7545
- msg.setHoldaction(value);
7546
- break;
7547
- case 16:
7548
- var value = new common_pb.AssistantConverstationKnowledgeRetrievalAction();
7549
- reader.readMessage(value, common_pb.AssistantConverstationKnowledgeRetrievalAction.deserializeBinaryFromReader);
7550
- msg.setKnowledgeretrievalaction(value);
7551
- break;
7552
- case 17:
7553
- var value = new common_pb.AssistantConverstationApiRequestAction();
7554
- reader.readMessage(value, common_pb.AssistantConverstationApiRequestAction.deserializeBinaryFromReader);
7555
- msg.setApirequestaction(value);
7556
- break;
7557
- case 18:
7558
- var value = new common_pb.AssistantConverstationEndpointAction();
7559
- reader.readMessage(value, common_pb.AssistantConverstationEndpointAction.deserializeBinaryFromReader);
7560
- msg.setEndpointaction(value);
7561
- break;
7562
- case 19:
7563
- var value = new common_pb.AssistantConversationDeviationAction();
7564
- reader.readMessage(value, common_pb.AssistantConversationDeviationAction.deserializeBinaryFromReader);
7565
- msg.setDeviationaction(value);
7566
- break;
7567
- case 20:
7568
- var value = new common_pb.AssistantConversationAssistantTransferAction();
7569
- reader.readMessage(value, common_pb.AssistantConversationAssistantTransferAction.deserializeBinaryFromReader);
7570
- msg.setAssistanttransferaction(value);
7571
- break;
7572
- case 21:
7573
- var value = new common_pb.AssistantConversationPhoneCallTransferAction();
7574
- reader.readMessage(value, common_pb.AssistantConversationPhoneCallTransferAction.deserializeBinaryFromReader);
7575
- msg.setPhonecalltransferaction(value);
7643
+ var value = new common_pb.Error();
7644
+ reader.readMessage(value, common_pb.Error.deserializeBinaryFromReader);
7645
+ msg.setError(value);
7576
7646
  break;
7577
7647
  default:
7578
7648
  reader.skipField();
@@ -7602,14 +7672,6 @@ var require_talk_api_pb = __commonJS({
7602
7672
  f
7603
7673
  );
7604
7674
  }
7605
- f = message.getError();
7606
- if (f != null) {
7607
- writer.writeMessage(
7608
- 4,
7609
- f,
7610
- common_pb.Error.serializeBinaryToWriter
7611
- );
7612
- }
7613
7675
  f = message.getConfiguration();
7614
7676
  if (f != null) {
7615
7677
  writer.writeMessage(
@@ -7650,68 +7712,20 @@ var require_talk_api_pb = __commonJS({
7650
7712
  common_pb.AssistantConversationMessage.serializeBinaryToWriter
7651
7713
  );
7652
7714
  }
7653
- f = message.getDisconnectaction();
7715
+ f = message.getAction();
7654
7716
  if (f != null) {
7655
7717
  writer.writeMessage(
7656
7718
  14,
7657
7719
  f,
7658
- common_pb.AssistantConversationDisconnectAction.serializeBinaryToWriter
7720
+ common_pb.AssistantConversationAction.serializeBinaryToWriter
7659
7721
  );
7660
7722
  }
7661
- f = message.getHoldaction();
7723
+ f = message.getError();
7662
7724
  if (f != null) {
7663
7725
  writer.writeMessage(
7664
7726
  15,
7665
7727
  f,
7666
- common_pb.AssistantConverstationHoldAction.serializeBinaryToWriter
7667
- );
7668
- }
7669
- f = message.getKnowledgeretrievalaction();
7670
- if (f != null) {
7671
- writer.writeMessage(
7672
- 16,
7673
- f,
7674
- common_pb.AssistantConverstationKnowledgeRetrievalAction.serializeBinaryToWriter
7675
- );
7676
- }
7677
- f = message.getApirequestaction();
7678
- if (f != null) {
7679
- writer.writeMessage(
7680
- 17,
7681
- f,
7682
- common_pb.AssistantConverstationApiRequestAction.serializeBinaryToWriter
7683
- );
7684
- }
7685
- f = message.getEndpointaction();
7686
- if (f != null) {
7687
- writer.writeMessage(
7688
- 18,
7689
- f,
7690
- common_pb.AssistantConverstationEndpointAction.serializeBinaryToWriter
7691
- );
7692
- }
7693
- f = message.getDeviationaction();
7694
- if (f != null) {
7695
- writer.writeMessage(
7696
- 19,
7697
- f,
7698
- common_pb.AssistantConversationDeviationAction.serializeBinaryToWriter
7699
- );
7700
- }
7701
- f = message.getAssistanttransferaction();
7702
- if (f != null) {
7703
- writer.writeMessage(
7704
- 20,
7705
- f,
7706
- common_pb.AssistantConversationAssistantTransferAction.serializeBinaryToWriter
7707
- );
7708
- }
7709
- f = message.getPhonecalltransferaction();
7710
- if (f != null) {
7711
- writer.writeMessage(
7712
- 21,
7713
- f,
7714
- common_pb.AssistantConversationPhoneCallTransferAction.serializeBinaryToWriter
7728
+ common_pb.Error.serializeBinaryToWriter
7715
7729
  );
7716
7730
  }
7717
7731
  };
@@ -7733,21 +7747,6 @@ var require_talk_api_pb = __commonJS({
7733
7747
  proto.talk_api.AssistantMessagingResponse.prototype.setSuccess = function(value) {
7734
7748
  return jspb.Message.setProto3BooleanField(this, 2, value);
7735
7749
  };
7736
- proto.talk_api.AssistantMessagingResponse.prototype.getError = function() {
7737
- return (
7738
- /** @type{?proto.Error} */
7739
- jspb.Message.getWrapperField(this, common_pb.Error, 4)
7740
- );
7741
- };
7742
- proto.talk_api.AssistantMessagingResponse.prototype.setError = function(value) {
7743
- return jspb.Message.setWrapperField(this, 4, value);
7744
- };
7745
- proto.talk_api.AssistantMessagingResponse.prototype.clearError = function() {
7746
- return this.setError(void 0);
7747
- };
7748
- proto.talk_api.AssistantMessagingResponse.prototype.hasError = function() {
7749
- return jspb.Message.getField(this, 4) != null;
7750
- };
7751
7750
  proto.talk_api.AssistantMessagingResponse.prototype.getConfiguration = function() {
7752
7751
  return (
7753
7752
  /** @type{?proto.AssistantConversationConfiguration} */
@@ -7823,126 +7822,36 @@ var require_talk_api_pb = __commonJS({
7823
7822
  proto.talk_api.AssistantMessagingResponse.prototype.hasMessage = function() {
7824
7823
  return jspb.Message.getField(this, 13) != null;
7825
7824
  };
7826
- proto.talk_api.AssistantMessagingResponse.prototype.getDisconnectaction = function() {
7825
+ proto.talk_api.AssistantMessagingResponse.prototype.getAction = function() {
7827
7826
  return (
7828
- /** @type{?proto.AssistantConversationDisconnectAction} */
7829
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationDisconnectAction, 14)
7827
+ /** @type{?proto.AssistantConversationAction} */
7828
+ jspb.Message.getWrapperField(this, common_pb.AssistantConversationAction, 14)
7830
7829
  );
7831
7830
  };
7832
- proto.talk_api.AssistantMessagingResponse.prototype.setDisconnectaction = function(value) {
7831
+ proto.talk_api.AssistantMessagingResponse.prototype.setAction = function(value) {
7833
7832
  return jspb.Message.setOneofWrapperField(this, 14, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7834
7833
  };
7835
- proto.talk_api.AssistantMessagingResponse.prototype.clearDisconnectaction = function() {
7836
- return this.setDisconnectaction(void 0);
7834
+ proto.talk_api.AssistantMessagingResponse.prototype.clearAction = function() {
7835
+ return this.setAction(void 0);
7837
7836
  };
7838
- proto.talk_api.AssistantMessagingResponse.prototype.hasDisconnectaction = function() {
7837
+ proto.talk_api.AssistantMessagingResponse.prototype.hasAction = function() {
7839
7838
  return jspb.Message.getField(this, 14) != null;
7840
7839
  };
7841
- proto.talk_api.AssistantMessagingResponse.prototype.getHoldaction = function() {
7840
+ proto.talk_api.AssistantMessagingResponse.prototype.getError = function() {
7842
7841
  return (
7843
- /** @type{?proto.AssistantConverstationHoldAction} */
7844
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationHoldAction, 15)
7842
+ /** @type{?proto.Error} */
7843
+ jspb.Message.getWrapperField(this, common_pb.Error, 15)
7845
7844
  );
7846
7845
  };
7847
- proto.talk_api.AssistantMessagingResponse.prototype.setHoldaction = function(value) {
7846
+ proto.talk_api.AssistantMessagingResponse.prototype.setError = function(value) {
7848
7847
  return jspb.Message.setOneofWrapperField(this, 15, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7849
7848
  };
7850
- proto.talk_api.AssistantMessagingResponse.prototype.clearHoldaction = function() {
7851
- return this.setHoldaction(void 0);
7849
+ proto.talk_api.AssistantMessagingResponse.prototype.clearError = function() {
7850
+ return this.setError(void 0);
7852
7851
  };
7853
- proto.talk_api.AssistantMessagingResponse.prototype.hasHoldaction = function() {
7852
+ proto.talk_api.AssistantMessagingResponse.prototype.hasError = function() {
7854
7853
  return jspb.Message.getField(this, 15) != null;
7855
7854
  };
7856
- proto.talk_api.AssistantMessagingResponse.prototype.getKnowledgeretrievalaction = function() {
7857
- return (
7858
- /** @type{?proto.AssistantConverstationKnowledgeRetrievalAction} */
7859
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationKnowledgeRetrievalAction, 16)
7860
- );
7861
- };
7862
- proto.talk_api.AssistantMessagingResponse.prototype.setKnowledgeretrievalaction = function(value) {
7863
- return jspb.Message.setOneofWrapperField(this, 16, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7864
- };
7865
- proto.talk_api.AssistantMessagingResponse.prototype.clearKnowledgeretrievalaction = function() {
7866
- return this.setKnowledgeretrievalaction(void 0);
7867
- };
7868
- proto.talk_api.AssistantMessagingResponse.prototype.hasKnowledgeretrievalaction = function() {
7869
- return jspb.Message.getField(this, 16) != null;
7870
- };
7871
- proto.talk_api.AssistantMessagingResponse.prototype.getApirequestaction = function() {
7872
- return (
7873
- /** @type{?proto.AssistantConverstationApiRequestAction} */
7874
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationApiRequestAction, 17)
7875
- );
7876
- };
7877
- proto.talk_api.AssistantMessagingResponse.prototype.setApirequestaction = function(value) {
7878
- return jspb.Message.setOneofWrapperField(this, 17, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7879
- };
7880
- proto.talk_api.AssistantMessagingResponse.prototype.clearApirequestaction = function() {
7881
- return this.setApirequestaction(void 0);
7882
- };
7883
- proto.talk_api.AssistantMessagingResponse.prototype.hasApirequestaction = function() {
7884
- return jspb.Message.getField(this, 17) != null;
7885
- };
7886
- proto.talk_api.AssistantMessagingResponse.prototype.getEndpointaction = function() {
7887
- return (
7888
- /** @type{?proto.AssistantConverstationEndpointAction} */
7889
- jspb.Message.getWrapperField(this, common_pb.AssistantConverstationEndpointAction, 18)
7890
- );
7891
- };
7892
- proto.talk_api.AssistantMessagingResponse.prototype.setEndpointaction = function(value) {
7893
- return jspb.Message.setOneofWrapperField(this, 18, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7894
- };
7895
- proto.talk_api.AssistantMessagingResponse.prototype.clearEndpointaction = function() {
7896
- return this.setEndpointaction(void 0);
7897
- };
7898
- proto.talk_api.AssistantMessagingResponse.prototype.hasEndpointaction = function() {
7899
- return jspb.Message.getField(this, 18) != null;
7900
- };
7901
- proto.talk_api.AssistantMessagingResponse.prototype.getDeviationaction = function() {
7902
- return (
7903
- /** @type{?proto.AssistantConversationDeviationAction} */
7904
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationDeviationAction, 19)
7905
- );
7906
- };
7907
- proto.talk_api.AssistantMessagingResponse.prototype.setDeviationaction = function(value) {
7908
- return jspb.Message.setOneofWrapperField(this, 19, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7909
- };
7910
- proto.talk_api.AssistantMessagingResponse.prototype.clearDeviationaction = function() {
7911
- return this.setDeviationaction(void 0);
7912
- };
7913
- proto.talk_api.AssistantMessagingResponse.prototype.hasDeviationaction = function() {
7914
- return jspb.Message.getField(this, 19) != null;
7915
- };
7916
- proto.talk_api.AssistantMessagingResponse.prototype.getAssistanttransferaction = function() {
7917
- return (
7918
- /** @type{?proto.AssistantConversationAssistantTransferAction} */
7919
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationAssistantTransferAction, 20)
7920
- );
7921
- };
7922
- proto.talk_api.AssistantMessagingResponse.prototype.setAssistanttransferaction = function(value) {
7923
- return jspb.Message.setOneofWrapperField(this, 20, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7924
- };
7925
- proto.talk_api.AssistantMessagingResponse.prototype.clearAssistanttransferaction = function() {
7926
- return this.setAssistanttransferaction(void 0);
7927
- };
7928
- proto.talk_api.AssistantMessagingResponse.prototype.hasAssistanttransferaction = function() {
7929
- return jspb.Message.getField(this, 20) != null;
7930
- };
7931
- proto.talk_api.AssistantMessagingResponse.prototype.getPhonecalltransferaction = function() {
7932
- return (
7933
- /** @type{?proto.AssistantConversationPhoneCallTransferAction} */
7934
- jspb.Message.getWrapperField(this, common_pb.AssistantConversationPhoneCallTransferAction, 21)
7935
- );
7936
- };
7937
- proto.talk_api.AssistantMessagingResponse.prototype.setPhonecalltransferaction = function(value) {
7938
- return jspb.Message.setOneofWrapperField(this, 21, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value);
7939
- };
7940
- proto.talk_api.AssistantMessagingResponse.prototype.clearPhonecalltransferaction = function() {
7941
- return this.setPhonecalltransferaction(void 0);
7942
- };
7943
- proto.talk_api.AssistantMessagingResponse.prototype.hasPhonecalltransferaction = function() {
7944
- return jspb.Message.getField(this, 21) != null;
7945
- };
7946
7855
  proto.talk_api.CreateMessageMetricRequest.repeatedFields_ = [4];
7947
7856
  if (jspb.Message.GENERATE_TO_OBJECT) {
7948
7857
  proto.talk_api.CreateMessageMetricRequest.prototype.toObject = function(opt_includeInstance) {
@@ -27745,7 +27654,7 @@ var Agent = class extends import_events.EventEmitter {
27745
27654
  _conversationId;
27746
27655
  // connection
27747
27656
  talkingConnection;
27748
- // Agent Configuration
27657
+ // // Agent Configuration
27749
27658
  agentConfig;
27750
27659
  // callbacks can have multiple callback
27751
27660
  agentCallbacks;
@@ -27854,6 +27763,8 @@ var Agent = class extends import_events.EventEmitter {
27854
27763
  this.agentConfig = config;
27855
27764
  const switchRequest = this._createAssistantConfigureRequest(
27856
27765
  this.agentConfig.definition,
27766
+ this.agentConfig.inputOptions.defaultInputStreamOption,
27767
+ this.agentConfig.outputOptions.defaultOutputStreamOption,
27857
27768
  this.agentConfig.arguments,
27858
27769
  this.agentConfig.metadata,
27859
27770
  this.agentConfig.options
@@ -28018,7 +27929,7 @@ var Agent = class extends import_events.EventEmitter {
28018
27929
  /**
28019
27930
  * Creates an assistant configuration request
28020
27931
  */
28021
- _createAssistantConfigureRequest(definition, args, metadatas, options) {
27932
+ _createAssistantConfigureRequest(definition, inputStreamConfig, outputStreamConfig, args, metadatas, options) {
28022
27933
  const request = new import_talk_api_pb.AssistantMessagingRequest();
28023
27934
  const assistantConfiguration = new import_common_pb6.AssistantConversationConfiguration();
28024
27935
  if (this._conversationId) {
@@ -28034,6 +27945,8 @@ var Agent = class extends import_events.EventEmitter {
28034
27945
  args?.forEach((v, k) => {
28035
27946
  assistantConfiguration.getArgsMap().set(k, v);
28036
27947
  });
27948
+ assistantConfiguration.setOutputconfig(outputStreamConfig);
27949
+ assistantConfiguration.setInputconfig(inputStreamConfig);
28037
27950
  request.setConfiguration(assistantConfiguration);
28038
27951
  return request;
28039
27952
  }
@@ -28071,6 +27984,8 @@ var Agent = class extends import_events.EventEmitter {
28071
27984
  await this.talkingConnection.write(
28072
27985
  this._createAssistantConfigureRequest(
28073
27986
  this.agentConfig.definition,
27987
+ this.agentConfig.inputOptions.defaultInputStreamOption,
27988
+ this.agentConfig.outputOptions.defaultOutputStreamOption,
28074
27989
  this.agentConfig.arguments,
28075
27990
  this.agentConfig.metadata,
28076
27991
  this.agentConfig.options
@@ -28579,18 +28494,11 @@ var VoiceAgent = class extends Agent {
28579
28494
  volume = 1;
28580
28495
  inputFrequencyData;
28581
28496
  outputFrequencyData;
28582
- /**
28583
- * input media device id
28584
- */
28585
- inputChannel = "audio" /* Audio */;
28586
- outputChannel = "audio" /* Audio */;
28587
28497
  /**
28588
28498
  * @param options
28589
28499
  */
28590
28500
  constructor(connection, agentConfig, agentCallback) {
28591
28501
  super(connection, agentConfig, agentCallback);
28592
- this.outputChannel = agentConfig.outputOptions.defaultChannel;
28593
- this.inputChannel = agentConfig.inputOptions.defaultChannel;
28594
28502
  }
28595
28503
  /**
28596
28504
  * disconnecting the agent and voice if it is connected
@@ -28683,7 +28591,7 @@ var VoiceAgent = class extends Agent {
28683
28591
  console.log("Please call connect first, agent is not connected");
28684
28592
  return;
28685
28593
  }
28686
- if (this.inputChannel == "audio" /* Audio */)
28594
+ if (this.agentConfig.inputOptions.channel == "audio" /* Audio */)
28687
28595
  this.talkingConnection?.write(
28688
28596
  this.createAssistantAudioMessage(
28689
28597
  arrayBufferToUint8(rawAudioPcmData.buffer)
@@ -28748,7 +28656,7 @@ var VoiceAgent = class extends Agent {
28748
28656
  */
28749
28657
  connect = async () => {
28750
28658
  try {
28751
- if (this.inputChannel == "audio" /* Audio */) {
28659
+ if (this.agentConfig.inputOptions.channel == "audio" /* Audio */) {
28752
28660
  await this.connectAudio();
28753
28661
  }
28754
28662
  await this.connectAgent();
@@ -28762,7 +28670,7 @@ var VoiceAgent = class extends Agent {
28762
28670
  */
28763
28671
  onSendText = async (text) => {
28764
28672
  if (!this.isConnected) await this.connect();
28765
- if (this.inputChannel == "text" /* Text */) {
28673
+ if (this.agentConfig.inputOptions.channel == "text" /* Text */) {
28766
28674
  this.talkingConnection?.write(this.createAssistantTextMessage(text));
28767
28675
  }
28768
28676
  };
@@ -28804,37 +28712,22 @@ var VoiceAgent = class extends Agent {
28804
28712
  get inputMediaDevice() {
28805
28713
  return this.agentConfig.inputOptions.recorderOption.device;
28806
28714
  }
28807
- /**
28808
- *
28809
- * @param input
28810
- * @returns
28811
- */
28812
- // public setInputChannel = async (input: Channel) => {
28813
- // if (this.inputChannel == input) {
28814
- // return;
28815
- // }
28816
- // if (input == Channel.Audio) {
28817
- // await this.connectAudio();
28818
- // } else {
28819
- // await this.disconnectAudio();
28820
- // }
28821
- // this.inputChannel = input;
28822
- // this.emit(AgentEvent.InputChannelChangeEvent, this.inputChannel);
28823
- // };
28824
28715
  setInputChannel = async (input) => {
28825
- if (this.inputChannel === input) {
28716
+ if (this.agentConfig.inputOptions.channel === input) {
28826
28717
  return;
28827
28718
  }
28828
28719
  await this.disconnectAudio();
28829
- this.inputChannel = input;
28720
+ this.agentConfig.inputOptions.channel = input;
28721
+ this.agentConfig.outputOptions.channel = input;
28830
28722
  if (input === "audio" /* Audio */) {
28831
28723
  if (this.isConnected) {
28832
28724
  await this.connectAudio();
28725
+ await this.switchAgent(this.agentConfig);
28833
28726
  } else {
28834
28727
  console.log("Audio initialization deferred until connect()");
28835
28728
  }
28836
28729
  }
28837
- this.emit("onInputChannelChangeEvent" /* InputChannelChangeEvent */, this.inputChannel);
28730
+ this.emit("onInputChannelChangeEvent" /* InputChannelChangeEvent */, this.agentConfig.inputOptions.channel);
28838
28731
  };
28839
28732
  /**
28840
28733
  *
@@ -28869,6 +28762,10 @@ var VoiceAgent = class extends Agent {
28869
28762
  );
28870
28763
  }
28871
28764
  };
28765
+ /**
28766
+ * on handle user content
28767
+ * @param userContent
28768
+ */
28872
28769
  onHandleUser = (userContent) => {
28873
28770
  if (userContent) {
28874
28771
  switch (userContent.getMessageCase()) {
@@ -28899,6 +28796,10 @@ var VoiceAgent = class extends Agent {
28899
28796
  );
28900
28797
  }
28901
28798
  };
28799
+ /**
28800
+ * on handle assistant content
28801
+ * @param systemContent
28802
+ */
28902
28803
  onHandleAssistant = (systemContent) => {
28903
28804
  if (systemContent) {
28904
28805
  switch (systemContent.getMessageCase()) {
@@ -28972,7 +28873,7 @@ var VoiceAgent = class extends Agent {
28972
28873
  }
28973
28874
  };
28974
28875
  /**
28975
- *
28876
+ * streaming response from the server
28976
28877
  * @param response
28977
28878
  * @returns
28978
28879
  */
@@ -29008,16 +28909,13 @@ var VoiceAgent = class extends Agent {
29008
28909
  switch (response.getDataCase()) {
29009
28910
  case import_talk_api_pb2.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
29010
28911
  break;
29011
- case import_talk_api_pb2.AssistantMessagingResponse.DataCase.APIREQUESTACTION:
29012
- if (agentCallback && agentCallback?.onAction) {
29013
- agentCallback.onAction(response.getApirequestaction()?.toObject());
28912
+ case import_talk_api_pb2.AssistantMessagingResponse.DataCase.ACTION:
28913
+ if (response.getAction()?.getAction() === import_common_pb9.AssistantConversationAction.ActionType.END_CONVERSATION) {
28914
+ await this.disconnect();
29014
28915
  }
29015
- break;
29016
- case import_talk_api_pb2.AssistantMessagingResponse.DataCase.DISCONNECTACTION:
29017
28916
  if (agentCallback && agentCallback?.onAction) {
29018
- agentCallback.onAction(response.getDisconnectaction()?.toObject());
28917
+ agentCallback.onAction(response.getAction()?.toObject());
29019
28918
  }
29020
- await this.disconnect();
29021
28919
  break;
29022
28920
  case import_talk_api_pb2.AssistantMessagingResponse.DataCase.INTERRUPTION:
29023
28921
  if (agentCallback && agentCallback?.onInterrupt) {
@@ -29060,7 +28958,7 @@ var VoiceAgent = class extends Agent {
29060
28958
  }
29061
28959
  };
29062
28960
  /**
29063
- *
28961
+ * to get byte frequency data from input
29064
28962
  * @returns
29065
28963
  */
29066
28964
  getInputByteFrequencyData = () => {
@@ -29075,7 +28973,7 @@ var VoiceAgent = class extends Agent {
29075
28973
  return this.inputFrequencyData;
29076
28974
  };
29077
28975
  /**
29078
- *
28976
+ * output byte frequency data
29079
28977
  * @returns
29080
28978
  */
29081
28979
  getOutputByteFrequencyData = () => {