mavenagi 0.0.0-alpha.16 → 0.0.0-alpha.17
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/api/resources/actions/client/Client.js +3 -3
- package/api/resources/appSettings/client/Client.js +1 -1
- package/api/resources/conversation/client/Client.d.ts +18 -4
- package/api/resources/conversation/client/Client.js +101 -13
- package/api/resources/conversation/types/AskRequest.d.ts +12 -0
- package/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
- package/api/resources/conversation/types/AskStreamActionEvent.js +4 -0
- package/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
- package/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
- package/api/resources/conversation/types/CategorizationResponse.js +4 -0
- package/api/resources/conversation/types/ConversationAnalysis.d.ts +12 -0
- package/api/resources/conversation/types/ConversationAnalysis.js +4 -0
- package/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
- package/api/resources/conversation/types/Sentiment.d.ts +14 -0
- package/api/resources/conversation/types/Sentiment.js +10 -0
- package/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/api/resources/conversation/types/index.d.ts +4 -0
- package/api/resources/conversation/types/index.js +4 -0
- package/api/resources/knowledge/client/Client.js +7 -7
- package/api/resources/triggers/client/Client.js +3 -3
- package/api/resources/users/client/Client.js +2 -2
- package/dist/api/resources/actions/client/Client.js +3 -3
- package/dist/api/resources/appSettings/client/Client.js +1 -1
- package/dist/api/resources/conversation/client/Client.d.ts +18 -4
- package/dist/api/resources/conversation/client/Client.js +101 -13
- package/dist/api/resources/conversation/types/AskRequest.d.ts +12 -0
- package/dist/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
- package/dist/api/resources/conversation/types/AskStreamActionEvent.js +4 -0
- package/dist/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
- package/dist/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
- package/dist/api/resources/conversation/types/CategorizationResponse.js +4 -0
- package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +12 -0
- package/dist/api/resources/conversation/types/ConversationAnalysis.js +4 -0
- package/dist/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
- package/dist/api/resources/conversation/types/Sentiment.d.ts +14 -0
- package/dist/api/resources/conversation/types/Sentiment.js +10 -0
- package/dist/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/dist/api/resources/conversation/types/index.d.ts +4 -0
- package/dist/api/resources/conversation/types/index.js +4 -0
- package/dist/api/resources/knowledge/client/Client.js +7 -7
- package/dist/api/resources/triggers/client/Client.js +3 -3
- package/dist/api/resources/users/client/Client.js +2 -2
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
- package/dist/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
- package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +10 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.js +2 -0
- package/dist/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Sentiment.js +5 -0
- package/dist/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/dist/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +4 -0
- package/dist/serialization/resources/conversation/types/index.js +4 -0
- package/package.json +1 -1
- package/reference.md +71 -8
- package/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
- package/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
- package/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
- package/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
- package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +15 -0
- package/serialization/resources/conversation/types/ConversationAnalysis.js +10 -0
- package/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationResponse.js +2 -0
- package/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
- package/serialization/resources/conversation/types/Sentiment.js +5 -0
- package/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/serialization/resources/conversation/types/index.d.ts +4 -0
- package/serialization/resources/conversation/types/index.js +4 -0
|
@@ -56,7 +56,7 @@ export class Actions {
|
|
|
56
56
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "mavenagi",
|
|
59
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
60
60
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
61
61
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
62
62
|
},
|
|
@@ -145,7 +145,7 @@ export class Actions {
|
|
|
145
145
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
146
146
|
"X-Fern-Language": "JavaScript",
|
|
147
147
|
"X-Fern-SDK-Name": "mavenagi",
|
|
148
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
148
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
149
149
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
150
150
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
151
151
|
},
|
|
@@ -233,7 +233,7 @@ export class Actions {
|
|
|
233
233
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
234
234
|
"X-Fern-Language": "JavaScript",
|
|
235
235
|
"X-Fern-SDK-Name": "mavenagi",
|
|
236
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
236
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
237
237
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
238
238
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
239
239
|
},
|
|
@@ -44,7 +44,7 @@ export class AppSettings {
|
|
|
44
44
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "mavenagi",
|
|
47
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
47
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
},
|
|
@@ -117,17 +117,17 @@ export declare class Conversation {
|
|
|
117
117
|
* @example
|
|
118
118
|
* await client.conversation.ask("string", {
|
|
119
119
|
* conversationMessageId: {
|
|
120
|
-
* referenceId: "
|
|
120
|
+
* referenceId: "message-1"
|
|
121
121
|
* },
|
|
122
122
|
* userId: {
|
|
123
|
-
* referenceId: "
|
|
123
|
+
* referenceId: "user-1"
|
|
124
124
|
* },
|
|
125
|
-
* text: "
|
|
125
|
+
* text: "How do I reset my password?"
|
|
126
126
|
* })
|
|
127
127
|
*/
|
|
128
128
|
ask(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
129
129
|
/**
|
|
130
|
-
* Ask a question
|
|
130
|
+
* Ask a question with a streaming response. The response will be sent as a stream of events. The text portions of stream responses should be concatenated to form the full response text. Action and metadata events should overwrite past data and do not need concatenation.
|
|
131
131
|
*/
|
|
132
132
|
askStream(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<core.Stream<MavenAGI.StreamResponse>>;
|
|
133
133
|
/**
|
|
@@ -149,6 +149,20 @@ export declare class Conversation {
|
|
|
149
149
|
* })
|
|
150
150
|
*/
|
|
151
151
|
generateMavenSuggestions(conversationId: string, request: MavenAGI.GenerateMavenSuggestionsRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
152
|
+
/**
|
|
153
|
+
* Uses an LLM flow to categorize the conversation. Experimental.
|
|
154
|
+
*
|
|
155
|
+
* @param {string} conversationId - The ID of the conversation to categorize
|
|
156
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
157
|
+
*
|
|
158
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
159
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
160
|
+
* @throws {@link MavenAGI.ServerError}
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await client.conversation.categorize("string")
|
|
164
|
+
*/
|
|
165
|
+
categorize(conversationId: string, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.CategorizationResponse>;
|
|
152
166
|
/**
|
|
153
167
|
* Create feedback
|
|
154
168
|
*
|
|
@@ -63,7 +63,7 @@ export class Conversation {
|
|
|
63
63
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
64
64
|
"X-Fern-Language": "JavaScript",
|
|
65
65
|
"X-Fern-SDK-Name": "mavenagi",
|
|
66
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
66
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
67
67
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
68
68
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
69
69
|
},
|
|
@@ -152,7 +152,7 @@ export class Conversation {
|
|
|
152
152
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
153
153
|
"X-Fern-Language": "JavaScript",
|
|
154
154
|
"X-Fern-SDK-Name": "mavenagi",
|
|
155
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
155
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
156
156
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
157
157
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
158
158
|
},
|
|
@@ -252,7 +252,7 @@ export class Conversation {
|
|
|
252
252
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
253
253
|
"X-Fern-Language": "JavaScript",
|
|
254
254
|
"X-Fern-SDK-Name": "mavenagi",
|
|
255
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
255
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
256
256
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
257
257
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
258
258
|
},
|
|
@@ -332,12 +332,12 @@ export class Conversation {
|
|
|
332
332
|
* @example
|
|
333
333
|
* await client.conversation.ask("string", {
|
|
334
334
|
* conversationMessageId: {
|
|
335
|
-
* referenceId: "
|
|
335
|
+
* referenceId: "message-1"
|
|
336
336
|
* },
|
|
337
337
|
* userId: {
|
|
338
|
-
* referenceId: "
|
|
338
|
+
* referenceId: "user-1"
|
|
339
339
|
* },
|
|
340
|
-
* text: "
|
|
340
|
+
* text: "How do I reset my password?"
|
|
341
341
|
* })
|
|
342
342
|
*/
|
|
343
343
|
ask(conversationId, request, requestOptions) {
|
|
@@ -352,7 +352,7 @@ export class Conversation {
|
|
|
352
352
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
353
353
|
"X-Fern-Language": "JavaScript",
|
|
354
354
|
"X-Fern-SDK-Name": "mavenagi",
|
|
355
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
355
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
356
356
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
357
357
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
358
358
|
},
|
|
@@ -417,7 +417,7 @@ export class Conversation {
|
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
/**
|
|
420
|
-
* Ask a question
|
|
420
|
+
* Ask a question with a streaming response. The response will be sent as a stream of events. The text portions of stream responses should be concatenated to form the full response text. Action and metadata events should overwrite past data and do not need concatenation.
|
|
421
421
|
*/
|
|
422
422
|
askStream(conversationId, request, requestOptions) {
|
|
423
423
|
var _a, _b;
|
|
@@ -431,7 +431,7 @@ export class Conversation {
|
|
|
431
431
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
432
432
|
"X-Fern-Language": "JavaScript",
|
|
433
433
|
"X-Fern-SDK-Name": "mavenagi",
|
|
434
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
434
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
435
435
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
436
436
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
437
437
|
},
|
|
@@ -536,7 +536,7 @@ export class Conversation {
|
|
|
536
536
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
537
537
|
"X-Fern-Language": "JavaScript",
|
|
538
538
|
"X-Fern-SDK-Name": "mavenagi",
|
|
539
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
539
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
540
540
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
541
541
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
542
542
|
},
|
|
@@ -600,6 +600,94 @@ export class Conversation {
|
|
|
600
600
|
}
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Uses an LLM flow to categorize the conversation. Experimental.
|
|
605
|
+
*
|
|
606
|
+
* @param {string} conversationId - The ID of the conversation to categorize
|
|
607
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
608
|
+
*
|
|
609
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
610
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
611
|
+
* @throws {@link MavenAGI.ServerError}
|
|
612
|
+
*
|
|
613
|
+
* @example
|
|
614
|
+
* await client.conversation.categorize("string")
|
|
615
|
+
*/
|
|
616
|
+
categorize(conversationId, requestOptions) {
|
|
617
|
+
var _a, _b;
|
|
618
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
619
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
620
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/categorize`),
|
|
621
|
+
method: "POST",
|
|
622
|
+
headers: {
|
|
623
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
624
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
625
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
626
|
+
"X-Fern-Language": "JavaScript",
|
|
627
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
628
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
629
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
630
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
631
|
+
},
|
|
632
|
+
contentType: "application/json",
|
|
633
|
+
requestType: "json",
|
|
634
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
635
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
636
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
637
|
+
});
|
|
638
|
+
if (_response.ok) {
|
|
639
|
+
return serializers.CategorizationResponse.parseOrThrow(_response.body, {
|
|
640
|
+
unrecognizedObjectKeys: "passthrough",
|
|
641
|
+
allowUnrecognizedUnionMembers: true,
|
|
642
|
+
allowUnrecognizedEnumValues: true,
|
|
643
|
+
breadcrumbsPrefix: ["response"],
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
if (_response.error.reason === "status-code") {
|
|
647
|
+
switch (_response.error.statusCode) {
|
|
648
|
+
case 404:
|
|
649
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
650
|
+
unrecognizedObjectKeys: "passthrough",
|
|
651
|
+
allowUnrecognizedUnionMembers: true,
|
|
652
|
+
allowUnrecognizedEnumValues: true,
|
|
653
|
+
breadcrumbsPrefix: ["response"],
|
|
654
|
+
}));
|
|
655
|
+
case 400:
|
|
656
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
657
|
+
unrecognizedObjectKeys: "passthrough",
|
|
658
|
+
allowUnrecognizedUnionMembers: true,
|
|
659
|
+
allowUnrecognizedEnumValues: true,
|
|
660
|
+
breadcrumbsPrefix: ["response"],
|
|
661
|
+
}));
|
|
662
|
+
case 500:
|
|
663
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
664
|
+
unrecognizedObjectKeys: "passthrough",
|
|
665
|
+
allowUnrecognizedUnionMembers: true,
|
|
666
|
+
allowUnrecognizedEnumValues: true,
|
|
667
|
+
breadcrumbsPrefix: ["response"],
|
|
668
|
+
}));
|
|
669
|
+
default:
|
|
670
|
+
throw new errors.MavenAGIError({
|
|
671
|
+
statusCode: _response.error.statusCode,
|
|
672
|
+
body: _response.error.body,
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
switch (_response.error.reason) {
|
|
677
|
+
case "non-json":
|
|
678
|
+
throw new errors.MavenAGIError({
|
|
679
|
+
statusCode: _response.error.statusCode,
|
|
680
|
+
body: _response.error.rawBody,
|
|
681
|
+
});
|
|
682
|
+
case "timeout":
|
|
683
|
+
throw new errors.MavenAGITimeoutError();
|
|
684
|
+
case "unknown":
|
|
685
|
+
throw new errors.MavenAGIError({
|
|
686
|
+
message: _response.error.errorMessage,
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
}
|
|
603
691
|
/**
|
|
604
692
|
* Create feedback
|
|
605
693
|
*
|
|
@@ -637,7 +725,7 @@ export class Conversation {
|
|
|
637
725
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
638
726
|
"X-Fern-Language": "JavaScript",
|
|
639
727
|
"X-Fern-SDK-Name": "mavenagi",
|
|
640
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
728
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
641
729
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
642
730
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
643
731
|
},
|
|
@@ -734,7 +822,7 @@ export class Conversation {
|
|
|
734
822
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
735
823
|
"X-Fern-Language": "JavaScript",
|
|
736
824
|
"X-Fern-SDK-Name": "mavenagi",
|
|
737
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
825
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
738
826
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
739
827
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
740
828
|
},
|
|
@@ -826,7 +914,7 @@ export class Conversation {
|
|
|
826
914
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
827
915
|
"X-Fern-Language": "JavaScript",
|
|
828
916
|
"X-Fern-SDK-Name": "mavenagi",
|
|
829
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
917
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
830
918
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
831
919
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
832
920
|
},
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* conversationMessageId: {
|
|
9
|
+
* referenceId: "message-1"
|
|
10
|
+
* },
|
|
11
|
+
* userId: {
|
|
12
|
+
* referenceId: "user-1"
|
|
13
|
+
* },
|
|
14
|
+
* text: "How do I reset my password?"
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
5
17
|
export interface AskRequest {
|
|
6
18
|
/** Externally supplied ID to uniquely identify this message within the conversation */
|
|
7
19
|
conversationMessageId: MavenAGI.EntityIdBase;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface ConversationAnalysis {
|
|
6
|
+
/** Generated user request summary of the conversation */
|
|
7
|
+
userRequest?: string;
|
|
8
|
+
/** Generated agent response summary of the conversation */
|
|
9
|
+
agentResponse?: string;
|
|
10
|
+
/** Generated sentiment of the conversation */
|
|
11
|
+
sentiment: MavenAGI.Sentiment;
|
|
12
|
+
}
|
|
@@ -7,4 +7,6 @@ export interface ConversationResponse extends MavenAGI.ConversationBase {
|
|
|
7
7
|
conversationId: MavenAGI.EntityId;
|
|
8
8
|
/** The messages in the conversation */
|
|
9
9
|
messages: MavenAGI.ConversationMessageResponse[];
|
|
10
|
+
/** An analysis of the conversation. */
|
|
11
|
+
analysis: MavenAGI.ConversationAnalysis;
|
|
10
12
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The sentiment of the conversation
|
|
6
|
+
*/
|
|
7
|
+
export declare type Sentiment = "POSITIVE" | "NEGATIVE" | "NEUTRAL" | "MIXED" | "UNKNOWN";
|
|
8
|
+
export declare const Sentiment: {
|
|
9
|
+
readonly Positive: "POSITIVE";
|
|
10
|
+
readonly Negative: "NEGATIVE";
|
|
11
|
+
readonly Neutral: "NEUTRAL";
|
|
12
|
+
readonly Mixed: "MIXED";
|
|
13
|
+
readonly Unknown: "UNKNOWN";
|
|
14
|
+
};
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
-
export declare type StreamResponse = MavenAGI.StreamResponse.Text | MavenAGI.StreamResponse.Metadata | MavenAGI.StreamResponse.Start | MavenAGI.StreamResponse.End;
|
|
5
|
+
export declare type StreamResponse = MavenAGI.StreamResponse.Text | MavenAGI.StreamResponse.Action | MavenAGI.StreamResponse.Metadata | MavenAGI.StreamResponse.Start | MavenAGI.StreamResponse.End;
|
|
6
6
|
export declare namespace StreamResponse {
|
|
7
7
|
interface Text extends MavenAGI.AskStreamTextEvent {
|
|
8
8
|
eventType: "text";
|
|
9
9
|
}
|
|
10
|
+
interface Action extends MavenAGI.AskStreamActionEvent {
|
|
11
|
+
eventType: "action";
|
|
12
|
+
}
|
|
10
13
|
interface Metadata extends MavenAGI.AskStreamMetadataEvent {
|
|
11
14
|
eventType: "metadata";
|
|
12
15
|
}
|
|
@@ -9,6 +9,7 @@ export * from "./ConversationRequest";
|
|
|
9
9
|
export * from "./ConversationMessageRequest";
|
|
10
10
|
export * from "./ConversationMessageBase";
|
|
11
11
|
export * from "./ConversationMessageResponse";
|
|
12
|
+
export * from "./ConversationAnalysis";
|
|
12
13
|
export * from "./UserMessageBase";
|
|
13
14
|
export * from "./UserMessage";
|
|
14
15
|
export * from "./BotMessage";
|
|
@@ -19,11 +20,14 @@ export * from "./BotActionFormResponse";
|
|
|
19
20
|
export * from "./ActionFormField";
|
|
20
21
|
export * from "./SubmitActionFormRequest";
|
|
21
22
|
export * from "./UserConversationMessageType";
|
|
23
|
+
export * from "./Sentiment";
|
|
22
24
|
export * from "./BotConversationMessageType";
|
|
23
25
|
export * from "./FeedbackRequest";
|
|
24
26
|
export * from "./StreamResponse";
|
|
25
27
|
export * from "./AskStreamTextEvent";
|
|
28
|
+
export * from "./AskStreamActionEvent";
|
|
26
29
|
export * from "./AskStreamMetadataEvent";
|
|
27
30
|
export * from "./AskStreamStartEvent";
|
|
28
31
|
export * from "./AskStreamEndEvent";
|
|
29
32
|
export * from "./Source";
|
|
33
|
+
export * from "./CategorizationResponse";
|
|
@@ -9,6 +9,7 @@ export * from "./ConversationRequest";
|
|
|
9
9
|
export * from "./ConversationMessageRequest";
|
|
10
10
|
export * from "./ConversationMessageBase";
|
|
11
11
|
export * from "./ConversationMessageResponse";
|
|
12
|
+
export * from "./ConversationAnalysis";
|
|
12
13
|
export * from "./UserMessageBase";
|
|
13
14
|
export * from "./UserMessage";
|
|
14
15
|
export * from "./BotMessage";
|
|
@@ -19,11 +20,14 @@ export * from "./BotActionFormResponse";
|
|
|
19
20
|
export * from "./ActionFormField";
|
|
20
21
|
export * from "./SubmitActionFormRequest";
|
|
21
22
|
export * from "./UserConversationMessageType";
|
|
23
|
+
export * from "./Sentiment";
|
|
22
24
|
export * from "./BotConversationMessageType";
|
|
23
25
|
export * from "./FeedbackRequest";
|
|
24
26
|
export * from "./StreamResponse";
|
|
25
27
|
export * from "./AskStreamTextEvent";
|
|
28
|
+
export * from "./AskStreamActionEvent";
|
|
26
29
|
export * from "./AskStreamMetadataEvent";
|
|
27
30
|
export * from "./AskStreamStartEvent";
|
|
28
31
|
export * from "./AskStreamEndEvent";
|
|
29
32
|
export * from "./Source";
|
|
33
|
+
export * from "./CategorizationResponse";
|
|
@@ -51,7 +51,7 @@ export class Knowledge {
|
|
|
51
51
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "mavenagi",
|
|
54
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
55
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
57
|
},
|
|
@@ -140,7 +140,7 @@ export class Knowledge {
|
|
|
140
140
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
141
141
|
"X-Fern-Language": "JavaScript",
|
|
142
142
|
"X-Fern-SDK-Name": "mavenagi",
|
|
143
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
143
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
144
144
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
145
145
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
146
146
|
},
|
|
@@ -231,7 +231,7 @@ export class Knowledge {
|
|
|
231
231
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
232
232
|
"X-Fern-Language": "JavaScript",
|
|
233
233
|
"X-Fern-SDK-Name": "mavenagi",
|
|
234
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
234
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
235
235
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
236
236
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
237
237
|
},
|
|
@@ -320,7 +320,7 @@ export class Knowledge {
|
|
|
320
320
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
321
321
|
"X-Fern-Language": "JavaScript",
|
|
322
322
|
"X-Fern-SDK-Name": "mavenagi",
|
|
323
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
323
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
324
324
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
325
325
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
326
326
|
},
|
|
@@ -411,7 +411,7 @@ export class Knowledge {
|
|
|
411
411
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
412
412
|
"X-Fern-Language": "JavaScript",
|
|
413
413
|
"X-Fern-SDK-Name": "mavenagi",
|
|
414
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
414
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
415
415
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
416
416
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
417
417
|
},
|
|
@@ -508,7 +508,7 @@ export class Knowledge {
|
|
|
508
508
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
509
509
|
"X-Fern-Language": "JavaScript",
|
|
510
510
|
"X-Fern-SDK-Name": "mavenagi",
|
|
511
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
511
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
512
512
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
513
513
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
514
514
|
},
|
|
@@ -598,7 +598,7 @@ export class Knowledge {
|
|
|
598
598
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
599
599
|
"X-Fern-Language": "JavaScript",
|
|
600
600
|
"X-Fern-SDK-Name": "mavenagi",
|
|
601
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
601
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
602
602
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
603
603
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
604
604
|
},
|
|
@@ -51,7 +51,7 @@ export class Triggers {
|
|
|
51
51
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "mavenagi",
|
|
54
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
55
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
57
|
},
|
|
@@ -140,7 +140,7 @@ export class Triggers {
|
|
|
140
140
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
141
141
|
"X-Fern-Language": "JavaScript",
|
|
142
142
|
"X-Fern-SDK-Name": "mavenagi",
|
|
143
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
143
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
144
144
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
145
145
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
146
146
|
},
|
|
@@ -228,7 +228,7 @@ export class Triggers {
|
|
|
228
228
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
229
229
|
"X-Fern-Language": "JavaScript",
|
|
230
230
|
"X-Fern-SDK-Name": "mavenagi",
|
|
231
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
231
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
232
232
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
233
233
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
234
234
|
},
|
|
@@ -59,7 +59,7 @@ export class Users {
|
|
|
59
59
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
60
60
|
"X-Fern-Language": "JavaScript",
|
|
61
61
|
"X-Fern-SDK-Name": "mavenagi",
|
|
62
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
62
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
63
63
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
64
64
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
65
65
|
},
|
|
@@ -148,7 +148,7 @@ export class Users {
|
|
|
148
148
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
149
149
|
"X-Fern-Language": "JavaScript",
|
|
150
150
|
"X-Fern-SDK-Name": "mavenagi",
|
|
151
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
151
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
152
152
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
153
153
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
154
154
|
},
|
|
@@ -56,7 +56,7 @@ export class Actions {
|
|
|
56
56
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "mavenagi",
|
|
59
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
60
60
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
61
61
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
62
62
|
},
|
|
@@ -145,7 +145,7 @@ export class Actions {
|
|
|
145
145
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
146
146
|
"X-Fern-Language": "JavaScript",
|
|
147
147
|
"X-Fern-SDK-Name": "mavenagi",
|
|
148
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
148
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
149
149
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
150
150
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
151
151
|
},
|
|
@@ -233,7 +233,7 @@ export class Actions {
|
|
|
233
233
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
234
234
|
"X-Fern-Language": "JavaScript",
|
|
235
235
|
"X-Fern-SDK-Name": "mavenagi",
|
|
236
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
236
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
237
237
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
238
238
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
239
239
|
},
|
|
@@ -44,7 +44,7 @@ export class AppSettings {
|
|
|
44
44
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "mavenagi",
|
|
47
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
47
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.17",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
},
|
|
@@ -117,17 +117,17 @@ export declare class Conversation {
|
|
|
117
117
|
* @example
|
|
118
118
|
* await client.conversation.ask("string", {
|
|
119
119
|
* conversationMessageId: {
|
|
120
|
-
* referenceId: "
|
|
120
|
+
* referenceId: "message-1"
|
|
121
121
|
* },
|
|
122
122
|
* userId: {
|
|
123
|
-
* referenceId: "
|
|
123
|
+
* referenceId: "user-1"
|
|
124
124
|
* },
|
|
125
|
-
* text: "
|
|
125
|
+
* text: "How do I reset my password?"
|
|
126
126
|
* })
|
|
127
127
|
*/
|
|
128
128
|
ask(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
129
129
|
/**
|
|
130
|
-
* Ask a question
|
|
130
|
+
* Ask a question with a streaming response. The response will be sent as a stream of events. The text portions of stream responses should be concatenated to form the full response text. Action and metadata events should overwrite past data and do not need concatenation.
|
|
131
131
|
*/
|
|
132
132
|
askStream(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<core.Stream<MavenAGI.StreamResponse>>;
|
|
133
133
|
/**
|
|
@@ -149,6 +149,20 @@ export declare class Conversation {
|
|
|
149
149
|
* })
|
|
150
150
|
*/
|
|
151
151
|
generateMavenSuggestions(conversationId: string, request: MavenAGI.GenerateMavenSuggestionsRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
152
|
+
/**
|
|
153
|
+
* Uses an LLM flow to categorize the conversation. Experimental.
|
|
154
|
+
*
|
|
155
|
+
* @param {string} conversationId - The ID of the conversation to categorize
|
|
156
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
157
|
+
*
|
|
158
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
159
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
160
|
+
* @throws {@link MavenAGI.ServerError}
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await client.conversation.categorize("string")
|
|
164
|
+
*/
|
|
165
|
+
categorize(conversationId: string, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.CategorizationResponse>;
|
|
152
166
|
/**
|
|
153
167
|
* Create feedback
|
|
154
168
|
*
|