@lautmaler/jovo-platform-aiflow 0.2.4 → 0.2.6
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/cjs/SipgateAiflowPlatform.js +8 -11
- package/dist/cjs/SipgateAiflowPlatform.js.map +1 -1
- package/dist/cjs/SipgateAiflowUser.js +1 -1
- package/dist/cjs/SipgateAiflowUser.js.map +1 -1
- package/dist/esm2015/SipgateAiflowPlatform.js +8 -11
- package/dist/esm2015/SipgateAiflowPlatform.js.map +1 -1
- package/dist/esm2015/SipgateAiflowUser.js +1 -1
- package/dist/esm2015/SipgateAiflowUser.js.map +1 -1
- package/dist/esm5/SipgateAiflowPlatform.js +8 -11
- package/dist/esm5/SipgateAiflowPlatform.js.map +1 -1
- package/dist/esm5/SipgateAiflowUser.js +1 -1
- package/dist/esm5/SipgateAiflowUser.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,6 @@ const SipgateAiflowDevice_1 = require("./SipgateAiflowDevice");
|
|
|
9
9
|
const SipgateAiflowRequest_1 = require("./SipgateAiflowRequest");
|
|
10
10
|
const SipgateAiflowRequestBuilder_1 = require("./SipgateAiflowRequestBuilder");
|
|
11
11
|
const SipgateAiflowUser_1 = require("./SipgateAiflowUser");
|
|
12
|
-
const aiflow_types_1 = require("./aiflow-types");
|
|
13
12
|
const server_1 = require("./server");
|
|
14
13
|
class SipgateAiflowPlatform extends framework_1.Platform {
|
|
15
14
|
constructor(config) {
|
|
@@ -25,21 +24,19 @@ class SipgateAiflowPlatform extends framework_1.Platform {
|
|
|
25
24
|
}
|
|
26
25
|
getDefaultConfig() {
|
|
27
26
|
return {
|
|
28
|
-
tts: {
|
|
29
|
-
provider: aiflow_types_1.TtsProvider.AZURE,
|
|
30
|
-
language: 'en-US',
|
|
31
|
-
voice: 'en-US-JennyNeural',
|
|
32
|
-
},
|
|
33
|
-
bargeIn: {
|
|
34
|
-
strategy: aiflow_types_1.BargeInStrategy.MINIMUM_CHARACTERS,
|
|
35
|
-
minimum_characters: 3,
|
|
36
|
-
},
|
|
37
27
|
userInputTimeoutSec: 4,
|
|
38
|
-
debug: false,
|
|
39
28
|
};
|
|
40
29
|
}
|
|
41
30
|
mount(parent) {
|
|
42
31
|
super.mount(parent);
|
|
32
|
+
// Clear history on new sessions to prevent old call data from polluting LLM context.
|
|
33
|
+
// Must be on parent's collection so it runs AFTER DbPlugin loads data at request.end.
|
|
34
|
+
parent.middlewareCollection.use('after.request.end', async (jovo) => {
|
|
35
|
+
var _a, _b, _c;
|
|
36
|
+
if (((_a = jovo.$platform) === null || _a === void 0 ? void 0 : _a.name) === this.name && ((_c = (_b = jovo.$request).isNewSession) === null || _c === void 0 ? void 0 : _c.call(_b))) {
|
|
37
|
+
jovo.$history.items = [];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
43
40
|
this.middlewareCollection.use('after.response.end', async (jovo) => {
|
|
44
41
|
if (jovo instanceof SipgateAiflowAsync_1.SipgateAiflowAsync) {
|
|
45
42
|
jovo.$response = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SipgateAiflowPlatform.js","sourceRoot":"","sources":["../../src/SipgateAiflowPlatform.ts"],"names":[],"mappings":";;;AAAA,mDAY6B;AAC7B,qCAAwE;AACxE,mDAAgD;AAChD,6DAA0D;AAC1D,+DAA4D;AAC5D,iEAA8D;AAC9D,+EAA4E;AAE5E,2DAAwD;
|
|
1
|
+
{"version":3,"file":"SipgateAiflowPlatform.js","sourceRoot":"","sources":["../../src/SipgateAiflowPlatform.ts"],"names":[],"mappings":";;;AAAA,mDAY6B;AAC7B,qCAAwE;AACxE,mDAAgD;AAChD,6DAA0D;AAC1D,+DAA4D;AAC5D,iEAA8D;AAC9D,+EAA4E;AAE5E,2DAAwD;AAKxD,qCAA2C;AA2B3C,MAAa,qBAAsB,SAAQ,oBAQ1C;IAWC,YAAY,MAA4B;QACtC,KAAK,CAAC,MAAM,CAAC,CAAC;QAXP,OAA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,EAAE,IAAI,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,IAAI,6BAAa,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,gBAAgB,CAAC,OAAyC;;QACxD,OAAO,OAAO,CAAC,GAAG,IAAI,iBAAiB,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,EAAE,KAAI,IAAI,CAAC;IACzE,CAAC;IAED,iBAAiB,CAAC,QAA2C;QAC3D,OAAO,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IACpD,CAAC;IAED,gBAAgB,CACd,QAA+B,EAC/B,IAAmB;QAEnB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAvED,sDAuEC"}
|
|
@@ -5,7 +5,7 @@ const framework_1 = require("@jovotech/framework");
|
|
|
5
5
|
class SipgateAiflowUser extends framework_1.JovoUser {
|
|
6
6
|
get id() {
|
|
7
7
|
var _a;
|
|
8
|
-
//
|
|
8
|
+
// from_phone_number is the caller's number — the correct user ID for cross-session persistence
|
|
9
9
|
const request = this.jovo.$request;
|
|
10
10
|
return ((_a = request.session) === null || _a === void 0 ? void 0 : _a.from_phone_number) || 'DefaultSipgateUser';
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SipgateAiflowUser.js","sourceRoot":"","sources":["../../src/SipgateAiflowUser.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAI/C,MAAa,iBAAkB,SAAQ,oBAAuB;IAC5D,IAAI,EAAE;;QACJ
|
|
1
|
+
{"version":3,"file":"SipgateAiflowUser.js","sourceRoot":"","sources":["../../src/SipgateAiflowUser.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAI/C,MAAa,iBAAkB,SAAQ,oBAAuB;IAC5D,IAAI,EAAE;;QACJ,+FAA+F;QAC/F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAgC,CAAC;QAC3D,OAAO,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,iBAAiB,KAAI,oBAAoB,CAAC;IACpE,CAAC;CACF;AAND,8CAMC"}
|
|
@@ -6,7 +6,6 @@ import { SipgateAiflowDevice } from './SipgateAiflowDevice';
|
|
|
6
6
|
import { SipgateAiflowRequest } from './SipgateAiflowRequest';
|
|
7
7
|
import { SipgateAiflowRequestBuilder } from './SipgateAiflowRequestBuilder';
|
|
8
8
|
import { SipgateAiflowUser } from './SipgateAiflowUser';
|
|
9
|
-
import { BargeInStrategy, TtsProvider, } from './aiflow-types';
|
|
10
9
|
import { WebSocketServer } from './server';
|
|
11
10
|
export class SipgateAiflowPlatform extends Platform {
|
|
12
11
|
constructor(config) {
|
|
@@ -22,21 +21,19 @@ export class SipgateAiflowPlatform extends Platform {
|
|
|
22
21
|
}
|
|
23
22
|
getDefaultConfig() {
|
|
24
23
|
return {
|
|
25
|
-
tts: {
|
|
26
|
-
provider: TtsProvider.AZURE,
|
|
27
|
-
language: 'en-US',
|
|
28
|
-
voice: 'en-US-JennyNeural',
|
|
29
|
-
},
|
|
30
|
-
bargeIn: {
|
|
31
|
-
strategy: BargeInStrategy.MINIMUM_CHARACTERS,
|
|
32
|
-
minimum_characters: 3,
|
|
33
|
-
},
|
|
34
24
|
userInputTimeoutSec: 4,
|
|
35
|
-
debug: false,
|
|
36
25
|
};
|
|
37
26
|
}
|
|
38
27
|
mount(parent) {
|
|
39
28
|
super.mount(parent);
|
|
29
|
+
// Clear history on new sessions to prevent old call data from polluting LLM context.
|
|
30
|
+
// Must be on parent's collection so it runs AFTER DbPlugin loads data at request.end.
|
|
31
|
+
parent.middlewareCollection.use('after.request.end', async (jovo) => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
if (((_a = jovo.$platform) === null || _a === void 0 ? void 0 : _a.name) === this.name && ((_c = (_b = jovo.$request).isNewSession) === null || _c === void 0 ? void 0 : _c.call(_b))) {
|
|
34
|
+
jovo.$history.items = [];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
40
37
|
this.middlewareCollection.use('after.response.end', async (jovo) => {
|
|
41
38
|
if (jovo instanceof SipgateAiflowAsync) {
|
|
42
39
|
jovo.$response = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SipgateAiflowPlatform.js","sourceRoot":"","sources":["../../src/SipgateAiflowPlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,GAIT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,4CAA4C,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SipgateAiflowPlatform.js","sourceRoot":"","sources":["../../src/SipgateAiflowPlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,GAIT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,4CAA4C,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,OAAO,EAAE,eAAe,EAAE,MA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CAAI,aAAa,CAAC,MAAM,YAAY,eAAe,CAAC;QAC5F,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,IAAI,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,gBAAgB,CAAC,OAAyC;;QACxD,OAAO,OAAO,CAAC,GAAG,IAAI,iBAAiB,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,EAAE,KAAI,IAAI,CAAC;IACzE,CAAC;IAED,iBAAiB,CAAC,QAA2C;QAC3D,OAAO,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IACpD,CAAC;IAED,gBAAgB,CACd,QAA+B,EAC/B,IAAmB;QAEnB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -2,7 +2,7 @@ import { JovoUser } from '@jovotech/framework';
|
|
|
2
2
|
export class SipgateAiflowUser extends JovoUser {
|
|
3
3
|
get id() {
|
|
4
4
|
var _a;
|
|
5
|
-
//
|
|
5
|
+
// from_phone_number is the caller's number — the correct user ID for cross-session persistence
|
|
6
6
|
const request = this.jovo.$request;
|
|
7
7
|
return ((_a = request.session) === null || _a === void 0 ? void 0 : _a.from_phone_number) || 'DefaultSipgateUser';
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SipgateAiflowUser.js","sourceRoot":"","sources":["../../src/SipgateAiflowUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,MAAM,OAAO,iBAAkB,SAAQ,QAAuB;IAC5D,IAAI,EAAE;;QACJ
|
|
1
|
+
{"version":3,"file":"SipgateAiflowUser.js","sourceRoot":"","sources":["../../src/SipgateAiflowUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,MAAM,OAAO,iBAAkB,SAAQ,QAAuB;IAC5D,IAAI,EAAE;;QACJ,+FAA+F;QAC/F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAgC,CAAC;QAC3D,OAAO,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,iBAAiB,KAAI,oBAAoB,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -6,7 +6,6 @@ import { SipgateAiflowDevice } from './SipgateAiflowDevice';
|
|
|
6
6
|
import { SipgateAiflowRequest } from './SipgateAiflowRequest';
|
|
7
7
|
import { SipgateAiflowRequestBuilder } from './SipgateAiflowRequestBuilder';
|
|
8
8
|
import { SipgateAiflowUser } from './SipgateAiflowUser';
|
|
9
|
-
import { BargeInStrategy, TtsProvider, } from './aiflow-types';
|
|
10
9
|
import { WebSocketServer } from './server';
|
|
11
10
|
export class SipgateAiflowPlatform extends Platform {
|
|
12
11
|
constructor(config) {
|
|
@@ -22,21 +21,19 @@ export class SipgateAiflowPlatform extends Platform {
|
|
|
22
21
|
}
|
|
23
22
|
getDefaultConfig() {
|
|
24
23
|
return {
|
|
25
|
-
tts: {
|
|
26
|
-
provider: TtsProvider.AZURE,
|
|
27
|
-
language: 'en-US',
|
|
28
|
-
voice: 'en-US-JennyNeural',
|
|
29
|
-
},
|
|
30
|
-
bargeIn: {
|
|
31
|
-
strategy: BargeInStrategy.MINIMUM_CHARACTERS,
|
|
32
|
-
minimum_characters: 3,
|
|
33
|
-
},
|
|
34
24
|
userInputTimeoutSec: 4,
|
|
35
|
-
debug: false,
|
|
36
25
|
};
|
|
37
26
|
}
|
|
38
27
|
mount(parent) {
|
|
39
28
|
super.mount(parent);
|
|
29
|
+
// Clear history on new sessions to prevent old call data from polluting LLM context.
|
|
30
|
+
// Must be on parent's collection so it runs AFTER DbPlugin loads data at request.end.
|
|
31
|
+
parent.middlewareCollection.use('after.request.end', async (jovo) => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
if (((_a = jovo.$platform) === null || _a === void 0 ? void 0 : _a.name) === this.name && ((_c = (_b = jovo.$request).isNewSession) === null || _c === void 0 ? void 0 : _c.call(_b))) {
|
|
34
|
+
jovo.$history.items = [];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
40
37
|
this.middlewareCollection.use('after.response.end', async (jovo) => {
|
|
41
38
|
if (jovo instanceof SipgateAiflowAsync) {
|
|
42
39
|
jovo.$response = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SipgateAiflowPlatform.js","sourceRoot":"","sources":["../../src/SipgateAiflowPlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,GAIT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,4CAA4C,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SipgateAiflowPlatform.js","sourceRoot":"","sources":["../../src/SipgateAiflowPlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,GAIT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,4CAA4C,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAo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S,GAAG,SAAS,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB,CAChB,GAAQ,EACR,aAA4B;;QAE5B,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,MAAM,CAAC,WAAW,mCAAI,aAAa,CAAC,MAAM,YAAY,eAAe,CAAC;QAC5F,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,IAAI,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,gBAAgB,CAAC,OAAyC;;QACxD,OAAO,OAAO,CAAC,GAAG,IAAI,iBAAiB,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,EAAE,KAAI,IAAI,CAAC;IACzE,CAAC;IAED,iBAAiB,CAAC,QAA2C;QAC3D,OAAO,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IACpD,CAAC;IAED,gBAAgB,CACd,QAA+B,EAC/B,IAAmB;QAEnB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -2,7 +2,7 @@ import { JovoUser } from '@jovotech/framework';
|
|
|
2
2
|
export class SipgateAiflowUser extends JovoUser {
|
|
3
3
|
get id() {
|
|
4
4
|
var _a;
|
|
5
|
-
//
|
|
5
|
+
// from_phone_number is the caller's number — the correct user ID for cross-session persistence
|
|
6
6
|
const request = this.jovo.$request;
|
|
7
7
|
return ((_a = request.session) === null || _a === void 0 ? void 0 : _a.from_phone_number) || 'DefaultSipgateUser';
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SipgateAiflowUser.js","sourceRoot":"","sources":["../../src/SipgateAiflowUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,MAAM,OAAO,iBAAkB,SAAQ,QAAuB;IAC5D,IAAI,EAAE;;QACJ
|
|
1
|
+
{"version":3,"file":"SipgateAiflowUser.js","sourceRoot":"","sources":["../../src/SipgateAiflowUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,MAAM,OAAO,iBAAkB,SAAQ,QAAuB;IAC5D,IAAI,EAAE;;QACJ,+FAA+F;QAC/F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAgC,CAAC;QAC3D,OAAO,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,iBAAiB,KAAI,oBAAoB,CAAC;IACpE,CAAC;CACF"}
|