@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
|
@@ -5797,10 +5797,14 @@ var require_talk_api_pb = __commonJS({
|
|
|
5797
5797
|
var common_pb = require_common_pb();
|
|
5798
5798
|
goog.object.extend(proto, common_pb);
|
|
5799
5799
|
goog.exportSymbol("proto.talk_api.AssistantConversationAssistantMessage", null, global);
|
|
5800
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationAssistantMessage.MessageCase", null, global);
|
|
5800
5801
|
goog.exportSymbol("proto.talk_api.AssistantConversationConfiguration", null, global);
|
|
5801
5802
|
goog.exportSymbol("proto.talk_api.AssistantConversationInterruption", null, global);
|
|
5802
5803
|
goog.exportSymbol("proto.talk_api.AssistantConversationInterruption.InterruptionType", null, global);
|
|
5804
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationMessageAudioContent", null, global);
|
|
5805
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationMessageTextContent", null, global);
|
|
5803
5806
|
goog.exportSymbol("proto.talk_api.AssistantConversationUserMessage", null, global);
|
|
5807
|
+
goog.exportSymbol("proto.talk_api.AssistantConversationUserMessage.MessageCase", null, global);
|
|
5804
5808
|
goog.exportSymbol("proto.talk_api.AssistantDefinition", null, global);
|
|
5805
5809
|
goog.exportSymbol("proto.talk_api.AssistantMessagingRequest", null, global);
|
|
5806
5810
|
goog.exportSymbol("proto.talk_api.AssistantMessagingRequest.RequestCase", null, global);
|
|
@@ -5835,15 +5839,29 @@ var require_talk_api_pb = __commonJS({
|
|
|
5835
5839
|
if (goog.DEBUG && !COMPILED) {
|
|
5836
5840
|
proto.talk_api.AssistantConversationInterruption.displayName = "proto.talk_api.AssistantConversationInterruption";
|
|
5837
5841
|
}
|
|
5838
|
-
proto.talk_api.
|
|
5842
|
+
proto.talk_api.AssistantConversationMessageTextContent = function(opt_data) {
|
|
5843
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
5844
|
+
};
|
|
5845
|
+
goog.inherits(proto.talk_api.AssistantConversationMessageTextContent, jspb.Message);
|
|
5846
|
+
if (goog.DEBUG && !COMPILED) {
|
|
5847
|
+
proto.talk_api.AssistantConversationMessageTextContent.displayName = "proto.talk_api.AssistantConversationMessageTextContent";
|
|
5848
|
+
}
|
|
5849
|
+
proto.talk_api.AssistantConversationMessageAudioContent = function(opt_data) {
|
|
5839
5850
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
5840
5851
|
};
|
|
5852
|
+
goog.inherits(proto.talk_api.AssistantConversationMessageAudioContent, jspb.Message);
|
|
5853
|
+
if (goog.DEBUG && !COMPILED) {
|
|
5854
|
+
proto.talk_api.AssistantConversationMessageAudioContent.displayName = "proto.talk_api.AssistantConversationMessageAudioContent";
|
|
5855
|
+
}
|
|
5856
|
+
proto.talk_api.AssistantConversationUserMessage = function(opt_data) {
|
|
5857
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantConversationUserMessage.oneofGroups_);
|
|
5858
|
+
};
|
|
5841
5859
|
goog.inherits(proto.talk_api.AssistantConversationUserMessage, jspb.Message);
|
|
5842
5860
|
if (goog.DEBUG && !COMPILED) {
|
|
5843
5861
|
proto.talk_api.AssistantConversationUserMessage.displayName = "proto.talk_api.AssistantConversationUserMessage";
|
|
5844
5862
|
}
|
|
5845
5863
|
proto.talk_api.AssistantConversationAssistantMessage = function(opt_data) {
|
|
5846
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null,
|
|
5864
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_);
|
|
5847
5865
|
};
|
|
5848
5866
|
goog.inherits(proto.talk_api.AssistantConversationAssistantMessage, jspb.Message);
|
|
5849
5867
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -6329,13 +6347,170 @@ var require_talk_api_pb = __commonJS({
|
|
|
6329
6347
|
proto.talk_api.AssistantConversationInterruption.prototype.hasTime = function() {
|
|
6330
6348
|
return jspb.Message.getField(this, 3) != null;
|
|
6331
6349
|
};
|
|
6350
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6351
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.toObject = function(opt_includeInstance) {
|
|
6352
|
+
return proto.talk_api.AssistantConversationMessageTextContent.toObject(opt_includeInstance, this);
|
|
6353
|
+
};
|
|
6354
|
+
proto.talk_api.AssistantConversationMessageTextContent.toObject = function(includeInstance, msg) {
|
|
6355
|
+
var f, obj = {
|
|
6356
|
+
content: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
6357
|
+
};
|
|
6358
|
+
if (includeInstance) {
|
|
6359
|
+
obj.$jspbMessageInstance = msg;
|
|
6360
|
+
}
|
|
6361
|
+
return obj;
|
|
6362
|
+
};
|
|
6363
|
+
}
|
|
6364
|
+
proto.talk_api.AssistantConversationMessageTextContent.deserializeBinary = function(bytes) {
|
|
6365
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
6366
|
+
var msg = new proto.talk_api.AssistantConversationMessageTextContent();
|
|
6367
|
+
return proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader(msg, reader);
|
|
6368
|
+
};
|
|
6369
|
+
proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader = function(msg, reader) {
|
|
6370
|
+
while (reader.nextField()) {
|
|
6371
|
+
if (reader.isEndGroup()) {
|
|
6372
|
+
break;
|
|
6373
|
+
}
|
|
6374
|
+
var field = reader.getFieldNumber();
|
|
6375
|
+
switch (field) {
|
|
6376
|
+
case 1:
|
|
6377
|
+
var value = (
|
|
6378
|
+
/** @type {string} */
|
|
6379
|
+
reader.readString()
|
|
6380
|
+
);
|
|
6381
|
+
msg.setContent(value);
|
|
6382
|
+
break;
|
|
6383
|
+
default:
|
|
6384
|
+
reader.skipField();
|
|
6385
|
+
break;
|
|
6386
|
+
}
|
|
6387
|
+
}
|
|
6388
|
+
return msg;
|
|
6389
|
+
};
|
|
6390
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.serializeBinary = function() {
|
|
6391
|
+
var writer = new jspb.BinaryWriter();
|
|
6392
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter(this, writer);
|
|
6393
|
+
return writer.getResultBuffer();
|
|
6394
|
+
};
|
|
6395
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter = function(message, writer) {
|
|
6396
|
+
var f = void 0;
|
|
6397
|
+
f = message.getContent();
|
|
6398
|
+
if (f.length > 0) {
|
|
6399
|
+
writer.writeString(
|
|
6400
|
+
1,
|
|
6401
|
+
f
|
|
6402
|
+
);
|
|
6403
|
+
}
|
|
6404
|
+
};
|
|
6405
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.getContent = function() {
|
|
6406
|
+
return (
|
|
6407
|
+
/** @type {string} */
|
|
6408
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
6409
|
+
);
|
|
6410
|
+
};
|
|
6411
|
+
proto.talk_api.AssistantConversationMessageTextContent.prototype.setContent = function(value) {
|
|
6412
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
6413
|
+
};
|
|
6414
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6415
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.toObject = function(opt_includeInstance) {
|
|
6416
|
+
return proto.talk_api.AssistantConversationMessageAudioContent.toObject(opt_includeInstance, this);
|
|
6417
|
+
};
|
|
6418
|
+
proto.talk_api.AssistantConversationMessageAudioContent.toObject = function(includeInstance, msg) {
|
|
6419
|
+
var f, obj = {
|
|
6420
|
+
content: msg.getContent_asB64()
|
|
6421
|
+
};
|
|
6422
|
+
if (includeInstance) {
|
|
6423
|
+
obj.$jspbMessageInstance = msg;
|
|
6424
|
+
}
|
|
6425
|
+
return obj;
|
|
6426
|
+
};
|
|
6427
|
+
}
|
|
6428
|
+
proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinary = function(bytes) {
|
|
6429
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
6430
|
+
var msg = new proto.talk_api.AssistantConversationMessageAudioContent();
|
|
6431
|
+
return proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader(msg, reader);
|
|
6432
|
+
};
|
|
6433
|
+
proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader = function(msg, reader) {
|
|
6434
|
+
while (reader.nextField()) {
|
|
6435
|
+
if (reader.isEndGroup()) {
|
|
6436
|
+
break;
|
|
6437
|
+
}
|
|
6438
|
+
var field = reader.getFieldNumber();
|
|
6439
|
+
switch (field) {
|
|
6440
|
+
case 1:
|
|
6441
|
+
var value = (
|
|
6442
|
+
/** @type {!Uint8Array} */
|
|
6443
|
+
reader.readBytes()
|
|
6444
|
+
);
|
|
6445
|
+
msg.setContent(value);
|
|
6446
|
+
break;
|
|
6447
|
+
default:
|
|
6448
|
+
reader.skipField();
|
|
6449
|
+
break;
|
|
6450
|
+
}
|
|
6451
|
+
}
|
|
6452
|
+
return msg;
|
|
6453
|
+
};
|
|
6454
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.serializeBinary = function() {
|
|
6455
|
+
var writer = new jspb.BinaryWriter();
|
|
6456
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter(this, writer);
|
|
6457
|
+
return writer.getResultBuffer();
|
|
6458
|
+
};
|
|
6459
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter = function(message, writer) {
|
|
6460
|
+
var f = void 0;
|
|
6461
|
+
f = message.getContent_asU8();
|
|
6462
|
+
if (f.length > 0) {
|
|
6463
|
+
writer.writeBytes(
|
|
6464
|
+
1,
|
|
6465
|
+
f
|
|
6466
|
+
);
|
|
6467
|
+
}
|
|
6468
|
+
};
|
|
6469
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.getContent = function() {
|
|
6470
|
+
return (
|
|
6471
|
+
/** @type {!(string|Uint8Array)} */
|
|
6472
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
6473
|
+
);
|
|
6474
|
+
};
|
|
6475
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.getContent_asB64 = function() {
|
|
6476
|
+
return (
|
|
6477
|
+
/** @type {string} */
|
|
6478
|
+
jspb.Message.bytesAsB64(
|
|
6479
|
+
this.getContent()
|
|
6480
|
+
)
|
|
6481
|
+
);
|
|
6482
|
+
};
|
|
6483
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.getContent_asU8 = function() {
|
|
6484
|
+
return (
|
|
6485
|
+
/** @type {!Uint8Array} */
|
|
6486
|
+
jspb.Message.bytesAsU8(
|
|
6487
|
+
this.getContent()
|
|
6488
|
+
)
|
|
6489
|
+
);
|
|
6490
|
+
};
|
|
6491
|
+
proto.talk_api.AssistantConversationMessageAudioContent.prototype.setContent = function(value) {
|
|
6492
|
+
return jspb.Message.setProto3BytesField(this, 1, value);
|
|
6493
|
+
};
|
|
6494
|
+
proto.talk_api.AssistantConversationUserMessage.oneofGroups_ = [[10, 11]];
|
|
6495
|
+
proto.talk_api.AssistantConversationUserMessage.MessageCase = {
|
|
6496
|
+
MESSAGE_NOT_SET: 0,
|
|
6497
|
+
AUDIO: 10,
|
|
6498
|
+
TEXT: 11
|
|
6499
|
+
};
|
|
6500
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.getMessageCase = function() {
|
|
6501
|
+
return (
|
|
6502
|
+
/** @type {proto.talk_api.AssistantConversationUserMessage.MessageCase} */
|
|
6503
|
+
jspb.Message.computeOneofCase(this, proto.talk_api.AssistantConversationUserMessage.oneofGroups_[0])
|
|
6504
|
+
);
|
|
6505
|
+
};
|
|
6332
6506
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6333
6507
|
proto.talk_api.AssistantConversationUserMessage.prototype.toObject = function(opt_includeInstance) {
|
|
6334
6508
|
return proto.talk_api.AssistantConversationUserMessage.toObject(opt_includeInstance, this);
|
|
6335
6509
|
};
|
|
6336
6510
|
proto.talk_api.AssistantConversationUserMessage.toObject = function(includeInstance, msg) {
|
|
6337
6511
|
var f, obj = {
|
|
6338
|
-
|
|
6512
|
+
audio: (f = msg.getAudio()) && proto.talk_api.AssistantConversationMessageAudioContent.toObject(includeInstance, f),
|
|
6513
|
+
text: (f = msg.getText()) && proto.talk_api.AssistantConversationMessageTextContent.toObject(includeInstance, f),
|
|
6339
6514
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
6340
6515
|
completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
6341
6516
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
|
|
@@ -6358,10 +6533,15 @@ var require_talk_api_pb = __commonJS({
|
|
|
6358
6533
|
}
|
|
6359
6534
|
var field = reader.getFieldNumber();
|
|
6360
6535
|
switch (field) {
|
|
6361
|
-
case
|
|
6362
|
-
var value = new
|
|
6363
|
-
reader.readMessage(value,
|
|
6364
|
-
msg.
|
|
6536
|
+
case 10:
|
|
6537
|
+
var value = new proto.talk_api.AssistantConversationMessageAudioContent();
|
|
6538
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader);
|
|
6539
|
+
msg.setAudio(value);
|
|
6540
|
+
break;
|
|
6541
|
+
case 11:
|
|
6542
|
+
var value = new proto.talk_api.AssistantConversationMessageTextContent();
|
|
6543
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader);
|
|
6544
|
+
msg.setText(value);
|
|
6365
6545
|
break;
|
|
6366
6546
|
case 2:
|
|
6367
6547
|
var value = (
|
|
@@ -6396,12 +6576,20 @@ var require_talk_api_pb = __commonJS({
|
|
|
6396
6576
|
};
|
|
6397
6577
|
proto.talk_api.AssistantConversationUserMessage.serializeBinaryToWriter = function(message, writer) {
|
|
6398
6578
|
var f = void 0;
|
|
6399
|
-
f = message.
|
|
6579
|
+
f = message.getAudio();
|
|
6400
6580
|
if (f != null) {
|
|
6401
6581
|
writer.writeMessage(
|
|
6402
|
-
|
|
6582
|
+
10,
|
|
6583
|
+
f,
|
|
6584
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter
|
|
6585
|
+
);
|
|
6586
|
+
}
|
|
6587
|
+
f = message.getText();
|
|
6588
|
+
if (f != null) {
|
|
6589
|
+
writer.writeMessage(
|
|
6590
|
+
11,
|
|
6403
6591
|
f,
|
|
6404
|
-
|
|
6592
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter
|
|
6405
6593
|
);
|
|
6406
6594
|
}
|
|
6407
6595
|
f = message.getId();
|
|
@@ -6427,20 +6615,35 @@ var require_talk_api_pb = __commonJS({
|
|
|
6427
6615
|
);
|
|
6428
6616
|
}
|
|
6429
6617
|
};
|
|
6430
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6618
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.getAudio = function() {
|
|
6431
6619
|
return (
|
|
6432
|
-
/** @type{?proto.
|
|
6433
|
-
jspb.Message.getWrapperField(this,
|
|
6620
|
+
/** @type{?proto.talk_api.AssistantConversationMessageAudioContent} */
|
|
6621
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageAudioContent, 10)
|
|
6434
6622
|
);
|
|
6435
6623
|
};
|
|
6436
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6437
|
-
return jspb.Message.
|
|
6624
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.setAudio = function(value) {
|
|
6625
|
+
return jspb.Message.setOneofWrapperField(this, 10, proto.talk_api.AssistantConversationUserMessage.oneofGroups_[0], value);
|
|
6438
6626
|
};
|
|
6439
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6440
|
-
return this.
|
|
6627
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.clearAudio = function() {
|
|
6628
|
+
return this.setAudio(void 0);
|
|
6441
6629
|
};
|
|
6442
|
-
proto.talk_api.AssistantConversationUserMessage.prototype.
|
|
6443
|
-
return jspb.Message.getField(this,
|
|
6630
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.hasAudio = function() {
|
|
6631
|
+
return jspb.Message.getField(this, 10) != null;
|
|
6632
|
+
};
|
|
6633
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.getText = function() {
|
|
6634
|
+
return (
|
|
6635
|
+
/** @type{?proto.talk_api.AssistantConversationMessageTextContent} */
|
|
6636
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageTextContent, 11)
|
|
6637
|
+
);
|
|
6638
|
+
};
|
|
6639
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.setText = function(value) {
|
|
6640
|
+
return jspb.Message.setOneofWrapperField(this, 11, proto.talk_api.AssistantConversationUserMessage.oneofGroups_[0], value);
|
|
6641
|
+
};
|
|
6642
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.clearText = function() {
|
|
6643
|
+
return this.setText(void 0);
|
|
6644
|
+
};
|
|
6645
|
+
proto.talk_api.AssistantConversationUserMessage.prototype.hasText = function() {
|
|
6646
|
+
return jspb.Message.getField(this, 11) != null;
|
|
6444
6647
|
};
|
|
6445
6648
|
proto.talk_api.AssistantConversationUserMessage.prototype.getId = function() {
|
|
6446
6649
|
return (
|
|
@@ -6475,13 +6678,26 @@ var require_talk_api_pb = __commonJS({
|
|
|
6475
6678
|
proto.talk_api.AssistantConversationUserMessage.prototype.hasTime = function() {
|
|
6476
6679
|
return jspb.Message.getField(this, 4) != null;
|
|
6477
6680
|
};
|
|
6681
|
+
proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_ = [[10, 11]];
|
|
6682
|
+
proto.talk_api.AssistantConversationAssistantMessage.MessageCase = {
|
|
6683
|
+
MESSAGE_NOT_SET: 0,
|
|
6684
|
+
AUDIO: 10,
|
|
6685
|
+
TEXT: 11
|
|
6686
|
+
};
|
|
6687
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.getMessageCase = function() {
|
|
6688
|
+
return (
|
|
6689
|
+
/** @type {proto.talk_api.AssistantConversationAssistantMessage.MessageCase} */
|
|
6690
|
+
jspb.Message.computeOneofCase(this, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_[0])
|
|
6691
|
+
);
|
|
6692
|
+
};
|
|
6478
6693
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6479
6694
|
proto.talk_api.AssistantConversationAssistantMessage.prototype.toObject = function(opt_includeInstance) {
|
|
6480
6695
|
return proto.talk_api.AssistantConversationAssistantMessage.toObject(opt_includeInstance, this);
|
|
6481
6696
|
};
|
|
6482
6697
|
proto.talk_api.AssistantConversationAssistantMessage.toObject = function(includeInstance, msg) {
|
|
6483
6698
|
var f, obj = {
|
|
6484
|
-
|
|
6699
|
+
audio: (f = msg.getAudio()) && proto.talk_api.AssistantConversationMessageAudioContent.toObject(includeInstance, f),
|
|
6700
|
+
text: (f = msg.getText()) && proto.talk_api.AssistantConversationMessageTextContent.toObject(includeInstance, f),
|
|
6485
6701
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
6486
6702
|
completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
6487
6703
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
|
|
@@ -6504,10 +6720,15 @@ var require_talk_api_pb = __commonJS({
|
|
|
6504
6720
|
}
|
|
6505
6721
|
var field = reader.getFieldNumber();
|
|
6506
6722
|
switch (field) {
|
|
6507
|
-
case
|
|
6508
|
-
var value = new
|
|
6509
|
-
reader.readMessage(value,
|
|
6510
|
-
msg.
|
|
6723
|
+
case 10:
|
|
6724
|
+
var value = new proto.talk_api.AssistantConversationMessageAudioContent();
|
|
6725
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageAudioContent.deserializeBinaryFromReader);
|
|
6726
|
+
msg.setAudio(value);
|
|
6727
|
+
break;
|
|
6728
|
+
case 11:
|
|
6729
|
+
var value = new proto.talk_api.AssistantConversationMessageTextContent();
|
|
6730
|
+
reader.readMessage(value, proto.talk_api.AssistantConversationMessageTextContent.deserializeBinaryFromReader);
|
|
6731
|
+
msg.setText(value);
|
|
6511
6732
|
break;
|
|
6512
6733
|
case 2:
|
|
6513
6734
|
var value = (
|
|
@@ -6542,12 +6763,20 @@ var require_talk_api_pb = __commonJS({
|
|
|
6542
6763
|
};
|
|
6543
6764
|
proto.talk_api.AssistantConversationAssistantMessage.serializeBinaryToWriter = function(message, writer) {
|
|
6544
6765
|
var f = void 0;
|
|
6545
|
-
f = message.
|
|
6766
|
+
f = message.getAudio();
|
|
6546
6767
|
if (f != null) {
|
|
6547
6768
|
writer.writeMessage(
|
|
6548
|
-
|
|
6769
|
+
10,
|
|
6770
|
+
f,
|
|
6771
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter
|
|
6772
|
+
);
|
|
6773
|
+
}
|
|
6774
|
+
f = message.getText();
|
|
6775
|
+
if (f != null) {
|
|
6776
|
+
writer.writeMessage(
|
|
6777
|
+
11,
|
|
6549
6778
|
f,
|
|
6550
|
-
|
|
6779
|
+
proto.talk_api.AssistantConversationMessageTextContent.serializeBinaryToWriter
|
|
6551
6780
|
);
|
|
6552
6781
|
}
|
|
6553
6782
|
f = message.getId();
|
|
@@ -6573,20 +6802,35 @@ var require_talk_api_pb = __commonJS({
|
|
|
6573
6802
|
);
|
|
6574
6803
|
}
|
|
6575
6804
|
};
|
|
6576
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6805
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.getAudio = function() {
|
|
6577
6806
|
return (
|
|
6578
|
-
/** @type{?proto.
|
|
6579
|
-
jspb.Message.getWrapperField(this,
|
|
6807
|
+
/** @type{?proto.talk_api.AssistantConversationMessageAudioContent} */
|
|
6808
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageAudioContent, 10)
|
|
6580
6809
|
);
|
|
6581
6810
|
};
|
|
6582
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6583
|
-
return jspb.Message.
|
|
6811
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.setAudio = function(value) {
|
|
6812
|
+
return jspb.Message.setOneofWrapperField(this, 10, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_[0], value);
|
|
6584
6813
|
};
|
|
6585
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6586
|
-
return this.
|
|
6814
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.clearAudio = function() {
|
|
6815
|
+
return this.setAudio(void 0);
|
|
6587
6816
|
};
|
|
6588
|
-
proto.talk_api.AssistantConversationAssistantMessage.prototype.
|
|
6589
|
-
return jspb.Message.getField(this,
|
|
6817
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.hasAudio = function() {
|
|
6818
|
+
return jspb.Message.getField(this, 10) != null;
|
|
6819
|
+
};
|
|
6820
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.getText = function() {
|
|
6821
|
+
return (
|
|
6822
|
+
/** @type{?proto.talk_api.AssistantConversationMessageTextContent} */
|
|
6823
|
+
jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationMessageTextContent, 11)
|
|
6824
|
+
);
|
|
6825
|
+
};
|
|
6826
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.setText = function(value) {
|
|
6827
|
+
return jspb.Message.setOneofWrapperField(this, 11, proto.talk_api.AssistantConversationAssistantMessage.oneofGroups_[0], value);
|
|
6828
|
+
};
|
|
6829
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.clearText = function() {
|
|
6830
|
+
return this.setText(void 0);
|
|
6831
|
+
};
|
|
6832
|
+
proto.talk_api.AssistantConversationAssistantMessage.prototype.hasText = function() {
|
|
6833
|
+
return jspb.Message.getField(this, 11) != null;
|
|
6590
6834
|
};
|
|
6591
6835
|
proto.talk_api.AssistantConversationAssistantMessage.prototype.getId = function() {
|
|
6592
6836
|
return (
|
|
@@ -20387,8 +20631,6 @@ var require_assistant_api_pb = __commonJS({
|
|
|
20387
20631
|
goog.exportSymbol("proto.assistant_api.GetAllAssistantProviderModelResponse", null, global);
|
|
20388
20632
|
goog.exportSymbol("proto.assistant_api.GetAllAssistantRequest", null, global);
|
|
20389
20633
|
goog.exportSymbol("proto.assistant_api.GetAllAssistantResponse", null, global);
|
|
20390
|
-
goog.exportSymbol("proto.assistant_api.GetAllAssistantUserConversationRequest", null, global);
|
|
20391
|
-
goog.exportSymbol("proto.assistant_api.GetAllAssistantUserConversationResponse", null, global);
|
|
20392
20634
|
goog.exportSymbol("proto.assistant_api.GetAllMessageRequest", null, global);
|
|
20393
20635
|
goog.exportSymbol("proto.assistant_api.GetAllMessageResponse", null, global);
|
|
20394
20636
|
goog.exportSymbol("proto.assistant_api.GetAssistantConversationRequest", null, global);
|
|
@@ -20531,20 +20773,6 @@ var require_assistant_api_pb = __commonJS({
|
|
|
20531
20773
|
if (goog.DEBUG && !COMPILED) {
|
|
20532
20774
|
proto.assistant_api.UpdateAssistantDetailRequest.displayName = "proto.assistant_api.UpdateAssistantDetailRequest";
|
|
20533
20775
|
}
|
|
20534
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest = function(opt_data) {
|
|
20535
|
-
jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAllAssistantUserConversationRequest.repeatedFields_, null);
|
|
20536
|
-
};
|
|
20537
|
-
goog.inherits(proto.assistant_api.GetAllAssistantUserConversationRequest, jspb.Message);
|
|
20538
|
-
if (goog.DEBUG && !COMPILED) {
|
|
20539
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.displayName = "proto.assistant_api.GetAllAssistantUserConversationRequest";
|
|
20540
|
-
}
|
|
20541
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse = function(opt_data) {
|
|
20542
|
-
jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAllAssistantUserConversationResponse.repeatedFields_, null);
|
|
20543
|
-
};
|
|
20544
|
-
goog.inherits(proto.assistant_api.GetAllAssistantUserConversationResponse, jspb.Message);
|
|
20545
|
-
if (goog.DEBUG && !COMPILED) {
|
|
20546
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.displayName = "proto.assistant_api.GetAllAssistantUserConversationResponse";
|
|
20547
|
-
}
|
|
20548
20776
|
proto.assistant_api.GetAssistantConversationRequest = function(opt_data) {
|
|
20549
20777
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAssistantConversationRequest.repeatedFields_, null);
|
|
20550
20778
|
};
|
|
@@ -24305,21 +24533,20 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24305
24533
|
proto.assistant_api.UpdateAssistantDetailRequest.prototype.setDescription = function(value) {
|
|
24306
24534
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
24307
24535
|
};
|
|
24308
|
-
proto.assistant_api.
|
|
24536
|
+
proto.assistant_api.GetAssistantConversationRequest.repeatedFields_ = [5];
|
|
24309
24537
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24310
|
-
proto.assistant_api.
|
|
24311
|
-
return proto.assistant_api.
|
|
24538
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.toObject = function(opt_includeInstance) {
|
|
24539
|
+
return proto.assistant_api.GetAssistantConversationRequest.toObject(opt_includeInstance, this);
|
|
24312
24540
|
};
|
|
24313
|
-
proto.assistant_api.
|
|
24541
|
+
proto.assistant_api.GetAssistantConversationRequest.toObject = function(includeInstance, msg) {
|
|
24314
24542
|
var f, obj = {
|
|
24315
24543
|
assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"),
|
|
24316
|
-
|
|
24317
|
-
|
|
24318
|
-
msg.
|
|
24319
|
-
common_pb.
|
|
24544
|
+
id: jspb.Message.getFieldWithDefault(msg, 2, "0"),
|
|
24545
|
+
selectorsList: jspb.Message.toObjectList(
|
|
24546
|
+
msg.getSelectorsList(),
|
|
24547
|
+
common_pb.FieldSelector.toObject,
|
|
24320
24548
|
includeInstance
|
|
24321
|
-
)
|
|
24322
|
-
source: jspb.Message.getFieldWithDefault(msg, 7, 0)
|
|
24549
|
+
)
|
|
24323
24550
|
};
|
|
24324
24551
|
if (includeInstance) {
|
|
24325
24552
|
obj.$jspbMessageInstance = msg;
|
|
@@ -24327,12 +24554,12 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24327
24554
|
return obj;
|
|
24328
24555
|
};
|
|
24329
24556
|
}
|
|
24330
|
-
proto.assistant_api.
|
|
24557
|
+
proto.assistant_api.GetAssistantConversationRequest.deserializeBinary = function(bytes) {
|
|
24331
24558
|
var reader = new jspb.BinaryReader(bytes);
|
|
24332
|
-
var msg = new proto.assistant_api.
|
|
24333
|
-
return proto.assistant_api.
|
|
24559
|
+
var msg = new proto.assistant_api.GetAssistantConversationRequest();
|
|
24560
|
+
return proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader(msg, reader);
|
|
24334
24561
|
};
|
|
24335
|
-
proto.assistant_api.
|
|
24562
|
+
proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
24336
24563
|
while (reader.nextField()) {
|
|
24337
24564
|
if (reader.isEndGroup()) {
|
|
24338
24565
|
break;
|
|
@@ -24347,21 +24574,16 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24347
24574
|
msg.setAssistantid(value);
|
|
24348
24575
|
break;
|
|
24349
24576
|
case 2:
|
|
24350
|
-
var value = new common_pb.Paginate();
|
|
24351
|
-
reader.readMessage(value, common_pb.Paginate.deserializeBinaryFromReader);
|
|
24352
|
-
msg.setPaginate(value);
|
|
24353
|
-
break;
|
|
24354
|
-
case 3:
|
|
24355
|
-
var value = new common_pb.Criteria();
|
|
24356
|
-
reader.readMessage(value, common_pb.Criteria.deserializeBinaryFromReader);
|
|
24357
|
-
msg.addCriterias(value);
|
|
24358
|
-
break;
|
|
24359
|
-
case 7:
|
|
24360
24577
|
var value = (
|
|
24361
|
-
/** @type {
|
|
24362
|
-
reader.
|
|
24578
|
+
/** @type {string} */
|
|
24579
|
+
reader.readUint64String()
|
|
24363
24580
|
);
|
|
24364
|
-
msg.
|
|
24581
|
+
msg.setId(value);
|
|
24582
|
+
break;
|
|
24583
|
+
case 5:
|
|
24584
|
+
var value = new common_pb.FieldSelector();
|
|
24585
|
+
reader.readMessage(value, common_pb.FieldSelector.deserializeBinaryFromReader);
|
|
24586
|
+
msg.addSelectors(value);
|
|
24365
24587
|
break;
|
|
24366
24588
|
default:
|
|
24367
24589
|
reader.skipField();
|
|
@@ -24370,12 +24592,12 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24370
24592
|
}
|
|
24371
24593
|
return msg;
|
|
24372
24594
|
};
|
|
24373
|
-
proto.assistant_api.
|
|
24595
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.serializeBinary = function() {
|
|
24374
24596
|
var writer = new jspb.BinaryWriter();
|
|
24375
|
-
proto.assistant_api.
|
|
24597
|
+
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter(this, writer);
|
|
24376
24598
|
return writer.getResultBuffer();
|
|
24377
24599
|
};
|
|
24378
|
-
proto.assistant_api.
|
|
24600
|
+
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter = function(message, writer) {
|
|
24379
24601
|
var f = void 0;
|
|
24380
24602
|
f = message.getAssistantid();
|
|
24381
24603
|
if (parseInt(f, 10) !== 0) {
|
|
@@ -24384,348 +24606,23 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24384
24606
|
f
|
|
24385
24607
|
);
|
|
24386
24608
|
}
|
|
24387
|
-
f = message.
|
|
24388
|
-
if (f
|
|
24389
|
-
writer.
|
|
24609
|
+
f = message.getId();
|
|
24610
|
+
if (parseInt(f, 10) !== 0) {
|
|
24611
|
+
writer.writeUint64String(
|
|
24390
24612
|
2,
|
|
24391
|
-
f
|
|
24392
|
-
common_pb.Paginate.serializeBinaryToWriter
|
|
24613
|
+
f
|
|
24393
24614
|
);
|
|
24394
24615
|
}
|
|
24395
|
-
f = message.
|
|
24616
|
+
f = message.getSelectorsList();
|
|
24396
24617
|
if (f.length > 0) {
|
|
24397
24618
|
writer.writeRepeatedMessage(
|
|
24398
|
-
|
|
24619
|
+
5,
|
|
24399
24620
|
f,
|
|
24400
|
-
common_pb.
|
|
24401
|
-
);
|
|
24402
|
-
}
|
|
24403
|
-
f = message.getSource();
|
|
24404
|
-
if (f !== 0) {
|
|
24405
|
-
writer.writeEnum(
|
|
24406
|
-
7,
|
|
24407
|
-
f
|
|
24621
|
+
common_pb.FieldSelector.serializeBinaryToWriter
|
|
24408
24622
|
);
|
|
24409
24623
|
}
|
|
24410
24624
|
};
|
|
24411
|
-
proto.assistant_api.
|
|
24412
|
-
return (
|
|
24413
|
-
/** @type {string} */
|
|
24414
|
-
jspb.Message.getFieldWithDefault(this, 1, "0")
|
|
24415
|
-
);
|
|
24416
|
-
};
|
|
24417
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setAssistantid = function(value) {
|
|
24418
|
-
return jspb.Message.setProto3StringIntField(this, 1, value);
|
|
24419
|
-
};
|
|
24420
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.getPaginate = function() {
|
|
24421
|
-
return (
|
|
24422
|
-
/** @type{?proto.Paginate} */
|
|
24423
|
-
jspb.Message.getWrapperField(this, common_pb.Paginate, 2)
|
|
24424
|
-
);
|
|
24425
|
-
};
|
|
24426
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setPaginate = function(value) {
|
|
24427
|
-
return jspb.Message.setWrapperField(this, 2, value);
|
|
24428
|
-
};
|
|
24429
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.clearPaginate = function() {
|
|
24430
|
-
return this.setPaginate(void 0);
|
|
24431
|
-
};
|
|
24432
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.hasPaginate = function() {
|
|
24433
|
-
return jspb.Message.getField(this, 2) != null;
|
|
24434
|
-
};
|
|
24435
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.getCriteriasList = function() {
|
|
24436
|
-
return (
|
|
24437
|
-
/** @type{!Array<!proto.Criteria>} */
|
|
24438
|
-
jspb.Message.getRepeatedWrapperField(this, common_pb.Criteria, 3)
|
|
24439
|
-
);
|
|
24440
|
-
};
|
|
24441
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setCriteriasList = function(value) {
|
|
24442
|
-
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
24443
|
-
};
|
|
24444
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.addCriterias = function(opt_value, opt_index) {
|
|
24445
|
-
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Criteria, opt_index);
|
|
24446
|
-
};
|
|
24447
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.clearCriteriasList = function() {
|
|
24448
|
-
return this.setCriteriasList([]);
|
|
24449
|
-
};
|
|
24450
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.getSource = function() {
|
|
24451
|
-
return (
|
|
24452
|
-
/** @type {!proto.Source} */
|
|
24453
|
-
jspb.Message.getFieldWithDefault(this, 7, 0)
|
|
24454
|
-
);
|
|
24455
|
-
};
|
|
24456
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.setSource = function(value) {
|
|
24457
|
-
return jspb.Message.setProto3EnumField(this, 7, value);
|
|
24458
|
-
};
|
|
24459
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.repeatedFields_ = [3];
|
|
24460
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24461
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.toObject = function(opt_includeInstance) {
|
|
24462
|
-
return proto.assistant_api.GetAllAssistantUserConversationResponse.toObject(opt_includeInstance, this);
|
|
24463
|
-
};
|
|
24464
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.toObject = function(includeInstance, msg) {
|
|
24465
|
-
var f, obj = {
|
|
24466
|
-
code: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
24467
|
-
success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
|
|
24468
|
-
dataList: jspb.Message.toObjectList(
|
|
24469
|
-
msg.getDataList(),
|
|
24470
|
-
common_pb.AssistantConversation.toObject,
|
|
24471
|
-
includeInstance
|
|
24472
|
-
),
|
|
24473
|
-
error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f),
|
|
24474
|
-
paginated: (f = msg.getPaginated()) && common_pb.Paginated.toObject(includeInstance, f)
|
|
24475
|
-
};
|
|
24476
|
-
if (includeInstance) {
|
|
24477
|
-
obj.$jspbMessageInstance = msg;
|
|
24478
|
-
}
|
|
24479
|
-
return obj;
|
|
24480
|
-
};
|
|
24481
|
-
}
|
|
24482
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.deserializeBinary = function(bytes) {
|
|
24483
|
-
var reader = new jspb.BinaryReader(bytes);
|
|
24484
|
-
var msg = new proto.assistant_api.GetAllAssistantUserConversationResponse();
|
|
24485
|
-
return proto.assistant_api.GetAllAssistantUserConversationResponse.deserializeBinaryFromReader(msg, reader);
|
|
24486
|
-
};
|
|
24487
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
24488
|
-
while (reader.nextField()) {
|
|
24489
|
-
if (reader.isEndGroup()) {
|
|
24490
|
-
break;
|
|
24491
|
-
}
|
|
24492
|
-
var field = reader.getFieldNumber();
|
|
24493
|
-
switch (field) {
|
|
24494
|
-
case 1:
|
|
24495
|
-
var value = (
|
|
24496
|
-
/** @type {number} */
|
|
24497
|
-
reader.readInt32()
|
|
24498
|
-
);
|
|
24499
|
-
msg.setCode(value);
|
|
24500
|
-
break;
|
|
24501
|
-
case 2:
|
|
24502
|
-
var value = (
|
|
24503
|
-
/** @type {boolean} */
|
|
24504
|
-
reader.readBool()
|
|
24505
|
-
);
|
|
24506
|
-
msg.setSuccess(value);
|
|
24507
|
-
break;
|
|
24508
|
-
case 3:
|
|
24509
|
-
var value = new common_pb.AssistantConversation();
|
|
24510
|
-
reader.readMessage(value, common_pb.AssistantConversation.deserializeBinaryFromReader);
|
|
24511
|
-
msg.addData(value);
|
|
24512
|
-
break;
|
|
24513
|
-
case 4:
|
|
24514
|
-
var value = new common_pb.Error();
|
|
24515
|
-
reader.readMessage(value, common_pb.Error.deserializeBinaryFromReader);
|
|
24516
|
-
msg.setError(value);
|
|
24517
|
-
break;
|
|
24518
|
-
case 5:
|
|
24519
|
-
var value = new common_pb.Paginated();
|
|
24520
|
-
reader.readMessage(value, common_pb.Paginated.deserializeBinaryFromReader);
|
|
24521
|
-
msg.setPaginated(value);
|
|
24522
|
-
break;
|
|
24523
|
-
default:
|
|
24524
|
-
reader.skipField();
|
|
24525
|
-
break;
|
|
24526
|
-
}
|
|
24527
|
-
}
|
|
24528
|
-
return msg;
|
|
24529
|
-
};
|
|
24530
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.serializeBinary = function() {
|
|
24531
|
-
var writer = new jspb.BinaryWriter();
|
|
24532
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.serializeBinaryToWriter(this, writer);
|
|
24533
|
-
return writer.getResultBuffer();
|
|
24534
|
-
};
|
|
24535
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.serializeBinaryToWriter = function(message, writer) {
|
|
24536
|
-
var f = void 0;
|
|
24537
|
-
f = message.getCode();
|
|
24538
|
-
if (f !== 0) {
|
|
24539
|
-
writer.writeInt32(
|
|
24540
|
-
1,
|
|
24541
|
-
f
|
|
24542
|
-
);
|
|
24543
|
-
}
|
|
24544
|
-
f = message.getSuccess();
|
|
24545
|
-
if (f) {
|
|
24546
|
-
writer.writeBool(
|
|
24547
|
-
2,
|
|
24548
|
-
f
|
|
24549
|
-
);
|
|
24550
|
-
}
|
|
24551
|
-
f = message.getDataList();
|
|
24552
|
-
if (f.length > 0) {
|
|
24553
|
-
writer.writeRepeatedMessage(
|
|
24554
|
-
3,
|
|
24555
|
-
f,
|
|
24556
|
-
common_pb.AssistantConversation.serializeBinaryToWriter
|
|
24557
|
-
);
|
|
24558
|
-
}
|
|
24559
|
-
f = message.getError();
|
|
24560
|
-
if (f != null) {
|
|
24561
|
-
writer.writeMessage(
|
|
24562
|
-
4,
|
|
24563
|
-
f,
|
|
24564
|
-
common_pb.Error.serializeBinaryToWriter
|
|
24565
|
-
);
|
|
24566
|
-
}
|
|
24567
|
-
f = message.getPaginated();
|
|
24568
|
-
if (f != null) {
|
|
24569
|
-
writer.writeMessage(
|
|
24570
|
-
5,
|
|
24571
|
-
f,
|
|
24572
|
-
common_pb.Paginated.serializeBinaryToWriter
|
|
24573
|
-
);
|
|
24574
|
-
}
|
|
24575
|
-
};
|
|
24576
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getCode = function() {
|
|
24577
|
-
return (
|
|
24578
|
-
/** @type {number} */
|
|
24579
|
-
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
24580
|
-
);
|
|
24581
|
-
};
|
|
24582
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setCode = function(value) {
|
|
24583
|
-
return jspb.Message.setProto3IntField(this, 1, value);
|
|
24584
|
-
};
|
|
24585
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getSuccess = function() {
|
|
24586
|
-
return (
|
|
24587
|
-
/** @type {boolean} */
|
|
24588
|
-
jspb.Message.getBooleanFieldWithDefault(this, 2, false)
|
|
24589
|
-
);
|
|
24590
|
-
};
|
|
24591
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setSuccess = function(value) {
|
|
24592
|
-
return jspb.Message.setProto3BooleanField(this, 2, value);
|
|
24593
|
-
};
|
|
24594
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getDataList = function() {
|
|
24595
|
-
return (
|
|
24596
|
-
/** @type{!Array<!proto.AssistantConversation>} */
|
|
24597
|
-
jspb.Message.getRepeatedWrapperField(this, common_pb.AssistantConversation, 3)
|
|
24598
|
-
);
|
|
24599
|
-
};
|
|
24600
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setDataList = function(value) {
|
|
24601
|
-
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
24602
|
-
};
|
|
24603
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.addData = function(opt_value, opt_index) {
|
|
24604
|
-
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversation, opt_index);
|
|
24605
|
-
};
|
|
24606
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.clearDataList = function() {
|
|
24607
|
-
return this.setDataList([]);
|
|
24608
|
-
};
|
|
24609
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getError = function() {
|
|
24610
|
-
return (
|
|
24611
|
-
/** @type{?proto.Error} */
|
|
24612
|
-
jspb.Message.getWrapperField(this, common_pb.Error, 4)
|
|
24613
|
-
);
|
|
24614
|
-
};
|
|
24615
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setError = function(value) {
|
|
24616
|
-
return jspb.Message.setWrapperField(this, 4, value);
|
|
24617
|
-
};
|
|
24618
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.clearError = function() {
|
|
24619
|
-
return this.setError(void 0);
|
|
24620
|
-
};
|
|
24621
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.hasError = function() {
|
|
24622
|
-
return jspb.Message.getField(this, 4) != null;
|
|
24623
|
-
};
|
|
24624
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.getPaginated = function() {
|
|
24625
|
-
return (
|
|
24626
|
-
/** @type{?proto.Paginated} */
|
|
24627
|
-
jspb.Message.getWrapperField(this, common_pb.Paginated, 5)
|
|
24628
|
-
);
|
|
24629
|
-
};
|
|
24630
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.setPaginated = function(value) {
|
|
24631
|
-
return jspb.Message.setWrapperField(this, 5, value);
|
|
24632
|
-
};
|
|
24633
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.clearPaginated = function() {
|
|
24634
|
-
return this.setPaginated(void 0);
|
|
24635
|
-
};
|
|
24636
|
-
proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.hasPaginated = function() {
|
|
24637
|
-
return jspb.Message.getField(this, 5) != null;
|
|
24638
|
-
};
|
|
24639
|
-
proto.assistant_api.GetAssistantConversationRequest.repeatedFields_ = [5];
|
|
24640
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24641
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.toObject = function(opt_includeInstance) {
|
|
24642
|
-
return proto.assistant_api.GetAssistantConversationRequest.toObject(opt_includeInstance, this);
|
|
24643
|
-
};
|
|
24644
|
-
proto.assistant_api.GetAssistantConversationRequest.toObject = function(includeInstance, msg) {
|
|
24645
|
-
var f, obj = {
|
|
24646
|
-
assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"),
|
|
24647
|
-
assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"),
|
|
24648
|
-
selectorsList: jspb.Message.toObjectList(
|
|
24649
|
-
msg.getSelectorsList(),
|
|
24650
|
-
common_pb.FieldSelector.toObject,
|
|
24651
|
-
includeInstance
|
|
24652
|
-
)
|
|
24653
|
-
};
|
|
24654
|
-
if (includeInstance) {
|
|
24655
|
-
obj.$jspbMessageInstance = msg;
|
|
24656
|
-
}
|
|
24657
|
-
return obj;
|
|
24658
|
-
};
|
|
24659
|
-
}
|
|
24660
|
-
proto.assistant_api.GetAssistantConversationRequest.deserializeBinary = function(bytes) {
|
|
24661
|
-
var reader = new jspb.BinaryReader(bytes);
|
|
24662
|
-
var msg = new proto.assistant_api.GetAssistantConversationRequest();
|
|
24663
|
-
return proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader(msg, reader);
|
|
24664
|
-
};
|
|
24665
|
-
proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
24666
|
-
while (reader.nextField()) {
|
|
24667
|
-
if (reader.isEndGroup()) {
|
|
24668
|
-
break;
|
|
24669
|
-
}
|
|
24670
|
-
var field = reader.getFieldNumber();
|
|
24671
|
-
switch (field) {
|
|
24672
|
-
case 1:
|
|
24673
|
-
var value = (
|
|
24674
|
-
/** @type {string} */
|
|
24675
|
-
reader.readUint64String()
|
|
24676
|
-
);
|
|
24677
|
-
msg.setAssistantid(value);
|
|
24678
|
-
break;
|
|
24679
|
-
case 2:
|
|
24680
|
-
var value = (
|
|
24681
|
-
/** @type {string} */
|
|
24682
|
-
reader.readUint64String()
|
|
24683
|
-
);
|
|
24684
|
-
msg.setAssistantconversationid(value);
|
|
24685
|
-
break;
|
|
24686
|
-
case 5:
|
|
24687
|
-
var value = new common_pb.FieldSelector();
|
|
24688
|
-
reader.readMessage(value, common_pb.FieldSelector.deserializeBinaryFromReader);
|
|
24689
|
-
msg.addSelectors(value);
|
|
24690
|
-
break;
|
|
24691
|
-
default:
|
|
24692
|
-
reader.skipField();
|
|
24693
|
-
break;
|
|
24694
|
-
}
|
|
24695
|
-
}
|
|
24696
|
-
return msg;
|
|
24697
|
-
};
|
|
24698
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.serializeBinary = function() {
|
|
24699
|
-
var writer = new jspb.BinaryWriter();
|
|
24700
|
-
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter(this, writer);
|
|
24701
|
-
return writer.getResultBuffer();
|
|
24702
|
-
};
|
|
24703
|
-
proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter = function(message, writer) {
|
|
24704
|
-
var f = void 0;
|
|
24705
|
-
f = message.getAssistantid();
|
|
24706
|
-
if (parseInt(f, 10) !== 0) {
|
|
24707
|
-
writer.writeUint64String(
|
|
24708
|
-
1,
|
|
24709
|
-
f
|
|
24710
|
-
);
|
|
24711
|
-
}
|
|
24712
|
-
f = message.getAssistantconversationid();
|
|
24713
|
-
if (parseInt(f, 10) !== 0) {
|
|
24714
|
-
writer.writeUint64String(
|
|
24715
|
-
2,
|
|
24716
|
-
f
|
|
24717
|
-
);
|
|
24718
|
-
}
|
|
24719
|
-
f = message.getSelectorsList();
|
|
24720
|
-
if (f.length > 0) {
|
|
24721
|
-
writer.writeRepeatedMessage(
|
|
24722
|
-
5,
|
|
24723
|
-
f,
|
|
24724
|
-
common_pb.FieldSelector.serializeBinaryToWriter
|
|
24725
|
-
);
|
|
24726
|
-
}
|
|
24727
|
-
};
|
|
24728
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.getAssistantid = function() {
|
|
24625
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.getAssistantid = function() {
|
|
24729
24626
|
return (
|
|
24730
24627
|
/** @type {string} */
|
|
24731
24628
|
jspb.Message.getFieldWithDefault(this, 1, "0")
|
|
@@ -24734,13 +24631,13 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24734
24631
|
proto.assistant_api.GetAssistantConversationRequest.prototype.setAssistantid = function(value) {
|
|
24735
24632
|
return jspb.Message.setProto3StringIntField(this, 1, value);
|
|
24736
24633
|
};
|
|
24737
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.
|
|
24634
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.getId = function() {
|
|
24738
24635
|
return (
|
|
24739
24636
|
/** @type {string} */
|
|
24740
24637
|
jspb.Message.getFieldWithDefault(this, 2, "0")
|
|
24741
24638
|
);
|
|
24742
24639
|
};
|
|
24743
|
-
proto.assistant_api.GetAssistantConversationRequest.prototype.
|
|
24640
|
+
proto.assistant_api.GetAssistantConversationRequest.prototype.setId = function(value) {
|
|
24744
24641
|
return jspb.Message.setProto3StringIntField(this, 2, value);
|
|
24745
24642
|
};
|
|
24746
24643
|
proto.assistant_api.GetAssistantConversationRequest.prototype.getSelectorsList = function() {
|
|
@@ -25238,7 +25135,7 @@ var DeviceManager = class _DeviceManager {
|
|
|
25238
25135
|
};
|
|
25239
25136
|
|
|
25240
25137
|
// src/agents/voice-agent.ts
|
|
25241
|
-
var
|
|
25138
|
+
var import_talk_api_pb4 = __toESM(require_talk_api_pb());
|
|
25242
25139
|
|
|
25243
25140
|
// src/types/agent-event.ts
|
|
25244
25141
|
var AgentEvent = /* @__PURE__ */ ((AgentEvent2) => {
|
|
@@ -25253,36 +25150,6 @@ var AgentEvent = /* @__PURE__ */ ((AgentEvent2) => {
|
|
|
25253
25150
|
return AgentEvent2;
|
|
25254
25151
|
})(AgentEvent || {});
|
|
25255
25152
|
|
|
25256
|
-
// src/utils/rapida_content.ts
|
|
25257
|
-
var import_common_pb = __toESM(require_common_pb());
|
|
25258
|
-
var TEXT_CONTENT_FORMAT_RAW = "raw";
|
|
25259
|
-
var AUDIO_CONTENT_FORMAT_CHUNK = "chunk";
|
|
25260
|
-
var toTextContent = (str, format) => {
|
|
25261
|
-
const cnt = new import_common_pb.Content();
|
|
25262
|
-
if (format) cnt.setContentformat(format);
|
|
25263
|
-
else cnt.setContentformat(TEXT_CONTENT_FORMAT_RAW);
|
|
25264
|
-
cnt.setContenttype("text" /* TEXT_CONTENT */);
|
|
25265
|
-
cnt.setContent(new TextEncoder().encode(str));
|
|
25266
|
-
return cnt;
|
|
25267
|
-
};
|
|
25268
|
-
var toStreamAudioContent = (raw) => {
|
|
25269
|
-
const cnt = new import_common_pb.Content();
|
|
25270
|
-
cnt.setContentformat(AUDIO_CONTENT_FORMAT_CHUNK);
|
|
25271
|
-
cnt.setContenttype("audio" /* AUDIO_CONTENT */);
|
|
25272
|
-
cnt.setContent(raw);
|
|
25273
|
-
return cnt;
|
|
25274
|
-
};
|
|
25275
|
-
var toContentText = (cnt) => {
|
|
25276
|
-
if (!cnt) return "";
|
|
25277
|
-
return cnt.filter((x) => x.getContenttype() === "text").map((x) => {
|
|
25278
|
-
try {
|
|
25279
|
-
return new TextDecoder().decode(x.getContent());
|
|
25280
|
-
} catch (error) {
|
|
25281
|
-
return "";
|
|
25282
|
-
}
|
|
25283
|
-
}).join(" ");
|
|
25284
|
-
};
|
|
25285
|
-
|
|
25286
25153
|
// src/types/message.ts
|
|
25287
25154
|
var MessageRole = /* @__PURE__ */ ((MessageRole2) => {
|
|
25288
25155
|
MessageRole2["System"] = "system";
|
|
@@ -25313,11 +25180,11 @@ var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
|
|
|
25313
25180
|
})(ConnectionState || {});
|
|
25314
25181
|
|
|
25315
25182
|
// src/agents/index.ts
|
|
25316
|
-
var
|
|
25183
|
+
var import_common_pb5 = __toESM(require_common_pb());
|
|
25317
25184
|
import { EventEmitter } from "events";
|
|
25318
25185
|
|
|
25319
25186
|
// src/clients/talk.ts
|
|
25320
|
-
var
|
|
25187
|
+
var import_common_pb = __toESM(require_common_pb());
|
|
25321
25188
|
|
|
25322
25189
|
// src/utils/rapida_header.ts
|
|
25323
25190
|
var HEADER_AUTH_ID = "x-auth-id";
|
|
@@ -25408,7 +25275,7 @@ var WithClientContext = (metadata = new grpc.Metadata()) => {
|
|
|
25408
25275
|
};
|
|
25409
25276
|
|
|
25410
25277
|
// src/clients/talk.ts
|
|
25411
|
-
var
|
|
25278
|
+
var import_common_pb2 = __toESM(require_common_pb());
|
|
25412
25279
|
function AssistantTalk(connectionConfig, authHeader) {
|
|
25413
25280
|
return connectionConfig.streamClient.assistantTalk(
|
|
25414
25281
|
WithAuthContext(connectionConfig.auth || authHeader)
|
|
@@ -25439,11 +25306,11 @@ function CreateConversationMetric(connectionConfig, req, authHeader) {
|
|
|
25439
25306
|
});
|
|
25440
25307
|
}
|
|
25441
25308
|
function GetAllAssistantConversation(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
25442
|
-
const req = new
|
|
25309
|
+
const req = new import_common_pb.GetAllAssistantConversationRequest();
|
|
25443
25310
|
req.setAssistantid(assistantId);
|
|
25444
|
-
const paginate = new
|
|
25311
|
+
const paginate = new import_common_pb2.Paginate();
|
|
25445
25312
|
criteria.forEach((x) => {
|
|
25446
|
-
let ctr = new
|
|
25313
|
+
let ctr = new import_common_pb2.Criteria();
|
|
25447
25314
|
ctr.setKey(x.key);
|
|
25448
25315
|
ctr.setValue(x.value);
|
|
25449
25316
|
req.addCriterias(ctr);
|
|
@@ -25481,19 +25348,19 @@ function getFeedback(input) {
|
|
|
25481
25348
|
var import_assistant_api_pb2 = __toESM(require_assistant_api_pb());
|
|
25482
25349
|
|
|
25483
25350
|
// src/clients/assistant.ts
|
|
25484
|
-
var
|
|
25351
|
+
var import_common_pb3 = __toESM(require_common_pb());
|
|
25485
25352
|
var import_assistant_api_pb = __toESM(require_assistant_api_pb());
|
|
25486
25353
|
var import_assistant_analysis_pb = __toESM(require_assistant_analysis_pb());
|
|
25487
25354
|
var import_assistant_tool_pb = __toESM(require_assistant_tool_pb());
|
|
25488
25355
|
var import_assistant_knowledge_pb = __toESM(require_assistant_knowledge_pb());
|
|
25489
25356
|
var import_assistant_webhook_pb = __toESM(require_assistant_webhook_pb());
|
|
25490
|
-
var
|
|
25357
|
+
var import_common_pb4 = __toESM(require_common_pb());
|
|
25491
25358
|
import { Struct } from "google-protobuf/google/protobuf/struct_pb";
|
|
25492
25359
|
function GetAllAssistant(connectionConfig, page, pageSize, criteria, cb, authHeader) {
|
|
25493
25360
|
const req = new import_assistant_api_pb.GetAllAssistantRequest();
|
|
25494
|
-
const paginate = new
|
|
25361
|
+
const paginate = new import_common_pb3.Paginate();
|
|
25495
25362
|
criteria.forEach(({ key, value }) => {
|
|
25496
|
-
const ctr = new
|
|
25363
|
+
const ctr = new import_common_pb3.Criteria();
|
|
25497
25364
|
ctr.setKey(key);
|
|
25498
25365
|
ctr.setValue(value);
|
|
25499
25366
|
req.addCriterias(ctr);
|
|
@@ -25520,9 +25387,9 @@ function UpdateAssistantVersion(connectionConfig, assistantId, assistantProvider
|
|
|
25520
25387
|
function GetAllAssistantProviderModel(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
25521
25388
|
const req = new import_assistant_api_pb.GetAllAssistantProviderModelRequest();
|
|
25522
25389
|
req.setAssistantid(assistantId);
|
|
25523
|
-
const paginate = new
|
|
25390
|
+
const paginate = new import_common_pb3.Paginate();
|
|
25524
25391
|
criteria.forEach(({ key, value }) => {
|
|
25525
|
-
const ctr = new
|
|
25392
|
+
const ctr = new import_common_pb3.Criteria();
|
|
25526
25393
|
ctr.setKey(key);
|
|
25527
25394
|
ctr.setValue(value);
|
|
25528
25395
|
req.addCriterias(ctr);
|
|
@@ -25601,9 +25468,9 @@ function UpdateAssistantDetail(connectionConfig, assistantId, name, description,
|
|
|
25601
25468
|
}
|
|
25602
25469
|
function GetAssistantMessages(connectionConfig, assistantId, page, pageSize, criteria, selectors, cb, authHeader) {
|
|
25603
25470
|
const req = new import_assistant_api_pb.GetAllAssistantMessageRequest();
|
|
25604
|
-
const paginate = new
|
|
25471
|
+
const paginate = new import_common_pb3.Paginate();
|
|
25605
25472
|
criteria.forEach(({ key, value, logic }) => {
|
|
25606
|
-
const ctr = new
|
|
25473
|
+
const ctr = new import_common_pb3.Criteria();
|
|
25607
25474
|
ctr.setKey(key);
|
|
25608
25475
|
ctr.setValue(value);
|
|
25609
25476
|
ctr.setLogic(logic);
|
|
@@ -25611,13 +25478,13 @@ function GetAssistantMessages(connectionConfig, assistantId, page, pageSize, cri
|
|
|
25611
25478
|
});
|
|
25612
25479
|
req.setAssistantid(assistantId);
|
|
25613
25480
|
selectors.forEach((v) => {
|
|
25614
|
-
const selectors2 = new
|
|
25481
|
+
const selectors2 = new import_common_pb3.FieldSelector();
|
|
25615
25482
|
selectors2.setField(v);
|
|
25616
25483
|
req.addSelectors(selectors2);
|
|
25617
25484
|
});
|
|
25618
25485
|
paginate.setPage(page);
|
|
25619
25486
|
paginate.setPagesize(pageSize);
|
|
25620
|
-
const order = new
|
|
25487
|
+
const order = new import_common_pb3.Ordering();
|
|
25621
25488
|
order.setColumn("created_date");
|
|
25622
25489
|
order.setOrder("desc");
|
|
25623
25490
|
req.setOrder(order);
|
|
@@ -25630,22 +25497,22 @@ function GetAssistantMessages(connectionConfig, assistantId, page, pageSize, cri
|
|
|
25630
25497
|
}
|
|
25631
25498
|
function GetMessages(connectionConfig, page, pageSize, criteria, selectors, cb, authHeader) {
|
|
25632
25499
|
const req = new import_assistant_api_pb.GetAllMessageRequest();
|
|
25633
|
-
const paginate = new
|
|
25500
|
+
const paginate = new import_common_pb3.Paginate();
|
|
25634
25501
|
criteria.forEach(({ key, value, logic }) => {
|
|
25635
|
-
const ctr = new
|
|
25502
|
+
const ctr = new import_common_pb3.Criteria();
|
|
25636
25503
|
ctr.setKey(key);
|
|
25637
25504
|
ctr.setValue(value);
|
|
25638
25505
|
ctr.setLogic(logic);
|
|
25639
25506
|
req.addCriterias(ctr);
|
|
25640
25507
|
});
|
|
25641
25508
|
selectors.forEach((v) => {
|
|
25642
|
-
const selectors2 = new
|
|
25509
|
+
const selectors2 = new import_common_pb3.FieldSelector();
|
|
25643
25510
|
selectors2.setField(v);
|
|
25644
25511
|
req.addSelectors(selectors2);
|
|
25645
25512
|
});
|
|
25646
25513
|
paginate.setPage(page);
|
|
25647
25514
|
paginate.setPagesize(pageSize);
|
|
25648
|
-
const order = new
|
|
25515
|
+
const order = new import_common_pb3.Ordering();
|
|
25649
25516
|
order.setColumn("created_date");
|
|
25650
25517
|
order.setOrder("desc");
|
|
25651
25518
|
req.setOrder(order);
|
|
@@ -25656,33 +25523,13 @@ function GetMessages(connectionConfig, page, pageSize, criteria, selectors, cb,
|
|
|
25656
25523
|
cb
|
|
25657
25524
|
);
|
|
25658
25525
|
}
|
|
25659
|
-
function GetAllAssistantSession(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
25660
|
-
const req = new import_common_pb5.GetAllAssistantConversationRequest();
|
|
25661
|
-
req.setAssistantid(assistantId);
|
|
25662
|
-
const paginate = new import_common_pb4.Paginate();
|
|
25663
|
-
criteria.forEach((x) => {
|
|
25664
|
-
let ctr = new import_common_pb4.Criteria();
|
|
25665
|
-
ctr.setKey(x.key);
|
|
25666
|
-
ctr.setValue(x.value);
|
|
25667
|
-
ctr.setLogic(x.logic);
|
|
25668
|
-
req.addCriterias(ctr);
|
|
25669
|
-
});
|
|
25670
|
-
paginate.setPage(page);
|
|
25671
|
-
paginate.setPagesize(pageSize);
|
|
25672
|
-
req.setPaginate(paginate);
|
|
25673
|
-
connectionConfig.assistantClient.getAllAssistantConversation(
|
|
25674
|
-
req,
|
|
25675
|
-
WithAuthContext(authHeader),
|
|
25676
|
-
cb
|
|
25677
|
-
);
|
|
25678
|
-
}
|
|
25679
25526
|
function GetAllAssistantConversationMessage(connectionConfig, assistantId, assistantConversationId, page, pageSize, criteria, authHeader, cb) {
|
|
25680
|
-
const req = new
|
|
25527
|
+
const req = new import_common_pb3.GetAllConversationMessageRequest();
|
|
25681
25528
|
req.setAssistantid(assistantId);
|
|
25682
25529
|
req.setAssistantconversationid(assistantConversationId);
|
|
25683
|
-
const paginate = new
|
|
25530
|
+
const paginate = new import_common_pb3.Paginate();
|
|
25684
25531
|
criteria.forEach((x) => {
|
|
25685
|
-
let ctr = new
|
|
25532
|
+
let ctr = new import_common_pb3.Criteria();
|
|
25686
25533
|
ctr.setKey(x.key);
|
|
25687
25534
|
ctr.setValue(x.value);
|
|
25688
25535
|
req.addCriterias(ctr);
|
|
@@ -25818,9 +25665,9 @@ function GetAssistantWhatsappDeployment(clientCfg, req, auth) {
|
|
|
25818
25665
|
}
|
|
25819
25666
|
function GetAllAssistantWebhook(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
25820
25667
|
const req = new import_assistant_webhook_pb.GetAllAssistantWebhookRequest();
|
|
25821
|
-
const paginate = new
|
|
25668
|
+
const paginate = new import_common_pb3.Paginate();
|
|
25822
25669
|
criteria.forEach(({ key, value }) => {
|
|
25823
|
-
const ctr = new
|
|
25670
|
+
const ctr = new import_common_pb3.Criteria();
|
|
25824
25671
|
ctr.setKey(key);
|
|
25825
25672
|
ctr.setValue(value);
|
|
25826
25673
|
req.addCriterias(ctr);
|
|
@@ -25926,9 +25773,9 @@ function DeleteAssistant(connectionConfig, assistantId, cb, authHeader) {
|
|
|
25926
25773
|
function GetAllAssistantAnalysis(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
25927
25774
|
const req = new import_assistant_analysis_pb.GetAllAssistantAnalysisRequest();
|
|
25928
25775
|
req.setAssistantid(assistantId);
|
|
25929
|
-
const paginate = new
|
|
25776
|
+
const paginate = new import_common_pb3.Paginate();
|
|
25930
25777
|
criteria.forEach(({ key, value }) => {
|
|
25931
|
-
const ctr = new
|
|
25778
|
+
const ctr = new import_common_pb3.Criteria();
|
|
25932
25779
|
ctr.setKey(key);
|
|
25933
25780
|
ctr.setValue(value);
|
|
25934
25781
|
req.addCriterias(ctr);
|
|
@@ -26001,9 +25848,9 @@ function DeleteAssistantAnalysis(connectionConfig, assistantId, AnalysisId, cb,
|
|
|
26001
25848
|
function GetAllWebhookLog(connectionConfig, projectId, page, pageSize, criteria, cb, authHeader) {
|
|
26002
25849
|
const req = new import_assistant_webhook_pb.GetAllAssistantWebhookLogRequest();
|
|
26003
25850
|
req.setProjectid(projectId);
|
|
26004
|
-
const paginate = new
|
|
25851
|
+
const paginate = new import_common_pb3.Paginate();
|
|
26005
25852
|
criteria.forEach(({ key, value, logic }) => {
|
|
26006
|
-
const ctr = new
|
|
25853
|
+
const ctr = new import_common_pb3.Criteria();
|
|
26007
25854
|
ctr.setKey(key);
|
|
26008
25855
|
ctr.setValue(value);
|
|
26009
25856
|
ctr.setLogic(logic);
|
|
@@ -26031,9 +25878,9 @@ function GetWebhookLog(connectionConfig, projectId, webhookLogId, cb, authHeader
|
|
|
26031
25878
|
function GetAllAssistantTool(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
26032
25879
|
const req = new import_assistant_tool_pb.GetAllAssistantToolRequest();
|
|
26033
25880
|
req.setAssistantid(assistantId);
|
|
26034
|
-
const paginate = new
|
|
25881
|
+
const paginate = new import_common_pb3.Paginate();
|
|
26035
25882
|
criteria.forEach(({ key, value }) => {
|
|
26036
|
-
const ctr = new
|
|
25883
|
+
const ctr = new import_common_pb3.Criteria();
|
|
26037
25884
|
ctr.setKey(key);
|
|
26038
25885
|
ctr.setValue(value);
|
|
26039
25886
|
req.addCriterias(ctr);
|
|
@@ -26104,9 +25951,9 @@ function DeleteAssistantTool(connectionConfig, assistantId, ToolId, cb, authHead
|
|
|
26104
25951
|
function GetAllAssistantKnowledge(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
26105
25952
|
const req = new import_assistant_knowledge_pb.GetAllAssistantKnowledgeRequest();
|
|
26106
25953
|
req.setAssistantid(assistantId);
|
|
26107
|
-
const paginate = new
|
|
25954
|
+
const paginate = new import_common_pb3.Paginate();
|
|
26108
25955
|
criteria.forEach(({ key, value }) => {
|
|
26109
|
-
const ctr = new
|
|
25956
|
+
const ctr = new import_common_pb3.Criteria();
|
|
26110
25957
|
ctr.setKey(key);
|
|
26111
25958
|
ctr.setValue(value);
|
|
26112
25959
|
req.addCriterias(ctr);
|
|
@@ -26205,6 +26052,7 @@ function GetAllAssistantToolLog(clientCfg, request, auth) {
|
|
|
26205
26052
|
}
|
|
26206
26053
|
|
|
26207
26054
|
// src/agents/index.ts
|
|
26055
|
+
var import_talk_api_pb2 = __toESM(require_talk_api_pb());
|
|
26208
26056
|
var Agent = class extends EventEmitter {
|
|
26209
26057
|
// Connection and State Management
|
|
26210
26058
|
connectionState = "disconnected" /* Disconnected */;
|
|
@@ -26358,7 +26206,7 @@ var Agent = class extends EventEmitter {
|
|
|
26358
26206
|
req.setAssistantconversationid(this._conversationId);
|
|
26359
26207
|
req.setMessageid(messageId);
|
|
26360
26208
|
for (const mtr of metrics) {
|
|
26361
|
-
const _m = new
|
|
26209
|
+
const _m = new import_common_pb5.Metric();
|
|
26362
26210
|
_m.setName(mtr.name);
|
|
26363
26211
|
_m.setValue(mtr.value);
|
|
26364
26212
|
_m.setDescription(mtr.description);
|
|
@@ -26405,7 +26253,7 @@ var Agent = class extends EventEmitter {
|
|
|
26405
26253
|
req.setAssistantid(this.agentConfig.definition.getAssistantid());
|
|
26406
26254
|
req.setAssistantconversationid(this._conversationId);
|
|
26407
26255
|
for (const mtr of metrics) {
|
|
26408
|
-
const _m = new
|
|
26256
|
+
const _m = new import_common_pb5.Metric();
|
|
26409
26257
|
_m.setName(mtr.name);
|
|
26410
26258
|
_m.setValue(mtr.value);
|
|
26411
26259
|
_m.setDescription(mtr.description);
|
|
@@ -26433,13 +26281,26 @@ var Agent = class extends EventEmitter {
|
|
|
26433
26281
|
* @param contents - Message contents
|
|
26434
26282
|
* @returns Configured messaging request
|
|
26435
26283
|
*/
|
|
26436
|
-
|
|
26284
|
+
createAssistantTextMessage(content) {
|
|
26285
|
+
const request = new import_talk_api_pb.AssistantMessagingRequest();
|
|
26286
|
+
const userMessage = new import_talk_api_pb.AssistantConversationUserMessage();
|
|
26287
|
+
const message = new import_talk_api_pb.AssistantConversationMessageTextContent();
|
|
26288
|
+
message.setContent(content);
|
|
26289
|
+
userMessage.setText(message);
|
|
26290
|
+
request.setMessage(userMessage);
|
|
26291
|
+
return request;
|
|
26292
|
+
}
|
|
26293
|
+
/**
|
|
26294
|
+
*
|
|
26295
|
+
* @param content
|
|
26296
|
+
* @returns
|
|
26297
|
+
*/
|
|
26298
|
+
createAssistantAudioMessage(content) {
|
|
26437
26299
|
const request = new import_talk_api_pb.AssistantMessagingRequest();
|
|
26438
26300
|
const userMessage = new import_talk_api_pb.AssistantConversationUserMessage();
|
|
26439
|
-
const message = new
|
|
26440
|
-
message.
|
|
26441
|
-
|
|
26442
|
-
userMessage.setMessage(message);
|
|
26301
|
+
const message = new import_talk_api_pb2.AssistantConversationMessageAudioContent();
|
|
26302
|
+
message.setContent(content);
|
|
26303
|
+
userMessage.setAudio(message);
|
|
26443
26304
|
request.setMessage(userMessage);
|
|
26444
26305
|
return request;
|
|
26445
26306
|
}
|
|
@@ -26968,12 +26829,50 @@ function arrayBufferToUint8(arrayBuffer) {
|
|
|
26968
26829
|
return new Uint8Array(arrayBuffer);
|
|
26969
26830
|
}
|
|
26970
26831
|
|
|
26832
|
+
// src/types/agent-callback.ts
|
|
26833
|
+
var import_talk_api_pb3 = __toESM(require_talk_api_pb());
|
|
26834
|
+
|
|
26835
|
+
// src/utils/rapida_content.ts
|
|
26836
|
+
var import_common_pb6 = __toESM(require_common_pb());
|
|
26837
|
+
var TEXT_CONTENT_FORMAT_RAW = "raw";
|
|
26838
|
+
var AUDIO_CONTENT_FORMAT_CHUNK = "chunk";
|
|
26839
|
+
var toTextContent = (str, format) => {
|
|
26840
|
+
const cnt = new import_common_pb6.Content();
|
|
26841
|
+
if (format) cnt.setContentformat(format);
|
|
26842
|
+
else cnt.setContentformat(TEXT_CONTENT_FORMAT_RAW);
|
|
26843
|
+
cnt.setContenttype("text" /* TEXT_CONTENT */);
|
|
26844
|
+
cnt.setContent(new TextEncoder().encode(str));
|
|
26845
|
+
return cnt;
|
|
26846
|
+
};
|
|
26847
|
+
var toStreamAudioContent = (raw) => {
|
|
26848
|
+
const cnt = new import_common_pb6.Content();
|
|
26849
|
+
cnt.setContentformat(AUDIO_CONTENT_FORMAT_CHUNK);
|
|
26850
|
+
cnt.setContenttype("audio" /* AUDIO_CONTENT */);
|
|
26851
|
+
cnt.setContent(raw);
|
|
26852
|
+
return cnt;
|
|
26853
|
+
};
|
|
26854
|
+
var toContentText = (cnt) => {
|
|
26855
|
+
if (!cnt) return "";
|
|
26856
|
+
return cnt.filter((x) => x.getContenttype() === "text").map((x) => {
|
|
26857
|
+
try {
|
|
26858
|
+
return new TextDecoder().decode(x.getContent());
|
|
26859
|
+
} catch (error) {
|
|
26860
|
+
return "";
|
|
26861
|
+
}
|
|
26862
|
+
}).join(" ");
|
|
26863
|
+
};
|
|
26864
|
+
|
|
26971
26865
|
// src/types/agent-callback.ts
|
|
26972
26866
|
var ConversationUserMessage = class {
|
|
26973
26867
|
constructor(config) {
|
|
26974
26868
|
if (config) {
|
|
26975
26869
|
Object.assign(this, config.toObject());
|
|
26976
|
-
|
|
26870
|
+
switch (config.getMessageCase()) {
|
|
26871
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
26872
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
26873
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
26874
|
+
this.messageText = config.getText()?.getContent();
|
|
26875
|
+
}
|
|
26977
26876
|
}
|
|
26978
26877
|
}
|
|
26979
26878
|
};
|
|
@@ -26981,7 +26880,12 @@ var ConversationAssistantMessage = class {
|
|
|
26981
26880
|
constructor(config) {
|
|
26982
26881
|
if (config) {
|
|
26983
26882
|
Object.assign(this, config.toObject());
|
|
26984
|
-
|
|
26883
|
+
switch (config.getMessageCase()) {
|
|
26884
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
26885
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
26886
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
26887
|
+
this.messageText = config.getText()?.getContent();
|
|
26888
|
+
}
|
|
26985
26889
|
}
|
|
26986
26890
|
}
|
|
26987
26891
|
};
|
|
@@ -27103,9 +27007,9 @@ var VoiceAgent = class extends Agent {
|
|
|
27103
27007
|
const maxVolume = event.data[1];
|
|
27104
27008
|
if (this.inputChannel == "audio" /* Audio */)
|
|
27105
27009
|
this.talkingConnection?.write(
|
|
27106
|
-
this.
|
|
27107
|
-
|
|
27108
|
-
|
|
27010
|
+
this.createAssistantAudioMessage(
|
|
27011
|
+
arrayBufferToUint8(rawAudioPcmData.buffer)
|
|
27012
|
+
)
|
|
27109
27013
|
);
|
|
27110
27014
|
};
|
|
27111
27015
|
/**
|
|
@@ -27181,9 +27085,7 @@ var VoiceAgent = class extends Agent {
|
|
|
27181
27085
|
onSendText = async (text) => {
|
|
27182
27086
|
if (!this.isConnected) await this.connect();
|
|
27183
27087
|
if (this.inputChannel == "text" /* Text */) {
|
|
27184
|
-
this.talkingConnection?.write(
|
|
27185
|
-
this.createAssistantRequest("user", [toTextContent(text)])
|
|
27186
|
-
);
|
|
27088
|
+
this.talkingConnection?.write(this.createAssistantTextMessage(text));
|
|
27187
27089
|
}
|
|
27188
27090
|
};
|
|
27189
27091
|
/**
|
|
@@ -27248,13 +27150,13 @@ var VoiceAgent = class extends Agent {
|
|
|
27248
27150
|
onHandleInterruption = (interruptionData) => {
|
|
27249
27151
|
if (interruptionData) {
|
|
27250
27152
|
switch (interruptionData.getType()) {
|
|
27251
|
-
case
|
|
27153
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_UNSPECIFIED:
|
|
27252
27154
|
console.log("Unspecified interruption type");
|
|
27253
27155
|
break;
|
|
27254
|
-
case
|
|
27156
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_VAD:
|
|
27255
27157
|
this.fadeOutAudio();
|
|
27256
27158
|
break;
|
|
27257
|
-
case
|
|
27159
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_WORD:
|
|
27258
27160
|
if (this.agentMessages.length > 0) {
|
|
27259
27161
|
const lastIndex = this.agentMessages.length - 1;
|
|
27260
27162
|
this.agentMessages[lastIndex] = {
|
|
@@ -27269,53 +27171,70 @@ var VoiceAgent = class extends Agent {
|
|
|
27269
27171
|
}
|
|
27270
27172
|
this.emit(
|
|
27271
27173
|
"onConversationEvent" /* ConversationEvent */,
|
|
27272
|
-
|
|
27174
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION,
|
|
27273
27175
|
interruptionData
|
|
27274
27176
|
);
|
|
27275
27177
|
}
|
|
27276
27178
|
};
|
|
27277
27179
|
onHandleUser = (userContent) => {
|
|
27278
27180
|
if (userContent) {
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
27282
|
-
|
|
27283
|
-
|
|
27284
|
-
|
|
27285
|
-
|
|
27286
|
-
|
|
27181
|
+
switch (userContent.getMessageCase()) {
|
|
27182
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
27183
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
27184
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
27185
|
+
const agentTranscript = userContent.getText()?.getContent();
|
|
27186
|
+
if (agentTranscript) {
|
|
27187
|
+
if (this.agentMessages.length > 0) {
|
|
27188
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
27189
|
+
if (lastMessage.role === "user" /* User */ && lastMessage.id === userContent.getId()) {
|
|
27190
|
+
this.agentMessages.pop();
|
|
27191
|
+
}
|
|
27192
|
+
}
|
|
27193
|
+
this.agentMessages.push({
|
|
27194
|
+
id: userContent.getId(),
|
|
27195
|
+
role: "user" /* User */,
|
|
27196
|
+
messages: [agentTranscript],
|
|
27197
|
+
time: toDate(userContent?.getTime()),
|
|
27198
|
+
status: userContent.getCompleted() ? "complete" /* Complete */ : "pending" /* Pending */
|
|
27199
|
+
});
|
|
27287
27200
|
}
|
|
27288
|
-
}
|
|
27289
|
-
this.agentMessages.push({
|
|
27290
|
-
id: userContent.getId(),
|
|
27291
|
-
role: "user" /* User */,
|
|
27292
|
-
messages: [agentTranscript],
|
|
27293
|
-
time: toDate(userContent?.getTime()),
|
|
27294
|
-
status: userContent.getCompleted() ? "complete" /* Complete */ : "pending" /* Pending */
|
|
27295
|
-
});
|
|
27296
27201
|
}
|
|
27297
27202
|
this.emit(
|
|
27298
27203
|
"onConversationEvent" /* ConversationEvent */,
|
|
27299
|
-
|
|
27204
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER,
|
|
27300
27205
|
userContent
|
|
27301
27206
|
);
|
|
27302
27207
|
}
|
|
27303
27208
|
};
|
|
27304
27209
|
onHandleAssistant = (systemContent) => {
|
|
27305
27210
|
if (systemContent) {
|
|
27306
|
-
|
|
27307
|
-
|
|
27308
|
-
|
|
27309
|
-
|
|
27310
|
-
|
|
27311
|
-
|
|
27312
|
-
|
|
27313
|
-
|
|
27314
|
-
|
|
27315
|
-
|
|
27316
|
-
|
|
27317
|
-
|
|
27318
|
-
|
|
27211
|
+
switch (systemContent.getMessageCase()) {
|
|
27212
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.MESSAGE_NOT_SET:
|
|
27213
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.AUDIO:
|
|
27214
|
+
const content = systemContent.getAudio();
|
|
27215
|
+
if (content) {
|
|
27216
|
+
const audioData = content.getContent_asU8();
|
|
27217
|
+
this.addAudioChunk(new Uint8Array(audioData).buffer);
|
|
27218
|
+
}
|
|
27219
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.TEXT:
|
|
27220
|
+
const systemTranscript = systemContent.getText()?.getContent();
|
|
27221
|
+
if (systemTranscript) {
|
|
27222
|
+
if (systemContent.getCompleted()) {
|
|
27223
|
+
if (this.agentMessages.length > 0) {
|
|
27224
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
27225
|
+
if (lastMessage.role === "system" /* System */ && lastMessage.status === "pending" /* Pending */) {
|
|
27226
|
+
lastMessage.messages = [systemTranscript];
|
|
27227
|
+
lastMessage.status = "complete" /* Complete */;
|
|
27228
|
+
lastMessage.time = toDate(systemContent?.getTime());
|
|
27229
|
+
} else {
|
|
27230
|
+
this.agentMessages.push({
|
|
27231
|
+
id: systemContent.getId(),
|
|
27232
|
+
role: "system" /* System */,
|
|
27233
|
+
messages: [systemTranscript],
|
|
27234
|
+
time: toDate(systemContent?.getTime()),
|
|
27235
|
+
status: "complete" /* Complete */
|
|
27236
|
+
});
|
|
27237
|
+
}
|
|
27319
27238
|
} else {
|
|
27320
27239
|
this.agentMessages.push({
|
|
27321
27240
|
id: systemContent.getId(),
|
|
@@ -27326,20 +27245,20 @@ var VoiceAgent = class extends Agent {
|
|
|
27326
27245
|
});
|
|
27327
27246
|
}
|
|
27328
27247
|
} else {
|
|
27329
|
-
this.agentMessages.
|
|
27330
|
-
|
|
27331
|
-
role
|
|
27332
|
-
|
|
27333
|
-
|
|
27334
|
-
|
|
27335
|
-
|
|
27336
|
-
|
|
27337
|
-
|
|
27338
|
-
|
|
27339
|
-
|
|
27340
|
-
|
|
27341
|
-
|
|
27342
|
-
|
|
27248
|
+
if (this.agentMessages.length > 0) {
|
|
27249
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
27250
|
+
if (lastMessage.role === "system" /* System */ && lastMessage.status === "pending" /* Pending */) {
|
|
27251
|
+
lastMessage.messages[0] += systemTranscript;
|
|
27252
|
+
lastMessage.time = toDate(systemContent?.getTime());
|
|
27253
|
+
} else {
|
|
27254
|
+
this.agentMessages.push({
|
|
27255
|
+
id: systemContent.getId(),
|
|
27256
|
+
role: "system" /* System */,
|
|
27257
|
+
messages: [systemTranscript],
|
|
27258
|
+
time: toDate(systemContent?.getTime()),
|
|
27259
|
+
status: "pending" /* Pending */
|
|
27260
|
+
});
|
|
27261
|
+
}
|
|
27343
27262
|
} else {
|
|
27344
27263
|
this.agentMessages.push({
|
|
27345
27264
|
id: systemContent.getId(),
|
|
@@ -27349,29 +27268,12 @@ var VoiceAgent = class extends Agent {
|
|
|
27349
27268
|
status: "pending" /* Pending */
|
|
27350
27269
|
});
|
|
27351
27270
|
}
|
|
27352
|
-
} else {
|
|
27353
|
-
this.agentMessages.push({
|
|
27354
|
-
id: systemContent.getId(),
|
|
27355
|
-
role: "system" /* System */,
|
|
27356
|
-
messages: [systemTranscript],
|
|
27357
|
-
time: toDate(systemContent?.getTime()),
|
|
27358
|
-
status: "pending" /* Pending */
|
|
27359
|
-
});
|
|
27360
27271
|
}
|
|
27361
27272
|
}
|
|
27362
|
-
}
|
|
27363
|
-
}
|
|
27364
|
-
if (responseContent.filter((x) => x.getContenttype() == "audio").length > 0) {
|
|
27365
|
-
for (const content of responseContent) {
|
|
27366
|
-
if (content.getContenttype() === "audio") {
|
|
27367
|
-
const audioData = content.getContent_asU8();
|
|
27368
|
-
this.addAudioChunk(new Uint8Array(audioData).buffer);
|
|
27369
|
-
}
|
|
27370
|
-
}
|
|
27371
27273
|
}
|
|
27372
27274
|
this.emit(
|
|
27373
27275
|
"onConversationEvent" /* ConversationEvent */,
|
|
27374
|
-
|
|
27276
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT,
|
|
27375
27277
|
systemContent
|
|
27376
27278
|
);
|
|
27377
27279
|
}
|
|
@@ -27383,22 +27285,22 @@ var VoiceAgent = class extends Agent {
|
|
|
27383
27285
|
*/
|
|
27384
27286
|
onRecieve = async (response) => {
|
|
27385
27287
|
switch (response.getDataCase()) {
|
|
27386
|
-
case
|
|
27288
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
|
|
27387
27289
|
break;
|
|
27388
|
-
case
|
|
27290
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION:
|
|
27389
27291
|
this.onHandleInterruption(response.getInterruption());
|
|
27390
27292
|
break;
|
|
27391
|
-
case
|
|
27293
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER:
|
|
27392
27294
|
this.onHandleUser(response.getUser());
|
|
27393
27295
|
break;
|
|
27394
|
-
case
|
|
27296
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT:
|
|
27395
27297
|
this.onHandleAssistant(response.getAssistant());
|
|
27396
27298
|
break;
|
|
27397
|
-
case
|
|
27299
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.CONFIGURATION:
|
|
27398
27300
|
const conversation = response.getConfiguration();
|
|
27399
27301
|
if (!conversation?.getAssistantconversationid()) return;
|
|
27400
27302
|
break;
|
|
27401
|
-
case
|
|
27303
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.MESSAGE:
|
|
27402
27304
|
break;
|
|
27403
27305
|
default:
|
|
27404
27306
|
break;
|
|
@@ -27411,28 +27313,28 @@ var VoiceAgent = class extends Agent {
|
|
|
27411
27313
|
onCallback(response) {
|
|
27412
27314
|
for (const agentCallback of this.agentCallbacks) {
|
|
27413
27315
|
switch (response.getDataCase()) {
|
|
27414
|
-
case
|
|
27316
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
|
|
27415
27317
|
break;
|
|
27416
|
-
case
|
|
27318
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION:
|
|
27417
27319
|
if (agentCallback && agentCallback?.onInterrupt) {
|
|
27418
27320
|
agentCallback.onInterrupt(response.getInterruption()?.toObject());
|
|
27419
27321
|
}
|
|
27420
27322
|
break;
|
|
27421
|
-
case
|
|
27323
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER:
|
|
27422
27324
|
if (agentCallback && agentCallback?.onUserMessage) {
|
|
27423
27325
|
agentCallback.onUserMessage(
|
|
27424
27326
|
new ConversationUserMessage(response.getUser())
|
|
27425
27327
|
);
|
|
27426
27328
|
}
|
|
27427
27329
|
break;
|
|
27428
|
-
case
|
|
27330
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT:
|
|
27429
27331
|
if (agentCallback && agentCallback?.onAssistantMessage) {
|
|
27430
27332
|
agentCallback.onAssistantMessage(
|
|
27431
27333
|
new ConversationAssistantMessage(response.getAssistant())
|
|
27432
27334
|
);
|
|
27433
27335
|
}
|
|
27434
27336
|
break;
|
|
27435
|
-
case
|
|
27337
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.CONFIGURATION:
|
|
27436
27338
|
if (agentCallback && agentCallback?.onConfiguration) {
|
|
27437
27339
|
agentCallback.onConfiguration(
|
|
27438
27340
|
response.getConfiguration()?.toObject()
|
|
@@ -27441,7 +27343,7 @@ var VoiceAgent = class extends Agent {
|
|
|
27441
27343
|
const cnvId = response.getConfiguration()?.getAssistantconversationid();
|
|
27442
27344
|
if (cnvId) this.changeConversation(cnvId);
|
|
27443
27345
|
break;
|
|
27444
|
-
case
|
|
27346
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.MESSAGE:
|
|
27445
27347
|
if (agentCallback && agentCallback?.onMessage) {
|
|
27446
27348
|
agentCallback.onMessage(
|
|
27447
27349
|
new ConversationMessage(response.getMessage())
|
|
@@ -27741,9 +27643,6 @@ export {
|
|
|
27741
27643
|
require_common_pb,
|
|
27742
27644
|
require_talk_api_pb,
|
|
27743
27645
|
AgentEvent,
|
|
27744
|
-
toTextContent,
|
|
27745
|
-
toStreamAudioContent,
|
|
27746
|
-
toContentText,
|
|
27747
27646
|
MessageRole,
|
|
27748
27647
|
MessageStatus,
|
|
27749
27648
|
Channel,
|
|
@@ -27798,7 +27697,6 @@ export {
|
|
|
27798
27697
|
UpdateAssistantDetail,
|
|
27799
27698
|
GetAssistantMessages,
|
|
27800
27699
|
GetMessages,
|
|
27801
|
-
GetAllAssistantSession,
|
|
27802
27700
|
GetAllAssistantConversationMessage,
|
|
27803
27701
|
CreateAssistantDebuggerDeployment,
|
|
27804
27702
|
GetAssistantDebuggerDeployment,
|
|
@@ -27836,6 +27734,9 @@ export {
|
|
|
27836
27734
|
DeleteAssistantKnowledge,
|
|
27837
27735
|
GetAssistantToolLog,
|
|
27838
27736
|
GetAllAssistantToolLog,
|
|
27737
|
+
toTextContent,
|
|
27738
|
+
toStreamAudioContent,
|
|
27739
|
+
toContentText,
|
|
27839
27740
|
VoiceAgent,
|
|
27840
27741
|
useObservableState,
|
|
27841
27742
|
agentEventSelector,
|
|
@@ -27845,4 +27746,4 @@ export {
|
|
|
27845
27746
|
useSelectInputDeviceAgent,
|
|
27846
27747
|
DeviceSelectorComponent
|
|
27847
27748
|
};
|
|
27848
|
-
//# sourceMappingURL=chunk-
|
|
27749
|
+
//# sourceMappingURL=chunk-U2OYP3DD.mjs.map
|