@webex/internal-plugin-llm 2.23.0 → 2.24.1
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/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/llm.js.map +1 -1
- package/package.json +4 -5
- package/src/{index.js → index.ts} +1 -1
- package/src/llm.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -8,8 +8,6 @@ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/defi
|
|
|
8
8
|
|
|
9
9
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
10
10
|
|
|
11
|
-
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
12
|
-
|
|
13
11
|
_Object$defineProperty(exports, "__esModule", {
|
|
14
12
|
value: true
|
|
15
13
|
});
|
|
@@ -17,15 +15,13 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
17
15
|
_Object$defineProperty(exports, "default", {
|
|
18
16
|
enumerable: true,
|
|
19
17
|
get: function get() {
|
|
20
|
-
return
|
|
18
|
+
return _llm.default;
|
|
21
19
|
}
|
|
22
20
|
});
|
|
23
21
|
|
|
24
22
|
var WebexCore = _interopRequireWildcard(require("@webex/webex-core"));
|
|
25
23
|
|
|
26
|
-
var _llm = _interopRequireWildcard(require("
|
|
27
|
-
|
|
28
|
-
var _llm2 = _interopRequireDefault(require("./llm"));
|
|
24
|
+
var _llm = _interopRequireWildcard(require("./llm"));
|
|
29
25
|
|
|
30
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
27
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WebexCore","registerInternalPlugin","LLMChannel","config"],"sources":["index.
|
|
1
|
+
{"version":3,"names":["WebexCore","registerInternalPlugin","LLMChannel","config"],"sources":["index.ts"],"sourcesContent":["import * as WebexCore from '@webex/webex-core';\nimport LLMChannel, {config} from './llm';\n\nWebexCore.registerInternalPlugin('llm', LLMChannel, {\n config,\n});\n\nexport {default} from './llm';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;AAEAA,SAAS,CAACC,sBAAV,CAAiC,KAAjC,EAAwCC,YAAxC,EAAoD;EAClDC,MAAM,EAANA;AADkD,CAApD"}
|
package/dist/llm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["config","llm","pingInterval","process","env","MERCURY_PING_INTERVAL","pongTimeout","MERCURY_PONG_TIMEOUT","backoffTimeMax","MERCURY_BACKOFF_TIME_MAX","backoffTimeReset","MERCURY_BACKOFF_TIME_RESET","forceCloseDelay","MERCURY_FORCE_CLOSE_DELAY","LLMChannel","args","LLM","llmSocketUrl","request","method","url","then","res","webSocketUrl","body","binding","locusUrl","datachannelUrl","register","undefined","connect","registered","disconnect","Mercury"],"sources":["llm.ts"],"sourcesContent":["import Mercury from '@webex/internal-plugin-mercury';\n\n\nimport {LLM} from './constants';\n// eslint-disable-next-line no-unused-vars\nimport {ILLMChannel} from './llm.types';\n\nexport const config = {\n llm: {\n /**\n * Milliseconds between pings sent up the socket\n * @type {number}\n */\n pingInterval: process.env.MERCURY_PING_INTERVAL || 15000,\n /**\n * Milliseconds to wait for a pong before declaring the connection dead\n * @type {number}\n */\n pongTimeout: process.env.MERCURY_PONG_TIMEOUT || 14000,\n /**\n * Maximum milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeMax: process.env.MERCURY_BACKOFF_TIME_MAX || 32000,\n /**\n * Initial milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeReset: process.env.MERCURY_BACKOFF_TIME_RESET || 1000,\n /**\n * Milliseconds to wait for a close frame before declaring the socket dead and\n * discarding it\n * @type {[type]}\n */\n forceCloseDelay: process.env.MERCURY_FORCE_CLOSE_DELAY || 2000,\n },\n};\n\n/**\n * LLMChannel to provide socket connections\n */\nexport default class LLMChannel extends (Mercury as any) implements ILLMChannel {\n namespace = LLM;\n\n /**\n * If the LLM plugin has been registered and listening\n * @instance\n * @type {Boolean}\n * @public\n */\n private registered:boolean = false;\n\n public webex: any;\n\n private webSocketUrl: string;\n\n private binding: string;\n\n private locusUrl: string;\n\n\n /**\n * Initializes the LLM Plugin\n * @constructor\n * @public\n */\n constructor(...args) {\n // eslint-disable-next-line constructor-super\n super(...args);\n\n\n this.registered = false;\n }\n\n /**\n * Register to the websocket\n * @param {string} llmSocketUrl\n * @returns {Promise<void>}\n */\n private register = (llmSocketUrl:string):Promise<void> => this.request({\n method: 'POST',\n url: llmSocketUrl,\n }).then((res: { body: { webSocketUrl: string; binding: string; }; }) => {\n this.webSocketUrl = res.body.webSocketUrl;\n this.binding = res.body.binding;\n });\n\n /**\n * Register and connect to the websocket\n * @param {string} locusUrl\n * @param {string} datachannelUrl\n * @returns {Promise<void>}\n */\n public registerAndConnect = (locusUrl:string, datachannelUrl:string):Promise<void> => this.register(datachannelUrl).then(() => {\n if(!locusUrl || !datachannelUrl) return undefined;\n this.locusUrl = locusUrl;\n this.connect(this.webSocketUrl).then(() => {\n this.registered = true;\n });\n });\n\n /**\n * Tells if LLM socket is connected\n * @returns {boolean} isRegistered\n */\n public isConnected = ():boolean => this.registered;\n\n /**\n * Tells if LLM socket is connected\n * @returns {bool} isRegistered\n */\n public getBinding = ():string => this.binding;\n\n /**\n * Get Locus URL for the connection\n * @returns {string} locus Url\n */\n public getLocusUrl = ():string => this.locusUrl;\n /**\n * Disconnects websocket connection\n * @returns Promise<void>\n */\n public disconnectLLM = () => this.disconnect()
|
|
1
|
+
{"version":3,"names":["config","llm","pingInterval","process","env","MERCURY_PING_INTERVAL","pongTimeout","MERCURY_PONG_TIMEOUT","backoffTimeMax","MERCURY_BACKOFF_TIME_MAX","backoffTimeReset","MERCURY_BACKOFF_TIME_RESET","forceCloseDelay","MERCURY_FORCE_CLOSE_DELAY","LLMChannel","args","LLM","llmSocketUrl","request","method","url","then","res","webSocketUrl","body","binding","locusUrl","datachannelUrl","register","undefined","connect","registered","disconnect","Mercury"],"sources":["llm.ts"],"sourcesContent":["import Mercury from '@webex/internal-plugin-mercury';\n\n\nimport {LLM} from './constants';\n// eslint-disable-next-line no-unused-vars\nimport {ILLMChannel} from './llm.types';\n\nexport const config = {\n llm: {\n /**\n * Milliseconds between pings sent up the socket\n * @type {number}\n */\n pingInterval: process.env.MERCURY_PING_INTERVAL || 15000,\n /**\n * Milliseconds to wait for a pong before declaring the connection dead\n * @type {number}\n */\n pongTimeout: process.env.MERCURY_PONG_TIMEOUT || 14000,\n /**\n * Maximum milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeMax: process.env.MERCURY_BACKOFF_TIME_MAX || 32000,\n /**\n * Initial milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeReset: process.env.MERCURY_BACKOFF_TIME_RESET || 1000,\n /**\n * Milliseconds to wait for a close frame before declaring the socket dead and\n * discarding it\n * @type {[type]}\n */\n forceCloseDelay: process.env.MERCURY_FORCE_CLOSE_DELAY || 2000,\n },\n};\n\n/**\n * LLMChannel to provide socket connections\n */\nexport default class LLMChannel extends (Mercury as any) implements ILLMChannel {\n namespace = LLM;\n\n /**\n * If the LLM plugin has been registered and listening\n * @instance\n * @type {Boolean}\n * @public\n */\n private registered:boolean = false;\n\n public webex: any;\n\n private webSocketUrl: string;\n\n private binding: string;\n\n private locusUrl: string;\n\n\n /**\n * Initializes the LLM Plugin\n * @constructor\n * @public\n */\n constructor(...args) {\n // eslint-disable-next-line constructor-super\n super(...args);\n\n\n this.registered = false;\n }\n\n /**\n * Register to the websocket\n * @param {string} llmSocketUrl\n * @returns {Promise<void>}\n */\n private register = (llmSocketUrl:string):Promise<void> => this.request({\n method: 'POST',\n url: llmSocketUrl,\n }).then((res: { body: { webSocketUrl: string; binding: string; }; }) => {\n this.webSocketUrl = res.body.webSocketUrl;\n this.binding = res.body.binding;\n });\n\n /**\n * Register and connect to the websocket\n * @param {string} locusUrl\n * @param {string} datachannelUrl\n * @returns {Promise<void>}\n */\n public registerAndConnect = (locusUrl:string, datachannelUrl:string):Promise<void> => this.register(datachannelUrl).then(() => {\n if(!locusUrl || !datachannelUrl) return undefined;\n this.locusUrl = locusUrl;\n this.connect(this.webSocketUrl).then(() => {\n this.registered = true;\n });\n });\n\n /**\n * Tells if LLM socket is connected\n * @returns {boolean} isRegistered\n */\n public isConnected = ():boolean => this.registered;\n\n /**\n * Tells if LLM socket is connected\n * @returns {bool} isRegistered\n */\n public getBinding = ():string => this.binding;\n\n /**\n * Get Locus URL for the connection\n * @returns {string} locus Url\n */\n public getLocusUrl = ():string => this.locusUrl;\n /**\n * Disconnects websocket connection\n * @returns Promise<void>\n */\n public disconnectLLM = () => this.disconnect();\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAGA;;;;;;AAIO,IAAMA,MAAM,GAAG;EACpBC,GAAG,EAAE;IACH;AACJ;AACA;AACA;IACIC,YAAY,EAAEC,OAAO,CAACC,GAAR,CAAYC,qBAAZ,IAAqC,KALhD;;IAMH;AACJ;AACA;AACA;IACIC,WAAW,EAAEH,OAAO,CAACC,GAAR,CAAYG,oBAAZ,IAAoC,KAV9C;;IAWH;AACJ;AACA;AACA;IACIC,cAAc,EAAEL,OAAO,CAACC,GAAR,CAAYK,wBAAZ,IAAwC,KAfrD;;IAgBH;AACJ;AACA;AACA;IACIC,gBAAgB,EAAEP,OAAO,CAACC,GAAR,CAAYO,0BAAZ,IAA0C,IApBzD;;IAqBH;AACJ;AACA;AACA;AACA;IACIC,eAAe,EAAET,OAAO,CAACC,GAAR,CAAYS,yBAAZ,IAAyC;EA1BvD;AADe,CAAf;AA+BP;AACA;AACA;;;;IACqBC,U;;;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@@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-plugin-llm",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
-
"devMain": "src/index.
|
|
7
|
+
"devMain": "src/index.ts",
|
|
8
8
|
"repository": "https://github.com/webex/webex-js-sdk/tree/master/packages/node_modules/@webex/internal-plugin-llm",
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=8"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@babel/runtime-corejs2": "^7.14.8",
|
|
14
|
-
"@webex/webex-core": "2.
|
|
15
|
-
"@webex/internal-plugin-
|
|
16
|
-
"@webex/internal-plugin-mercury": "2.23.0",
|
|
14
|
+
"@webex/webex-core": "2.24.1",
|
|
15
|
+
"@webex/internal-plugin-mercury": "2.24.1",
|
|
17
16
|
"envify": "^4.1.0"
|
|
18
17
|
},
|
|
19
18
|
"browserify": {
|
package/src/llm.ts
CHANGED
|
@@ -120,6 +120,6 @@ export default class LLMChannel extends (Mercury as any) implements ILLMChannel
|
|
|
120
120
|
* Disconnects websocket connection
|
|
121
121
|
* @returns Promise<void>
|
|
122
122
|
*/
|
|
123
|
-
public disconnectLLM = () => this.disconnect()
|
|
123
|
+
public disconnectLLM = () => this.disconnect();
|
|
124
124
|
}
|
|
125
125
|
|