@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
package/dist/index.js
CHANGED
|
@@ -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,
|
|
6428
6608
|
f,
|
|
6429
|
-
|
|
6609
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter
|
|
6610
|
+
);
|
|
6611
|
+
}
|
|
6612
|
+
f = message.getText();
|
|
6613
|
+
if (f != null) {
|
|
6614
|
+
writer.writeMessage(
|
|
6615
|
+
11,
|
|
6616
|
+
f,
|
|
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,
|
|
6574
6795
|
f,
|
|
6575
|
-
|
|
6796
|
+
proto.talk_api.AssistantConversationMessageAudioContent.serializeBinaryToWriter
|
|
6797
|
+
);
|
|
6798
|
+
}
|
|
6799
|
+
f = message.getText();
|
|
6800
|
+
if (f != null) {
|
|
6801
|
+
writer.writeMessage(
|
|
6802
|
+
11,
|
|
6803
|
+
f,
|
|
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,337 +24558,6 @@ 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.GetAllAssistantUserConversationRequest.repeatedFields_ = [3];
|
|
24334
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24335
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.toObject = function(opt_includeInstance) {
|
|
24336
|
-
return proto.assistant_api.GetAllAssistantUserConversationRequest.toObject(opt_includeInstance, this);
|
|
24337
|
-
};
|
|
24338
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.toObject = function(includeInstance, msg) {
|
|
24339
|
-
var f, obj = {
|
|
24340
|
-
assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"),
|
|
24341
|
-
paginate: (f = msg.getPaginate()) && common_pb.Paginate.toObject(includeInstance, f),
|
|
24342
|
-
criteriasList: jspb.Message.toObjectList(
|
|
24343
|
-
msg.getCriteriasList(),
|
|
24344
|
-
common_pb.Criteria.toObject,
|
|
24345
|
-
includeInstance
|
|
24346
|
-
),
|
|
24347
|
-
source: jspb.Message.getFieldWithDefault(msg, 7, 0)
|
|
24348
|
-
};
|
|
24349
|
-
if (includeInstance) {
|
|
24350
|
-
obj.$jspbMessageInstance = msg;
|
|
24351
|
-
}
|
|
24352
|
-
return obj;
|
|
24353
|
-
};
|
|
24354
|
-
}
|
|
24355
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.deserializeBinary = function(bytes) {
|
|
24356
|
-
var reader = new jspb.BinaryReader(bytes);
|
|
24357
|
-
var msg = new proto.assistant_api.GetAllAssistantUserConversationRequest();
|
|
24358
|
-
return proto.assistant_api.GetAllAssistantUserConversationRequest.deserializeBinaryFromReader(msg, reader);
|
|
24359
|
-
};
|
|
24360
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
24361
|
-
while (reader.nextField()) {
|
|
24362
|
-
if (reader.isEndGroup()) {
|
|
24363
|
-
break;
|
|
24364
|
-
}
|
|
24365
|
-
var field = reader.getFieldNumber();
|
|
24366
|
-
switch (field) {
|
|
24367
|
-
case 1:
|
|
24368
|
-
var value = (
|
|
24369
|
-
/** @type {string} */
|
|
24370
|
-
reader.readUint64String()
|
|
24371
|
-
);
|
|
24372
|
-
msg.setAssistantid(value);
|
|
24373
|
-
break;
|
|
24374
|
-
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
|
-
var value = (
|
|
24386
|
-
/** @type {!proto.Source} */
|
|
24387
|
-
reader.readEnum()
|
|
24388
|
-
);
|
|
24389
|
-
msg.setSource(value);
|
|
24390
|
-
break;
|
|
24391
|
-
default:
|
|
24392
|
-
reader.skipField();
|
|
24393
|
-
break;
|
|
24394
|
-
}
|
|
24395
|
-
}
|
|
24396
|
-
return msg;
|
|
24397
|
-
};
|
|
24398
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.serializeBinary = function() {
|
|
24399
|
-
var writer = new jspb.BinaryWriter();
|
|
24400
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.serializeBinaryToWriter(this, writer);
|
|
24401
|
-
return writer.getResultBuffer();
|
|
24402
|
-
};
|
|
24403
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.serializeBinaryToWriter = function(message, writer) {
|
|
24404
|
-
var f = void 0;
|
|
24405
|
-
f = message.getAssistantid();
|
|
24406
|
-
if (parseInt(f, 10) !== 0) {
|
|
24407
|
-
writer.writeUint64String(
|
|
24408
|
-
1,
|
|
24409
|
-
f
|
|
24410
|
-
);
|
|
24411
|
-
}
|
|
24412
|
-
f = message.getPaginate();
|
|
24413
|
-
if (f != null) {
|
|
24414
|
-
writer.writeMessage(
|
|
24415
|
-
2,
|
|
24416
|
-
f,
|
|
24417
|
-
common_pb.Paginate.serializeBinaryToWriter
|
|
24418
|
-
);
|
|
24419
|
-
}
|
|
24420
|
-
f = message.getCriteriasList();
|
|
24421
|
-
if (f.length > 0) {
|
|
24422
|
-
writer.writeRepeatedMessage(
|
|
24423
|
-
3,
|
|
24424
|
-
f,
|
|
24425
|
-
common_pb.Criteria.serializeBinaryToWriter
|
|
24426
|
-
);
|
|
24427
|
-
}
|
|
24428
|
-
f = message.getSource();
|
|
24429
|
-
if (f !== 0) {
|
|
24430
|
-
writer.writeEnum(
|
|
24431
|
-
7,
|
|
24432
|
-
f
|
|
24433
|
-
);
|
|
24434
|
-
}
|
|
24435
|
-
};
|
|
24436
|
-
proto.assistant_api.GetAllAssistantUserConversationRequest.prototype.getAssistantid = function() {
|
|
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
24561
|
proto.assistant_api.GetAssistantConversationRequest.repeatedFields_ = [5];
|
|
24665
24562
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
24666
24563
|
proto.assistant_api.GetAssistantConversationRequest.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -24669,7 +24566,7 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24669
24566
|
proto.assistant_api.GetAssistantConversationRequest.toObject = function(includeInstance, msg) {
|
|
24670
24567
|
var f, obj = {
|
|
24671
24568
|
assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"),
|
|
24672
|
-
|
|
24569
|
+
id: jspb.Message.getFieldWithDefault(msg, 2, "0"),
|
|
24673
24570
|
selectorsList: jspb.Message.toObjectList(
|
|
24674
24571
|
msg.getSelectorsList(),
|
|
24675
24572
|
common_pb.FieldSelector.toObject,
|
|
@@ -24706,7 +24603,7 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24706
24603
|
/** @type {string} */
|
|
24707
24604
|
reader.readUint64String()
|
|
24708
24605
|
);
|
|
24709
|
-
msg.
|
|
24606
|
+
msg.setId(value);
|
|
24710
24607
|
break;
|
|
24711
24608
|
case 5:
|
|
24712
24609
|
var value = new common_pb.FieldSelector();
|
|
@@ -24734,7 +24631,7 @@ var require_assistant_api_pb = __commonJS({
|
|
|
24734
24631
|
f
|
|
24735
24632
|
);
|
|
24736
24633
|
}
|
|
24737
|
-
f = message.
|
|
24634
|
+
f = message.getId();
|
|
24738
24635
|
if (parseInt(f, 10) !== 0) {
|
|
24739
24636
|
writer.writeUint64String(
|
|
24740
24637
|
2,
|
|
@@ -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() {
|
|
@@ -60282,21 +60179,21 @@ __export(index_exports, {
|
|
|
60282
60179
|
AssistantAnalysis: () => import_assistant_analysis_pb2.AssistantAnalysis,
|
|
60283
60180
|
AssistantApiDeployment: () => import_assistant_deployment_pb.AssistantApiDeployment,
|
|
60284
60181
|
AssistantConversation: () => import_common_pb15.AssistantConversation,
|
|
60285
|
-
AssistantConversationAssistantMessage: () =>
|
|
60286
|
-
AssistantConversationConfiguration: () =>
|
|
60182
|
+
AssistantConversationAssistantMessage: () => import_talk_api_pb6.AssistantConversationAssistantMessage,
|
|
60183
|
+
AssistantConversationConfiguration: () => import_talk_api_pb6.AssistantConversationConfiguration,
|
|
60287
60184
|
AssistantConversationContext: () => import_common_pb15.AssistantConversationContext,
|
|
60288
|
-
AssistantConversationInterruption: () =>
|
|
60185
|
+
AssistantConversationInterruption: () => import_talk_api_pb6.AssistantConversationInterruption,
|
|
60289
60186
|
AssistantConversationMessage: () => import_common_pb15.AssistantConversationMessage,
|
|
60290
60187
|
AssistantConversationRecording: () => import_common_pb15.AssistantConversationRecording,
|
|
60291
|
-
AssistantConversationUserMessage: () =>
|
|
60188
|
+
AssistantConversationUserMessage: () => import_talk_api_pb6.AssistantConversationUserMessage,
|
|
60292
60189
|
AssistantDebuggerDeployment: () => import_assistant_deployment_pb.AssistantDebuggerDeployment,
|
|
60293
|
-
AssistantDefinition: () =>
|
|
60190
|
+
AssistantDefinition: () => import_talk_api_pb6.AssistantDefinition,
|
|
60294
60191
|
AssistantDeploymentService: () => import_assistant_deployment_pb_service2.AssistantDeploymentService,
|
|
60295
60192
|
AssistantDeploymentServiceClient: () => import_assistant_deployment_pb_service2.AssistantDeploymentServiceClient,
|
|
60296
60193
|
AssistantKnowledge: () => import_assistant_knowledge_pb2.AssistantKnowledge,
|
|
60297
60194
|
AssistantMessageStage: () => import_common_pb15.AssistantMessageStage,
|
|
60298
|
-
AssistantMessagingRequest: () =>
|
|
60299
|
-
AssistantMessagingResponse: () =>
|
|
60195
|
+
AssistantMessagingRequest: () => import_talk_api_pb6.AssistantMessagingRequest,
|
|
60196
|
+
AssistantMessagingResponse: () => import_talk_api_pb6.AssistantMessagingResponse,
|
|
60300
60197
|
AssistantPhoneDeployment: () => import_assistant_deployment_pb.AssistantPhoneDeployment,
|
|
60301
60198
|
AssistantProviderModel: () => import_assistant_api_pb3.AssistantProviderModel,
|
|
60302
60199
|
AssistantService: () => import_assistant_api_pb_service2.AssistantService,
|
|
@@ -60358,11 +60255,11 @@ __export(index_exports, {
|
|
|
60358
60255
|
CreateAssistantWebpluginDeployment: () => CreateAssistantWebpluginDeployment,
|
|
60359
60256
|
CreateAssistantWhatsappDeployment: () => CreateAssistantWhatsappDeployment,
|
|
60360
60257
|
CreateBulkPhoneCall: () => CreateBulkPhoneCall,
|
|
60361
|
-
CreateBulkPhoneCallRequest: () =>
|
|
60362
|
-
CreateBulkPhoneCallResponse: () =>
|
|
60258
|
+
CreateBulkPhoneCallRequest: () => import_talk_api_pb7.CreateBulkPhoneCallRequest,
|
|
60259
|
+
CreateBulkPhoneCallResponse: () => import_talk_api_pb7.CreateBulkPhoneCallResponse,
|
|
60363
60260
|
CreateConversationMetric: () => CreateConversationMetric,
|
|
60364
|
-
CreateConversationMetricRequest: () =>
|
|
60365
|
-
CreateConversationMetricResponse: () =>
|
|
60261
|
+
CreateConversationMetricRequest: () => import_talk_api_pb6.CreateConversationMetricRequest,
|
|
60262
|
+
CreateConversationMetricResponse: () => import_talk_api_pb6.CreateConversationMetricResponse,
|
|
60366
60263
|
CreateEndpoint: () => CreateEndpoint,
|
|
60367
60264
|
CreateEndpointCacheConfiguration: () => CreateEndpointCacheConfiguration,
|
|
60368
60265
|
CreateEndpointCacheConfigurationRequest: () => import_endpoint_api_pb2.CreateEndpointCacheConfigurationRequest,
|
|
@@ -60386,8 +60283,8 @@ __export(index_exports, {
|
|
|
60386
60283
|
CreateKnowledgeTag: () => CreateKnowledgeTag,
|
|
60387
60284
|
CreateKnowledgeTagRequest: () => import_knowledge_api_pb3.CreateKnowledgeTagRequest,
|
|
60388
60285
|
CreateMessageMetric: () => CreateMessageMetric,
|
|
60389
|
-
CreateMessageMetricRequest: () =>
|
|
60390
|
-
CreateMessageMetricResponse: () =>
|
|
60286
|
+
CreateMessageMetricRequest: () => import_talk_api_pb6.CreateMessageMetricRequest,
|
|
60287
|
+
CreateMessageMetricResponse: () => import_talk_api_pb6.CreateMessageMetricResponse,
|
|
60391
60288
|
CreateMetadataRequest: () => import_audit_logging_api_pb2.CreateMetadataRequest,
|
|
60392
60289
|
CreateMetadataResponse: () => import_audit_logging_api_pb2.CreateMetadataResponse,
|
|
60393
60290
|
CreateOrganization: () => CreateOrganization,
|
|
@@ -60397,8 +60294,8 @@ __export(index_exports, {
|
|
|
60397
60294
|
CreatePasswordRequest: () => import_web_api_pb4.CreatePasswordRequest,
|
|
60398
60295
|
CreatePasswordResponse: () => import_web_api_pb4.CreatePasswordResponse,
|
|
60399
60296
|
CreatePhoneCall: () => CreatePhoneCall,
|
|
60400
|
-
CreatePhoneCallRequest: () =>
|
|
60401
|
-
CreatePhoneCallResponse: () =>
|
|
60297
|
+
CreatePhoneCallRequest: () => import_talk_api_pb7.CreatePhoneCallRequest,
|
|
60298
|
+
CreatePhoneCallResponse: () => import_talk_api_pb7.CreatePhoneCallResponse,
|
|
60402
60299
|
CreateProject: () => CreateProject,
|
|
60403
60300
|
CreateProjectCredential: () => CreateProjectCredential,
|
|
60404
60301
|
CreateProjectCredentialRequest: () => import_web_api_pb4.CreateProjectCredentialRequest,
|
|
@@ -60484,15 +60381,12 @@ __export(index_exports, {
|
|
|
60484
60381
|
GetAllAssistantProviderModelResponse: () => import_assistant_api_pb3.GetAllAssistantProviderModelResponse,
|
|
60485
60382
|
GetAllAssistantRequest: () => import_assistant_api_pb3.GetAllAssistantRequest,
|
|
60486
60383
|
GetAllAssistantResponse: () => import_assistant_api_pb3.GetAllAssistantResponse,
|
|
60487
|
-
GetAllAssistantSession: () => GetAllAssistantSession,
|
|
60488
60384
|
GetAllAssistantTool: () => GetAllAssistantTool,
|
|
60489
60385
|
GetAllAssistantToolLog: () => GetAllAssistantToolLog,
|
|
60490
60386
|
GetAllAssistantToolLogRequest: () => import_assistant_tool_pb2.GetAllAssistantToolLogRequest,
|
|
60491
60387
|
GetAllAssistantToolLogResponse: () => import_assistant_tool_pb2.GetAllAssistantToolLogResponse,
|
|
60492
60388
|
GetAllAssistantToolRequest: () => import_assistant_tool_pb2.GetAllAssistantToolRequest,
|
|
60493
60389
|
GetAllAssistantToolResponse: () => import_assistant_tool_pb2.GetAllAssistantToolResponse,
|
|
60494
|
-
GetAllAssistantUserConversationRequest: () => import_assistant_api_pb3.GetAllAssistantUserConversationRequest,
|
|
60495
|
-
GetAllAssistantUserConversationResponse: () => import_assistant_api_pb3.GetAllAssistantUserConversationResponse,
|
|
60496
60390
|
GetAllAssistantWebhook: () => GetAllAssistantWebhook,
|
|
60497
60391
|
GetAllAssistantWebhookLogRequest: () => import_assistant_webhook_pb2.GetAllAssistantWebhookLogRequest,
|
|
60498
60392
|
GetAllAssistantWebhookLogResponse: () => import_assistant_webhook_pb2.GetAllAssistantWebhookLogResponse,
|
|
@@ -61113,7 +61007,7 @@ var DeviceManager = class _DeviceManager {
|
|
|
61113
61007
|
};
|
|
61114
61008
|
|
|
61115
61009
|
// src/agents/voice-agent.ts
|
|
61116
|
-
var
|
|
61010
|
+
var import_talk_api_pb4 = __toESM(require_talk_api_pb());
|
|
61117
61011
|
|
|
61118
61012
|
// src/types/agent-event.ts
|
|
61119
61013
|
var AgentEvent = /* @__PURE__ */ ((AgentEvent2) => {
|
|
@@ -61128,36 +61022,6 @@ var AgentEvent = /* @__PURE__ */ ((AgentEvent2) => {
|
|
|
61128
61022
|
return AgentEvent2;
|
|
61129
61023
|
})(AgentEvent || {});
|
|
61130
61024
|
|
|
61131
|
-
// src/utils/rapida_content.ts
|
|
61132
|
-
var import_common_pb = __toESM(require_common_pb());
|
|
61133
|
-
var TEXT_CONTENT_FORMAT_RAW = "raw";
|
|
61134
|
-
var AUDIO_CONTENT_FORMAT_CHUNK = "chunk";
|
|
61135
|
-
var toTextContent = (str, format) => {
|
|
61136
|
-
const cnt = new import_common_pb.Content();
|
|
61137
|
-
if (format) cnt.setContentformat(format);
|
|
61138
|
-
else cnt.setContentformat(TEXT_CONTENT_FORMAT_RAW);
|
|
61139
|
-
cnt.setContenttype("text" /* TEXT_CONTENT */);
|
|
61140
|
-
cnt.setContent(new TextEncoder().encode(str));
|
|
61141
|
-
return cnt;
|
|
61142
|
-
};
|
|
61143
|
-
var toStreamAudioContent = (raw) => {
|
|
61144
|
-
const cnt = new import_common_pb.Content();
|
|
61145
|
-
cnt.setContentformat(AUDIO_CONTENT_FORMAT_CHUNK);
|
|
61146
|
-
cnt.setContenttype("audio" /* AUDIO_CONTENT */);
|
|
61147
|
-
cnt.setContent(raw);
|
|
61148
|
-
return cnt;
|
|
61149
|
-
};
|
|
61150
|
-
var toContentText = (cnt) => {
|
|
61151
|
-
if (!cnt) return "";
|
|
61152
|
-
return cnt.filter((x) => x.getContenttype() === "text").map((x) => {
|
|
61153
|
-
try {
|
|
61154
|
-
return new TextDecoder().decode(x.getContent());
|
|
61155
|
-
} catch (error) {
|
|
61156
|
-
return "";
|
|
61157
|
-
}
|
|
61158
|
-
}).join(" ");
|
|
61159
|
-
};
|
|
61160
|
-
|
|
61161
61025
|
// src/types/message.ts
|
|
61162
61026
|
var MessageRole = /* @__PURE__ */ ((MessageRole2) => {
|
|
61163
61027
|
MessageRole2["System"] = "system";
|
|
@@ -61189,10 +61053,10 @@ var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
|
|
|
61189
61053
|
|
|
61190
61054
|
// src/agents/index.ts
|
|
61191
61055
|
var import_events = require("events");
|
|
61192
|
-
var
|
|
61056
|
+
var import_common_pb5 = __toESM(require_common_pb());
|
|
61193
61057
|
|
|
61194
61058
|
// src/clients/talk.ts
|
|
61195
|
-
var
|
|
61059
|
+
var import_common_pb = __toESM(require_common_pb());
|
|
61196
61060
|
|
|
61197
61061
|
// src/utils/rapida_header.ts
|
|
61198
61062
|
var HEADER_AUTH_ID = "x-auth-id";
|
|
@@ -61283,7 +61147,7 @@ var WithClientContext = (metadata = new import_grpc_web.grpc.Metadata()) => {
|
|
|
61283
61147
|
};
|
|
61284
61148
|
|
|
61285
61149
|
// src/clients/talk.ts
|
|
61286
|
-
var
|
|
61150
|
+
var import_common_pb2 = __toESM(require_common_pb());
|
|
61287
61151
|
function AssistantTalk(connectionConfig, authHeader) {
|
|
61288
61152
|
return connectionConfig.streamClient.assistantTalk(
|
|
61289
61153
|
WithAuthContext(connectionConfig.auth || authHeader)
|
|
@@ -61314,11 +61178,11 @@ function CreateConversationMetric(connectionConfig, req, authHeader) {
|
|
|
61314
61178
|
});
|
|
61315
61179
|
}
|
|
61316
61180
|
function GetAllAssistantConversation(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
61317
|
-
const req = new
|
|
61181
|
+
const req = new import_common_pb.GetAllAssistantConversationRequest();
|
|
61318
61182
|
req.setAssistantid(assistantId);
|
|
61319
|
-
const paginate = new
|
|
61183
|
+
const paginate = new import_common_pb2.Paginate();
|
|
61320
61184
|
criteria.forEach((x) => {
|
|
61321
|
-
let ctr = new
|
|
61185
|
+
let ctr = new import_common_pb2.Criteria();
|
|
61322
61186
|
ctr.setKey(x.key);
|
|
61323
61187
|
ctr.setValue(x.value);
|
|
61324
61188
|
req.addCriterias(ctr);
|
|
@@ -61356,19 +61220,19 @@ function getFeedback(input) {
|
|
|
61356
61220
|
var import_assistant_api_pb2 = __toESM(require_assistant_api_pb());
|
|
61357
61221
|
|
|
61358
61222
|
// src/clients/assistant.ts
|
|
61359
|
-
var
|
|
61223
|
+
var import_common_pb3 = __toESM(require_common_pb());
|
|
61360
61224
|
var import_assistant_api_pb = __toESM(require_assistant_api_pb());
|
|
61361
61225
|
var import_assistant_analysis_pb = __toESM(require_assistant_analysis_pb());
|
|
61362
61226
|
var import_assistant_tool_pb = __toESM(require_assistant_tool_pb());
|
|
61363
61227
|
var import_assistant_knowledge_pb = __toESM(require_assistant_knowledge_pb());
|
|
61364
61228
|
var import_assistant_webhook_pb = __toESM(require_assistant_webhook_pb());
|
|
61365
|
-
var
|
|
61229
|
+
var import_common_pb4 = __toESM(require_common_pb());
|
|
61366
61230
|
var import_struct_pb = require("google-protobuf/google/protobuf/struct_pb");
|
|
61367
61231
|
function GetAllAssistant(connectionConfig, page, pageSize, criteria, cb, authHeader) {
|
|
61368
61232
|
const req = new import_assistant_api_pb.GetAllAssistantRequest();
|
|
61369
|
-
const paginate = new
|
|
61233
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61370
61234
|
criteria.forEach(({ key, value }) => {
|
|
61371
|
-
const ctr = new
|
|
61235
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61372
61236
|
ctr.setKey(key);
|
|
61373
61237
|
ctr.setValue(value);
|
|
61374
61238
|
req.addCriterias(ctr);
|
|
@@ -61395,9 +61259,9 @@ function UpdateAssistantVersion(connectionConfig, assistantId, assistantProvider
|
|
|
61395
61259
|
function GetAllAssistantProviderModel(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
61396
61260
|
const req = new import_assistant_api_pb.GetAllAssistantProviderModelRequest();
|
|
61397
61261
|
req.setAssistantid(assistantId);
|
|
61398
|
-
const paginate = new
|
|
61262
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61399
61263
|
criteria.forEach(({ key, value }) => {
|
|
61400
|
-
const ctr = new
|
|
61264
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61401
61265
|
ctr.setKey(key);
|
|
61402
61266
|
ctr.setValue(value);
|
|
61403
61267
|
req.addCriterias(ctr);
|
|
@@ -61476,9 +61340,9 @@ function UpdateAssistantDetail(connectionConfig, assistantId, name, description,
|
|
|
61476
61340
|
}
|
|
61477
61341
|
function GetAssistantMessages(connectionConfig, assistantId, page, pageSize, criteria, selectors, cb, authHeader) {
|
|
61478
61342
|
const req = new import_assistant_api_pb.GetAllAssistantMessageRequest();
|
|
61479
|
-
const paginate = new
|
|
61343
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61480
61344
|
criteria.forEach(({ key, value, logic }) => {
|
|
61481
|
-
const ctr = new
|
|
61345
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61482
61346
|
ctr.setKey(key);
|
|
61483
61347
|
ctr.setValue(value);
|
|
61484
61348
|
ctr.setLogic(logic);
|
|
@@ -61486,13 +61350,13 @@ function GetAssistantMessages(connectionConfig, assistantId, page, pageSize, cri
|
|
|
61486
61350
|
});
|
|
61487
61351
|
req.setAssistantid(assistantId);
|
|
61488
61352
|
selectors.forEach((v) => {
|
|
61489
|
-
const selectors2 = new
|
|
61353
|
+
const selectors2 = new import_common_pb3.FieldSelector();
|
|
61490
61354
|
selectors2.setField(v);
|
|
61491
61355
|
req.addSelectors(selectors2);
|
|
61492
61356
|
});
|
|
61493
61357
|
paginate.setPage(page);
|
|
61494
61358
|
paginate.setPagesize(pageSize);
|
|
61495
|
-
const order = new
|
|
61359
|
+
const order = new import_common_pb3.Ordering();
|
|
61496
61360
|
order.setColumn("created_date");
|
|
61497
61361
|
order.setOrder("desc");
|
|
61498
61362
|
req.setOrder(order);
|
|
@@ -61505,22 +61369,22 @@ function GetAssistantMessages(connectionConfig, assistantId, page, pageSize, cri
|
|
|
61505
61369
|
}
|
|
61506
61370
|
function GetMessages(connectionConfig, page, pageSize, criteria, selectors, cb, authHeader) {
|
|
61507
61371
|
const req = new import_assistant_api_pb.GetAllMessageRequest();
|
|
61508
|
-
const paginate = new
|
|
61372
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61509
61373
|
criteria.forEach(({ key, value, logic }) => {
|
|
61510
|
-
const ctr = new
|
|
61374
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61511
61375
|
ctr.setKey(key);
|
|
61512
61376
|
ctr.setValue(value);
|
|
61513
61377
|
ctr.setLogic(logic);
|
|
61514
61378
|
req.addCriterias(ctr);
|
|
61515
61379
|
});
|
|
61516
61380
|
selectors.forEach((v) => {
|
|
61517
|
-
const selectors2 = new
|
|
61381
|
+
const selectors2 = new import_common_pb3.FieldSelector();
|
|
61518
61382
|
selectors2.setField(v);
|
|
61519
61383
|
req.addSelectors(selectors2);
|
|
61520
61384
|
});
|
|
61521
61385
|
paginate.setPage(page);
|
|
61522
61386
|
paginate.setPagesize(pageSize);
|
|
61523
|
-
const order = new
|
|
61387
|
+
const order = new import_common_pb3.Ordering();
|
|
61524
61388
|
order.setColumn("created_date");
|
|
61525
61389
|
order.setOrder("desc");
|
|
61526
61390
|
req.setOrder(order);
|
|
@@ -61531,33 +61395,13 @@ function GetMessages(connectionConfig, page, pageSize, criteria, selectors, cb,
|
|
|
61531
61395
|
cb
|
|
61532
61396
|
);
|
|
61533
61397
|
}
|
|
61534
|
-
function GetAllAssistantSession(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
61535
|
-
const req = new import_common_pb5.GetAllAssistantConversationRequest();
|
|
61536
|
-
req.setAssistantid(assistantId);
|
|
61537
|
-
const paginate = new import_common_pb4.Paginate();
|
|
61538
|
-
criteria.forEach((x) => {
|
|
61539
|
-
let ctr = new import_common_pb4.Criteria();
|
|
61540
|
-
ctr.setKey(x.key);
|
|
61541
|
-
ctr.setValue(x.value);
|
|
61542
|
-
ctr.setLogic(x.logic);
|
|
61543
|
-
req.addCriterias(ctr);
|
|
61544
|
-
});
|
|
61545
|
-
paginate.setPage(page);
|
|
61546
|
-
paginate.setPagesize(pageSize);
|
|
61547
|
-
req.setPaginate(paginate);
|
|
61548
|
-
connectionConfig.assistantClient.getAllAssistantConversation(
|
|
61549
|
-
req,
|
|
61550
|
-
WithAuthContext(authHeader),
|
|
61551
|
-
cb
|
|
61552
|
-
);
|
|
61553
|
-
}
|
|
61554
61398
|
function GetAllAssistantConversationMessage(connectionConfig, assistantId, assistantConversationId, page, pageSize, criteria, authHeader, cb) {
|
|
61555
|
-
const req = new
|
|
61399
|
+
const req = new import_common_pb3.GetAllConversationMessageRequest();
|
|
61556
61400
|
req.setAssistantid(assistantId);
|
|
61557
61401
|
req.setAssistantconversationid(assistantConversationId);
|
|
61558
|
-
const paginate = new
|
|
61402
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61559
61403
|
criteria.forEach((x) => {
|
|
61560
|
-
let ctr = new
|
|
61404
|
+
let ctr = new import_common_pb3.Criteria();
|
|
61561
61405
|
ctr.setKey(x.key);
|
|
61562
61406
|
ctr.setValue(x.value);
|
|
61563
61407
|
req.addCriterias(ctr);
|
|
@@ -61693,9 +61537,9 @@ function GetAssistantWhatsappDeployment(clientCfg, req, auth) {
|
|
|
61693
61537
|
}
|
|
61694
61538
|
function GetAllAssistantWebhook(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
61695
61539
|
const req = new import_assistant_webhook_pb.GetAllAssistantWebhookRequest();
|
|
61696
|
-
const paginate = new
|
|
61540
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61697
61541
|
criteria.forEach(({ key, value }) => {
|
|
61698
|
-
const ctr = new
|
|
61542
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61699
61543
|
ctr.setKey(key);
|
|
61700
61544
|
ctr.setValue(value);
|
|
61701
61545
|
req.addCriterias(ctr);
|
|
@@ -61801,9 +61645,9 @@ function DeleteAssistant(connectionConfig, assistantId, cb, authHeader) {
|
|
|
61801
61645
|
function GetAllAssistantAnalysis(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
61802
61646
|
const req = new import_assistant_analysis_pb.GetAllAssistantAnalysisRequest();
|
|
61803
61647
|
req.setAssistantid(assistantId);
|
|
61804
|
-
const paginate = new
|
|
61648
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61805
61649
|
criteria.forEach(({ key, value }) => {
|
|
61806
|
-
const ctr = new
|
|
61650
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61807
61651
|
ctr.setKey(key);
|
|
61808
61652
|
ctr.setValue(value);
|
|
61809
61653
|
req.addCriterias(ctr);
|
|
@@ -61876,9 +61720,9 @@ function DeleteAssistantAnalysis(connectionConfig, assistantId, AnalysisId, cb,
|
|
|
61876
61720
|
function GetAllWebhookLog(connectionConfig, projectId, page, pageSize, criteria, cb, authHeader) {
|
|
61877
61721
|
const req = new import_assistant_webhook_pb.GetAllAssistantWebhookLogRequest();
|
|
61878
61722
|
req.setProjectid(projectId);
|
|
61879
|
-
const paginate = new
|
|
61723
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61880
61724
|
criteria.forEach(({ key, value, logic }) => {
|
|
61881
|
-
const ctr = new
|
|
61725
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61882
61726
|
ctr.setKey(key);
|
|
61883
61727
|
ctr.setValue(value);
|
|
61884
61728
|
ctr.setLogic(logic);
|
|
@@ -61906,9 +61750,9 @@ function GetWebhookLog(connectionConfig, projectId, webhookLogId, cb, authHeader
|
|
|
61906
61750
|
function GetAllAssistantTool(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
61907
61751
|
const req = new import_assistant_tool_pb.GetAllAssistantToolRequest();
|
|
61908
61752
|
req.setAssistantid(assistantId);
|
|
61909
|
-
const paginate = new
|
|
61753
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61910
61754
|
criteria.forEach(({ key, value }) => {
|
|
61911
|
-
const ctr = new
|
|
61755
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61912
61756
|
ctr.setKey(key);
|
|
61913
61757
|
ctr.setValue(value);
|
|
61914
61758
|
req.addCriterias(ctr);
|
|
@@ -61979,9 +61823,9 @@ function DeleteAssistantTool(connectionConfig, assistantId, ToolId, cb, authHead
|
|
|
61979
61823
|
function GetAllAssistantKnowledge(connectionConfig, assistantId, page, pageSize, criteria, cb, authHeader) {
|
|
61980
61824
|
const req = new import_assistant_knowledge_pb.GetAllAssistantKnowledgeRequest();
|
|
61981
61825
|
req.setAssistantid(assistantId);
|
|
61982
|
-
const paginate = new
|
|
61826
|
+
const paginate = new import_common_pb3.Paginate();
|
|
61983
61827
|
criteria.forEach(({ key, value }) => {
|
|
61984
|
-
const ctr = new
|
|
61828
|
+
const ctr = new import_common_pb3.Criteria();
|
|
61985
61829
|
ctr.setKey(key);
|
|
61986
61830
|
ctr.setValue(value);
|
|
61987
61831
|
req.addCriterias(ctr);
|
|
@@ -62080,6 +61924,7 @@ function GetAllAssistantToolLog(clientCfg, request, auth) {
|
|
|
62080
61924
|
}
|
|
62081
61925
|
|
|
62082
61926
|
// src/agents/index.ts
|
|
61927
|
+
var import_talk_api_pb2 = __toESM(require_talk_api_pb());
|
|
62083
61928
|
var Agent = class extends import_events.EventEmitter {
|
|
62084
61929
|
// Connection and State Management
|
|
62085
61930
|
connectionState = "disconnected" /* Disconnected */;
|
|
@@ -62233,7 +62078,7 @@ var Agent = class extends import_events.EventEmitter {
|
|
|
62233
62078
|
req.setAssistantconversationid(this._conversationId);
|
|
62234
62079
|
req.setMessageid(messageId);
|
|
62235
62080
|
for (const mtr of metrics) {
|
|
62236
|
-
const _m = new
|
|
62081
|
+
const _m = new import_common_pb5.Metric();
|
|
62237
62082
|
_m.setName(mtr.name);
|
|
62238
62083
|
_m.setValue(mtr.value);
|
|
62239
62084
|
_m.setDescription(mtr.description);
|
|
@@ -62280,7 +62125,7 @@ var Agent = class extends import_events.EventEmitter {
|
|
|
62280
62125
|
req.setAssistantid(this.agentConfig.definition.getAssistantid());
|
|
62281
62126
|
req.setAssistantconversationid(this._conversationId);
|
|
62282
62127
|
for (const mtr of metrics) {
|
|
62283
|
-
const _m = new
|
|
62128
|
+
const _m = new import_common_pb5.Metric();
|
|
62284
62129
|
_m.setName(mtr.name);
|
|
62285
62130
|
_m.setValue(mtr.value);
|
|
62286
62131
|
_m.setDescription(mtr.description);
|
|
@@ -62308,13 +62153,26 @@ var Agent = class extends import_events.EventEmitter {
|
|
|
62308
62153
|
* @param contents - Message contents
|
|
62309
62154
|
* @returns Configured messaging request
|
|
62310
62155
|
*/
|
|
62311
|
-
|
|
62156
|
+
createAssistantTextMessage(content) {
|
|
62157
|
+
const request = new import_talk_api_pb.AssistantMessagingRequest();
|
|
62158
|
+
const userMessage = new import_talk_api_pb.AssistantConversationUserMessage();
|
|
62159
|
+
const message = new import_talk_api_pb.AssistantConversationMessageTextContent();
|
|
62160
|
+
message.setContent(content);
|
|
62161
|
+
userMessage.setText(message);
|
|
62162
|
+
request.setMessage(userMessage);
|
|
62163
|
+
return request;
|
|
62164
|
+
}
|
|
62165
|
+
/**
|
|
62166
|
+
*
|
|
62167
|
+
* @param content
|
|
62168
|
+
* @returns
|
|
62169
|
+
*/
|
|
62170
|
+
createAssistantAudioMessage(content) {
|
|
62312
62171
|
const request = new import_talk_api_pb.AssistantMessagingRequest();
|
|
62313
62172
|
const userMessage = new import_talk_api_pb.AssistantConversationUserMessage();
|
|
62314
|
-
const message = new
|
|
62315
|
-
message.
|
|
62316
|
-
|
|
62317
|
-
userMessage.setMessage(message);
|
|
62173
|
+
const message = new import_talk_api_pb2.AssistantConversationMessageAudioContent();
|
|
62174
|
+
message.setContent(content);
|
|
62175
|
+
userMessage.setAudio(message);
|
|
62318
62176
|
request.setMessage(userMessage);
|
|
62319
62177
|
return request;
|
|
62320
62178
|
}
|
|
@@ -62843,12 +62701,50 @@ function arrayBufferToUint8(arrayBuffer) {
|
|
|
62843
62701
|
return new Uint8Array(arrayBuffer);
|
|
62844
62702
|
}
|
|
62845
62703
|
|
|
62704
|
+
// src/types/agent-callback.ts
|
|
62705
|
+
var import_talk_api_pb3 = __toESM(require_talk_api_pb());
|
|
62706
|
+
|
|
62707
|
+
// src/utils/rapida_content.ts
|
|
62708
|
+
var import_common_pb6 = __toESM(require_common_pb());
|
|
62709
|
+
var TEXT_CONTENT_FORMAT_RAW = "raw";
|
|
62710
|
+
var AUDIO_CONTENT_FORMAT_CHUNK = "chunk";
|
|
62711
|
+
var toTextContent = (str, format) => {
|
|
62712
|
+
const cnt = new import_common_pb6.Content();
|
|
62713
|
+
if (format) cnt.setContentformat(format);
|
|
62714
|
+
else cnt.setContentformat(TEXT_CONTENT_FORMAT_RAW);
|
|
62715
|
+
cnt.setContenttype("text" /* TEXT_CONTENT */);
|
|
62716
|
+
cnt.setContent(new TextEncoder().encode(str));
|
|
62717
|
+
return cnt;
|
|
62718
|
+
};
|
|
62719
|
+
var toStreamAudioContent = (raw) => {
|
|
62720
|
+
const cnt = new import_common_pb6.Content();
|
|
62721
|
+
cnt.setContentformat(AUDIO_CONTENT_FORMAT_CHUNK);
|
|
62722
|
+
cnt.setContenttype("audio" /* AUDIO_CONTENT */);
|
|
62723
|
+
cnt.setContent(raw);
|
|
62724
|
+
return cnt;
|
|
62725
|
+
};
|
|
62726
|
+
var toContentText = (cnt) => {
|
|
62727
|
+
if (!cnt) return "";
|
|
62728
|
+
return cnt.filter((x) => x.getContenttype() === "text").map((x) => {
|
|
62729
|
+
try {
|
|
62730
|
+
return new TextDecoder().decode(x.getContent());
|
|
62731
|
+
} catch (error) {
|
|
62732
|
+
return "";
|
|
62733
|
+
}
|
|
62734
|
+
}).join(" ");
|
|
62735
|
+
};
|
|
62736
|
+
|
|
62846
62737
|
// src/types/agent-callback.ts
|
|
62847
62738
|
var ConversationUserMessage = class {
|
|
62848
62739
|
constructor(config) {
|
|
62849
62740
|
if (config) {
|
|
62850
62741
|
Object.assign(this, config.toObject());
|
|
62851
|
-
|
|
62742
|
+
switch (config.getMessageCase()) {
|
|
62743
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
62744
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
62745
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
62746
|
+
this.messageText = config.getText()?.getContent();
|
|
62747
|
+
}
|
|
62852
62748
|
}
|
|
62853
62749
|
}
|
|
62854
62750
|
};
|
|
@@ -62856,7 +62752,12 @@ var ConversationAssistantMessage = class {
|
|
|
62856
62752
|
constructor(config) {
|
|
62857
62753
|
if (config) {
|
|
62858
62754
|
Object.assign(this, config.toObject());
|
|
62859
|
-
|
|
62755
|
+
switch (config.getMessageCase()) {
|
|
62756
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
62757
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
62758
|
+
case import_talk_api_pb3.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
62759
|
+
this.messageText = config.getText()?.getContent();
|
|
62760
|
+
}
|
|
62860
62761
|
}
|
|
62861
62762
|
}
|
|
62862
62763
|
};
|
|
@@ -62978,9 +62879,9 @@ var VoiceAgent = class extends Agent {
|
|
|
62978
62879
|
const maxVolume = event.data[1];
|
|
62979
62880
|
if (this.inputChannel == "audio" /* Audio */)
|
|
62980
62881
|
this.talkingConnection?.write(
|
|
62981
|
-
this.
|
|
62982
|
-
|
|
62983
|
-
|
|
62882
|
+
this.createAssistantAudioMessage(
|
|
62883
|
+
arrayBufferToUint8(rawAudioPcmData.buffer)
|
|
62884
|
+
)
|
|
62984
62885
|
);
|
|
62985
62886
|
};
|
|
62986
62887
|
/**
|
|
@@ -63056,9 +62957,7 @@ var VoiceAgent = class extends Agent {
|
|
|
63056
62957
|
onSendText = async (text) => {
|
|
63057
62958
|
if (!this.isConnected) await this.connect();
|
|
63058
62959
|
if (this.inputChannel == "text" /* Text */) {
|
|
63059
|
-
this.talkingConnection?.write(
|
|
63060
|
-
this.createAssistantRequest("user", [toTextContent(text)])
|
|
63061
|
-
);
|
|
62960
|
+
this.talkingConnection?.write(this.createAssistantTextMessage(text));
|
|
63062
62961
|
}
|
|
63063
62962
|
};
|
|
63064
62963
|
/**
|
|
@@ -63123,13 +63022,13 @@ var VoiceAgent = class extends Agent {
|
|
|
63123
63022
|
onHandleInterruption = (interruptionData) => {
|
|
63124
63023
|
if (interruptionData) {
|
|
63125
63024
|
switch (interruptionData.getType()) {
|
|
63126
|
-
case
|
|
63025
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_UNSPECIFIED:
|
|
63127
63026
|
console.log("Unspecified interruption type");
|
|
63128
63027
|
break;
|
|
63129
|
-
case
|
|
63028
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_VAD:
|
|
63130
63029
|
this.fadeOutAudio();
|
|
63131
63030
|
break;
|
|
63132
|
-
case
|
|
63031
|
+
case import_talk_api_pb4.AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_WORD:
|
|
63133
63032
|
if (this.agentMessages.length > 0) {
|
|
63134
63033
|
const lastIndex = this.agentMessages.length - 1;
|
|
63135
63034
|
this.agentMessages[lastIndex] = {
|
|
@@ -63144,53 +63043,70 @@ var VoiceAgent = class extends Agent {
|
|
|
63144
63043
|
}
|
|
63145
63044
|
this.emit(
|
|
63146
63045
|
"onConversationEvent" /* ConversationEvent */,
|
|
63147
|
-
|
|
63046
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION,
|
|
63148
63047
|
interruptionData
|
|
63149
63048
|
);
|
|
63150
63049
|
}
|
|
63151
63050
|
};
|
|
63152
63051
|
onHandleUser = (userContent) => {
|
|
63153
63052
|
if (userContent) {
|
|
63154
|
-
|
|
63155
|
-
|
|
63156
|
-
|
|
63157
|
-
|
|
63158
|
-
|
|
63159
|
-
|
|
63160
|
-
|
|
63161
|
-
|
|
63053
|
+
switch (userContent.getMessageCase()) {
|
|
63054
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET:
|
|
63055
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.AUDIO:
|
|
63056
|
+
case import_talk_api_pb4.AssistantConversationUserMessage.MessageCase.TEXT:
|
|
63057
|
+
const agentTranscript = userContent.getText()?.getContent();
|
|
63058
|
+
if (agentTranscript) {
|
|
63059
|
+
if (this.agentMessages.length > 0) {
|
|
63060
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
63061
|
+
if (lastMessage.role === "user" /* User */ && lastMessage.id === userContent.getId()) {
|
|
63062
|
+
this.agentMessages.pop();
|
|
63063
|
+
}
|
|
63064
|
+
}
|
|
63065
|
+
this.agentMessages.push({
|
|
63066
|
+
id: userContent.getId(),
|
|
63067
|
+
role: "user" /* User */,
|
|
63068
|
+
messages: [agentTranscript],
|
|
63069
|
+
time: toDate(userContent?.getTime()),
|
|
63070
|
+
status: userContent.getCompleted() ? "complete" /* Complete */ : "pending" /* Pending */
|
|
63071
|
+
});
|
|
63162
63072
|
}
|
|
63163
|
-
}
|
|
63164
|
-
this.agentMessages.push({
|
|
63165
|
-
id: userContent.getId(),
|
|
63166
|
-
role: "user" /* User */,
|
|
63167
|
-
messages: [agentTranscript],
|
|
63168
|
-
time: toDate(userContent?.getTime()),
|
|
63169
|
-
status: userContent.getCompleted() ? "complete" /* Complete */ : "pending" /* Pending */
|
|
63170
|
-
});
|
|
63171
63073
|
}
|
|
63172
63074
|
this.emit(
|
|
63173
63075
|
"onConversationEvent" /* ConversationEvent */,
|
|
63174
|
-
|
|
63076
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER,
|
|
63175
63077
|
userContent
|
|
63176
63078
|
);
|
|
63177
63079
|
}
|
|
63178
63080
|
};
|
|
63179
63081
|
onHandleAssistant = (systemContent) => {
|
|
63180
63082
|
if (systemContent) {
|
|
63181
|
-
|
|
63182
|
-
|
|
63183
|
-
|
|
63184
|
-
|
|
63185
|
-
|
|
63186
|
-
|
|
63187
|
-
|
|
63188
|
-
|
|
63189
|
-
|
|
63190
|
-
|
|
63191
|
-
|
|
63192
|
-
|
|
63193
|
-
|
|
63083
|
+
switch (systemContent.getMessageCase()) {
|
|
63084
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.MESSAGE_NOT_SET:
|
|
63085
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.AUDIO:
|
|
63086
|
+
const content = systemContent.getAudio();
|
|
63087
|
+
if (content) {
|
|
63088
|
+
const audioData = content.getContent_asU8();
|
|
63089
|
+
this.addAudioChunk(new Uint8Array(audioData).buffer);
|
|
63090
|
+
}
|
|
63091
|
+
case import_talk_api_pb4.AssistantConversationAssistantMessage.MessageCase.TEXT:
|
|
63092
|
+
const systemTranscript = systemContent.getText()?.getContent();
|
|
63093
|
+
if (systemTranscript) {
|
|
63094
|
+
if (systemContent.getCompleted()) {
|
|
63095
|
+
if (this.agentMessages.length > 0) {
|
|
63096
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
63097
|
+
if (lastMessage.role === "system" /* System */ && lastMessage.status === "pending" /* Pending */) {
|
|
63098
|
+
lastMessage.messages = [systemTranscript];
|
|
63099
|
+
lastMessage.status = "complete" /* Complete */;
|
|
63100
|
+
lastMessage.time = toDate(systemContent?.getTime());
|
|
63101
|
+
} else {
|
|
63102
|
+
this.agentMessages.push({
|
|
63103
|
+
id: systemContent.getId(),
|
|
63104
|
+
role: "system" /* System */,
|
|
63105
|
+
messages: [systemTranscript],
|
|
63106
|
+
time: toDate(systemContent?.getTime()),
|
|
63107
|
+
status: "complete" /* Complete */
|
|
63108
|
+
});
|
|
63109
|
+
}
|
|
63194
63110
|
} else {
|
|
63195
63111
|
this.agentMessages.push({
|
|
63196
63112
|
id: systemContent.getId(),
|
|
@@ -63201,20 +63117,20 @@ var VoiceAgent = class extends Agent {
|
|
|
63201
63117
|
});
|
|
63202
63118
|
}
|
|
63203
63119
|
} else {
|
|
63204
|
-
this.agentMessages.
|
|
63205
|
-
|
|
63206
|
-
role
|
|
63207
|
-
|
|
63208
|
-
|
|
63209
|
-
|
|
63210
|
-
|
|
63211
|
-
|
|
63212
|
-
|
|
63213
|
-
|
|
63214
|
-
|
|
63215
|
-
|
|
63216
|
-
|
|
63217
|
-
|
|
63120
|
+
if (this.agentMessages.length > 0) {
|
|
63121
|
+
const lastMessage = this.agentMessages[this.agentMessages.length - 1];
|
|
63122
|
+
if (lastMessage.role === "system" /* System */ && lastMessage.status === "pending" /* Pending */) {
|
|
63123
|
+
lastMessage.messages[0] += systemTranscript;
|
|
63124
|
+
lastMessage.time = toDate(systemContent?.getTime());
|
|
63125
|
+
} else {
|
|
63126
|
+
this.agentMessages.push({
|
|
63127
|
+
id: systemContent.getId(),
|
|
63128
|
+
role: "system" /* System */,
|
|
63129
|
+
messages: [systemTranscript],
|
|
63130
|
+
time: toDate(systemContent?.getTime()),
|
|
63131
|
+
status: "pending" /* Pending */
|
|
63132
|
+
});
|
|
63133
|
+
}
|
|
63218
63134
|
} else {
|
|
63219
63135
|
this.agentMessages.push({
|
|
63220
63136
|
id: systemContent.getId(),
|
|
@@ -63224,29 +63140,12 @@ var VoiceAgent = class extends Agent {
|
|
|
63224
63140
|
status: "pending" /* Pending */
|
|
63225
63141
|
});
|
|
63226
63142
|
}
|
|
63227
|
-
} else {
|
|
63228
|
-
this.agentMessages.push({
|
|
63229
|
-
id: systemContent.getId(),
|
|
63230
|
-
role: "system" /* System */,
|
|
63231
|
-
messages: [systemTranscript],
|
|
63232
|
-
time: toDate(systemContent?.getTime()),
|
|
63233
|
-
status: "pending" /* Pending */
|
|
63234
|
-
});
|
|
63235
63143
|
}
|
|
63236
63144
|
}
|
|
63237
|
-
}
|
|
63238
|
-
}
|
|
63239
|
-
if (responseContent.filter((x) => x.getContenttype() == "audio").length > 0) {
|
|
63240
|
-
for (const content of responseContent) {
|
|
63241
|
-
if (content.getContenttype() === "audio") {
|
|
63242
|
-
const audioData = content.getContent_asU8();
|
|
63243
|
-
this.addAudioChunk(new Uint8Array(audioData).buffer);
|
|
63244
|
-
}
|
|
63245
|
-
}
|
|
63246
63145
|
}
|
|
63247
63146
|
this.emit(
|
|
63248
63147
|
"onConversationEvent" /* ConversationEvent */,
|
|
63249
|
-
|
|
63148
|
+
import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT,
|
|
63250
63149
|
systemContent
|
|
63251
63150
|
);
|
|
63252
63151
|
}
|
|
@@ -63258,22 +63157,22 @@ var VoiceAgent = class extends Agent {
|
|
|
63258
63157
|
*/
|
|
63259
63158
|
onRecieve = async (response) => {
|
|
63260
63159
|
switch (response.getDataCase()) {
|
|
63261
|
-
case
|
|
63160
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
|
|
63262
63161
|
break;
|
|
63263
|
-
case
|
|
63162
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION:
|
|
63264
63163
|
this.onHandleInterruption(response.getInterruption());
|
|
63265
63164
|
break;
|
|
63266
|
-
case
|
|
63165
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER:
|
|
63267
63166
|
this.onHandleUser(response.getUser());
|
|
63268
63167
|
break;
|
|
63269
|
-
case
|
|
63168
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT:
|
|
63270
63169
|
this.onHandleAssistant(response.getAssistant());
|
|
63271
63170
|
break;
|
|
63272
|
-
case
|
|
63171
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.CONFIGURATION:
|
|
63273
63172
|
const conversation = response.getConfiguration();
|
|
63274
63173
|
if (!conversation?.getAssistantconversationid()) return;
|
|
63275
63174
|
break;
|
|
63276
|
-
case
|
|
63175
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.MESSAGE:
|
|
63277
63176
|
break;
|
|
63278
63177
|
default:
|
|
63279
63178
|
break;
|
|
@@ -63286,28 +63185,28 @@ var VoiceAgent = class extends Agent {
|
|
|
63286
63185
|
onCallback(response) {
|
|
63287
63186
|
for (const agentCallback of this.agentCallbacks) {
|
|
63288
63187
|
switch (response.getDataCase()) {
|
|
63289
|
-
case
|
|
63188
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.DATA_NOT_SET:
|
|
63290
63189
|
break;
|
|
63291
|
-
case
|
|
63190
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.INTERRUPTION:
|
|
63292
63191
|
if (agentCallback && agentCallback?.onInterrupt) {
|
|
63293
63192
|
agentCallback.onInterrupt(response.getInterruption()?.toObject());
|
|
63294
63193
|
}
|
|
63295
63194
|
break;
|
|
63296
|
-
case
|
|
63195
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.USER:
|
|
63297
63196
|
if (agentCallback && agentCallback?.onUserMessage) {
|
|
63298
63197
|
agentCallback.onUserMessage(
|
|
63299
63198
|
new ConversationUserMessage(response.getUser())
|
|
63300
63199
|
);
|
|
63301
63200
|
}
|
|
63302
63201
|
break;
|
|
63303
|
-
case
|
|
63202
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.ASSISTANT:
|
|
63304
63203
|
if (agentCallback && agentCallback?.onAssistantMessage) {
|
|
63305
63204
|
agentCallback.onAssistantMessage(
|
|
63306
63205
|
new ConversationAssistantMessage(response.getAssistant())
|
|
63307
63206
|
);
|
|
63308
63207
|
}
|
|
63309
63208
|
break;
|
|
63310
|
-
case
|
|
63209
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.CONFIGURATION:
|
|
63311
63210
|
if (agentCallback && agentCallback?.onConfiguration) {
|
|
63312
63211
|
agentCallback.onConfiguration(
|
|
63313
63212
|
response.getConfiguration()?.toObject()
|
|
@@ -63316,7 +63215,7 @@ var VoiceAgent = class extends Agent {
|
|
|
63316
63215
|
const cnvId = response.getConfiguration()?.getAssistantconversationid();
|
|
63317
63216
|
if (cnvId) this.changeConversation(cnvId);
|
|
63318
63217
|
break;
|
|
63319
|
-
case
|
|
63218
|
+
case import_talk_api_pb4.AssistantMessagingResponse.DataCase.MESSAGE:
|
|
63320
63219
|
if (agentCallback && agentCallback?.onMessage) {
|
|
63321
63220
|
agentCallback.onMessage(
|
|
63322
63221
|
new ConversationMessage(response.getMessage())
|
|
@@ -63678,7 +63577,7 @@ var MediaDeviceFailure = /* @__PURE__ */ ((MediaDeviceFailure2) => {
|
|
|
63678
63577
|
})(MediaDeviceFailure || {});
|
|
63679
63578
|
|
|
63680
63579
|
// src/types/agent-config.ts
|
|
63681
|
-
var
|
|
63580
|
+
var import_talk_api_pb5 = __toESM(require_talk_api_pb());
|
|
63682
63581
|
|
|
63683
63582
|
// src/utils/rapida_value.ts
|
|
63684
63583
|
var import_any_pb = require("google-protobuf/google/protobuf/any_pb");
|
|
@@ -63912,7 +63811,7 @@ var AgentConfig = class {
|
|
|
63912
63811
|
* @returns {AssistantDefinition} A configured `AssistantDefinition` instance with the agent's details.
|
|
63913
63812
|
*/
|
|
63914
63813
|
get definition() {
|
|
63915
|
-
const def = new
|
|
63814
|
+
const def = new import_talk_api_pb5.AssistantDefinition();
|
|
63916
63815
|
def.setAssistantid(this.id);
|
|
63917
63816
|
if (this.version) {
|
|
63918
63817
|
def.setVersion(this.version);
|
|
@@ -65263,7 +65162,7 @@ var import_knowledge_api_pb_service2 = __toESM(require_knowledge_api_pb_service(
|
|
|
65263
65162
|
var import_provider_api_pb2 = __toESM(require_provider_api_pb());
|
|
65264
65163
|
var import_vault_api_pb2 = __toESM(require_vault_api_pb());
|
|
65265
65164
|
var import_provider_api_pb_service2 = __toESM(require_provider_api_pb_service());
|
|
65266
|
-
var
|
|
65165
|
+
var import_talk_api_pb6 = __toESM(require_talk_api_pb());
|
|
65267
65166
|
var import_assistant_analysis_pb2 = __toESM(require_assistant_analysis_pb());
|
|
65268
65167
|
var import_sendgrid_api_pb = __toESM(require_sendgrid_api_pb());
|
|
65269
65168
|
var import_invoker_api_pb = __toESM(require_invoker_api_pb());
|
|
@@ -65312,7 +65211,7 @@ function CreateBulkPhoneCall(clientCfg, request, authHeader) {
|
|
|
65312
65211
|
}
|
|
65313
65212
|
|
|
65314
65213
|
// src/index.ts
|
|
65315
|
-
var
|
|
65214
|
+
var import_talk_api_pb7 = __toESM(require_talk_api_pb());
|
|
65316
65215
|
|
|
65317
65216
|
// src/styles/index.ts
|
|
65318
65217
|
var import_clsx = require("clsx");
|
|
@@ -65721,15 +65620,12 @@ var MultibandAudioVisualizerComponent = ({
|
|
|
65721
65620
|
GetAllAssistantProviderModelResponse,
|
|
65722
65621
|
GetAllAssistantRequest,
|
|
65723
65622
|
GetAllAssistantResponse,
|
|
65724
|
-
GetAllAssistantSession,
|
|
65725
65623
|
GetAllAssistantTool,
|
|
65726
65624
|
GetAllAssistantToolLog,
|
|
65727
65625
|
GetAllAssistantToolLogRequest,
|
|
65728
65626
|
GetAllAssistantToolLogResponse,
|
|
65729
65627
|
GetAllAssistantToolRequest,
|
|
65730
65628
|
GetAllAssistantToolResponse,
|
|
65731
|
-
GetAllAssistantUserConversationRequest,
|
|
65732
|
-
GetAllAssistantUserConversationResponse,
|
|
65733
65629
|
GetAllAssistantWebhook,
|
|
65734
65630
|
GetAllAssistantWebhookLogRequest,
|
|
65735
65631
|
GetAllAssistantWebhookLogResponse,
|