@rapidaai/react 1.1.35 → 1.1.38
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.
- package/dist/{chunk-4BXVNAM6.mjs → chunk-U2OYP3DD.mjs} +500 -599
- package/dist/chunk-U2OYP3DD.mjs.map +1 -0
- package/dist/components/device-selector.d.mts +1 -1
- package/dist/components/device-selector.d.ts +1 -1
- package/dist/components/device-selector.js +451 -546
- package/dist/components/device-selector.js.map +1 -1
- package/dist/components/device-selector.mjs +1 -1
- package/dist/{device-selector-nRT7JeU2.d.mts → device-selector-DIhyLN0t.d.mts} +89 -93
- package/dist/{device-selector-nRT7JeU2.d.ts → device-selector-DIhyLN0t.d.ts} +89 -93
- package/dist/index.d.mts +3 -24
- package/dist/index.d.ts +3 -24
- package/dist/index.js +486 -590
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4BXVNAM6.mjs.map +0 -1
|
@@ -5822,10 +5822,14 @@ var require_talk_api_pb = __commonJS({
|
|
|
5822
5822
|
var common_pb = require_common_pb();
|
|
5823
5823
|
goog.object.extend(proto, common_pb);
|
|
5824
5824
|
goog.exportSymbol("proto.talk_api.AssistantConversationAssistantMessage", null, global);
|
|
5825
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationAssistantMessage.MessageCase", null, global);
|
|
5825
5826
|
goog.exportSymbol("proto.talk_api.AssistantConversationConfiguration", null, global);
|
|
5826
5827
|
goog.exportSymbol("proto.talk_api.AssistantConversationInterruption", null, global);
|
|
5827
5828
|
goog.exportSymbol("proto.talk_api.AssistantConversationInterruption.InterruptionType", null, global);
|
|
5829
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationMessageAudioContent", null, global);
|
|
5830
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationMessageTextContent", null, global);
|
|
5828
5831
|
goog.exportSymbol("proto.talk_api.AssistantConversationUserMessage", null, global);
|
|
5832
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationUserMessage.MessageCase", null, global);
|
|
5829
5833
|
goog.exportSymbol("proto.talk_api.AssistantDefinition", null, global);
|
|
5830
5834
|
goog.exportSymbol("proto.talk_api.AssistantMessagingRequest", null, global);
|
|
5831
5835
|
goog.exportSymbol("proto.talk_api.AssistantMessagingRequest.RequestCase", null, global);
|
|
@@ -5860,15 +5864,29 @@ var require_talk_api_pb = __commonJS({
|
|
|
5860
5864
|
if (goog.DEBUG && !COMPILED) {
|
|
5861
5865
|
proto.talk_api.AssistantConversationInterruption.displayName = "proto.talk_api.AssistantConversationInterruption";
|
|
5862
5866
|
}
|
|
5863
|
-
proto.talk_api.
|
|
5867
|
+
proto.talk_api.AssistantConversationMessageTextContent = function(opt_data) {
|
|
5868
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
5869
|
+
};
|
|
5870
|
+
goog.inherits(proto.talk_api.AssistantConversationMessageTextContent, jspb.Message);
|
|
5871
|
+
if (goog.DEBUG && !COMPILED) {
|
|
5872
|
+
proto.talk_api.AssistantConversationMessageTextContent.displayName = "proto.talk_api.AssistantConversationMessageTextContent";
|
|
5873
|
+
}
|
|
5874
|
+
proto.talk_api.AssistantConversationMessageAudioContent = function(opt_data) {
|
|
5864
5875
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
5865
5876
|
};
|
|
5877
|
+
goog.inherits(proto.talk_api.AssistantConversationMessageAudioContent, jspb.Message);
|
|
5878
|
+
if (goog.DEBUG && !COMPILED) {
|
|
5879
|
+
proto.talk_api.AssistantConversationMessageAudioContent.displayName = "proto.talk_api.AssistantConversationMessageAudioContent";
|
|
5880
|
+
}
|
|
5881
|
+
proto.talk_api.AssistantConversationUserMessage = function(opt_data) {
|
|
5882
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantConversationUserMessage.oneofGroups_);
|
|
5883
|
+
};
|
|
5866
5884
|
goog.inherits(proto.talk_api.AssistantConversationUserMessage, jspb.Message);
|
|
5867
5885
|
if (goog.DEBUG && !COMPILED) {
|
|
5868
5886
|
proto.talk_api.AssistantConversationUserMessage.displayName = "proto.talk_api.AssistantConversationUserMessage";
|
|
5869
5887
|
}
|
|
5870
5888
|
proto.talk_api.AssistantConversationAssistantMessage = function(opt_data) {
|
|
5871
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null,
|
|
5889
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_);
|
|
5872
5890
|
};
|
|
5873
5891
|
goog.inherits(proto.talk_api.AssistantConversationAssistantMessage, jspb.Message);
|
|
5874
5892
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -6354,13 +6372,170 @@ var require_talk_api_pb = __commonJS({
|
|
|
6354
6372
|
proto.talk_api.AssistantConversationInterruption.prototype.hasTime = function() {
|
|
6355
6373
|
return jspb.Message.getField(this, 3) != null;
|
|
6356
6374
|
};
|
|
6375
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6376
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.toObject = function(opt_includeInstance) {
|
|
6377
|
+
return proto.talk_api.AssistantConversationMessageTextContent.toObject(opt_includeInstance, this);
|
|
6378
|
+
};
|
|
6379
|
+
proto.talk_api.AssistantConversationMessageTextContent.toObject = function(includeInstance, msg) {
|
|
6380
|
+
var f, obj = {
|
|
6381
|
+
content: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
6382
|
+
};
|
|
6383
|
+
if (includeInstance) {
|
|
6384
|
+
obj.$jspbMessageInstance = msg;
|
|
6385
|
+
}
|
|
6386
|
+
return obj;
|
|
6387
|
+
};
|
|
6388
|
+
}
|
|
6389
|
+
proto.talk_api.AssistantConversationMessageTextContent.deserializeBinary = function(bytes) {
|
|
6390
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
6391
|
+
var msg = new proto.talk_api.AssistantConversationMessageTextContent();
|
|
6392
|
+
return proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader(msg, reader);
|
|
6393
|
+
};
|
|
6394
|
+
proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader = function(msg, reader) {
|
|
6395
|
+
while (reader.nextField()) {
|
|
6396
|
+
if (reader.isEndGroup()) {
|
|
6397
|
+
break;
|
|
6398
|
+
}
|
|
6399
|
+
var field = reader.getFieldNumber();
|
|
6400
|
+
switch (field) {
|
|
6401
|
+
case 1:
|
|
6402
|
+
var value = (
|
|
6403
|
+
/** @type {string} */
|
|
6404
|
+
reader.readString()
|
|
6405
|
+
);
|
|
6406
|
+
msg.setContent(value);
|
|
6407
|
+
break;
|
|
6408
|
+
default:
|
|
6409
|
+
reader.skipField();
|
|
6410
|
+
break;
|
|
6411
|
+
}
|
|
6412
|
+
}
|
|
6413
|
+
return msg;
|
|
6414
|
+
};
|
|
6415
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.serializeBinary = function() {
|
|
6416
|
+
var writer = new jspb.BinaryWriter();
|
|
6417
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter(this, writer);
|
|
6418
|
+
return writer.getResultBuffer();
|
|
6419
|
+
};
|
|
6420
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter = function(message, writer) {
|
|
6421
|
+
var f = void 0;
|
|
6422
|
+
f = message.getContent();
|
|
6423
|
+
if (f.length > 0) {
|
|
6424
|
+
writer.writeString(
|
|
6425
|
+
1,
|
|
6426
|
+
f
|
|
6427
|
+
);
|
|
6428
|
+
}
|
|
6429
|
+
};
|
|
6430
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.getContent = function() {
|
|
6431
|
+
return (
|
|
6432
|
+
/** @type {string} */
|
|
6433
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
6434
|
+
);
|
|
6435
|
+
};
|
|
6436
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.setContent = function(value) {
|
|
6437
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
6438
|
+
};
|
|
6439
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6440
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.toObject = function(opt_includeInstance) {
|
|
6441
|
+
return proto.talk_api.AssistantConversationMessageAudioContent.toObject(opt_includeInstance, this);
|
|
6442
|
+
};
|
|
6443
|
+
proto.talk_api.AssistantConversationMessageAudioContent.toObject = function(includeInstance, msg) {
|
|
6444
|
+
var f, obj = {
|
|
6445
|
+
content: msg.getContent_asB64()
|
|
6446
|
+
};
|
|
6447
|
+
if (includeInstance) {
|
|
6448
|
+
obj.$jspbMessageInstance = msg;
|
|
6449
|
+
}
|
|
6450
|
+
return obj;
|
|
6451
|
+
};
|
|
6452
|
+
}
|
|
6453
|
+
proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinary = function(bytes) {
|
|
6454
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
6455
|
+
var msg = new proto.talk_api.AssistantConversationMessageAudioContent();
|
|
6456
|
+
return proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader(msg, reader);
|
|
6457
|
+
};
|
|
6458
|
+
proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader = function(msg, reader) {
|
|
6459
|
+
while (reader.nextField()) {
|
|
6460
|
+
if (reader.isEndGroup()) {
|
|
6461
|
+
break;
|
|
6462
|
+
}
|
|
6463
|
+
var field = reader.getFieldNumber();
|
|
6464
|
+
switch (field) {
|
|
6465
|
+
case 1:
|
|
6466
|
+
var value = (
|
|
6467
|
+
/** @type {!Uint8Array} */
|
|
6468
|
+
reader.readBytes()
|
|
6469
|
+
);
|
|
6470
|
+
msg.setContent(value);
|
|
6471
|
+
break;
|
|
6472
|
+
default:
|
|
6473
|
+
reader.skipField();
|
|
6474
|
+
break;
|
|
6475
|
+
}
|
|
6476
|
+
}
|
|
6477
|
+
return msg;
|
|
6478
|
+
};
|
|
6479
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.serializeBinary = function() {
|
|
6480
|
+
var writer = new jspb.BinaryWriter();
|
|
6481
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter(this, writer);
|
|
6482
|
+
return writer.getResultBuffer();
|
|
6483
|
+
};
|
|
6484
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter = function(message, writer) {
|
|
6485
|
+
var f = void 0;
|
|
6486
|
+
f = message.getContent_asU8();
|
|
6487
|
+
if (f.length > 0) {
|
|
6488
|
+
writer.writeBytes(
|
|
6489
|
+
1,
|
|
6490
|
+
f
|
|
6491
|
+
);
|
|
6492
|
+
}
|
|
6493
|
+
};
|
|
6494
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.getContent = function() {
|
|
6495
|
+
return (
|
|
6496
|
+
/** @type {!(string|Uint8Array)} */
|
|
6497
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
6498
|
+
);
|
|
6499
|
+
};
|
|
6500
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.getContent_asB64 = function() {
|
|
6501
|
+
return (
|
|
6502
|
+
/** @type {string} */
|
|
6503
|
+
jspb.Message.bytesAsB64(
|
|
6504
|
+
this.getContent()
|
|
6505
|
+
)
|
|
6506
|
+
);
|
|
6507
|
+
};
|
|
6508
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.getContent_asU8 = function() {
|
|
6509
|
+
return (
|
|
6510
|
+
/** @type {!Uint8Array} */
|
|
6511
|
+
jspb.Message.bytesAsU8(
|
|
6512
|
+
this.getContent()
|
|
6513
|
+
)
|
|
6514
|
+
);
|
|
6515
|
+
};
|
|
6516
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.setContent = function(value) {
|
|
6517
|
+
return jspb.Message.setProto3BytesField(this, 1, value);
|
|
6518
|
+
};
|
|
6519
|
+
proto.talk_api.AssistantConversationUserMessage.oneofGroups_ = [[10, 11]];
|
|
6520
|
+
proto.talk_api.AssistantConversationUserMessage.MessageCase = {
|
|
6521
|
+
MESSAGE_NOT_SET: 0,
|
|
6522
|
+
AUDIO: 10,
|
|
6523
|
+
TEXT: 11
|
|
6524
|
+
};
|
|
6525
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.getMessageCase = function() {
|
|
6526
|
+
return (
|
|
6527
|
+
/** @type {proto.talk_api.AssistantConversationUserMessage.MessageCase} */
|
|
6528
|
+
jspb.Message.computeOneofCase(this, proto.talk_api.AssistantConversationUserMessage.oneofGroups_[0])
|
|
6529
|
+
);
|
|
6530
|
+
};
|
|
6357
6531
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6358
6532
|
proto.talk_api.AssistantConversationUserMessage.prototype.toObject = function(opt_includeInstance) {
|
|
6359
6533
|
return proto.talk_api.AssistantConversationUserMessage.toObject(opt_includeInstance, this);
|
|
6360
6534
|
};
|
|
6361
6535
|
proto.talk_api.AssistantConversationUserMessage.toObject = function(includeInstance, msg) {
|
|
6362
6536
|
var f, obj = {
|
|
6363
|
-
|
|
6537
|
+
audio: (f = msg.getAudio()) && proto.talk_api.AssistantConversationMessageAudioContent.toObject(includeInstance, f),
|
|
6538
|
+
text: (f = msg.getText()) && proto.talk_api.AssistantConversationMessageTextContent.toObject(includeInstance, f),
|
|
6364
6539
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
6365
6540
|
completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
6366
6541
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
|
|
@@ -6383,10 +6558,15 @@ var require_talk_api_pb = __commonJS({
|
|
|
6383
6558
|
}
|
|
6384
6559
|
var field = reader.getFieldNumber();
|
|
6385
6560
|
switch (field) {
|
|
6386
|
-
case
|
|
6387
|
-
var value = new
|
|
6388
|
-
reader.readMessage(value,
|
|
6389
|
-
msg.
|
|
6561
|
+
case 10:
|
|
6562
|
+
var value = new proto.talk_api.AssistantConversationMessageAudioContent();
|
|
6563
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader);
|
|
6564
|
+
msg.setAudio(value);
|
|
6565
|
+
break;
|
|
6566
|
+
case 11:
|
|
6567
|
+
var value = new proto.talk_api.AssistantConversationMessageTextContent();
|
|
6568
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader);
|
|
6569
|
+
msg.setText(value);
|
|
6390
6570
|
break;
|
|
6391
6571
|
case 2:
|
|
6392
6572
|
var value = (
|
|
@@ -6421,12 +6601,20 @@ var require_talk_api_pb = __commonJS({
|
|
|
6421
6601
|
};
|
|
6422
6602
|
proto.talk_api.AssistantConversationUserMessage.serializeBinaryToWriter = function(message, writer) {
|
|
6423
6603
|
var f = void 0;
|
|
6424
|
-
f = message.
|
|
6604
|
+
f = message.getAudio();
|
|
6425
6605
|
if (f != null) {
|
|
6426
6606
|
writer.writeMessage(
|
|
6427
|
-
|
|
6607
|
+
10,
|
|
6608
|
+
f,
|
|
6609
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter
|
|
6610
|
+
);
|
|
6611
|
+
}
|
|
6612
|
+
f = message.getText();
|
|
6613
|
+
if (f != null) {
|
|
6614
|
+
writer.writeMessage(
|
|
6615
|
+
11,
|
|
6428
6616
|
f,
|
|
6429
|
-
|
|
6617
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter
|
|
6430
6618
|
);
|
|
6431
6619
|
}
|
|
6432
6620
|
f = message.getId();
|
|
@@ -6452,20 +6640,35 @@ var require_talk_api_pb = __commonJS({
|
|
|
6452
6640
|
);
|
|
6453
6641
|
}
|
|
6454
6642
|
};
|
|
6455
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6643
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.getAudio = function() {
|
|
6456
6644
|
return (
|
|
6457
|
-
/** @type{?proto.
|
|
6458
|
-
jspb.Message.getWrapperField(this,
|
|
6645
|
+
/** @type{?proto.talk_api.AssistantConversationMessageAudioContent} */
|
|
6646
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageAudioContent, 10)
|
|
6459
6647
|
);
|
|
6460
6648
|
};
|
|
6461
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6462
|
-
return jspb.Message.
|
|
6649
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.setAudio = function(value) {
|
|
6650
|
+
return jspb.Message.setOneofWrapperField(this, 10, proto.talk_api.AssistantConversationUserMessage.oneofGroups_[0], value);
|
|
6463
6651
|
};
|
|
6464
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6465
|
-
return this.
|
|
6652
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.clearAudio = function() {
|
|
6653
|
+
return this.setAudio(void 0);
|
|
6466
6654
|
};
|
|
6467
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6468
|
-
return jspb.Message.getField(this,
|
|
6655
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.hasAudio = function() {
|
|
6656
|
+
return jspb.Message.getField(this, 10) != null;
|
|
6657
|
+
};
|
|
6658
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.getText = function() {
|
|
6659
|
+
return (
|
|
6660
|
+
/** @type{?proto.talk_api.AssistantConversationMessageTextContent} */
|
|
6661
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageTextContent, 11)
|
|
6662
|
+
);
|
|
6663
|
+
};
|
|
6664
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.setText = function(value) {
|
|
6665
|
+
return jspb.Message.setOneofWrapperField(this, 11, proto.talk_api.AssistantConversationUserMessage.oneofGroups_[0], value);
|
|
6666
|
+
};
|
|
6667
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.clearText = function() {
|
|
6668
|
+
return this.setText(void 0);
|
|
6669
|
+
};
|
|
6670
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.hasText = function() {
|
|
6671
|
+
return jspb.Message.getField(this, 11) != null;
|
|
6469
6672
|
};
|
|
6470
6673
|
proto.talk_api.AssistantConversationUserMessage.prototype.getId = function() {
|
|
6471
6674
|
return (
|
|
@@ -6500,13 +6703,26 @@ var require_talk_api_pb = __commonJS({
|
|
|
6500
6703
|
proto.talk_api.AssistantConversationUserMessage.prototype.hasTime = function() {
|
|
6501
6704
|
return jspb.Message.getField(this, 4) != null;
|
|
6502
6705
|
};
|
|
6706
|
+
proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_ = [[10, 11]];
|
|
6707
|
+
proto.talk_api.AssistantConversationAssistantMessage.MessageCase = {
|
|
6708
|
+
MESSAGE_NOT_SET: 0,
|
|
6709
|
+
AUDIO: 10,
|
|
6710
|
+
TEXT: 11
|
|
6711
|
+
};
|
|
6712
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.getMessageCase = function() {
|
|
6713
|
+
return (
|
|
6714
|
+
/** @type {proto.talk_api.AssistantConversationAssistantMessage.MessageCase} */
|
|
6715
|
+
jspb.Message.computeOneofCase(this, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_[0])
|
|
6716
|
+
);
|
|
6717
|
+
};
|
|
6503
6718
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6504
6719
|
proto.talk_api.AssistantConversationAssistantMessage.prototype.toObject = function(opt_includeInstance) {
|
|
6505
6720
|
return proto.talk_api.AssistantConversationAssistantMessage.toObject(opt_includeInstance, this);
|
|
6506
6721
|
};
|
|
6507
6722
|
proto.talk_api.AssistantConversationAssistantMessage.toObject = function(includeInstance, msg) {
|
|
6508
6723
|
var f, obj = {
|
|
6509
|
-
|
|
6724
|
+
audio: (f = msg.getAudio()) && proto.talk_api.AssistantConversationMessageAudioContent.toObject(includeInstance, f),
|
|
6725
|
+
text: (f = msg.getText()) && proto.talk_api.AssistantConversationMessageTextContent.toObject(includeInstance, f),
|
|
6510
6726
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
6511
6727
|
completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
6512
6728
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
|
|
@@ -6529,10 +6745,15 @@ var require_talk_api_pb = __commonJS({
|
|
|
6529
6745
|
}
|
|
6530
6746
|
var field = reader.getFieldNumber();
|
|
6531
6747
|
switch (field) {
|
|
6532
|
-
case
|
|
6533
|
-
var value = new
|
|
6534
|
-
reader.readMessage(value,
|
|
6535
|
-
msg.
|
|
6748
|
+
case 10:
|
|
6749
|
+
var value = new proto.talk_api.AssistantConversationMessageAudioContent();
|
|
6750
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader);
|
|
6751
|
+
msg.setAudio(value);
|
|
6752
|
+
break;
|
|
6753
|
+
case 11:
|
|
6754
|
+
var value = new proto.talk_api.AssistantConversationMessageTextContent();
|
|
6755
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader);
|
|
6756
|
+
msg.setText(value);
|
|
6536
6757
|
break;
|
|
6537
6758
|
case 2:
|
|
6538
6759
|
var value = (
|
|
@@ -6567,12 +6788,20 @@ var require_talk_api_pb = __commonJS({
|
|
|
6567
6788
|
};
|
|
6568
6789
|
proto.talk_api.AssistantConversationAssistantMessage.serializeBinaryToWriter = function(message, writer) {
|
|
6569
6790
|
var f = void 0;
|
|
6570
|
-
f = message.
|
|
6791
|
+
f = message.getAudio();
|
|
6571
6792
|
if (f != null) {
|
|
6572
6793
|
writer.writeMessage(
|
|
6573
|
-
|
|
6794
|
+
10,
|
|
6795
|
+
f,
|
|
6796
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter
|
|
6797
|
+
);
|
|
6798
|
+
}
|
|
6799
|
+
f = message.getText();
|
|
6800
|
+
if (f != null) {
|
|
6801
|
+
writer.writeMessage(
|
|
6802
|
+
11,
|
|
6574
6803
|
f,
|
|
6575
|
-
|
|
6804
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter
|
|
6576
6805
|
);
|
|
6577
6806
|
}
|
|
6578
6807
|
f = message.getId();
|
|
@@ -6598,20 +6827,35 @@ var require_talk_api_pb = __commonJS({
|
|
|
6598
6827
|
);
|
|
6599
6828
|
}
|
|
6600
6829
|
};
|
|
6601
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6830
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.getAudio = function() {
|
|
6602
6831
|
return (
|
|
6603
|
-
/** @type{?proto.
|
|
6604
|
-
jspb.Message.getWrapperField(this,
|
|
6832
|
+
/** @type{?proto.talk_api.AssistantConversationMessageAudioContent} */
|
|
6833
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageAudioContent, 10)
|
|
6605
6834
|
);
|
|
6606
6835
|
};
|
|
6607
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6608
|
-
return jspb.Message.
|
|
6836
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.setAudio = function(value) {
|
|
6837
|
+
return jspb.Message.setOneofWrapperField(this, 10, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_[0], value);
|
|
6609
6838
|
};
|
|
6610
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6611
|
-
return this.
|
|
6839
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.clearAudio = function() {
|
|
6840
|
+
return this.setAudio(void 0);
|
|
6612
6841
|
};
|
|
6613
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6614
|
-
return jspb.Message.getField(this,
|
|
6842
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.hasAudio = function() {
|
|
6843
|
+
return jspb.Message.getField(this, 10) != null;
|
|
6844
|
+
};
|
|
6845
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.getText = function() {
|
|
6846
|
+
return (
|
|
6847
|
+
/** @type{?proto.talk_api.AssistantConversationMessageTextContent} */
|
|
6848
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageTextContent, 11)
|
|
6849
|
+
);
|
|
6850
|
+
};
|
|
6851
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.setText = function(value) {
|
|
6852
|
+
return jspb.Message.setOneofWrapperField(this, 11, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_[0], value);
|
|
6853
|
+
};
|
|
6854
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.clearText = function() {
|
|
6855
|
+
return this.setText(void 0);
|
|
6856
|
+
};
|
|
6857
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.hasText = function() {
|
|
6858
|
+
return jspb.Message.getField(this, 11) != null;
|
|
6615
6859
|
};
|
|
6616
6860
|
proto.talk_api.AssistantConversationAssistantMessage.prototype.getId = function() {
|
|
6617
6861
|
return (
|
|
@@ -20412,8 +20656,6 @@ var require_assistant_api_pb = __commonJS({
|
|
|
20412
20656
|
goog.exportSymbol("proto.assistant_api.GetAllAssistantProviderModelResponse", null, global);
|
|
20413
20657
|
goog.exportSymbol("proto.assistant_api.GetAllAssistantRequest", null, global);
|
|
20414
20658
|
goog.exportSymbol("proto.assistant_api.GetAllAssistantResponse", null, global);
|
|
20415
|
-
goog.exportSymbol("proto.assistant_api.GetAllAssistantUserConversationRequest", null, global);
|
|
20416
|
-
goog.exportSymbol("proto.assistant_api.GetAllAssistantUserConversationResponse", null, global);
|
|
20417
20659
|
goog.exportSymbol("proto.assistant_api.GetAllMessageRequest", null, global);
|
|
20418
20660
|
goog.exportSymbol("proto.assistant_api.GetAllMessageResponse", null, global);
|
|
20419
20661
|
goog.exportSymbol("proto.assistant_api.GetAssistantConversationRequest", null, global);
|
|
@@ -20556,20 +20798,6 @@ var require_assistant_api_pb = __commonJS({
|
|
|
20556
20798
|
if (goog.DEBUG && !COMPILED) {
|
|
20557
20799
|
proto.assistant_api.UpdateAssistantDetailRequest.displayName = "proto.assistant_api.UpdateAssistantDetailRequest";
|
|
20558
20800
|
}
|
|
20559
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest = function(opt_data) {
|
|
20560
|
-
jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAllAssistantUserConversationRequest.repeatedFields_, null);
|
|
20561
|
-
};
|
|
20562
|
-
goog.inherits(proto.assistant_api.GetAllAssistantUserConversationRequest, jspb.Message);
|
|
20563
|
-
if (goog.DEBUG && !COMPILED) {
|
|
20564
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.displayName = "proto.assistant_api.GetAllAssistantUserConversationRequest";
|
|
20565
|
-
}
|
|
20566
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse = function(opt_data) {
|
|
20567
|
-
jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAllAssistantUserConversationResponse.repeatedFields_, null);
|
|
20568
|
-
};
|
|
20569
|
-
goog.inherits(proto.assistant_api.GetAllAssistantUserConversationResponse, jspb.Message);
|
|
20570
|
-
if (goog.DEBUG && !COMPILED) {
|
|
20571
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.displayName = "proto.assistant_api.GetAllAssistantUserConversationResponse";
|
|
20572
|
-
}
|
|
20573
20801
|
proto.assistant_api.GetAssistantConversationRequest = function(opt_data) {
|
|
20574
20802
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAssistantConversationRequest.repeatedFields_, null);
|
|
20575
20803
|
};
|
|
@@ -24330,21 +24558,20 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24330
24558
|
proto.assistant_api.UpdateAssistantDetailRequest.prototype.setDescription = function(value) {
|
|
24331
24559
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
24332
24560
|
};
|
|
24333
|
-
proto.assistant_api.
|
|
24561
|
+
proto.assistant_api.GetAssistantConversationRequest.repeatedFields_ = [5];
|
|
24334
24562
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24335
|
-
proto.assistant_api.
|
|
24336
|
-
return proto.assistant_api.
|
|
24563
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.toObject = function(opt_includeInstance) {
|
|
24564
|
+
return proto.assistant_api.GetAssistantConversationRequest.toObject(opt_includeInstance, this);
|
|
24337
24565
|
};
|
|
24338
|
-
proto.assistant_api.
|
|
24566
|
+
proto.assistant_api.GetAssistantConversationRequest.toObject = function(includeInstance, msg) {
|
|
24339
24567
|
var f, obj = {
|
|
24340
24568
|
assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"),
|
|
24341
|
-
|
|
24342
|
-
|
|
24343
|
-
msg.
|
|
24344
|
-
common_pb.
|
|
24569
|
+
id: jspb.Message.getFieldWithDefault(msg, 2, "0"),
|
|
24570
|
+
selectorsList: jspb.Message.toObjectList(
|
|
24571
|
+
msg.getSelectorsList(),
|
|
24572
|
+
common_pb.FieldSelector.toObject,
|
|
24345
24573
|
includeInstance
|
|
24346
|
-
)
|
|
24347
|
-
source: jspb.Message.getFieldWithDefault(msg, 7, 0)
|
|
24574
|
+
)
|
|
24348
24575
|
};
|
|
24349
24576
|
if (includeInstance) {
|
|
24350
24577
|
obj.$jspbMessageInstance = msg;
|
|
@@ -24352,12 +24579,12 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24352
24579
|
return obj;
|
|
24353
24580
|
};
|
|
24354
24581
|
}
|
|
24355
|
-
proto.assistant_api.
|
|
24582
|
+
proto.assistant_api.GetAssistantConversationRequest.deserializeBinary = function(bytes) {
|
|
24356
24583
|
var reader = new jspb.BinaryReader(bytes);
|
|
24357
|
-
var msg = new proto.assistant_api.
|
|
24358
|
-
return proto.assistant_api.
|
|
24584
|
+
var msg = new proto.assistant_api.GetAssistantConversationRequest();
|
|
24585
|
+
return proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader(msg, reader);
|
|
24359
24586
|
};
|
|
24360
|
-
proto.assistant_api.
|
|
24587
|
+
proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
24361
24588
|
while (reader.nextField()) {
|
|
24362
24589
|
if (reader.isEndGroup()) {
|
|
24363
24590
|
break;
|
|
@@ -24372,21 +24599,16 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24372
24599
|
msg.setAssistantid(value);
|
|
24373
24600
|
break;
|
|
24374
24601
|
case 2:
|
|
24375
|
-
var value = new common_pb.Paginate();
|
|
24376
|
-
reader.readMessage(value, common_pb.Paginate.deserializeBinaryFromReader);
|
|
24377
|
-
msg.setPaginate(value);
|
|
24378
|
-
break;
|
|
24379
|
-
case 3:
|
|
24380
|
-
var value = new common_pb.Criteria();
|
|
24381
|
-
reader.readMessage(value, common_pb.Criteria.deserializeBinaryFromReader);
|
|
24382
|
-
msg.addCriterias(value);
|
|
24383
|
-
break;
|
|
24384
|
-
case 7:
|
|
24385
24602
|
var value = (
|
|
24386
|
-
/** @type {
|
|
24387
|
-
reader.
|
|
24603
|
+
/** @type {string} */
|
|
24604
|
+
reader.readUint64String()
|
|
24388
24605
|
);
|
|
24389
|
-
msg.
|
|
24606
|
+
msg.setId(value);
|
|
24607
|
+
break;
|
|
24608
|
+
case 5:
|
|
24609
|
+
var value = new common_pb.FieldSelector();
|
|
24610
|
+
reader.readMessage(value, common_pb.FieldSelector.deserializeBinaryFromReader);
|
|
24611
|
+
msg.addSelectors(value);
|
|
24390
24612
|
break;
|
|
24391
24613
|
default:
|
|
24392
24614
|
reader.skipField();
|
|
@@ -24395,12 +24617,12 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24395
24617
|
}
|
|
24396
24618
|
return msg;
|
|
24397
24619
|
};
|
|
24398
|
-
proto.assistant_api.
|
|
24620
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.serializeBinary = function() {
|
|
24399
24621
|
var writer = new jspb.BinaryWriter();
|
|
24400
|
-
proto.assistant_api.
|
|
24622
|
+
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter(this, writer);
|
|
24401
24623
|
return writer.getResultBuffer();
|
|
24402
24624
|
};
|
|
24403
|
-
proto.assistant_api.
|
|
24625
|
+
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter = function(message, writer) {
|
|
24404
24626
|
var f = void 0;
|
|
24405
24627
|
f = message.getAssistantid();
|
|
24406
24628
|
if (parseInt(f, 10) !== 0) {
|
|
@@ -24409,348 +24631,23 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24409
24631
|
f
|
|
24410
24632
|
);
|
|
24411
24633
|
}
|
|
24412
|
-
f = message.
|
|
24413
|
-
if (f
|
|
24414
|
-
writer.
|
|
24634
|
+
f = message.getId();
|
|
24635
|
+
if (parseInt(f, 10) !== 0) {
|
|
24636
|
+
writer.writeUint64String(
|
|
24415
24637
|
2,
|
|
24416
|
-
f
|
|
24417
|
-
common_pb.Paginate.serializeBinaryToWriter
|
|
24638
|
+
f
|
|
24418
24639
|
);
|
|
24419
24640
|
}
|
|
24420
|
-
f = message.
|
|
24641
|
+
f = message.getSelectorsList();
|
|
24421
24642
|
if (f.length > 0) {
|
|
24422
24643
|
writer.writeRepeatedMessage(
|
|
24423
|
-
|
|
24644
|
+
5,
|
|
24424
24645
|
f,
|
|
24425
|
-
common_pb.
|
|
24426
|
-
);
|
|
24427
|
-
}
|
|
24428
|
-
f = message.getSource();
|
|
24429
|
-
if (f !== 0) {
|
|
24430
|
-
writer.writeEnum(
|
|
24431
|
-
7,
|
|
24432
|
-
f
|
|
24646
|
+
common_pb.FieldSelector.serializeBinaryToWriter
|
|
24433
24647
|
);
|
|
24434
24648
|
}
|
|
24435
24649
|
};
|
|
24436
|
-
proto.assistant_api.
|
|
24437
|
-
return (
|
|
24438
|
-
/** @type {string} */
|
|
24439
|
-
jspb.Message.getFieldWithDefault(this, 1, "0")
|
|
24440
|
-
);
|
|
24441
|
-
};
|
|
24442
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setAssistantid = function(value) {
|
|
24443
|
-
return jspb.Message.setProto3StringIntField(this, 1, value);
|
|
24444
|
-
};
|
|
24445
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.getPaginate = function() {
|
|
24446
|
-
return (
|
|
24447
|
-
/** @type{?proto.Paginate} */
|
|
24448
|
-
jspb.Message.getWrapperField(this, common_pb.Paginate, 2)
|
|
24449
|
-
);
|
|
24450
|
-
};
|
|
24451
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setPaginate = function(value) {
|
|
24452
|
-
return jspb.Message.setWrapperField(this, 2, value);
|
|
24453
|
-
};
|
|
24454
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.clearPaginate = function() {
|
|
24455
|
-
return this.setPaginate(void 0);
|
|
24456
|
-
};
|
|
24457
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.hasPaginate = function() {
|
|
24458
|
-
return jspb.Message.getField(this, 2) != null;
|
|
24459
|
-
};
|
|
24460
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.getCriteriasList = function() {
|
|
24461
|
-
return (
|
|
24462
|
-
/** @type{!Array<!proto.Criteria>} */
|
|
24463
|
-
jspb.Message.getRepeatedWrapperField(this, common_pb.Criteria, 3)
|
|
24464
|
-
);
|
|
24465
|
-
};
|
|
24466
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setCriteriasList = function(value) {
|
|
24467
|
-
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
24468
|
-
};
|
|
24469
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.addCriterias = function(opt_value, opt_index) {
|
|
24470
|
-
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Criteria, opt_index);
|
|
24471
|
-
};
|
|
24472
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.clearCriteriasList = function() {
|
|
24473
|
-
return this.setCriteriasList([]);
|
|
24474
|
-
};
|
|
24475
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.getSource = function() {
|
|
24476
|
-
return (
|
|
24477
|
-
/** @type {!proto.Source} */
|
|
24478
|
-
jspb.Message.getFieldWithDefault(this, 7, 0)
|
|
24479
|
-
);
|
|
24480
|
-
};
|
|
24481
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setSource = function(value) {
|
|
24482
|
-
return jspb.Message.setProto3EnumField(this, 7, value);
|
|
24483
|
-
};
|
|
24484
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.repeatedFields_ = [3];
|
|
24485
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24486
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.toObject = function(opt_includeInstance) {
|
|
24487
|
-
return proto.assistant_api.GetAllAssistantUserConversationResponse.toObject(opt_includeInstance, this);
|
|
24488
|
-
};
|
|
24489
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.toObject = function(includeInstance, msg) {
|
|
24490
|
-
var f, obj = {
|
|
24491
|
-
code: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
24492
|
-
success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
|
|
24493
|
-
dataList: jspb.Message.toObjectList(
|
|
24494
|
-
msg.getDataList(),
|
|
24495
|
-
common_pb.AssistantConversation.toObject,
|
|
24496
|
-
includeInstance
|
|
24497
|
-
),
|
|
24498
|
-
error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f),
|
|
24499
|
-
paginated: (f = msg.getPaginated()) && common_pb.Paginated.toObject(includeInstance, f)
|
|
24500
|
-
};
|
|
24501
|
-
if (includeInstance) {
|
|
24502
|
-
obj.$jspbMessageInstance = msg;
|
|
24503
|
-
}
|
|
24504
|
-
return obj;
|
|
24505
|
-
};
|
|
24506
|
-
}
|
|
24507
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.deserializeBinary = function(bytes) {
|
|
24508
|
-
var reader = new jspb.BinaryReader(bytes);
|
|
24509
|
-
var msg = new proto.assistant_api.GetAllAssistantUserConversationResponse();
|
|
24510
|
-
return proto.assistant_api.GetAllAssistantUserConversationResponse.deserializeBinaryFromReader(msg, reader);
|
|
24511
|
-
};
|
|
24512
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
24513
|
-
while (reader.nextField()) {
|
|
24514
|
-
if (reader.isEndGroup()) {
|
|
24515
|
-
break;
|
|
24516
|
-
}
|
|
24517
|
-
var field = reader.getFieldNumber();
|
|
24518
|
-
switch (field) {
|
|
24519
|
-
case 1:
|
|
24520
|
-
var value = (
|
|
24521
|
-
/** @type {number} */
|
|
24522
|
-
reader.readInt32()
|
|
24523
|
-
);
|
|
24524
|
-
msg.setCode(value);
|
|
24525
|
-
break;
|
|
24526
|
-
case 2:
|
|
24527
|
-
var value = (
|
|
24528
|
-
/** @type {boolean} */
|
|
24529
|
-
reader.readBool()
|
|
24530
|
-
);
|
|
24531
|
-
msg.setSuccess(value);
|
|
24532
|
-
break;
|
|
24533
|
-
case 3:
|
|
24534
|
-
var value = new common_pb.AssistantConversation();
|
|
24535
|
-
reader.readMessage(value, common_pb.AssistantConversation.deserializeBinaryFromReader);
|
|
24536
|
-
msg.addData(value);
|
|
24537
|
-
break;
|
|
24538
|
-
case 4:
|
|
24539
|
-
var value = new common_pb.Error();
|
|
24540
|
-
reader.readMessage(value, common_pb.Error.deserializeBinaryFromReader);
|
|
24541
|
-
msg.setError(value);
|
|
24542
|
-
break;
|
|
24543
|
-
case 5:
|
|
24544
|
-
var value = new common_pb.Paginated();
|
|
24545
|
-
reader.readMessage(value, common_pb.Paginated.deserializeBinaryFromReader);
|
|
24546
|
-
msg.setPaginated(value);
|
|
24547
|
-
break;
|
|
24548
|
-
default:
|
|
24549
|
-
reader.skipField();
|
|
24550
|
-
break;
|
|
24551
|
-
}
|
|
24552
|
-
}
|
|
24553
|
-
return msg;
|
|
24554
|
-
};
|
|
24555
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.serializeBinary = function() {
|
|
24556
|
-
var writer = new jspb.BinaryWriter();
|
|
24557
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.serializeBinaryToWriter(this, writer);
|
|
24558
|
-
return writer.getResultBuffer();
|
|
24559
|
-
};
|
|
24560
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.serializeBinaryToWriter = function(message, writer) {
|
|
24561
|
-
var f = void 0;
|
|
24562
|
-
f = message.getCode();
|
|
24563
|
-
if (f !== 0) {
|
|
24564
|
-
writer.writeInt32(
|
|
24565
|
-
1,
|
|
24566
|
-
f
|
|
24567
|
-
);
|
|
24568
|
-
}
|
|
24569
|
-
f = message.getSuccess();
|
|
24570
|
-
if (f) {
|
|
24571
|
-
writer.writeBool(
|
|
24572
|
-
2,
|
|
24573
|
-
f
|
|
24574
|
-
);
|
|
24575
|
-
}
|
|
24576
|
-
f = message.getDataList();
|
|
24577
|
-
if (f.length > 0) {
|
|
24578
|
-
writer.writeRepeatedMessage(
|
|
24579
|
-
3,
|
|
24580
|
-
f,
|
|
24581
|
-
common_pb.AssistantConversation.serializeBinaryToWriter
|
|
24582
|
-
);
|
|
24583
|
-
}
|
|
24584
|
-
f = message.getError();
|
|
24585
|
-
if (f != null) {
|
|
24586
|
-
writer.writeMessage(
|
|
24587
|
-
4,
|
|
24588
|
-
f,
|
|
24589
|
-
common_pb.Error.serializeBinaryToWriter
|
|
24590
|
-
);
|
|
24591
|
-
}
|
|
24592
|
-
f = message.getPaginated();
|
|
24593
|
-
if (f != null) {
|
|
24594
|
-
writer.writeMessage(
|
|
24595
|
-
5,
|
|
24596
|
-
f,
|
|
24597
|
-
common_pb.Paginated.serializeBinaryToWriter
|
|
24598
|
-
);
|
|
24599
|
-
}
|
|
24600
|
-
};
|
|
24601
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getCode = function() {
|
|
24602
|
-
return (
|
|
24603
|
-
/** @type {number} */
|
|
24604
|
-
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
24605
|
-
);
|
|
24606
|
-
};
|
|
24607
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setCode = function(value) {
|
|
24608
|
-
return jspb.Message.setProto3IntField(this, 1, value);
|
|
24609
|
-
};
|
|
24610
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getSuccess = function() {
|
|
24611
|
-
return (
|
|
24612
|
-
/** @type {boolean} */
|
|
24613
|
-
jspb.Message.getBooleanFieldWithDefault(this, 2, false)
|
|
24614
|
-
);
|
|
24615
|
-
};
|
|
24616
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setSuccess = function(value) {
|
|
24617
|
-
return jspb.Message.setProto3BooleanField(this, 2, value);
|
|
24618
|
-
};
|
|
24619
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getDataList = function() {
|
|
24620
|
-
return (
|
|
24621
|
-
/** @type{!Array<!proto.AssistantConversation>} */
|
|
24622
|
-
jspb.Message.getRepeatedWrapperField(this, common_pb.AssistantConversation, 3)
|
|
24623
|
-
);
|
|
24624
|
-
};
|
|
24625
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setDataList = function(value) {
|
|
24626
|
-
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
24627
|
-
};
|
|
24628
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.addData = function(opt_value, opt_index) {
|
|
24629
|
-
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversation, opt_index);
|
|
24630
|
-
};
|
|
24631
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.clearDataList = function() {
|
|
24632
|
-
return this.setDataList([]);
|
|
24633
|
-
};
|
|
24634
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getError = function() {
|
|
24635
|
-
return (
|
|
24636
|
-
/** @type{?proto.Error} */
|
|
24637
|
-
jspb.Message.getWrapperField(this, common_pb.Error, 4)
|
|
24638
|
-
);
|
|
24639
|
-
};
|
|
24640
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setError = function(value) {
|
|
24641
|
-
return jspb.Message.setWrapperField(this, 4, value);
|
|
24642
|
-
};
|
|
24643
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.clearError = function() {
|
|
24644
|
-
return this.setError(void 0);
|
|
24645
|
-
};
|
|
24646
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.hasError = function() {
|
|
24647
|
-
return jspb.Message.getField(this, 4) != null;
|
|
24648
|
-
};
|
|
24649
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getPaginated = function() {
|
|
24650
|
-
return (
|
|
24651
|
-
/** @type{?proto.Paginated} */
|
|
24652
|
-
jspb.Message.getWrapperField(this, common_pb.Paginated, 5)
|
|
24653
|
-
);
|
|
24654
|
-
};
|
|
24655
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setPaginated = function(value) {
|
|
24656
|
-
return jspb.Message.setWrapperField(this, 5, value);
|
|
24657
|
-
};
|
|
24658
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.clearPaginated = function() {
|
|
24659
|
-
return this.setPaginated(void 0);
|
|
24660
|
-
};
|
|
24661
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.hasPaginated = function() {
|
|
24662
|
-
return jspb.Message.getField(this, 5) != null;
|
|
24663
|
-
};
|
|
24664
|
-
proto.assistant_api.GetAssistantConversationRequest.repeatedFields_ = [5];
|
|
24665
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24666
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.toObject = function(opt_includeInstance) {
|
|
24667
|
-
return proto.assistant_api.GetAssistantConversationRequest.toObject(opt_includeInstance, this);
|
|
24668
|
-
};
|
|
24669
|
-
proto.assistant_api.GetAssistantConversationRequest.toObject = function(includeInstance, msg) {
|
|
24670
|
-
var f, obj = {
|
|
24671
|
-
assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"),
|
|
24672
|
-
assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"),
|
|
24673
|
-
selectorsList: jspb.Message.toObjectList(
|
|
24674
|
-
msg.getSelectorsList(),
|
|
24675
|
-
common_pb.FieldSelector.toObject,
|
|
24676
|
-
includeInstance
|
|
24677
|
-
)
|
|
24678
|
-
};
|
|
24679
|
-
if (includeInstance) {
|
|
24680
|
-
obj.$jspbMessageInstance = msg;
|
|
24681
|
-
}
|
|
24682
|
-
return obj;
|
|
24683
|
-
};
|
|
24684
|
-
}
|
|
24685
|
-
proto.assistant_api.GetAssistantConversationRequest.deserializeBinary = function(bytes) {
|
|
24686
|
-
var reader = new jspb.BinaryReader(bytes);
|
|
24687
|
-
var msg = new proto.assistant_api.GetAssistantConversationRequest();
|
|
24688
|
-
return proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader(msg, reader);
|
|
24689
|
-
};
|
|
24690
|
-
proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
24691
|
-
while (reader.nextField()) {
|
|
24692
|
-
if (reader.isEndGroup()) {
|
|
24693
|
-
break;
|
|
24694
|
-
}
|
|
24695
|
-
var field = reader.getFieldNumber();
|
|
24696
|
-
switch (field) {
|
|
24697
|
-
case 1:
|
|
24698
|
-
var value = (
|
|
24699
|
-
/** @type {string} */
|
|
24700
|
-
reader.readUint64String()
|
|
24701
|
-
);
|
|
24702
|
-
msg.setAssistantid(value);
|
|
24703
|
-
break;
|
|
24704
|
-
case 2:
|
|
24705
|
-
var value = (
|
|
24706
|
-
/** @type {string} */
|
|
24707
|
-
reader.readUint64String()
|
|
24708
|
-
);
|
|
24709
|
-
msg.setAssistantconversationid(value);
|
|
24710
|
-
break;
|
|
24711
|
-
case 5:
|
|
24712
|
-
var value = new common_pb.FieldSelector();
|
|
24713
|
-
reader.readMessage(value, common_pb.FieldSelector.deserializeBinaryFromReader);
|
|
24714
|
-
msg.addSelectors(value);
|
|
24715
|
-
break;
|
|
24716
|
-
default:
|
|
24717
|
-
reader.skipField();
|
|
24718
|
-
break;
|
|
24719
|
-
}
|
|
24720
|
-
}
|
|
24721
|
-
return msg;
|
|
24722
|
-
};
|
|
24723
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.serializeBinary = function() {
|
|
24724
|
-
var writer = new jspb.BinaryWriter();
|
|
24725
|
-
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter(this, writer);
|
|
24726
|
-
return writer.getResultBuffer();
|
|
24727
|
-
};
|
|
24728
|
-
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter = function(message, writer) {
|
|
24729
|
-
var f = void 0;
|
|
24730
|
-
f = message.getAssistantid();
|
|
24731
|
-
if (parseInt(f, 10) !== 0) {
|
|
24732
|
-
writer.writeUint64String(
|
|
24733
|
-
1,
|
|
24734
|
-
f
|
|
24735
|
-
);
|
|
24736
|
-
}
|
|
24737
|
-
f = message.getAssistantconversationid();
|
|
24738
|
-
if (parseInt(f, 10) !== 0) {
|
|
24739
|
-
writer.writeUint64String(
|
|
24740
|
-
2,
|
|
24741
|
-
f
|
|
24742
|
-
);
|
|
24743
|
-
}
|
|
24744
|
-
f = message.getSelectorsList();
|
|
24745
|
-
if (f.length > 0) {
|
|
24746
|
-
writer.writeRepeatedMessage(
|
|
24747
|
-
5,
|
|
24748
|
-
f,
|
|
24749
|
-
common_pb.FieldSelector.serializeBinaryToWriter
|
|
24750
|
-
);
|
|
24751
|
-
}
|
|
24752
|
-
};
|
|
24753
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.getAssistantid = function() {
|
|
24650
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.getAssistantid = function() {
|
|
24754
24651
|
return (
|
|
24755
24652
|
/** @type {string} */
|
|
24756
24653
|
jspb.Message.getFieldWithDefault(this, 1, "0")
|
|
@@ -24759,13 +24656,13 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24759
24656
|
proto.assistant_api.GetAssistantConversationRequest.prototype.setAssistantid = function(value) {
|
|
24760
24657
|
return jspb.Message.setProto3StringIntField(this, 1, value);
|
|
24761
24658
|
};
|
|
24762
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.
|
|
24659
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.getId = function() {
|
|
24763
24660
|
return (
|
|
24764
24661
|
/** @type {string} */
|
|
24765
24662
|
jspb.Message.getFieldWithDefault(this, 2, "0")
|
|
24766
24663
|
);
|
|
24767
24664
|
};
|
|
24768
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.
|
|
24665
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.setId = function(value) {
|
|
24769
24666
|
return jspb.Message.setProto3StringIntField(this, 2, value);
|
|
24770
24667
|
};
|
|
24771
24668
|
proto.assistant_api.GetAssistantConversationRequest.prototype.getSelectorsList = function() {
|
|
@@ -25264,45 +25161,15 @@ var DeviceManager = class _DeviceManager {
|
|
|
25264
25161
|
};
|
|
25265
25162
|
|
|
25266
25163
|
// src/agents/voice-agent.ts
|
|
25267
|
-
var
|
|
25268
|
-
|
|
25269
|
-
// src/utils/rapida_content.ts
|
|
25270
|
-
var import_common_pb = __toESM(require_common_pb());
|
|
25271
|
-
var TEXT_CONTENT_FORMAT_RAW = "raw";
|
|
25272
|
-
var AUDIO_CONTENT_FORMAT_CHUNK = "chunk";
|
|
25273
|
-
var toTextContent = (str, format) => {
|
|
25274
|
-
const cnt = new import_common_pb.Content();
|
|
25275
|
-
if (format) cnt.setContentformat(format);
|
|
25276
|
-
else cnt.setContentformat(TEXT_CONTENT_FORMAT_RAW);
|
|
25277
|
-
cnt.setContenttype("text" /* TEXT_CONTENT */);
|
|
25278
|
-
cnt.setContent(new TextEncoder().encode(str));
|
|
25279
|
-
return cnt;
|
|
25280
|
-
};
|
|
25281
|
-
var toStreamAudioContent = (raw) => {
|
|
25282
|
-
const cnt = new import_common_pb.Content();
|
|
25283
|
-
cnt.setContentformat(AUDIO_CONTENT_FORMAT_CHUNK);
|
|
25284
|
-
cnt.setContenttype("audio" /* AUDIO_CONTENT */);
|
|
25285
|
-
cnt.setContent(raw);
|
|
25286
|
-
return cnt;
|
|
25287
|
-
};
|
|
25288
|
-
var toContentText = (cnt) => {
|
|
25289
|
-
if (!cnt) return "";
|
|
25290
|
-
return cnt.filter((x) => x.getContenttype() === "text").map((x) => {
|
|
25291
|
-
try {
|
|
25292
|
-
return new TextDecoder().decode(x.getContent());
|
|
25293
|
-
} catch (error) {
|
|
25294
|
-
return "";
|
|
25295
|
-
}
|
|
25296
|
-
}).join(" ");
|
|
25297
|
-
};
|
|
25164
|
+
var import_talk_api_pb4 = __toESM(require_talk_api_pb());
|
|
25298
25165
|
|
|
25299
25166
|
// src/agents/index.ts
|
|
25300
25167
|
var import_talk_api_pb = __toESM(require_talk_api_pb());
|
|
25301
25168
|
var import_events = require("events");
|
|
25302
|
-
var
|
|
25169
|
+
var import_common_pb5 = __toESM(require_common_pb());
|
|
25303
25170
|
|
|
25304
25171
|
// src/clients/talk.ts
|
|
25305
|
-
var
|
|
25172
|
+
var import_common_pb = __toESM(require_common_pb());
|
|
25306
25173
|
|
|
25307
25174
|
// src/utils/rapida_header.ts
|
|
25308
25175
|
var HEADER_REGION_KEY = "x-rapida-region";
|
|
@@ -25386,7 +25253,7 @@ var WithClientContext = (metadata = new import_grpc_web.grpc.Metadata()) => {
|
|
|
25386
25253
|
};
|
|
25387
25254
|
|
|
25388
25255
|
// src/clients/talk.ts
|
|
25389
|
-
var
|
|
25256
|
+
var import_common_pb2 = __toESM(require_common_pb());
|
|
25390
25257
|
function AssistantTalk(connectionConfig, authHeader) {
|
|
25391
25258
|
return connectionConfig.streamClient.assistantTalk(
|
|
25392
25259
|
WithAuthContext(connectionConfig.auth || authHeader)
|
|
@@ -25434,13 +25301,13 @@ function getFeedback(input) {
|
|
|
25434
25301
|
var import_assistant_api_pb2 = __toESM(require_assistant_api_pb());
|
|
25435
25302
|
|
|
25436
25303
|
// src/clients/assistant.ts
|
|
25437
|
-
var
|
|
25304
|
+
var import_common_pb3 = __toESM(require_common_pb());
|
|
25438
25305
|
var import_assistant_api_pb = __toESM(require_assistant_api_pb());
|
|
25439
25306
|
var import_assistant_analysis_pb = __toESM(require_assistant_analysis_pb());
|
|
25440
25307
|
var import_assistant_tool_pb = __toESM(require_assistant_tool_pb());
|
|
25441
25308
|
var import_assistant_knowledge_pb = __toESM(require_assistant_knowledge_pb());
|
|
25442
25309
|
var import_assistant_webhook_pb = __toESM(require_assistant_webhook_pb());
|
|
25443
|
-
var
|
|
25310
|
+
var import_common_pb4 = __toESM(require_common_pb());
|
|
25444
25311
|
var import_struct_pb = require("google-protobuf/google/protobuf/struct_pb");
|
|
25445
25312
|
function GetAssistant(connectionConfig, req, authHeader) {
|
|
25446
25313
|
return new Promise((resolve, reject) => {
|
|
@@ -25456,6 +25323,7 @@ function GetAssistant(connectionConfig, req, authHeader) {
|
|
|
25456
25323
|
}
|
|
25457
25324
|
|
|
25458
25325
|
// src/agents/index.ts
|
|
25326
|
+
var import_talk_api_pb2 = __toESM(require_talk_api_pb());
|
|
25459
25327
|
var Agent = class extends import_events.EventEmitter {
|
|
25460
25328
|
// Connection and State Management
|
|
25461
25329
|
connectionState = "disconnected" /* Disconnected */;
|
|
@@ -25609,7 +25477,7 @@ var Agent = class extends import_events.EventEmitter {
|
|
|
25609
25477
|
req.setAssistantconversationid(this._conversationId);
|
|
25610
25478
|
req.setMessageid(messageId);
|
|
25611
25479
|
for (const mtr of metrics) {
|
|
25612
|
-
const _m = new
|
|
25480
|
+
const _m = new import_common_pb5.Metric();
|
|
25613
25481
|
_m.setName(mtr.name);
|
|
25614
25482
|
_m.setValue(mtr.value);
|
|
25615
25483
|
_m.setDescription(mtr.description);
|
|
@@ -25656,7 +25524,7 @@ var Agent = class extends import_events.EventEmitter {
|
|
|
25656
25524
|
req.setAssistantid(this.agentConfig.definition.getAssistantid());
|
|
25657
25525
|
req.setAssistantconversationid(this._conversationId);
|
|
25658
25526
|
for (const mtr of metrics) {
|
|
25659
|
-
const _m = new
|
|
25527
|
+
const _m = new import_common_pb5.Metric();
|
|
25660
25528
|
_m.setName(mtr.name);
|
|
25661
25529
|
_m.setValue(mtr.value);
|
|
25662
25530
|
_m.setDescription(mtr.description);
|
|
@@ -25684,13 +25552,26 @@ var Agent = class extends import_events.EventEmitter {
|
|
|
25684
25552
|
* @param contents - Message contents
|
|
25685
25553
|
* @returns Configured messaging request
|
|
25686
25554
|
*/
|
|
25687
|
-
|
|
25555
|
+
createAssistantTextMessage(content) {
|
|
25688
25556
|
const request = new import_talk_api_pb.AssistantMessagingRequest();
|
|
25689
25557
|
const userMessage = new import_talk_api_pb.AssistantConversationUserMessage();
|
|
25690
|
-
const message = new
|
|
25691
|
-
message.
|
|
25692
|
-
|
|
25693
|
-
|
|
25558
|
+
const message = new import_talk_api_pb.AssistantConversationMessageTextContent();
|
|
25559
|
+
message.setContent(content);
|
|
25560
|
+
userMessage.setText(message);
|
|
25561
|
+
request.setMessage(userMessage);
|
|
25562
|
+
return request;
|
|
25563
|
+
}
|
|
25564
|
+
/**
|
|
25565
|
+
*
|
|
25566
|
+
* @param content
|
|
25567
|
+
* @returns
|
|
25568
|
+
*/
|
|
25569
|
+
createAssistantAudioMessage(content) {
|
|
25570
|
+
const request = new import_talk_api_pb.AssistantMessagingRequest();
|
|
25571
|
+
const userMessage = new import_talk_api_pb.AssistantConversationUserMessage();
|
|
25572
|
+
const message = new import_talk_api_pb2.AssistantConversationMessageAudioContent();
|
|
25573
|
+
message.setContent(content);
|
|
25574
|
+
userMessage.setAudio(message);
|
|
25694
25575
|
request.setMessage(userMessage);
|
|
25695
25576
|
return request;
|
|
25696
25577
|
}
|
|
@@ -26219,12 +26100,33 @@ function arrayBufferToUint8(arrayBuffer) {
|
|
|
26219
26100
|
return new Uint8Array(arrayBuffer);
|
|
26220
26101
|
}
|
|
26221
26102
|
|
|
26103
|
+
// src/types/agent-callback.ts
|
|
26104
|
+
var import_talk_api_pb3 = __toESM(require_talk_api_pb());
|
|
26105
|
+
|
|
26106
|
+
// src/utils/rapida_content.ts
|
|
26107
|
+
var import_common_pb6 = __toESM(require_common_pb());
|
|
26108
|
+
var toContentText = (cnt) => {
|
|
26109
|
+
if (!cnt) return "";
|
|
26110
|
+
return cnt.filter((x) => x.getContenttype() === "text").map((x) => {
|
|
26111
|
+
try {
|
|
26112
|
+
return new TextDecoder().decode(x.getContent());
|
|
26113
|
+
} catch (error) {
|
|
26114
|
+
return "";
|
|
26115
|
+
}
|
|
26116
|
+
}).join(" ");
|
|
26117
|
+
};
|
|
26118
|
+
|
|
26222
26119
|
// src/types/agent-callback.ts
|
|
26223
26120
|
var ConversationUserMessage = class {
|
|
26224
26121
|
constructor(config) {
|
|
26225
26122
|
if (config) {
|
|
26226
26123
|
Object.assign(this, config.toObject());
|
|
26227
|
-
|
|
26124
|
+
switch (config.getMessageCase()) {
|
|
26125
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
26126
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
26127
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
26128
|
+
this.messageText = config.getText()?.getContent();
|
|
26129
|
+
}
|
|
26228
26130
|
}
|
|
26229
26131
|
}
|
|
26230
26132
|
};
|
|
@@ -26232,7 +26134,12 @@ var ConversationAssistantMessage = class {
|
|
|
26232
26134
|
constructor(config) {
|
|
26233
26135
|
if (config) {
|
|
26234
26136
|
Object.assign(this, config.toObject());
|
|
26235
|
-
|
|
26137
|
+
switch (config.getMessageCase()) {
|
|
26138
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
26139
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
26140
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
26141
|
+
this.messageText = config.getText()?.getContent();
|
|
26142
|
+
}
|
|
26236
26143
|
}
|
|
26237
26144
|
}
|
|
26238
26145
|
};
|
|
@@ -26354,9 +26261,9 @@ var VoiceAgent = class extends Agent {
|
|
|
26354
26261
|
const maxVolume = event.data[1];
|
|
26355
26262
|
if (this.inputChannel == "audio" /* Audio */)
|
|
26356
26263
|
this.talkingConnection?.write(
|
|
26357
|
-
this.
|
|
26358
|
-
|
|
26359
|
-
|
|
26264
|
+
this.createAssistantAudioMessage(
|
|
26265
|
+
arrayBufferToUint8(rawAudioPcmData.buffer)
|
|
26266
|
+
)
|
|
26360
26267
|
);
|
|
26361
26268
|
};
|
|
26362
26269
|
/**
|
|
@@ -26432,9 +26339,7 @@ var VoiceAgent = class extends Agent {
|
|
|
26432
26339
|
onSendText = async (text) => {
|
|
26433
26340
|
if (!this.isConnected) await this.connect();
|
|
26434
26341
|
if (this.inputChannel == "text" /* Text */) {
|
|
26435
|
-
this.talkingConnection?.write(
|
|
26436
|
-
this.createAssistantRequest("user", [toTextContent(text)])
|
|
26437
|
-
);
|
|
26342
|
+
this.talkingConnection?.write(this.createAssistantTextMessage(text));
|
|
26438
26343
|
}
|
|
26439
26344
|
};
|
|
26440
26345
|
/**
|
|
@@ -26499,13 +26404,13 @@ var VoiceAgent = class extends Agent {
|
|
|
26499
26404
|
onHandleInterruption = (interruptionData) => {
|
|
26500
26405
|
if (interruptionData) {
|
|
26501
26406
|
switch (interruptionData.getType()) {
|
|
26502
|
-
case
|
|
26407
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_UNSPECIFIED:
|
|
26503
26408
|
console.log("Unspecified interruption type");
|
|
26504
26409
|
break;
|
|
26505
|
-
case
|
|
26410
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_VAD:
|
|
26506
26411
|
this.fadeOutAudio();
|
|
26507
26412
|
break;
|
|
26508
|
-
case
|
|
26413
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_WORD:
|
|
26509
26414
|
if (this.agentMessages.length > 0) {
|
|
26510
26415
|
const lastIndex = this.agentMessages.length - 1;
|
|
26511
26416
|
this.agentMessages[lastIndex] = {
|
|
@@ -26520,53 +26425,70 @@ var VoiceAgent = class extends Agent {
|
|
|
26520
26425
|
}
|
|
26521
26426
|
this.emit(
|
|
26522
26427
|
"onConversationEvent" /* ConversationEvent */,
|
|
26523
|
-
|
|
26428
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION,
|
|
26524
26429
|
interruptionData
|
|
26525
26430
|
);
|
|
26526
26431
|
}
|
|
26527
26432
|
};
|
|
26528
26433
|
onHandleUser = (userContent) => {
|
|
26529
26434
|
if (userContent) {
|
|
26530
|
-
|
|
26531
|
-
|
|
26532
|
-
|
|
26533
|
-
|
|
26534
|
-
|
|
26535
|
-
|
|
26536
|
-
|
|
26537
|
-
|
|
26435
|
+
switch (userContent.getMessageCase()) {
|
|
26436
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
26437
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
26438
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
26439
|
+
const agentTranscript = userContent.getText()?.getContent();
|
|
26440
|
+
if (agentTranscript) {
|
|
26441
|
+
if (this.agentMessages.length > 0) {
|
|
26442
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
26443
|
+
if (lastMessage.role === "user" /* User */ && lastMessage.id === userContent.getId()) {
|
|
26444
|
+
this.agentMessages.pop();
|
|
26445
|
+
}
|
|
26446
|
+
}
|
|
26447
|
+
this.agentMessages.push({
|
|
26448
|
+
id: userContent.getId(),
|
|
26449
|
+
role: "user" /* User */,
|
|
26450
|
+
messages: [agentTranscript],
|
|
26451
|
+
time: toDate(userContent?.getTime()),
|
|
26452
|
+
status: userContent.getCompleted() ? "complete" /* Complete */ : "pending" /* Pending */
|
|
26453
|
+
});
|
|
26538
26454
|
}
|
|
26539
|
-
}
|
|
26540
|
-
this.agentMessages.push({
|
|
26541
|
-
id: userContent.getId(),
|
|
26542
|
-
role: "user" /* User */,
|
|
26543
|
-
messages: [agentTranscript],
|
|
26544
|
-
time: toDate(userContent?.getTime()),
|
|
26545
|
-
status: userContent.getCompleted() ? "complete" /* Complete */ : "pending" /* Pending */
|
|
26546
|
-
});
|
|
26547
26455
|
}
|
|
26548
26456
|
this.emit(
|
|
26549
26457
|
"onConversationEvent" /* ConversationEvent */,
|
|
26550
|
-
|
|
26458
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER,
|
|
26551
26459
|
userContent
|
|
26552
26460
|
);
|
|
26553
26461
|
}
|
|
26554
26462
|
};
|
|
26555
26463
|
onHandleAssistant = (systemContent) => {
|
|
26556
26464
|
if (systemContent) {
|
|
26557
|
-
|
|
26558
|
-
|
|
26559
|
-
|
|
26560
|
-
|
|
26561
|
-
|
|
26562
|
-
|
|
26563
|
-
|
|
26564
|
-
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26568
|
-
|
|
26569
|
-
|
|
26465
|
+
switch (systemContent.getMessageCase()) {
|
|
26466
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.MESSAGE_NOT_SET:
|
|
26467
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.AUDIO:
|
|
26468
|
+
const content = systemContent.getAudio();
|
|
26469
|
+
if (content) {
|
|
26470
|
+
const audioData = content.getContent_asU8();
|
|
26471
|
+
this.addAudioChunk(new Uint8Array(audioData).buffer);
|
|
26472
|
+
}
|
|
26473
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.TEXT:
|
|
26474
|
+
const systemTranscript = systemContent.getText()?.getContent();
|
|
26475
|
+
if (systemTranscript) {
|
|
26476
|
+
if (systemContent.getCompleted()) {
|
|
26477
|
+
if (this.agentMessages.length > 0) {
|
|
26478
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
26479
|
+
if (lastMessage.role === "system" /* System */ && lastMessage.status === "pending" /* Pending */) {
|
|
26480
|
+
lastMessage.messages = [systemTranscript];
|
|
26481
|
+
lastMessage.status = "complete" /* Complete */;
|
|
26482
|
+
lastMessage.time = toDate(systemContent?.getTime());
|
|
26483
|
+
} else {
|
|
26484
|
+
this.agentMessages.push({
|
|
26485
|
+
id: systemContent.getId(),
|
|
26486
|
+
role: "system" /* System */,
|
|
26487
|
+
messages: [systemTranscript],
|
|
26488
|
+
time: toDate(systemContent?.getTime()),
|
|
26489
|
+
status: "complete" /* Complete */
|
|
26490
|
+
});
|
|
26491
|
+
}
|
|
26570
26492
|
} else {
|
|
26571
26493
|
this.agentMessages.push({
|
|
26572
26494
|
id: systemContent.getId(),
|
|
@@ -26577,20 +26499,20 @@ var VoiceAgent = class extends Agent {
|
|
|
26577
26499
|
});
|
|
26578
26500
|
}
|
|
26579
26501
|
} else {
|
|
26580
|
-
this.agentMessages.
|
|
26581
|
-
|
|
26582
|
-
role
|
|
26583
|
-
|
|
26584
|
-
|
|
26585
|
-
|
|
26586
|
-
|
|
26587
|
-
|
|
26588
|
-
|
|
26589
|
-
|
|
26590
|
-
|
|
26591
|
-
|
|
26592
|
-
|
|
26593
|
-
|
|
26502
|
+
if (this.agentMessages.length > 0) {
|
|
26503
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
26504
|
+
if (lastMessage.role === "system" /* System */ && lastMessage.status === "pending" /* Pending */) {
|
|
26505
|
+
lastMessage.messages[0] += systemTranscript;
|
|
26506
|
+
lastMessage.time = toDate(systemContent?.getTime());
|
|
26507
|
+
} else {
|
|
26508
|
+
this.agentMessages.push({
|
|
26509
|
+
id: systemContent.getId(),
|
|
26510
|
+
role: "system" /* System */,
|
|
26511
|
+
messages: [systemTranscript],
|
|
26512
|
+
time: toDate(systemContent?.getTime()),
|
|
26513
|
+
status: "pending" /* Pending */
|
|
26514
|
+
});
|
|
26515
|
+
}
|
|
26594
26516
|
} else {
|
|
26595
26517
|
this.agentMessages.push({
|
|
26596
26518
|
id: systemContent.getId(),
|
|
@@ -26600,29 +26522,12 @@ var VoiceAgent = class extends Agent {
|
|
|
26600
26522
|
status: "pending" /* Pending */
|
|
26601
26523
|
});
|
|
26602
26524
|
}
|
|
26603
|
-
} else {
|
|
26604
|
-
this.agentMessages.push({
|
|
26605
|
-
id: systemContent.getId(),
|
|
26606
|
-
role: "system" /* System */,
|
|
26607
|
-
messages: [systemTranscript],
|
|
26608
|
-
time: toDate(systemContent?.getTime()),
|
|
26609
|
-
status: "pending" /* Pending */
|
|
26610
|
-
});
|
|
26611
26525
|
}
|
|
26612
26526
|
}
|
|
26613
|
-
}
|
|
26614
|
-
}
|
|
26615
|
-
if (responseContent.filter((x) => x.getContenttype() == "audio").length > 0) {
|
|
26616
|
-
for (const content of responseContent) {
|
|
26617
|
-
if (content.getContenttype() === "audio") {
|
|
26618
|
-
const audioData = content.getContent_asU8();
|
|
26619
|
-
this.addAudioChunk(new Uint8Array(audioData).buffer);
|
|
26620
|
-
}
|
|
26621
|
-
}
|
|
26622
26527
|
}
|
|
26623
26528
|
this.emit(
|
|
26624
26529
|
"onConversationEvent" /* ConversationEvent */,
|
|
26625
|
-
|
|
26530
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT,
|
|
26626
26531
|
systemContent
|
|
26627
26532
|
);
|
|
26628
26533
|
}
|
|
@@ -26634,22 +26539,22 @@ var VoiceAgent = class extends Agent {
|
|
|
26634
26539
|
*/
|
|
26635
26540
|
onRecieve = async (response) => {
|
|
26636
26541
|
switch (response.getDataCase()) {
|
|
26637
|
-
case
|
|
26542
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
|
|
26638
26543
|
break;
|
|
26639
|
-
case
|
|
26544
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION:
|
|
26640
26545
|
this.onHandleInterruption(response.getInterruption());
|
|
26641
26546
|
break;
|
|
26642
|
-
case
|
|
26547
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER:
|
|
26643
26548
|
this.onHandleUser(response.getUser());
|
|
26644
26549
|
break;
|
|
26645
|
-
case
|
|
26550
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT:
|
|
26646
26551
|
this.onHandleAssistant(response.getAssistant());
|
|
26647
26552
|
break;
|
|
26648
|
-
case
|
|
26553
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.CONFIGURATION:
|
|
26649
26554
|
const conversation = response.getConfiguration();
|
|
26650
26555
|
if (!conversation?.getAssistantconversationid()) return;
|
|
26651
26556
|
break;
|
|
26652
|
-
case
|
|
26557
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.MESSAGE:
|
|
26653
26558
|
break;
|
|
26654
26559
|
default:
|
|
26655
26560
|
break;
|
|
@@ -26662,28 +26567,28 @@ var VoiceAgent = class extends Agent {
|
|
|
26662
26567
|
onCallback(response) {
|
|
26663
26568
|
for (const agentCallback of this.agentCallbacks) {
|
|
26664
26569
|
switch (response.getDataCase()) {
|
|
26665
|
-
case
|
|
26570
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
|
|
26666
26571
|
break;
|
|
26667
|
-
case
|
|
26572
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION:
|
|
26668
26573
|
if (agentCallback && agentCallback?.onInterrupt) {
|
|
26669
26574
|
agentCallback.onInterrupt(response.getInterruption()?.toObject());
|
|
26670
26575
|
}
|
|
26671
26576
|
break;
|
|
26672
|
-
case
|
|
26577
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER:
|
|
26673
26578
|
if (agentCallback && agentCallback?.onUserMessage) {
|
|
26674
26579
|
agentCallback.onUserMessage(
|
|
26675
26580
|
new ConversationUserMessage(response.getUser())
|
|
26676
26581
|
);
|
|
26677
26582
|
}
|
|
26678
26583
|
break;
|
|
26679
|
-
case
|
|
26584
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT:
|
|
26680
26585
|
if (agentCallback && agentCallback?.onAssistantMessage) {
|
|
26681
26586
|
agentCallback.onAssistantMessage(
|
|
26682
26587
|
new ConversationAssistantMessage(response.getAssistant())
|
|
26683
26588
|
);
|
|
26684
26589
|
}
|
|
26685
26590
|
break;
|
|
26686
|
-
case
|
|
26591
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.CONFIGURATION:
|
|
26687
26592
|
if (agentCallback && agentCallback?.onConfiguration) {
|
|
26688
26593
|
agentCallback.onConfiguration(
|
|
26689
26594
|
response.getConfiguration()?.toObject()
|
|
@@ -26692,7 +26597,7 @@ var VoiceAgent = class extends Agent {
|
|
|
26692
26597
|
const cnvId = response.getConfiguration()?.getAssistantconversationid();
|
|
26693
26598
|
if (cnvId) this.changeConversation(cnvId);
|
|
26694
26599
|
break;
|
|
26695
|
-
case
|
|
26600
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.MESSAGE:
|
|
26696
26601
|
if (agentCallback && agentCallback?.onMessage) {
|
|
26697
26602
|
agentCallback.onMessage(
|
|
26698
26603
|
new ConversationMessage(response.getMessage())
|