@vendasta/ai-assistants 0.38.0 → 0.40.0
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/esm2020/lib/_internal/assistant.api.service.mjs +7 -2
- package/esm2020/lib/_internal/enums/index.mjs +2 -2
- package/esm2020/lib/_internal/enums/model.enum.mjs +24 -0
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/assistant.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/integration-tests.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/model.interface.mjs +8 -0
- package/esm2020/lib/_internal/objects/api.mjs +133 -37
- package/esm2020/lib/_internal/objects/assistant.mjs +8 -1
- package/esm2020/lib/_internal/objects/index.mjs +4 -3
- package/esm2020/lib/_internal/objects/integration-tests.mjs +45 -1
- package/esm2020/lib/_internal/objects/model.mjs +46 -0
- package/fesm2015/vendasta-ai-assistants.mjs +264 -63
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +264 -63
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/assistant.api.service.d.ts +3 -2
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/enums/model.enum.d.ts +15 -0
- package/lib/_internal/interfaces/api.interface.d.ts +28 -14
- package/lib/_internal/interfaces/assistant.interface.d.ts +2 -0
- package/lib/_internal/interfaces/index.d.ts +3 -2
- package/lib/_internal/interfaces/integration-tests.interface.d.ts +10 -0
- package/lib/_internal/interfaces/model.interface.d.ts +8 -0
- package/lib/_internal/objects/api.d.ts +42 -16
- package/lib/_internal/objects/assistant.d.ts +2 -0
- package/lib/_internal/objects/index.d.ts +3 -2
- package/lib/_internal/objects/integration-tests.d.ts +13 -0
- package/lib/_internal/objects/model.d.ts +13 -0
- package/package.json +1 -1
- package/esm2020/lib/_internal/enums/api.enum.mjs +0 -18
- package/lib/_internal/enums/api.enum.d.ts +0 -10
|
@@ -67,6 +67,30 @@ var GoalType;
|
|
|
67
67
|
GoalType[GoalType["GOAL_TYPE_CUSTOM"] = 4] = "GOAL_TYPE_CUSTOM";
|
|
68
68
|
})(GoalType || (GoalType = {}));
|
|
69
69
|
|
|
70
|
+
// *********************************
|
|
71
|
+
// Code generated by sdkgen
|
|
72
|
+
// DO NOT EDIT!.
|
|
73
|
+
//
|
|
74
|
+
// Enums.
|
|
75
|
+
// *********************************
|
|
76
|
+
var ModelType;
|
|
77
|
+
(function (ModelType) {
|
|
78
|
+
ModelType[ModelType["TYPE_UNSET"] = 0] = "TYPE_UNSET";
|
|
79
|
+
ModelType[ModelType["TYPE_LARGE_LANGUAGE_MODEL"] = 1] = "TYPE_LARGE_LANGUAGE_MODEL";
|
|
80
|
+
ModelType[ModelType["TYPE_SPEECH_TO_TEXT"] = 2] = "TYPE_SPEECH_TO_TEXT";
|
|
81
|
+
ModelType[ModelType["TYPE_TEXT_TO_SPEECH"] = 3] = "TYPE_TEXT_TO_SPEECH";
|
|
82
|
+
ModelType[ModelType["TYPE_SPEECH_TO_SPEECH"] = 4] = "TYPE_SPEECH_TO_SPEECH";
|
|
83
|
+
ModelType[ModelType["TYPE_TEXT_TO_IMAGE"] = 5] = "TYPE_TEXT_TO_IMAGE";
|
|
84
|
+
ModelType[ModelType["TYPE_TEXT_TO_VIDEO"] = 6] = "TYPE_TEXT_TO_VIDEO";
|
|
85
|
+
})(ModelType || (ModelType = {}));
|
|
86
|
+
var ModelVendor;
|
|
87
|
+
(function (ModelVendor) {
|
|
88
|
+
ModelVendor[ModelVendor["VENDOR_UNSET"] = 0] = "VENDOR_UNSET";
|
|
89
|
+
ModelVendor[ModelVendor["VENDOR_OPENAI"] = 1] = "VENDOR_OPENAI";
|
|
90
|
+
ModelVendor[ModelVendor["VENDOR_GOOGLE"] = 2] = "VENDOR_GOOGLE";
|
|
91
|
+
ModelVendor[ModelVendor["VENDOR_DEEPGRAM"] = 3] = "VENDOR_DEEPGRAM";
|
|
92
|
+
})(ModelVendor || (ModelVendor = {}));
|
|
93
|
+
|
|
70
94
|
// *********************************
|
|
71
95
|
// Code generated by sdkgen
|
|
72
96
|
// DO NOT EDIT!.
|
|
@@ -137,24 +161,6 @@ var SortDirection;
|
|
|
137
161
|
SortDirection[SortDirection["SORT_DIRECTION_DESCENDING"] = 2] = "SORT_DIRECTION_DESCENDING";
|
|
138
162
|
})(SortDirection || (SortDirection = {}));
|
|
139
163
|
|
|
140
|
-
// *********************************
|
|
141
|
-
// Code generated by sdkgen
|
|
142
|
-
// DO NOT EDIT!.
|
|
143
|
-
//
|
|
144
|
-
// Enums.
|
|
145
|
-
// *********************************
|
|
146
|
-
var GenerateChatAnswerRequestModel;
|
|
147
|
-
(function (GenerateChatAnswerRequestModel) {
|
|
148
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_NOT_SET"] = 0] = "MODEL_NOT_SET";
|
|
149
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_OPENAI_GPT_4OMNI"] = 1] = "MODEL_OPENAI_GPT_4OMNI";
|
|
150
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_OPENAI_GPT_4OMNI_MINI"] = 2] = "MODEL_OPENAI_GPT_4OMNI_MINI";
|
|
151
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_OPENAI_GPT_4DOT1"] = 3] = "MODEL_OPENAI_GPT_4DOT1";
|
|
152
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_OPENAI_GPT_4DOT1_MINI"] = 4] = "MODEL_OPENAI_GPT_4DOT1_MINI";
|
|
153
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_OPENAI_GPT_4DOT1_NANO"] = 5] = "MODEL_OPENAI_GPT_4DOT1_NANO";
|
|
154
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_GOOGLE_GEMINI_2DOT5_PRO_PREVIEW"] = 6] = "MODEL_GOOGLE_GEMINI_2DOT5_PRO_PREVIEW";
|
|
155
|
-
GenerateChatAnswerRequestModel[GenerateChatAnswerRequestModel["MODEL_GOOGLE_GEMINI_2DOT5_FLASH_PREVIEW"] = 7] = "MODEL_GOOGLE_GEMINI_2DOT5_FLASH_PREVIEW";
|
|
156
|
-
})(GenerateChatAnswerRequestModel || (GenerateChatAnswerRequestModel = {}));
|
|
157
|
-
|
|
158
164
|
// *********************************
|
|
159
165
|
// Code generated by sdkgen
|
|
160
166
|
// DO NOT EDIT!.
|
|
@@ -162,7 +168,7 @@ var GenerateChatAnswerRequestModel;
|
|
|
162
168
|
// Enums Index.
|
|
163
169
|
// *********************************
|
|
164
170
|
|
|
165
|
-
function enumStringToValue$
|
|
171
|
+
function enumStringToValue$d(enumRef, value) {
|
|
166
172
|
if (typeof value === 'number') {
|
|
167
173
|
return value;
|
|
168
174
|
}
|
|
@@ -284,7 +290,7 @@ class NamespaceSystemNamespace {
|
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
292
|
|
|
287
|
-
function enumStringToValue$
|
|
293
|
+
function enumStringToValue$c(enumRef, value) {
|
|
288
294
|
if (typeof value === 'number') {
|
|
289
295
|
return value;
|
|
290
296
|
}
|
|
@@ -444,7 +450,7 @@ class FunctionParameter {
|
|
|
444
450
|
m.items = FunctionParameter.fromProto(proto.items);
|
|
445
451
|
}
|
|
446
452
|
if (proto.location) {
|
|
447
|
-
m.location = enumStringToValue$
|
|
453
|
+
m.location = enumStringToValue$c(FunctionParameterParameterLocation, proto.location);
|
|
448
454
|
}
|
|
449
455
|
return m;
|
|
450
456
|
}
|
|
@@ -518,7 +524,7 @@ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
|
|
|
518
524
|
}
|
|
519
525
|
}
|
|
520
526
|
|
|
521
|
-
function enumStringToValue$
|
|
527
|
+
function enumStringToValue$b(enumRef, value) {
|
|
522
528
|
if (typeof value === 'number') {
|
|
523
529
|
return value;
|
|
524
530
|
}
|
|
@@ -721,7 +727,7 @@ class PromptVersion {
|
|
|
721
727
|
}
|
|
722
728
|
}
|
|
723
729
|
|
|
724
|
-
function enumStringToValue$
|
|
730
|
+
function enumStringToValue$a(enumRef, value) {
|
|
725
731
|
if (typeof value === 'number') {
|
|
726
732
|
return value;
|
|
727
733
|
}
|
|
@@ -735,7 +741,7 @@ class Goal {
|
|
|
735
741
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
736
742
|
}
|
|
737
743
|
if (proto.type) {
|
|
738
|
-
m.type = enumStringToValue$
|
|
744
|
+
m.type = enumStringToValue$a(GoalType, proto.type);
|
|
739
745
|
}
|
|
740
746
|
if (proto.promptModules) {
|
|
741
747
|
m.promptModules = proto.promptModules.map(PromptModule.fromProto);
|
|
@@ -747,7 +753,7 @@ class Goal {
|
|
|
747
753
|
m.updated = new Date(proto.updated);
|
|
748
754
|
}
|
|
749
755
|
if (proto.supportedChannels) {
|
|
750
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$
|
|
756
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$a(GoalChannel, v));
|
|
751
757
|
}
|
|
752
758
|
return m;
|
|
753
759
|
}
|
|
@@ -822,7 +828,7 @@ class GoalKey {
|
|
|
822
828
|
}
|
|
823
829
|
}
|
|
824
830
|
|
|
825
|
-
function enumStringToValue$
|
|
831
|
+
function enumStringToValue$9(enumRef, value) {
|
|
826
832
|
if (typeof value === 'number') {
|
|
827
833
|
return value;
|
|
828
834
|
}
|
|
@@ -852,6 +858,51 @@ class KeyValuePair {
|
|
|
852
858
|
}
|
|
853
859
|
}
|
|
854
860
|
|
|
861
|
+
function enumStringToValue$8(enumRef, value) {
|
|
862
|
+
if (typeof value === 'number') {
|
|
863
|
+
return value;
|
|
864
|
+
}
|
|
865
|
+
return enumRef[value];
|
|
866
|
+
}
|
|
867
|
+
class Model {
|
|
868
|
+
static fromProto(proto) {
|
|
869
|
+
let m = new Model();
|
|
870
|
+
m = Object.assign(m, proto);
|
|
871
|
+
if (proto.vendor) {
|
|
872
|
+
m.vendor = enumStringToValue$8(ModelVendor, proto.vendor);
|
|
873
|
+
}
|
|
874
|
+
if (proto.type) {
|
|
875
|
+
m.type = enumStringToValue$8(ModelType, proto.type);
|
|
876
|
+
}
|
|
877
|
+
return m;
|
|
878
|
+
}
|
|
879
|
+
constructor(kwargs) {
|
|
880
|
+
if (!kwargs) {
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
Object.assign(this, kwargs);
|
|
884
|
+
}
|
|
885
|
+
toApiJson() {
|
|
886
|
+
const toReturn = {};
|
|
887
|
+
if (typeof this.id !== 'undefined') {
|
|
888
|
+
toReturn['id'] = this.id;
|
|
889
|
+
}
|
|
890
|
+
if (typeof this.vendor !== 'undefined') {
|
|
891
|
+
toReturn['vendor'] = this.vendor;
|
|
892
|
+
}
|
|
893
|
+
if (typeof this.type !== 'undefined') {
|
|
894
|
+
toReturn['type'] = this.type;
|
|
895
|
+
}
|
|
896
|
+
if (typeof this.name !== 'undefined') {
|
|
897
|
+
toReturn['name'] = this.name;
|
|
898
|
+
}
|
|
899
|
+
if (typeof this.recommended !== 'undefined') {
|
|
900
|
+
toReturn['recommended'] = this.recommended;
|
|
901
|
+
}
|
|
902
|
+
return toReturn;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
|
|
855
906
|
function enumStringToValue$7(enumRef, value) {
|
|
856
907
|
if (typeof value === 'number') {
|
|
857
908
|
return value;
|
|
@@ -947,6 +998,9 @@ class Config {
|
|
|
947
998
|
if (proto.voiceConfig) {
|
|
948
999
|
m.voiceConfig = ConfigVoiceConfig.fromProto(proto.voiceConfig);
|
|
949
1000
|
}
|
|
1001
|
+
if (proto.models) {
|
|
1002
|
+
m.models = proto.models.map(Model.fromProto);
|
|
1003
|
+
}
|
|
950
1004
|
return m;
|
|
951
1005
|
}
|
|
952
1006
|
constructor(kwargs) {
|
|
@@ -963,6 +1017,9 @@ class Config {
|
|
|
963
1017
|
if (typeof this.voiceConfig !== 'undefined' && this.voiceConfig !== null) {
|
|
964
1018
|
toReturn['voiceConfig'] = 'toApiJson' in this.voiceConfig ? this.voiceConfig.toApiJson() : this.voiceConfig;
|
|
965
1019
|
}
|
|
1020
|
+
if (typeof this.models !== 'undefined' && this.models !== null) {
|
|
1021
|
+
toReturn['models'] = 'toApiJson' in this.models ? this.models.toApiJson() : this.models;
|
|
1022
|
+
}
|
|
966
1023
|
return toReturn;
|
|
967
1024
|
}
|
|
968
1025
|
}
|
|
@@ -1499,6 +1556,41 @@ class CancelTestRunRequest {
|
|
|
1499
1556
|
return toReturn;
|
|
1500
1557
|
}
|
|
1501
1558
|
}
|
|
1559
|
+
class TestResultCitation {
|
|
1560
|
+
static fromProto(proto) {
|
|
1561
|
+
let m = new TestResultCitation();
|
|
1562
|
+
m = Object.assign(m, proto);
|
|
1563
|
+
return m;
|
|
1564
|
+
}
|
|
1565
|
+
constructor(kwargs) {
|
|
1566
|
+
if (!kwargs) {
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
Object.assign(this, kwargs);
|
|
1570
|
+
}
|
|
1571
|
+
toApiJson() {
|
|
1572
|
+
const toReturn = {};
|
|
1573
|
+
if (typeof this.type !== 'undefined') {
|
|
1574
|
+
toReturn['type'] = this.type;
|
|
1575
|
+
}
|
|
1576
|
+
if (typeof this.description !== 'undefined') {
|
|
1577
|
+
toReturn['description'] = this.description;
|
|
1578
|
+
}
|
|
1579
|
+
if (typeof this.title !== 'undefined') {
|
|
1580
|
+
toReturn['title'] = this.title;
|
|
1581
|
+
}
|
|
1582
|
+
if (typeof this.link !== 'undefined') {
|
|
1583
|
+
toReturn['link'] = this.link;
|
|
1584
|
+
}
|
|
1585
|
+
if (typeof this.reason !== 'undefined') {
|
|
1586
|
+
toReturn['reason'] = this.reason;
|
|
1587
|
+
}
|
|
1588
|
+
if (typeof this.fileUrl !== 'undefined') {
|
|
1589
|
+
toReturn['fileUrl'] = this.fileUrl;
|
|
1590
|
+
}
|
|
1591
|
+
return toReturn;
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1502
1594
|
class DeleteTestCasesRequest {
|
|
1503
1595
|
static fromProto(proto) {
|
|
1504
1596
|
let m = new DeleteTestCasesRequest();
|
|
@@ -1810,6 +1902,9 @@ class TestResult {
|
|
|
1810
1902
|
if (proto.chatHistory) {
|
|
1811
1903
|
m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
|
|
1812
1904
|
}
|
|
1905
|
+
if (proto.citations) {
|
|
1906
|
+
m.citations = proto.citations.map(TestResultCitation.fromProto);
|
|
1907
|
+
}
|
|
1813
1908
|
return m;
|
|
1814
1909
|
}
|
|
1815
1910
|
constructor(kwargs) {
|
|
@@ -1841,6 +1936,12 @@ class TestResult {
|
|
|
1841
1936
|
if (typeof this.score !== 'undefined') {
|
|
1842
1937
|
toReturn['score'] = this.score;
|
|
1843
1938
|
}
|
|
1939
|
+
if (typeof this.reasoning !== 'undefined') {
|
|
1940
|
+
toReturn['reasoning'] = this.reasoning;
|
|
1941
|
+
}
|
|
1942
|
+
if (typeof this.citations !== 'undefined' && this.citations !== null) {
|
|
1943
|
+
toReturn['citations'] = 'toApiJson' in this.citations ? this.citations.toApiJson() : this.citations;
|
|
1944
|
+
}
|
|
1844
1945
|
return toReturn;
|
|
1845
1946
|
}
|
|
1846
1947
|
}
|
|
@@ -2533,21 +2634,12 @@ class ExecuteFunctionResponse {
|
|
|
2533
2634
|
return toReturn;
|
|
2534
2635
|
}
|
|
2535
2636
|
}
|
|
2536
|
-
class
|
|
2637
|
+
class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
2537
2638
|
static fromProto(proto) {
|
|
2538
|
-
let m = new
|
|
2639
|
+
let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
|
|
2539
2640
|
m = Object.assign(m, proto);
|
|
2540
|
-
if (proto.namespace) {
|
|
2541
|
-
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2542
|
-
}
|
|
2543
2641
|
if (proto.type) {
|
|
2544
|
-
m.type = enumStringToValue(
|
|
2545
|
-
}
|
|
2546
|
-
if (proto.supportedChannels) {
|
|
2547
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
|
|
2548
|
-
}
|
|
2549
|
-
if (proto.namespaces) {
|
|
2550
|
-
m.namespaces = proto.namespaces.map(Namespace.fromProto);
|
|
2642
|
+
m.type = enumStringToValue(AssistantType, proto.type);
|
|
2551
2643
|
}
|
|
2552
2644
|
return m;
|
|
2553
2645
|
}
|
|
@@ -2559,18 +2651,9 @@ class ListGoalsRequestFilters {
|
|
|
2559
2651
|
}
|
|
2560
2652
|
toApiJson() {
|
|
2561
2653
|
const toReturn = {};
|
|
2562
|
-
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2563
|
-
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2564
|
-
}
|
|
2565
2654
|
if (typeof this.type !== 'undefined') {
|
|
2566
2655
|
toReturn['type'] = this.type;
|
|
2567
2656
|
}
|
|
2568
|
-
if (typeof this.supportedChannels !== 'undefined') {
|
|
2569
|
-
toReturn['supportedChannels'] = this.supportedChannels;
|
|
2570
|
-
}
|
|
2571
|
-
if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
|
|
2572
|
-
toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
|
|
2573
|
-
}
|
|
2574
2657
|
return toReturn;
|
|
2575
2658
|
}
|
|
2576
2659
|
}
|
|
@@ -2626,12 +2709,44 @@ class ListFunctionRequestFilters {
|
|
|
2626
2709
|
return toReturn;
|
|
2627
2710
|
}
|
|
2628
2711
|
}
|
|
2629
|
-
class
|
|
2712
|
+
class ListPromptModuleRequestFilters {
|
|
2630
2713
|
static fromProto(proto) {
|
|
2631
|
-
let m = new
|
|
2714
|
+
let m = new ListPromptModuleRequestFilters();
|
|
2632
2715
|
m = Object.assign(m, proto);
|
|
2716
|
+
if (proto.namespace) {
|
|
2717
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2718
|
+
}
|
|
2719
|
+
return m;
|
|
2720
|
+
}
|
|
2721
|
+
constructor(kwargs) {
|
|
2722
|
+
if (!kwargs) {
|
|
2723
|
+
return;
|
|
2724
|
+
}
|
|
2725
|
+
Object.assign(this, kwargs);
|
|
2726
|
+
}
|
|
2727
|
+
toApiJson() {
|
|
2728
|
+
const toReturn = {};
|
|
2729
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2730
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2731
|
+
}
|
|
2732
|
+
return toReturn;
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
class ListGoalsRequestFilters {
|
|
2736
|
+
static fromProto(proto) {
|
|
2737
|
+
let m = new ListGoalsRequestFilters();
|
|
2738
|
+
m = Object.assign(m, proto);
|
|
2739
|
+
if (proto.namespace) {
|
|
2740
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2741
|
+
}
|
|
2633
2742
|
if (proto.type) {
|
|
2634
|
-
m.type = enumStringToValue(
|
|
2743
|
+
m.type = enumStringToValue(GoalType, proto.type);
|
|
2744
|
+
}
|
|
2745
|
+
if (proto.supportedChannels) {
|
|
2746
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
|
|
2747
|
+
}
|
|
2748
|
+
if (proto.namespaces) {
|
|
2749
|
+
m.namespaces = proto.namespaces.map(Namespace.fromProto);
|
|
2635
2750
|
}
|
|
2636
2751
|
return m;
|
|
2637
2752
|
}
|
|
@@ -2643,9 +2758,18 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
|
2643
2758
|
}
|
|
2644
2759
|
toApiJson() {
|
|
2645
2760
|
const toReturn = {};
|
|
2761
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2762
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2763
|
+
}
|
|
2646
2764
|
if (typeof this.type !== 'undefined') {
|
|
2647
2765
|
toReturn['type'] = this.type;
|
|
2648
2766
|
}
|
|
2767
|
+
if (typeof this.supportedChannels !== 'undefined') {
|
|
2768
|
+
toReturn['supportedChannels'] = this.supportedChannels;
|
|
2769
|
+
}
|
|
2770
|
+
if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
|
|
2771
|
+
toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
|
|
2772
|
+
}
|
|
2649
2773
|
return toReturn;
|
|
2650
2774
|
}
|
|
2651
2775
|
}
|
|
@@ -2678,12 +2802,15 @@ class ListAssistantRequestFilters {
|
|
|
2678
2802
|
return toReturn;
|
|
2679
2803
|
}
|
|
2680
2804
|
}
|
|
2681
|
-
class
|
|
2805
|
+
class ListAvailableModelsRequestFilters {
|
|
2682
2806
|
static fromProto(proto) {
|
|
2683
|
-
let m = new
|
|
2807
|
+
let m = new ListAvailableModelsRequestFilters();
|
|
2684
2808
|
m = Object.assign(m, proto);
|
|
2685
|
-
if (proto.
|
|
2686
|
-
m.
|
|
2809
|
+
if (proto.vendor) {
|
|
2810
|
+
m.vendor = proto.vendor.map((v) => enumStringToValue(ModelVendor, v));
|
|
2811
|
+
}
|
|
2812
|
+
if (proto.type) {
|
|
2813
|
+
m.type = proto.type.map((v) => enumStringToValue(ModelType, v));
|
|
2687
2814
|
}
|
|
2688
2815
|
return m;
|
|
2689
2816
|
}
|
|
@@ -2695,8 +2822,11 @@ class ListPromptModuleRequestFilters {
|
|
|
2695
2822
|
}
|
|
2696
2823
|
toApiJson() {
|
|
2697
2824
|
const toReturn = {};
|
|
2698
|
-
if (typeof this.
|
|
2699
|
-
toReturn['
|
|
2825
|
+
if (typeof this.vendor !== 'undefined') {
|
|
2826
|
+
toReturn['vendor'] = this.vendor;
|
|
2827
|
+
}
|
|
2828
|
+
if (typeof this.type !== 'undefined') {
|
|
2829
|
+
toReturn['type'] = this.type;
|
|
2700
2830
|
}
|
|
2701
2831
|
return toReturn;
|
|
2702
2832
|
}
|
|
@@ -2796,6 +2926,9 @@ class GetAssistantRequest {
|
|
|
2796
2926
|
if (proto.namespace) {
|
|
2797
2927
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2798
2928
|
}
|
|
2929
|
+
if (proto.options) {
|
|
2930
|
+
m.options = GetAssistantRequestOptions.fromProto(proto.options);
|
|
2931
|
+
}
|
|
2799
2932
|
return m;
|
|
2800
2933
|
}
|
|
2801
2934
|
constructor(kwargs) {
|
|
@@ -2812,6 +2945,9 @@ class GetAssistantRequest {
|
|
|
2812
2945
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2813
2946
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2814
2947
|
}
|
|
2948
|
+
if (typeof this.options !== 'undefined' && this.options !== null) {
|
|
2949
|
+
toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
|
|
2950
|
+
}
|
|
2815
2951
|
return toReturn;
|
|
2816
2952
|
}
|
|
2817
2953
|
}
|
|
@@ -3726,6 +3862,52 @@ class ListAssistantResponse {
|
|
|
3726
3862
|
return toReturn;
|
|
3727
3863
|
}
|
|
3728
3864
|
}
|
|
3865
|
+
class ListAvailableModelsRequest {
|
|
3866
|
+
static fromProto(proto) {
|
|
3867
|
+
let m = new ListAvailableModelsRequest();
|
|
3868
|
+
m = Object.assign(m, proto);
|
|
3869
|
+
if (proto.filters) {
|
|
3870
|
+
m.filters = ListAvailableModelsRequestFilters.fromProto(proto.filters);
|
|
3871
|
+
}
|
|
3872
|
+
return m;
|
|
3873
|
+
}
|
|
3874
|
+
constructor(kwargs) {
|
|
3875
|
+
if (!kwargs) {
|
|
3876
|
+
return;
|
|
3877
|
+
}
|
|
3878
|
+
Object.assign(this, kwargs);
|
|
3879
|
+
}
|
|
3880
|
+
toApiJson() {
|
|
3881
|
+
const toReturn = {};
|
|
3882
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
3883
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
3884
|
+
}
|
|
3885
|
+
return toReturn;
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
class ListAvailableModelsResponse {
|
|
3889
|
+
static fromProto(proto) {
|
|
3890
|
+
let m = new ListAvailableModelsResponse();
|
|
3891
|
+
m = Object.assign(m, proto);
|
|
3892
|
+
if (proto.models) {
|
|
3893
|
+
m.models = proto.models.map(Model.fromProto);
|
|
3894
|
+
}
|
|
3895
|
+
return m;
|
|
3896
|
+
}
|
|
3897
|
+
constructor(kwargs) {
|
|
3898
|
+
if (!kwargs) {
|
|
3899
|
+
return;
|
|
3900
|
+
}
|
|
3901
|
+
Object.assign(this, kwargs);
|
|
3902
|
+
}
|
|
3903
|
+
toApiJson() {
|
|
3904
|
+
const toReturn = {};
|
|
3905
|
+
if (typeof this.models !== 'undefined' && this.models !== null) {
|
|
3906
|
+
toReturn['models'] = 'toApiJson' in this.models ? this.models.toApiJson() : this.models;
|
|
3907
|
+
}
|
|
3908
|
+
return toReturn;
|
|
3909
|
+
}
|
|
3910
|
+
}
|
|
3729
3911
|
class ListConnectionsRequest {
|
|
3730
3912
|
static fromProto(proto) {
|
|
3731
3913
|
let m = new ListConnectionsRequest();
|
|
@@ -4148,9 +4330,6 @@ class GenerateChatAnswerRequestOptions {
|
|
|
4148
4330
|
if (proto.maxTokens) {
|
|
4149
4331
|
m.maxTokens = parseInt(proto.maxTokens, 10);
|
|
4150
4332
|
}
|
|
4151
|
-
if (proto.model) {
|
|
4152
|
-
m.model = enumStringToValue(GenerateChatAnswerRequestModel, proto.model);
|
|
4153
|
-
}
|
|
4154
4333
|
return m;
|
|
4155
4334
|
}
|
|
4156
4335
|
constructor(kwargs) {
|
|
@@ -4170,9 +4349,6 @@ class GenerateChatAnswerRequestOptions {
|
|
|
4170
4349
|
if (typeof this.maxTokens !== 'undefined') {
|
|
4171
4350
|
toReturn['maxTokens'] = this.maxTokens;
|
|
4172
4351
|
}
|
|
4173
|
-
if (typeof this.model !== 'undefined') {
|
|
4174
|
-
toReturn['model'] = this.model;
|
|
4175
|
-
}
|
|
4176
4352
|
return toReturn;
|
|
4177
4353
|
}
|
|
4178
4354
|
}
|
|
@@ -4196,6 +4372,26 @@ class CreateAssistantRequestOptions {
|
|
|
4196
4372
|
return toReturn;
|
|
4197
4373
|
}
|
|
4198
4374
|
}
|
|
4375
|
+
class GetAssistantRequestOptions {
|
|
4376
|
+
static fromProto(proto) {
|
|
4377
|
+
let m = new GetAssistantRequestOptions();
|
|
4378
|
+
m = Object.assign(m, proto);
|
|
4379
|
+
return m;
|
|
4380
|
+
}
|
|
4381
|
+
constructor(kwargs) {
|
|
4382
|
+
if (!kwargs) {
|
|
4383
|
+
return;
|
|
4384
|
+
}
|
|
4385
|
+
Object.assign(this, kwargs);
|
|
4386
|
+
}
|
|
4387
|
+
toApiJson() {
|
|
4388
|
+
const toReturn = {};
|
|
4389
|
+
if (typeof this.skipGoalsHydration !== 'undefined') {
|
|
4390
|
+
toReturn['skipGoalsHydration'] = this.skipGoalsHydration;
|
|
4391
|
+
}
|
|
4392
|
+
return toReturn;
|
|
4393
|
+
}
|
|
4394
|
+
}
|
|
4199
4395
|
class CreatePromptModuleVersionRequestOptions {
|
|
4200
4396
|
static fromProto(proto) {
|
|
4201
4397
|
let m = new CreatePromptModuleVersionRequestOptions();
|
|
@@ -4581,6 +4777,11 @@ class AssistantApiService {
|
|
|
4581
4777
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/ExecuteFunction", request.toApiJson(), this.apiOptions())
|
|
4582
4778
|
.pipe(map(resp => ExecuteFunctionResponse.fromProto(resp)));
|
|
4583
4779
|
}
|
|
4780
|
+
listAvailableModels(r) {
|
|
4781
|
+
const request = (r.toApiJson) ? r : new ListAvailableModelsRequest(r);
|
|
4782
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/ListAvailableModels", request.toApiJson(), this.apiOptions())
|
|
4783
|
+
.pipe(map(resp => ListAvailableModelsResponse.fromProto(resp)));
|
|
4784
|
+
}
|
|
4584
4785
|
}
|
|
4585
4786
|
AssistantApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssistantApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4586
4787
|
AssistantApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssistantApiService, providedIn: 'root' });
|
|
@@ -4980,5 +5181,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4980
5181
|
* Generated bundle index. Do not edit.
|
|
4981
5182
|
*/
|
|
4982
5183
|
|
|
4983
|
-
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest,
|
|
5184
|
+
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListAvailableModelsRequest, ListAvailableModelsRequestFilters, ListAvailableModelsResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertTestCasesRequest, VendorModel };
|
|
4984
5185
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|