@picoflow/core 1.0.17 → 1.0.19
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/README.md +1 -1
- package/clients/http-client.js +1 -1
- package/clients/self-client.js +1 -1
- package/configs/core-config.d.ts +1 -0
- package/configs/core-config.js +1 -1
- package/decorators/stop-tool.js +1 -1
- package/flow/content-type.js +1 -1
- package/flow/end-step.d.ts +1 -1
- package/flow/end-step.js +1 -1
- package/flow/flow-creator.js +1 -1
- package/flow/flow-types.d.ts +107 -48
- package/flow/flow-types.js +1 -1
- package/flow/flow.d.ts +14 -4
- package/flow/flow.js +1 -1
- package/flow/llm-runner.d.ts +3 -1
- package/flow/llm-runner.js +1 -1
- package/flow/logic-runner.d.ts +2 -1
- package/flow/logic-runner.js +1 -1
- package/flow/logic-step.js +1 -1
- package/flow/memory.js +1 -1
- package/flow/step.d.ts +19 -8
- package/flow/step.js +1 -1
- package/index.d.ts +38 -33
- package/index.js +5 -2
- package/models/default-models.d.ts +1 -1
- package/models/default-models.js +1 -1
- package/models/model-registry.d.ts +22 -2
- package/models/model-registry.js +1 -1
- package/package.json +15 -13
- package/prompt/flow-prompt.js +1 -1
- package/prompt/prompt-util.js +1 -1
- package/services/flow-engine.js +1 -1
- package/session/cosmo-session.js +1 -1
- package/session/file-session.js +1 -1
- package/session/flow-session.js +1 -1
- package/session/mongo-session.js +1 -1
- package/session/session-adaptor.js +1 -1
- package/session/session-logger.js +1 -1
- package/session/sqlite-session.js +1 -1
- package/utils/constants.js +1 -1
- package/utils/environ.js +1 -1
- package/utils/errors.js +1 -1
- package/utils/license-util.js +1 -1
- package/utils/llm-file.d.ts +2 -0
- package/utils/llm-file.js +1 -1
- package/utils/logic.js +1 -1
- package/utils/message-util.d.ts +3 -1
- package/utils/message-util.js +1 -1
- package/utils/retry.js +1 -1
- package/utils/string-util.js +1 -1
- package/utils/tool-util.js +1 -1
- package/utils/verify-license.js +1 -1
package/flow/step.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a13_0x3f00(_0x247d3e,_0x46e084){const _0x42655e=a13_0x3019();return a13_0x3f00=function(_0x215c5c,_0x6280e7){_0x215c5c=_0x215c5c-0x1d5;let _0x301995=_0x42655e[_0x215c5c];return _0x301995;},a13_0x3f00(_0x247d3e,_0x46e084);}const a13_0x46e361=a13_0x3f00;(function(_0x49f28e,_0x390ffd){const _0x4612c5=a13_0x3f00,_0x463800=_0x49f28e();while(!![]){try{const _0x24042a=parseInt(_0x4612c5(0x1fc))/0x1*(-parseInt(_0x4612c5(0x248))/0x2)+-parseInt(_0x4612c5(0x1f5))/0x3+-parseInt(_0x4612c5(0x224))/0x4*(parseInt(_0x4612c5(0x22b))/0x5)+-parseInt(_0x4612c5(0x1fb))/0x6+-parseInt(_0x4612c5(0x220))/0x7+parseInt(_0x4612c5(0x24f))/0x8*(-parseInt(_0x4612c5(0x232))/0x9)+parseInt(_0x4612c5(0x26d))/0xa;if(_0x24042a===_0x390ffd)break;else _0x463800['push'](_0x463800['shift']());}catch(_0x366158){_0x463800['push'](_0x463800['shift']());}}}(a13_0x3019,0x36e4a));const a13_0x6280e7=(function(){const _0x5d5ee1={'JazBO':function(_0x3318f9,_0x5a7e96){return _0x3318f9!==_0x5a7e96;},'RUWTi':'BtFOS','lLdNJ':'VQCFx'};let _0x55bd2b=!![];return function(_0x29328c,_0x1906a7){const _0x127354=a13_0x3f00;if(_0x5d5ee1[_0x127354(0x25f)]===_0x5d5ee1[_0x127354(0x25f)]){const _0x305d26=_0x55bd2b?function(){const _0x2ed85b=_0x127354;if(_0x5d5ee1[_0x2ed85b(0x25b)](_0x5d5ee1['RUWTi'],_0x5d5ee1[_0x2ed85b(0x1e4)]))this[_0x2ed85b(0x23b)]({'_stopTool':{[_0x3b9ba0]:![]}});else{if(_0x1906a7){const _0x27f7b1=_0x1906a7['apply'](_0x29328c,arguments);return _0x1906a7=null,_0x27f7b1;}}}:function(){};return _0x55bd2b=![],_0x305d26;}else return this[_0x127354(0x285)];};}()),a13_0x215c5c=a13_0x6280e7(this,function(){const _0x554725=a13_0x3f00,_0x2dc4db={'JbAwY':_0x554725(0x1e7)};return a13_0x215c5c[_0x554725(0x267)]()[_0x554725(0x231)](_0x2dc4db['JbAwY'])[_0x554725(0x267)]()[_0x554725(0x238)](a13_0x215c5c)[_0x554725(0x231)](_0x2dc4db[_0x554725(0x264)]);});a13_0x215c5c();'use strict';var __importDefault=this&&this[a13_0x46e361(0x1d6)]||function(_0x1f8b1a){const _0x404c43=a13_0x46e361;return _0x1f8b1a&&_0x1f8b1a[_0x404c43(0x23a)]?_0x1f8b1a:{'default':_0x1f8b1a};};Object[a13_0x46e361(0x240)](exports,'__esModule',{'value':!![]}),exports['Step']=void 0x0;const lodash_1=require(a13_0x46e361(0x23f)),moment_1=__importDefault(require('moment')),messages_1=require(a13_0x46e361(0x1de)),node_async_hooks_1=require('node:async_hooks'),llm_runner_1=require(a13_0x46e361(0x20d)),message_util_1=require('../utils/message-util'),content_type_1=require(a13_0x46e361(0x20e)),llm_file_js_1=require(a13_0x46e361(0x1f3)),constants_1=require(a13_0x46e361(0x20f));function a13_0x3019(){const _0x3e2993=['VOoxG','createDoc','genMessageId','get','map','NvZyj','ZQeVd','SystemMessage','VlNUN','onExit','vCJNP','nrQAj','startsWith','YCukj','getMemory','callStepTool','1071182lYPIpC','wxADw','VmjQo','jmOSN','80740ephBdQ','BFJWy','Start','XdpaD','OPENAI','active','AsyncLocalStorage','75qRiFRp','runStatus','SHTFL','FapVF','activeStepScope','memorySpace','search','3571209dfNbjs','trim','getSessionDoc','string','onCrossing','zxOjd','constructor','UNSUPPORTED','__esModule','saveState','xzFke','lJsKc','YDbzU','lodash','defineProperty','iyUPF','TRANSIENT','mVcAf','name','JQqTB','LLMType','FKwQe','18KHPquN','sessionCompleted','hYoju','keys','push','replace','isLogic','8UXPvRt','invokeTool','random10Digits','BkJEA','getModel','useMemory','pXaZm','length','merge','GEMINI','ylqTf','FZpzp','JazBO','PIYNw','gpt','utc','lLdNJ','toDate','flow','run','DYQIe','JbAwY','WgyjL','zJOMT','toString','yATCv','getStore','VYoug','runStep','getStateAs','17760710NXhUsq','activate','claude','ovzgF','NtpYF','tiMwD','modelParamsName','qIZaL','XmsQq','**Important:**\x20After\x20collecting\x20data,\x20call\x20tool\x20','HumanMessageEx','getLLMType','send','contentType','getTool','getModelParams','getPrompt','amendTool','_stopTool','HttpContentType','zXinR','SWlqT','OoLjd','yrzTN','ctType','step','yZABK','__importDefault','YYYY-MM-DDTHH:mm:ss.SSS[Z]','modelParams','_prompt','getStep','writeDoc','EZdHl','removeState','@langchain/core/messages','temperature','floor','getContext','structOutputSchema','ShBOw','RUWTi','isEnd','fIgHf','(((.+)+)+)+$','eraseMemory','withActiveStepScope','getLastMessage','isActive','obtainTools','useModelParams','setStopTool','modelName','kjsTw','VGgiW','ksKKj','../utils/llm-file.js','smfkG','437349NUIWDY','ANTHROPIC','VAJzu','gemini','onResponse','default','1514166vyloCr','33387CafbbZ','xURrn','state','KxQAE','TNIiM','XZluf','\x20to\x20ensure\x20the\x20tool\x20is\x20triggered.','readDoc','function','defineTool','getStopTool','completed','omit','random','getState','onEnter','getModelParamsModelName','./llm-runner','./content-type','../utils/constants'];a13_0x3019=function(){return _0x3e2993;};return a13_0x3019();}class Step{constructor(_0xa831f6,_0x1fd147,_0x13ab7a=![]){const _0x4c0bd1=a13_0x46e361;this['isActive']=![],this['state']={},this[_0x4c0bd1(0x1ef)]=undefined,this['modelParams']={},this[_0x4c0bd1(0x285)]=content_type_1[_0x4c0bd1(0x280)]['Plain'],this[_0x4c0bd1(0x244)]=_0xa831f6[_0x4c0bd1(0x244)],this[_0x4c0bd1(0x261)]=_0x1fd147,this[_0x4c0bd1(0x1eb)]=_0x13ab7a,this[_0x4c0bd1(0x230)]=_0xa831f6[_0x4c0bd1(0x244)];}['getName'](){const _0x9817c6=a13_0x46e361;return this[_0x9817c6(0x244)];}[a13_0x46e361(0x20b)](){}[a13_0x46e361(0x219)](){}async[a13_0x46e361(0x1f9)](_0x33deac){return _0x33deac;}get[a13_0x46e361(0x229)](){const _0x56f573=a13_0x46e361,_0x56c7a4={'yATCv':function(_0x44cf8d,_0x46c2d4){return _0x44cf8d===_0x46c2d4;}},_0x1be493=Step[_0x56f573(0x22f)][_0x56f573(0x269)]();if(_0x1be493)return _0x56c7a4[_0x56f573(0x268)](_0x1be493[_0x56f573(0x286)],this);return this[_0x56f573(0x1eb)];}[a13_0x46e361(0x24e)](){return![];}set['active'](_0x30312b){const _0x17c952=a13_0x46e361,_0x1f8e09={'NvZyj':'gemini','DYQIe':_0x17c952(0x25d),'zxOjd':_0x17c952(0x26f),'FapVF':function(_0x4583b7,_0x753976){return _0x4583b7!==_0x753976;},'VAJzu':function(_0x2d5d85,_0xd0352d){return _0x2d5d85===_0xd0352d;},'tiMwD':function(_0xafb71c,_0x35639a){return _0xafb71c===_0x35639a;},'iyUPF':_0x17c952(0x1dc),'SWlqT':'LGJJV','KxQAE':function(_0x4e886f,_0x5b2edb){return _0x4e886f===_0x5b2edb;},'NtpYF':'svZJp','tkAyW':'bugJh'},_0x25810e=Step[_0x17c952(0x22f)][_0x17c952(0x269)]();if(_0x25810e){if(_0x30312b){if(_0x1f8e09[_0x17c952(0x22e)](_0x25810e[_0x17c952(0x286)],this)){if(_0x1f8e09[_0x17c952(0x22e)]('PctaT',_0x17c952(0x24a)))_0x25810e[_0x17c952(0x286)]&&(_0x25810e[_0x17c952(0x286)][_0x17c952(0x229)]=![]),this[_0x17c952(0x20b)](),_0x25810e[_0x17c952(0x286)]=this;else{this[_0x17c952(0x1eb)]=_0x4da337[_0x17c952(0x1eb)],this['state']=_0x49a18f[_0x17c952(0x1fe)];_0x2ee6dc['modelName']&&(this[_0x17c952(0x1ef)]=_0x130e33[_0x17c952(0x1ef)]);this[_0x17c952(0x273)]=_0xc8d1bf[_0x17c952(0x273)],this[_0x17c952(0x1d8)]=(0x0,_0x52e254[_0x17c952(0x257)])({},_0x34f46e['modelParams']??{});const _0x42d034=_0x1be480[_0x17c952(0x1df)];_0x42d034!==_0x544154&&this['modelParams'][_0x17c952(0x1df)]===_0x25996f&&(this[_0x17c952(0x1d8)][_0x17c952(0x1df)]=_0x42d034);}}}else{if(_0x1f8e09[_0x17c952(0x1f7)](_0x25810e['step'],this)){if(_0x1f8e09[_0x17c952(0x272)](_0x1f8e09[_0x17c952(0x241)],_0x1f8e09[_0x17c952(0x282)])){const _0x435fdf=this[_0x17c952(0x1ef)]||this['flow']['getModel'](),_0x45fd29=_0x435fdf[_0x17c952(0x233)]()['toLowerCase']();if(_0x45fd29[_0x17c952(0x21c)](_0x1f8e09[_0x17c952(0x215)]))return _0x570f72[_0x17c952(0x246)]['GEMINI'];if(_0x45fd29['startsWith'](_0x1f8e09[_0x17c952(0x263)]))return _0x17fc51[_0x17c952(0x246)][_0x17c952(0x228)];if(_0x45fd29[_0x17c952(0x21c)](_0x1f8e09[_0x17c952(0x237)]))return _0x5ec9be['LLMType'][_0x17c952(0x1f6)];return _0x492735[_0x17c952(0x246)][_0x17c952(0x239)];}else this['onExit'](),_0x25810e['step']=null;}}return;}!this[_0x17c952(0x1eb)]&&_0x30312b&&this[_0x17c952(0x20b)]();if(this['isActive']&&!_0x30312b){if(_0x1f8e09[_0x17c952(0x1ff)](_0x1f8e09[_0x17c952(0x271)],_0x1f8e09['tkAyW'])){if(_0x423bca){const _0x3c38ce=_0x58f364[_0x17c952(0x24b)](_0x58420c)[0x0];if(_0x5f1713){const _0x95aec3=(0x0,_0x2b2ef2[_0x17c952(0x208)])((0x0,_0x2a0cd2[_0x17c952(0x213)])(this[_0x17c952(0x1fe)],_0x4e704d['K'][_0x17c952(0x242)],{}),_0x3c38ce);this[_0x17c952(0x1fe)]=(0x0,_0x50db03['merge'])({},this[_0x17c952(0x1fe)],{[_0x173bbd['K'][_0x17c952(0x242)]]:(0x0,_0x35a88e[_0x17c952(0x257)])({},_0x95aec3,_0x15537f)});}else this[_0x17c952(0x1fe)]=(0x0,_0x2e3f15[_0x17c952(0x208)])(this[_0x17c952(0x1fe)],_0x3c38ce),this['state']=(0x0,_0xcb81a3['merge'])({},this[_0x17c952(0x1fe)],_0x4c21b4);this[_0x17c952(0x1fe)]=(0x0,_0x42c621['merge'])(this[_0x17c952(0x1fe)],{'_saveOn':(0x0,_0x2338a6[_0x17c952(0x1fa)])()['toDate']()});}}else this['onExit']();}this[_0x17c952(0x1eb)]=_0x30312b;}static async[a13_0x46e361(0x1e9)](_0x116691){const _0x37443f=a13_0x46e361;return await Step[_0x37443f(0x22f)][_0x37443f(0x262)]({'step':null},_0x116691);}get[a13_0x46e361(0x27a)](){const _0x8161ed=a13_0x46e361;return this[_0x8161ed(0x285)];}set['contentType'](_0x3b7df3){const _0x423978=a13_0x46e361;this[_0x423978(0x285)]=_0x3b7df3;}[a13_0x46e361(0x20a)](_0xe02ae7,_0x571037=![]){const _0x33e1b4=a13_0x46e361,_0x402453={'jEuSd':function(_0x114b61,_0x3c593c){return _0x114b61!==_0x3c593c;},'PIYNw':'YHyQr'},_0x35e7ee=_0x571037?(0x0,lodash_1[_0x33e1b4(0x213)])(this[_0x33e1b4(0x1fe)],constants_1['K']['TRANSIENT'],{}):this[_0x33e1b4(0x1fe)];if(_0xe02ae7){if(_0x402453['jEuSd']('JDmdN',_0x402453[_0x33e1b4(0x25c)]))return(0x0,lodash_1[_0x33e1b4(0x213)])(_0x35e7ee,_0xe02ae7);else{const _0x3af522=_0x25019c?(0x0,_0x513459[_0x33e1b4(0x213)])(this[_0x33e1b4(0x1fe)],_0x4ae1ee['K'][_0x33e1b4(0x242)],{}):this[_0x33e1b4(0x1fe)];if(_0x3c16bd)return(0x0,_0x24395c[_0x33e1b4(0x213)])(_0x3af522,_0x5bd41f);return _0x3af522;}}return _0x35e7ee;}[a13_0x46e361(0x26c)](_0x17ec3e,_0x5b8400=![]){const _0x2b2bda=a13_0x46e361,_0x4a5e96={'XqxVD':function(_0x2aed08,_0x362854){return _0x2aed08===_0x362854;},'XmsQq':_0x2b2bda(0x259)},_0x300c77=_0x5b8400?(0x0,lodash_1['get'])(this[_0x2b2bda(0x1fe)],constants_1['K']['TRANSIENT'],{}):this[_0x2b2bda(0x1fe)];if(_0x17ec3e)return _0x4a5e96['XqxVD'](_0x4a5e96[_0x2b2bda(0x275)],_0x4a5e96[_0x2b2bda(0x275)])?(0x0,lodash_1[_0x2b2bda(0x213)])(_0x300c77,_0x17ec3e):(0x0,_0x514525['get'])(_0xbf2f75,_0x5244bb);return _0x300c77;}[a13_0x46e361(0x23b)](_0x42fa82,_0x14ec55=![]){const _0x56883d=a13_0x46e361,_0x123ee2={'yrzTN':function(_0x406661,_0x54829c){return _0x406661===_0x54829c;},'ZQeVd':'TRlIw'};if(_0x42fa82){const _0x33a88b=Object[_0x56883d(0x24b)](_0x42fa82)[0x0];if(_0x14ec55){const _0x2eb82b=(0x0,lodash_1[_0x56883d(0x208)])((0x0,lodash_1[_0x56883d(0x213)])(this['state'],constants_1['K'][_0x56883d(0x242)],{}),_0x33a88b);this[_0x56883d(0x1fe)]=(0x0,lodash_1[_0x56883d(0x257)])({},this[_0x56883d(0x1fe)],{[constants_1['K'][_0x56883d(0x242)]]:(0x0,lodash_1['merge'])({},_0x2eb82b,_0x42fa82)});}else _0x123ee2[_0x56883d(0x284)]('qcBKA',_0x123ee2[_0x56883d(0x216)])?this[_0x56883d(0x1ef)]=_0x493b6[_0x56883d(0x1ef)]:(this[_0x56883d(0x1fe)]=(0x0,lodash_1[_0x56883d(0x208)])(this[_0x56883d(0x1fe)],_0x33a88b),this[_0x56883d(0x1fe)]=(0x0,lodash_1[_0x56883d(0x257)])({},this[_0x56883d(0x1fe)],_0x42fa82));this[_0x56883d(0x1fe)]=(0x0,lodash_1[_0x56883d(0x257)])(this['state'],{'_saveOn':(0x0,moment_1[_0x56883d(0x1fa)])()[_0x56883d(0x260)]()});}}[a13_0x46e361(0x249)](){const _0x2b34f5=a13_0x46e361,_0x59aa65={'OoLjd':_0x2b34f5(0x207)},_0x45af5e=this[_0x2b34f5(0x261)][_0x2b34f5(0x234)]();_0x45af5e[_0x2b34f5(0x22c)]=_0x59aa65[_0x2b34f5(0x283)];}[a13_0x46e361(0x1e1)](_0x19ab85){const _0x558479=a13_0x46e361;return this[_0x558479(0x261)]['getContext'](_0x19ab85);}[a13_0x46e361(0x1dd)](_0x5f6ca1){const _0x54eb0e=a13_0x46e361;this[_0x54eb0e(0x1fe)]=(0x0,lodash_1[_0x54eb0e(0x208)])(this['state'],_0x5f6ca1);}[a13_0x46e361(0x27d)](){const _0x281368=a13_0x46e361,_0x747894={'VOoxG':_0x281368(0x1d9)},_0x2441c7=this[_0x281368(0x20a)](_0x747894[_0x281368(0x210)]);return _0x2441c7?_0x2441c7['toString']():null;}[a13_0x46e361(0x236)](_0x549ae0,_0x3195f4){const _0x316756=a13_0x46e361,_0x1ef1ff={'lJsKc':function(_0x542bad,_0x3e15ed){return _0x542bad===_0x3e15ed;},'jXVkd':function(_0x2ef83a,_0x389d7f){return _0x2ef83a===_0x389d7f;},'FIIZq':'skAkk','XdpaD':function(_0x162c03,_0x23c51e){return _0x162c03!==_0x23c51e;},'xURrn':'dowtg','JQqTB':'pqKDa','fIgHf':_0x316756(0x226)};if(!_0x549ae0){if(_0x1ef1ff['jXVkd'](_0x1ef1ff['FIIZq'],_0x316756(0x1e3))){const _0x3333e1=this[_0x316756(0x21e)]();_0x1ef1ff[_0x316756(0x23d)](_0x3333e1[_0x316756(0x256)],0x1)&&(_0x232cc9=new _0x2be652[(_0x316756(0x277))](this,_0x316756(0x226)));}else{const _0x416924=this[_0x316756(0x21e)]();if(_0x416924['length']===0x1){if(_0x1ef1ff[_0x316756(0x227)](_0x1ef1ff[_0x316756(0x1fd)],_0x1ef1ff[_0x316756(0x245)]))_0x549ae0=new message_util_1[(_0x316756(0x277))](this,_0x1ef1ff[_0x316756(0x1e6)]);else return(0x0,_0x4be55d[_0x316756(0x213)])(_0x56bab4,_0xa95d9e);}}}return _0x549ae0;}[a13_0x46e361(0x21e)](){const _0xa386d9=a13_0x46e361,_0x3785c5={'VmjQo':function(_0xc24f02,_0x18e632){return _0xc24f02===_0x18e632;}},_0x296184=this[_0xa386d9(0x261)][_0xa386d9(0x21e)](this[_0xa386d9(0x230)]);return _0x3785c5[_0xa386d9(0x222)](_0x296184[_0xa386d9(0x256)],0x0)&&_0x296184[_0xa386d9(0x24c)](new messages_1[(_0xa386d9(0x217))]({'content':'','id':this[_0xa386d9(0x212)]()})),_0x296184;}[a13_0x46e361(0x1ea)](){const _0x4e74f3=a13_0x46e361,_0x2d4c56={'jmOSN':function(_0x35e362,_0x5531d9){return _0x35e362===_0x5531d9;},'vCJNP':function(_0x1328b1,_0x476868){return _0x1328b1>_0x476868;},'XZluf':'KSDwd'},_0x39b692=this[_0x4e74f3(0x261)][_0x4e74f3(0x21e)](this[_0x4e74f3(0x230)]);if(_0x2d4c56[_0x4e74f3(0x21a)](_0x39b692[_0x4e74f3(0x256)],0x0)){if(_0x2d4c56[_0x4e74f3(0x201)]===_0x2d4c56[_0x4e74f3(0x201)])return _0x39b692[_0x39b692[_0x4e74f3(0x256)]-0x1];else for(const _0x4258bc of _0x289baf){_0x2d4c56[_0x4e74f3(0x223)](_0x4258bc[_0x4e74f3(0x244)],this[_0x4e74f3(0x244)])&&(_0x4258bc[_0x4e74f3(0x1eb)]=this['isActive'],_0x4258bc[_0x4e74f3(0x1fe)]=(0x0,_0x32634d['omit'])(this[_0x4e74f3(0x1fe)],_0x376791['K'][_0x4e74f3(0x242)]),!this[_0x4e74f3(0x24e)]()&&(_0x4258bc['modelName']=this[_0x4e74f3(0x1ef)],_0x4258bc[_0x4e74f3(0x273)]=this[_0x4e74f3(0x273)],_0x4258bc['modelParams']=this['modelParams']));}}return null;}[a13_0x46e361(0x254)](_0xaebf8f){const _0x396033=a13_0x46e361;return this[_0x396033(0x230)]=_0xaebf8f,this;}['useModel'](_0x2d6003,_0x28fa7a){const _0x44fe21=a13_0x46e361;return this['modelName']=_0x2d6003,this['modelParamsName']=_0x2d6003,_0x28fa7a&&this[_0x44fe21(0x1ed)](_0x28fa7a),this;}['useModelParams'](_0x1bb202,_0x15d7f3){const _0x46b048=a13_0x46e361,_0x14c11f={'ovzgF':_0x46b048(0x235),'wxADw':function(_0x24698d,_0x3ce6b5){return _0x24698d??_0x3ce6b5;}};if(typeof _0x1bb202===_0x14c11f[_0x46b048(0x270)])return this[_0x46b048(0x273)]=_0x1bb202,this[_0x46b048(0x1d8)]=(0x0,lodash_1['merge'])({},this[_0x46b048(0x1d8)],_0x14c11f[_0x46b048(0x221)](_0x15d7f3,{})),this;return this[_0x46b048(0x273)]=this[_0x46b048(0x1ef)]??this[_0x46b048(0x261)][_0x46b048(0x253)](),this[_0x46b048(0x1d8)]=(0x0,lodash_1[_0x46b048(0x257)])({},this[_0x46b048(0x1d8)],_0x1bb202),this;}['getModel'](){const _0x5e87cb=a13_0x46e361;return this[_0x5e87cb(0x1ef)];}[a13_0x46e361(0x27c)](){const _0x1ac99e=a13_0x46e361;return this[_0x1ac99e(0x1d8)];}[a13_0x46e361(0x20c)](){const _0x525c81=a13_0x46e361;return this[_0x525c81(0x273)];}[a13_0x46e361(0x205)](){return null;}['isToolAvailable'](_0x2c58be){const _0x5eacbb=a13_0x46e361,_0x19872f={'pXaZm':function(_0xbe06b9,_0x36f1c2){return _0xbe06b9===_0x36f1c2;}};for(const _0x1ea2e3 of this[_0x5eacbb(0x27b)]()){if(_0x19872f[_0x5eacbb(0x255)](_0x1ea2e3,_0x2c58be))return!![];}return![];}[a13_0x46e361(0x27b)](){return[];}['getStopTool'](){return[];}[a13_0x46e361(0x1ec)](){const _0x29c060=a13_0x46e361,_0x3bad4c=this[_0x29c060(0x27b)]();return _0x3bad4c[_0x29c060(0x214)](_0x38595d=>{const _0x11a3d9=_0x29c060;return this['flow'][_0x11a3d9(0x27b)](_0x38595d);});}[a13_0x46e361(0x27e)](_0x2f3f00){const _0x539a98=a13_0x46e361,_0x5091bc={'smfkG':_0x539a98(0x27f)},_0x52e4e0=this[_0x539a98(0x206)]();for(const _0x1fe7bd of _0x52e4e0){const _0x2810c6=this[_0x539a98(0x20a)](_0x5091bc[_0x539a98(0x1f4)])[_0x1fe7bd],_0x4b05bb=_0x539a98(0x276)+_0x1fe7bd+_0x539a98(0x202),_0xd7cce7=_0x2810c6?_0x4b05bb:'';_0x2f3f00=_0x2f3f00[_0x539a98(0x24d)]('{{'+_0x1fe7bd+'}}',_0xd7cce7);}return _0x2f3f00;}async[a13_0x46e361(0x250)](_0x510e9d){return null;}async[a13_0x46e361(0x262)](_0x45512d){const _0x2e9ee2=a13_0x46e361,_0x2159fb={'qIZaL':function(_0x3fff96,_0x5053a9){return _0x3fff96-_0x5053a9;},'BJgpv':function(_0x25f739,_0x4a8129){return _0x25f739!==_0x4a8129;},'WgyjL':_0x2e9ee2(0x200),'xzFke':function(_0x8dd02c,_0x1ec480){return _0x8dd02c!==_0x1ec480;},'KUGTg':_0x2e9ee2(0x21d),'SHTFL':_0x2e9ee2(0x1f1)};let _0x21388a;if(!_0x45512d)_0x2159fb['BJgpv'](_0x2e9ee2(0x200),_0x2159fb[_0x2e9ee2(0x265)])?_0x1d7e9a=new _0x2123b0[(_0x2e9ee2(0x277))](this,_0x2e9ee2(0x226)):_0x21388a=this[_0x2e9ee2(0x236)](null);else{if(_0x2159fb[_0x2e9ee2(0x23c)](_0x2159fb['KUGTg'],_0x2159fb[_0x2e9ee2(0x22d)]))_0x21388a=new message_util_1[(_0x2e9ee2(0x277))](this,_0x45512d);else return _0x21fcab[_0x2159fb[_0x2e9ee2(0x274)](_0x28be20[_0x2e9ee2(0x256)],0x1)];}const _0x2d56c2=this[_0x2e9ee2(0x206)]();for(const _0x56d3b7 of _0x2d56c2){this[_0x2e9ee2(0x23b)]({'_stopTool':{[_0x56d3b7]:!![]}});}const _0x2b5f6=await llm_runner_1['LlmRunner'][_0x2e9ee2(0x279)](this['flow'],_0x21388a);return _0x2b5f6;}async[a13_0x46e361(0x26b)](_0x1eca64,_0x54ec3d){const _0x58a3f2=a13_0x46e361;return await Step[_0x58a3f2(0x1e9)](async()=>{const _0x5e9010=_0x58a3f2,_0x500751=await this[_0x5e9010(0x261)][_0x5e9010(0x26e)](_0x1eca64);return await _0x500751[_0x5e9010(0x262)](_0x54ec3d);});}async['runSteps'](_0x15950b){const _0x23f699=a13_0x46e361,_0x3d57ce=_0x15950b[_0x23f699(0x214)](({step:_0x503a38,userMessage:_0x4e6f46})=>{const _0xe51f6=_0x23f699;return Step[_0xe51f6(0x1e9)](async()=>{const _0x459dc4=_0xe51f6,_0x5c5430=await this[_0x459dc4(0x261)][_0x459dc4(0x26e)](_0x503a38);return await _0x5c5430[_0x459dc4(0x262)](_0x4e6f46);});});return await Promise['all'](_0x3d57ce);}[a13_0x46e361(0x1e5)](){const _0x1c58b2=a13_0x46e361,_0x2ba499={'foRca':function(_0x87dd0d,_0x2bf999){return _0x87dd0d===_0x2bf999;},'qiymS':'completed'};return _0x2ba499['foRca'](this['flow'][_0x1c58b2(0x234)]()[_0x1c58b2(0x22c)],_0x2ba499['qiymS']);}[a13_0x46e361(0x1db)](_0x507fd3){const _0x54ffd5=a13_0x46e361,_0xf86f58={'vDbHR':function(_0x2ffa10,_0x333951){return _0x2ffa10===_0x333951;},'FKwQe':function(_0x562d59,_0x52ebc8){return _0x562d59===_0x52ebc8;}};for(const _0xdaef45 of _0x507fd3){if(_0x54ffd5(0x281)===_0x54ffd5(0x281))_0xf86f58[_0x54ffd5(0x247)](_0xdaef45[_0x54ffd5(0x244)],this[_0x54ffd5(0x244)])&&(_0xdaef45[_0x54ffd5(0x1eb)]=this[_0x54ffd5(0x1eb)],_0xdaef45[_0x54ffd5(0x1fe)]=(0x0,lodash_1[_0x54ffd5(0x208)])(this[_0x54ffd5(0x1fe)],constants_1['K'][_0x54ffd5(0x242)]),!this[_0x54ffd5(0x24e)]()&&(_0xdaef45[_0x54ffd5(0x1ef)]=this[_0x54ffd5(0x1ef)],_0xdaef45['modelParamsName']=this[_0x54ffd5(0x273)],_0xdaef45[_0x54ffd5(0x1d8)]=this[_0x54ffd5(0x1d8)]));else{for(const _0x231e17 of this[_0x54ffd5(0x27b)]()){if(_0xf86f58['vDbHR'](_0x231e17,_0x4167b4))return!![];}return![];}}}[a13_0x46e361(0x203)](_0x218056){const _0x17b76f=a13_0x46e361,_0x53b314={'nrQAj':function(_0x488f99,_0x219927){return _0x488f99!==_0x219927;},'FZpzp':_0x17b76f(0x225),'yZABK':function(_0x45cf36,_0x1abd8b){return _0x45cf36===_0x1abd8b;}};for(const _0x214906 of _0x218056){if(_0x53b314[_0x17b76f(0x21b)](_0x53b314[_0x17b76f(0x25a)],_0x53b314[_0x17b76f(0x25a)]))return _0x31555d[_0x17b76f(0x246)][_0x17b76f(0x258)];else{if(_0x53b314[_0x17b76f(0x1d5)](_0x214906[_0x17b76f(0x244)],this[_0x17b76f(0x244)])){this['isActive']=_0x214906[_0x17b76f(0x1eb)],this[_0x17b76f(0x1fe)]=_0x214906[_0x17b76f(0x1fe)];_0x214906['modelName']&&(this[_0x17b76f(0x1ef)]=_0x214906[_0x17b76f(0x1ef)]);this[_0x17b76f(0x273)]=_0x214906['modelParamsName'],this[_0x17b76f(0x1d8)]=(0x0,lodash_1[_0x17b76f(0x257)])({},_0x214906['modelParams']??{});const _0xdef75f=_0x214906[_0x17b76f(0x1df)];_0x53b314[_0x17b76f(0x21b)](_0xdef75f,undefined)&&this['modelParams']['temperature']===undefined&&(this[_0x17b76f(0x1d8)][_0x17b76f(0x1df)]=_0xdef75f);}}}}[a13_0x46e361(0x211)](){const _0x447cf0=a13_0x46e361;return{'name':this['name'],'isActive':this['isActive'],'state':this['state'],'modelName':this[_0x447cf0(0x1ef)],'modelParamsName':this[_0x447cf0(0x273)],'modelParams':this[_0x447cf0(0x1d8)]};}[a13_0x46e361(0x1e8)](){const _0x567282=a13_0x46e361,_0x3e9161=this[_0x567282(0x261)][_0x567282(0x21e)](this[_0x567282(0x230)]);return _0x3e9161[_0x567282(0x256)]=0x0,_0x3e9161;}async[a13_0x46e361(0x21f)](_0x31a36a,_0xb610a1){const _0x27f5b9=a13_0x46e361,_0x34ee4e={'VYoug':function(_0x38ef97,_0x314b44){return _0x38ef97===_0x314b44;},'BSOVQ':_0x27f5b9(0x204)},_0x445e35=this['flow'][_0x27f5b9(0x1da)](_0x31a36a[_0x27f5b9(0x244)]);return _0x34ee4e[_0x27f5b9(0x26a)](typeof this[_0xb610a1['name']],_0x34ee4e['BSOVQ'])?await _0x445e35[_0xb610a1[_0x27f5b9(0x244)]](_0xb610a1):_0x31a36a;}[a13_0x46e361(0x1ee)](_0x461fe2){const _0x398bf5=a13_0x46e361,_0x58259a={'YDbzU':'stopTool'},_0x2edf07=this[_0x398bf5(0x206)]();for(const _0x393b4f of _0x2edf07){this['saveState']({'_stopTool':{[_0x393b4f]:![]}});}return _0x461fe2['additional_kwargs'][_0x58259a[_0x398bf5(0x23e)]]=!![],_0x461fe2;}[a13_0x46e361(0x212)](){const _0x146e71=a13_0x46e361,_0x2d6f07={'ksKKj':_0x146e71(0x1d7)};return this[_0x146e71(0x244)]+'|'+moment_1[_0x146e71(0x1fa)][_0x146e71(0x25e)]()['format'](_0x2d6f07[_0x146e71(0x1f2)])+'|'+this[_0x146e71(0x251)]();}[a13_0x46e361(0x251)](){const _0x1b6a79=a13_0x46e361,_0x5dda1d={'zJOMT':function(_0x5c2e46,_0x4de1ac){return _0x5c2e46+_0x4de1ac;},'BkJEA':function(_0x3fe468,_0x8cecf8){return _0x3fe468*_0x8cecf8;},'VlNUN':function(_0x2b46b0,_0xf861ad){return _0x2b46b0+_0xf861ad;},'wEBnS':function(_0x12cd70,_0x740f08){return _0x12cd70-_0x740f08;}},_0x31bbbf=0x3b9aca00,_0x53ee91=0x2540be3ff;return _0x5dda1d[_0x1b6a79(0x266)](Math[_0x1b6a79(0x1e0)](_0x5dda1d[_0x1b6a79(0x252)](Math[_0x1b6a79(0x209)](),_0x5dda1d[_0x1b6a79(0x218)](_0x5dda1d['wEBnS'](_0x53ee91,_0x31bbbf),0x1))),_0x31bbbf);}[a13_0x46e361(0x278)](){const _0x5b4d0c=a13_0x46e361,_0x26487f={'mVcAf':_0x5b4d0c(0x1f8),'kjsTw':_0x5b4d0c(0x25d),'jmCTZ':_0x5b4d0c(0x26f)},_0x5d70a5=this[_0x5b4d0c(0x1ef)]||this[_0x5b4d0c(0x261)][_0x5b4d0c(0x253)](),_0x1b20d8=_0x5d70a5['trim']()['toLowerCase']();if(_0x1b20d8[_0x5b4d0c(0x21c)](_0x26487f[_0x5b4d0c(0x243)]))return llm_file_js_1[_0x5b4d0c(0x246)][_0x5b4d0c(0x258)];if(_0x1b20d8[_0x5b4d0c(0x21c)](_0x26487f[_0x5b4d0c(0x1f0)]))return llm_file_js_1[_0x5b4d0c(0x246)][_0x5b4d0c(0x228)];if(_0x1b20d8['startsWith'](_0x26487f['jmCTZ']))return llm_file_js_1[_0x5b4d0c(0x246)][_0x5b4d0c(0x1f6)];return llm_file_js_1[_0x5b4d0c(0x246)]['UNSUPPORTED'];}[a13_0x46e361(0x1e2)](){return null;}}exports['Step']=Step,Step[a13_0x46e361(0x22f)]=new node_async_hooks_1[(a13_0x46e361(0x22a))]();
|
|
1
|
+
const a13_0x474b93=a13_0x157a;(function(_0x370d91,_0x3440a3){const _0xc34828=a13_0x157a,_0x20a514=_0x370d91();while(!![]){try{const _0x6d4db5=parseInt(_0xc34828(0x174))/0x1+-parseInt(_0xc34828(0x14a))/0x2+parseInt(_0xc34828(0x140))/0x3+parseInt(_0xc34828(0x1bd))/0x4*(-parseInt(_0xc34828(0x14d))/0x5)+parseInt(_0xc34828(0x167))/0x6*(-parseInt(_0xc34828(0x15a))/0x7)+parseInt(_0xc34828(0x195))/0x8+parseInt(_0xc34828(0x13f))/0x9*(parseInt(_0xc34828(0x168))/0xa);if(_0x6d4db5===_0x3440a3)break;else _0x20a514['push'](_0x20a514['shift']());}catch(_0x3f553a){_0x20a514['push'](_0x20a514['shift']());}}}(a13_0x37b4,0x4c142));function a13_0x157a(_0x122790,_0x2ac5d6){const _0x3b6992=a13_0x37b4();return a13_0x157a=function(_0x2cd911,_0x307710){_0x2cd911=_0x2cd911-0x11a;let _0x37b4a4=_0x3b6992[_0x2cd911];return _0x37b4a4;},a13_0x157a(_0x122790,_0x2ac5d6);}const a13_0x307710=(function(){const _0x4ad828=a13_0x157a,_0x581e7c={'mSDNt':function(_0x4da00c,_0x6aa0d1){return _0x4da00c===_0x6aa0d1;},'bFVJC':_0x4ad828(0x18e),'WFCwL':'YWwuy'};let _0x365f3f=!![];return function(_0x420f8e,_0x277a20){const _0x18b325=_0x365f3f?function(){const _0x5140de=a13_0x157a,_0x4b49fd={'CxhNH':function(_0x9513fc,_0x392e5d){const _0xe0ee54=a13_0x157a;return _0x581e7c[_0xe0ee54(0x13d)](_0x9513fc,_0x392e5d);}};if(_0x581e7c[_0x5140de(0x16e)]!=='OrTsS')return this[_0x5140de(0x13b)];else{if(_0x277a20){if(_0x581e7c['WFCwL']===_0x5140de(0x1b5)){const _0x566f33=_0x277a20[_0x5140de(0x1dd)](_0x420f8e,arguments);return _0x277a20=null,_0x566f33;}else{for(const _0x41d072 of this[_0x5140de(0x1f9)]()){if(_0x4b49fd['CxhNH'](_0x41d072,_0x5785e9))return!![];}return![];}}}}:function(){};return _0x365f3f=![],_0x18b325;};}()),a13_0x2cd911=a13_0x307710(this,function(){const _0xf7e31f=a13_0x157a,_0xaaeb14={'jgBZr':_0xf7e31f(0x1e5)};return a13_0x2cd911[_0xf7e31f(0x1d0)]()[_0xf7e31f(0x1db)](_0xaaeb14[_0xf7e31f(0x16d)])[_0xf7e31f(0x1d0)]()['constructor'](a13_0x2cd911)[_0xf7e31f(0x1db)](_0xaaeb14[_0xf7e31f(0x16d)]);});a13_0x2cd911();function a13_0x37b4(){const _0x1ea2a0=['additional_kwargs','eetde','SystemMessage','isEnd','OpBTf','getMemory','getPrompt','Plain','hyxLN','YWwuy','gncMA','eIPdD','iTvGf','zgkWn','eraseMemory','UjdeP','abpzC','18804WUeuFS','format','./llm-runner','CStlU','XYtqa','string','isLogic','amendTool','VWPmP','active','modelParamsName','run','invokeTool','../utils/message-util','sessionCompleted','getStopTool','send','AMgQF','DyyDj','toString','HumanMessageEx','trim','getName','\x20to\x20ensure\x20the\x20tool\x20is\x20triggered.','HttpContentType','DeIgN','onEnter','uAICw','wehHz','VMCDA','search','FsHEP','apply','replaceScopedActiveStep','IQfqr','eJieN','get','LKRaE','2|6|1|0|4|8|7|3|5','EWVyc','(((.+)+)+)+$','SaveStateType','NADZv','completed','transient','SyuAL','modelName','YbVGu','VsAvo','LCVWd','withActiveStepScope','onStart','removeState','stringify','CETOB','modelParams','node:async_hooks','state','nXmMR','SHOQl','getTool','yixgp','MEuVy','LLMType','btXDa','_stopTool','contentType','TRANSIENT','onCrossing','btHcf','hasActiveStepScope','getState','getStep','pushScopedActiveStep','pop','QabYF','gDGsI','fdgvG','structOutputSchema','rLgRq','SKJoE','bAkWm','map','activateNested','push','__esModule','mGASL','useMemory','QLxtR','AsyncLocalStorage','useModel','Start','WTBCI','flow','exitScopedActiveStep','ctType','cdgKE','mSDNt','ndBdk','260613VkisFX','1139199rQmtQt','claude','XFtQa','yYllu','yBNMw','GEMINI','defineTool','pBMwo','omit','runStatus','194348nyqqZY','LlmRunner','useModelParams','200xjVcUW','startsWith','saveState','getLLMType','toDate','checkResponse','yGizf','lADtB','isToolAvailable','onRestore','length','WgXwk','OPENAI','10066OvrBBA','constructor','FghUQ','**Important:**\x20After\x20collecting\x20data,\x20call\x20tool\x20','YkSWd','QjFjd','KYBsd','QDpsh','temperature','xDHOT','DeeIl','gpt','aODJH','1776JMhapz','50osXCHC','setActive','__importDefault','getScopedActiveStep','function','jgBZr','bFVJC','getStore','uPMyC','stopTool','isActive','memorySpace','482864qYMRFU','stack','wxOvY','dEZAK','DgIPe','sWqvk','activeStepScope','PcJsC','uACZx','runSteps','Vgqzr','zOCKC','gemini','_prompt','Step','persistent','withNestedSequence','YYYY-MM-DDTHH:mm:ss.SSS[Z]','tqAfj','kVCZI','keys','PLjtA','GpMKD','onExit','JrJoo','RKUir','OrTsS','merge','EFdrX','BUKee','YLsHM','nArhf','readDoc','120784aYBHxp','name','bshIA','toLowerCase','mWBot','all','floor','mLhma','qSuqV','sEQTs','getSessionDoc','getModelParamsModelName','createDoc','UObcW','cgmjs','saveTransientState','uCuuG','genMessageId','split','zCGUn','GtCxX','nMdje','getModel'];a13_0x37b4=function(){return _0x1ea2a0;};return a13_0x37b4();}'use strict';var __importDefault=this&&this[a13_0x474b93(0x16a)]||function(_0x30b75b){return _0x30b75b&&_0x30b75b['__esModule']?_0x30b75b:{'default':_0x30b75b};};Object['defineProperty'](exports,a13_0x474b93(0x131),{'value':!![]}),exports[a13_0x474b93(0x182)]=void 0x0;const lodash_1=require('lodash'),moment_1=__importDefault(require('moment')),flow_types_1=require('./flow-types'),messages_1=require('@langchain/core/messages'),node_async_hooks_1=require(a13_0x474b93(0x1f5)),llm_runner_1=require(a13_0x474b93(0x1bf)),message_util_1=require(a13_0x474b93(0x1ca)),content_type_1=require('./content-type'),llm_file_js_1=require('../utils/llm-file.js'),constants_1=require('../utils/constants');class Step{constructor(_0x33a5ee,_0x4de5f1,_0x25af50=![]){const _0x2ff6e4=a13_0x474b93,_0x47f45b=_0x2ff6e4(0x1e3)[_0x2ff6e4(0x1a7)]('|');let _0x224133=0x0;while(!![]){switch(_0x47f45b[_0x224133++]){case'0':this[_0x2ff6e4(0x1f4)]={};continue;case'1':this[_0x2ff6e4(0x1eb)]=undefined;continue;case'2':this[_0x2ff6e4(0x172)]=![];continue;case'3':this['isActive']=_0x25af50;continue;case'4':this[_0x2ff6e4(0x13b)]=content_type_1[_0x2ff6e4(0x1d5)][_0x2ff6e4(0x1b3)];continue;case'5':this[_0x2ff6e4(0x173)]=_0x33a5ee[_0x2ff6e4(0x196)];continue;case'6':this[_0x2ff6e4(0x1f6)]={};continue;case'7':this[_0x2ff6e4(0x139)]=_0x4de5f1;continue;case'8':this[_0x2ff6e4(0x196)]=_0x33a5ee['name'];continue;}break;}}[a13_0x474b93(0x1d3)](){return this['name'];}async[a13_0x474b93(0x1d7)](){}async[a13_0x474b93(0x18b)](){}async[a13_0x474b93(0x156)](){}async[a13_0x474b93(0x1f0)](){const _0xb96644=a13_0x474b93;return await this[_0xb96644(0x1d7)](),this[_0xb96644(0x120)](null);}async['onResponse'](_0x56245e){const _0x4534e8=a13_0x474b93,_0x3f0f50={'fdgvG':'object'};if(typeof _0x56245e===_0x3f0f50[_0x4534e8(0x129)])return JSON[_0x4534e8(0x1f2)](_0x56245e);return _0x56245e;}[a13_0x474b93(0x152)](_0x3710ae){return![];}get[a13_0x474b93(0x1c6)](){const _0x1aa573=a13_0x474b93,_0x21a288={'Vgqzr':function(_0x326715,_0x1c62c6){return _0x326715!==_0x1c62c6;},'BUKee':'tUmDB','MEuVy':function(_0x48cd9b,_0x14ddbe){return _0x48cd9b===_0x14ddbe;}},_0x183c95=Step[_0x1aa573(0x16b)]();if(_0x21a288[_0x1aa573(0x17e)](_0x183c95,undefined))return'tUmDB'!==_0x21a288[_0x1aa573(0x191)]?null:_0x21a288[_0x1aa573(0x11a)](_0x183c95,this);return this['isActive'];}[a13_0x474b93(0x1c3)](){return![];}set[a13_0x474b93(0x1c6)](_0x3461bb){const _0x5a96e0=a13_0x474b93;void this[_0x5a96e0(0x169)](_0x3461bb);}async[a13_0x474b93(0x169)](_0x25ce6e){const _0x155286=a13_0x474b93,_0x53e89b={'EhuhL':function(_0x308acd,_0x6fd623){return _0x308acd!==_0x6fd623;},'QDpsh':_0x155286(0x143),'uCuuG':_0x155286(0x15e),'zOCKC':'RUVlS','VMCDA':function(_0x1f9155,_0x287cfd){return _0x1f9155===_0x287cfd;},'abpzC':'IQfqr','RKUir':_0x155286(0x1fa),'GtCxX':'QhJfo','DeIgN':function(_0x1eccee,_0x342cc9){return _0x1eccee!==_0x342cc9;},'SyuAL':_0x155286(0x1c0)},_0x508fc5=Step[_0x155286(0x17a)][_0x155286(0x16f)]();if(_0x508fc5){if(_0x25ce6e&&this[_0x155286(0x1c6)]){if(_0x53e89b[_0x155286(0x161)]===_0x155286(0x134))return this[_0x155286(0x1eb)]=_0x22a54a,this[_0x155286(0x1c7)]=_0x51cbbf,_0x51c031&&this['useModelParams'](_0x11baf2),this;else return;}if(_0x25ce6e){if(_0x53e89b['EhuhL'](_0x53e89b[_0x155286(0x1a5)],_0x53e89b[_0x155286(0x17f)]))await this[_0x155286(0x1de)]();else{const _0x992257=this[_0x155286(0x139)][_0x155286(0x1b1)](this[_0x155286(0x173)]);return _0x992257[_0x155286(0x157)]=0x0,_0x992257;}}else this[_0x155286(0x1c6)]&&(_0x53e89b[_0x155286(0x1da)](_0x155286(0x176),_0x155286(0x176))?await Step['exitScopedActiveStep']():(_0x4ac98c[_0x155286(0x1eb)]=this[_0x155286(0x1eb)],_0x4f38af[_0x155286(0x1c7)]=this[_0x155286(0x1c7)],_0x7378cc[_0x155286(0x1f4)]=this[_0x155286(0x1f4)]));return;}if(!this[_0x155286(0x172)]&&_0x25ce6e){this[_0x155286(0x172)]=!![];try{if(_0x53e89b[_0x155286(0x1da)](_0x155286(0x1df),_0x53e89b[_0x155286(0x1bc)]))await this[_0x155286(0x1d7)]();else return this['modelParams'];}catch(_0x16bcaf){if(_0x53e89b[_0x155286(0x1da)](_0x53e89b[_0x155286(0x18d)],_0x155286(0x1cf)))return;else{this[_0x155286(0x172)]=![];throw _0x16bcaf;}}return;}if(this[_0x155286(0x172)]&&!_0x25ce6e)try{_0x53e89b['GtCxX']!==_0x53e89b[_0x155286(0x1a9)]?_0x5055dd=new _0x15a12f[(_0x155286(0x1d1))](this,_0x1c4529):await this[_0x155286(0x18b)]();}finally{if(_0x53e89b[_0x155286(0x1d6)](_0x53e89b[_0x155286(0x1ea)],_0x53e89b['SyuAL'])){this[_0x155286(0x172)]=_0x5168f9[_0x155286(0x172)],this['state']=_0x57e390[_0x155286(0x1f6)];_0x4c33b1[_0x155286(0x1eb)]&&(this[_0x155286(0x1eb)]=_0x18b2a1[_0x155286(0x1eb)]);this[_0x155286(0x1c7)]=_0x160c72[_0x155286(0x1c7)],this[_0x155286(0x1f4)]=(0x0,_0x579def['merge'])({},_0x55850e[_0x155286(0x1f4)]??{});const _0x33b06d=_0x1d24d2[_0x155286(0x162)];_0x53e89b['EhuhL'](_0x33b06d,_0x3cc307)&&this[_0x155286(0x1f4)][_0x155286(0x162)]===_0x10e2a8&&(this[_0x155286(0x1f4)][_0x155286(0x162)]=_0x33b06d);}else this[_0x155286(0x172)]=![];}}static async[a13_0x474b93(0x1ef)](_0x115f1a,_0x47563b){const _0x16fbe6=a13_0x474b93,_0x5256fd={'uPMyC':function(_0x4f5c34,_0x54174c){return _0x4f5c34!==_0x54174c;}},_0x2ef013=Step[_0x16fbe6(0x17a)][_0x16fbe6(0x16f)](),_0x58c5b5=_0x2ef013?[..._0x2ef013['stack']]:[];return _0x5256fd[_0x16fbe6(0x170)](_0x58c5b5[_0x58c5b5[_0x16fbe6(0x157)]-0x1],_0x115f1a)&&_0x58c5b5[_0x16fbe6(0x130)](_0x115f1a),await Step[_0x16fbe6(0x17a)][_0x16fbe6(0x1c8)]({'stack':_0x58c5b5},_0x47563b);}static[a13_0x474b93(0x122)](){const _0x14971d=a13_0x474b93,_0x197a3b={'hBFNF':function(_0x4caa1f,_0x3d715f){return _0x4caa1f!==_0x3d715f;}};return _0x197a3b['hBFNF'](Step[_0x14971d(0x17a)]['getStore'](),undefined);}static[a13_0x474b93(0x16b)](){const _0x5d125f=a13_0x474b93,_0x48aee6={'PXFXH':function(_0x113909,_0x50dcb0){return _0x113909!==_0x50dcb0;},'iaNLs':_0x5d125f(0x1a8),'nIFIS':_0x5d125f(0x17b),'UjdeP':function(_0x4739d6,_0xf3bd8f){return _0x4739d6-_0xf3bd8f;}},_0x54875e=Step[_0x5d125f(0x17a)][_0x5d125f(0x16f)]();if(!_0x54875e)return _0x48aee6['PXFXH'](_0x48aee6['iaNLs'],_0x48aee6['nIFIS'])?undefined:this['flow']['getContext'](_0x40b38d);return _0x54875e[_0x5d125f(0x175)][_0x48aee6[_0x5d125f(0x1bb)](_0x54875e[_0x5d125f(0x175)][_0x5d125f(0x157)],0x1)]??null;}async[a13_0x474b93(0x125)](){const _0x4d59dd=a13_0x474b93,_0x3398da={'OpBTf':function(_0x2f40f3,_0x5527b0){return _0x2f40f3??_0x5527b0;},'mGASL':function(_0x16be95,_0x3cbf1d){return _0x16be95===_0x3cbf1d;},'pBMwo':_0x4d59dd(0x163),'nXmMR':'qmJJJ'},_0x3ed41e=Step[_0x4d59dd(0x17a)][_0x4d59dd(0x16f)]();if(!_0x3ed41e){if(_0x3398da[_0x4d59dd(0x132)](_0x3398da[_0x4d59dd(0x147)],_0x3398da[_0x4d59dd(0x1f7)]))return this[_0x4d59dd(0x1c7)]=_0x3a466c,this[_0x4d59dd(0x1f4)]=(0x0,_0x20fe41['merge'])({},this[_0x4d59dd(0x1f4)],_0x3398da[_0x4d59dd(0x1b0)](_0x154f88,{})),this;else{await this['setActive'](!![]);return;}}_0x3ed41e[_0x4d59dd(0x175)]['push'](this);try{await this[_0x4d59dd(0x1d7)]();}catch(_0x2abe22){_0x3ed41e['stack']['pop']();throw _0x2abe22;}}async[a13_0x474b93(0x1de)](){const _0x2adf2f=a13_0x474b93,_0x514756={'yGizf':_0x2adf2f(0x137),'wehHz':function(_0x3d326d,_0x390ed8){return _0x3d326d===_0x390ed8;},'sWqvk':function(_0x41b80c,_0x3e88ef){return _0x41b80c!==_0x3e88ef;},'PIGmC':'oeDkP','sNkhn':function(_0x12e39c,_0x58fde1){return _0x12e39c===_0x58fde1;}},_0x5c4e7d=Step[_0x2adf2f(0x17a)][_0x2adf2f(0x16f)]();if(!_0x5c4e7d){await this[_0x2adf2f(0x169)](!![]);return;}const _0x5deafc=Step[_0x2adf2f(0x16b)]();if(_0x5deafc){await _0x5deafc[_0x2adf2f(0x18b)]();if(_0x514756[_0x2adf2f(0x1d9)](Step[_0x2adf2f(0x16b)](),_0x5deafc)){if(_0x514756[_0x2adf2f(0x179)](_0x2adf2f(0x193),_0x514756['PIGmC']))_0x5c4e7d[_0x2adf2f(0x175)]['pop']();else{if(!_0x487eb6){const _0x2778f7=this[_0x2adf2f(0x1b1)]();_0x2778f7['length']===0x1&&(_0xf57900=new _0xaf8876['HumanMessageEx'](this,_0x514756[_0x2adf2f(0x153)]));}return _0x22daa2;}}}_0x5c4e7d['stack'][_0x2adf2f(0x130)](this);try{await this[_0x2adf2f(0x1d7)]();}catch(_0x29e6a6){_0x514756['sNkhn'](Step[_0x2adf2f(0x16b)](),this)&&_0x5c4e7d[_0x2adf2f(0x175)][_0x2adf2f(0x126)]();throw _0x29e6a6;}}static async[a13_0x474b93(0x13a)](){const _0x162338=a13_0x474b93,_0x4d87f2={'uAICw':_0x162338(0x199),'zgkWn':function(_0x3d83e0,_0xee6733){return _0x3d83e0===_0xee6733;}},_0x2a01c0=Step[_0x162338(0x17a)][_0x162338(0x16f)](),_0x15217a=Step[_0x162338(0x16b)]();if(!_0x2a01c0||!_0x15217a){if(_0x4d87f2['uAICw']!==_0x4d87f2[_0x162338(0x1d8)]){if(_0x248f4c){const _0x7bbbad=_0x1ef0ea[_0x162338(0x1dd)](_0x3e7673,arguments);return _0x347185=null,_0x7bbbad;}}else return;}try{await _0x15217a[_0x162338(0x18b)]();}finally{_0x4d87f2[_0x162338(0x1b9)](Step[_0x162338(0x16b)](),_0x15217a)&&_0x2a01c0['stack'][_0x162338(0x126)]();}}get[a13_0x474b93(0x11e)](){return this['ctType'];}set['contentType'](_0x3d499a){const _0x3fa96e=a13_0x474b93;this[_0x3fa96e(0x13b)]=_0x3d499a;}[a13_0x474b93(0x123)](_0x3753aa,_0x59a823=flow_types_1[a13_0x474b93(0x1e6)][a13_0x474b93(0x183)]){const _0x1dd40f=a13_0x474b93,_0x38bec6={'FghUQ':function(_0x2e6954,_0x32e1ca){return _0x2e6954===_0x32e1ca;}},_0x3dbc3b=_0x38bec6[_0x1dd40f(0x15c)](_0x59a823,flow_types_1[_0x1dd40f(0x1e6)][_0x1dd40f(0x1e9)])?(0x0,lodash_1[_0x1dd40f(0x1e1)])(this[_0x1dd40f(0x1f6)],constants_1['K'][_0x1dd40f(0x11f)],{}):this['state'];return _0x3753aa?(0x0,lodash_1[_0x1dd40f(0x1e1)])(_0x3dbc3b,_0x3753aa):_0x3dbc3b;}['getTransientState'](_0x37580a){const _0x10e2b2=a13_0x474b93;return this[_0x10e2b2(0x123)](_0x37580a,flow_types_1[_0x10e2b2(0x1e6)][_0x10e2b2(0x1e9)]);}[a13_0x474b93(0x14f)](_0x2f581f,_0x51227c=flow_types_1[a13_0x474b93(0x1e6)][a13_0x474b93(0x183)]){const _0x163508=a13_0x474b93,_0x395534={'EWVyc':function(_0x2b491f,_0x4b41aa){return _0x2b491f===_0x4b41aa;}};if(_0x2f581f){const _0x1299bc=Object[_0x163508(0x188)](_0x2f581f)[0x0];if(_0x395534[_0x163508(0x1e4)](_0x51227c,flow_types_1[_0x163508(0x1e6)]['transient'])){const _0x39c654=(0x0,lodash_1[_0x163508(0x148)])((0x0,lodash_1['get'])(this[_0x163508(0x1f6)],constants_1['K'][_0x163508(0x11f)],{}),_0x1299bc);this[_0x163508(0x1f6)]=(0x0,lodash_1[_0x163508(0x18f)])({},this[_0x163508(0x1f6)],{[constants_1['K']['TRANSIENT']]:(0x0,lodash_1['merge'])({},_0x39c654,_0x2f581f)});}else this['state']=(0x0,lodash_1[_0x163508(0x148)])(this[_0x163508(0x1f6)],_0x1299bc),this[_0x163508(0x1f6)]=(0x0,lodash_1[_0x163508(0x18f)])({},this['state'],_0x2f581f);this[_0x163508(0x1f6)]=(0x0,lodash_1[_0x163508(0x18f)])(this[_0x163508(0x1f6)],{'_saveOn':(0x0,moment_1['default'])()[_0x163508(0x151)]()});}}[a13_0x474b93(0x1a4)](_0x189f2b){const _0x6c2e20=a13_0x474b93;return this[_0x6c2e20(0x14f)](_0x189f2b,flow_types_1['SaveStateType'][_0x6c2e20(0x1e9)]);}[a13_0x474b93(0x1cb)](){const _0x281460=a13_0x474b93,_0x3e0b0d={'uACZx':_0x281460(0x1e8)},_0x39bf64=this[_0x281460(0x139)]['getSessionDoc']();_0x39bf64['runStatus']=_0x3e0b0d[_0x281460(0x17c)];}['getContext'](_0x611bbb){const _0x21dea2=a13_0x474b93;return this[_0x21dea2(0x139)]['getContext'](_0x611bbb);}[a13_0x474b93(0x1f1)](_0x2e5d2f){const _0x59228c=a13_0x474b93;this[_0x59228c(0x1f6)]=(0x0,lodash_1[_0x59228c(0x148)])(this[_0x59228c(0x1f6)],_0x2e5d2f);}[a13_0x474b93(0x1b2)](){const _0x37524d=a13_0x474b93,_0x255429={'bAkWm':_0x37524d(0x181)},_0x2460bd=this['getState'](_0x255429[_0x37524d(0x12d)]);return _0x2460bd?_0x2460bd[_0x37524d(0x1d0)]():null;}[a13_0x474b93(0x120)](_0x3f02bf,_0x1f8e7a){const _0x1d0b28=a13_0x474b93,_0x67080d={'YbVGu':function(_0x2c2bc4,_0x10205b){return _0x2c2bc4===_0x10205b;},'DgIPe':function(_0x4432b7,_0x12e02f){return _0x4432b7!==_0x12e02f;},'aODJH':function(_0x187423,_0x53d4e8){return _0x187423===_0x53d4e8;},'AXibI':'yLpye','kVCZI':_0x1d0b28(0x137)};if(!_0x3f02bf){const _0x32ad57=this[_0x1d0b28(0x1b1)]();if(_0x67080d[_0x1d0b28(0x166)](_0x32ad57[_0x1d0b28(0x157)],0x1)){if(_0x67080d[_0x1d0b28(0x178)](_0x67080d['AXibI'],'yLpye')){if(_0x67080d[_0x1d0b28(0x1ec)](_0x3fefd7[_0x1d0b28(0x196)],this['name'])){this['isActive']=_0xbeb02c[_0x1d0b28(0x172)],this[_0x1d0b28(0x1f6)]=_0x38bb82[_0x1d0b28(0x1f6)];_0x5e5a37['modelName']&&(this[_0x1d0b28(0x1eb)]=_0xf8e5db[_0x1d0b28(0x1eb)]);this[_0x1d0b28(0x1c7)]=_0x1d99a9[_0x1d0b28(0x1c7)],this[_0x1d0b28(0x1f4)]=(0x0,_0x3db954[_0x1d0b28(0x18f)])({},_0x55d20b['modelParams']??{});const _0x33076a=_0x1e2dc0['temperature'];_0x67080d[_0x1d0b28(0x178)](_0x33076a,_0x512f7c)&&_0x67080d[_0x1d0b28(0x1ec)](this[_0x1d0b28(0x1f4)][_0x1d0b28(0x162)],_0x5f30ff)&&(this['modelParams'][_0x1d0b28(0x162)]=_0x33076a);}}else _0x3f02bf=new message_util_1[(_0x1d0b28(0x1d1))](this,_0x67080d[_0x1d0b28(0x187)]);}}return _0x3f02bf;}[a13_0x474b93(0x1b1)](){const _0x166056=a13_0x474b93,_0x454b8b={'eIPdD':function(_0x4dae93,_0x28526e){return _0x4dae93===_0x28526e;}},_0x432cef=this[_0x166056(0x139)][_0x166056(0x1b1)](this[_0x166056(0x173)]);return _0x454b8b[_0x166056(0x1b7)](_0x432cef['length'],0x0)&&_0x432cef[_0x166056(0x130)](new messages_1[(_0x166056(0x1ae))]({'content':'','id':this[_0x166056(0x1a6)]()})),_0x432cef;}['getLastMessage'](){const _0x1fa74f=a13_0x474b93,_0x88d970={'DeeIl':function(_0x3d3cb5,_0x138617){return _0x3d3cb5>_0x138617;},'WTBCI':function(_0x533996,_0x325d5d){return _0x533996-_0x325d5d;}},_0x56f0fd=this['flow']['getMemory'](this[_0x1fa74f(0x173)]);if(_0x88d970[_0x1fa74f(0x164)](_0x56f0fd[_0x1fa74f(0x157)],0x0))return _0x56f0fd[_0x88d970[_0x1fa74f(0x138)](_0x56f0fd[_0x1fa74f(0x157)],0x1)];return null;}[a13_0x474b93(0x133)](_0x9a2219){return this['memorySpace']=_0x9a2219,this;}[a13_0x474b93(0x136)](_0x5db9c0,_0x269ebc){const _0x18841e=a13_0x474b93;return this[_0x18841e(0x1eb)]=_0x5db9c0,this[_0x18841e(0x1c7)]=_0x5db9c0,_0x269ebc&&this[_0x18841e(0x14c)](_0x269ebc),this;}[a13_0x474b93(0x14c)](_0x3c99da,_0x3ff002){const _0x57cc52=a13_0x474b93,_0x3deebe={'bshIA':_0x57cc52(0x1c2),'mLhma':_0x57cc52(0x19e)};if(typeof _0x3c99da===_0x3deebe[_0x57cc52(0x197)])return _0x3deebe[_0x57cc52(0x19c)]===_0x3deebe[_0x57cc52(0x19c)]?(this[_0x57cc52(0x1c7)]=_0x3c99da,this[_0x57cc52(0x1f4)]=(0x0,lodash_1[_0x57cc52(0x18f)])({},this[_0x57cc52(0x1f4)],_0x3ff002??{}),this):{'name':this[_0x57cc52(0x196)],'isActive':this[_0x57cc52(0x172)],'state':this['state'],'modelName':this[_0x57cc52(0x1eb)],'modelParamsName':this['modelParamsName'],'modelParams':this[_0x57cc52(0x1f4)]};return this['modelParamsName']=this[_0x57cc52(0x1eb)]??this[_0x57cc52(0x139)][_0x57cc52(0x1ab)](),this['modelParams']=(0x0,lodash_1['merge'])({},this[_0x57cc52(0x1f4)],_0x3c99da),this;}['getModel'](){const _0x85442c=a13_0x474b93;return this[_0x85442c(0x1eb)];}['getModelParams'](){return this['modelParams'];}[a13_0x474b93(0x1a0)](){return this['modelParamsName'];}[a13_0x474b93(0x146)](){return null;}[a13_0x474b93(0x155)](_0x5c51e4){const _0x49d927=a13_0x474b93;for(const _0x265944 of this[_0x49d927(0x1f9)]()){if(_0x265944===_0x5c51e4)return!![];}return![];}[a13_0x474b93(0x1f9)](){return[];}[a13_0x474b93(0x1cc)](){return[];}['obtainTools'](){const _0x25224d=a13_0x474b93,_0x596701={'iKWJA':_0x25224d(0x154),'DeBPj':_0x25224d(0x1b4)},_0xe748df=this['getTool']();return _0xe748df[_0x25224d(0x12e)](_0x13b5bd=>{const _0x42da48=_0x25224d;return _0x596701['iKWJA']===_0x596701['DeBPj']?!![]:this[_0x42da48(0x139)][_0x42da48(0x1f9)](_0x13b5bd);});}[a13_0x474b93(0x1c4)](_0x3132fe){const _0xd7b550=a13_0x474b93,_0x6afe8e={'GpMKD':_0xd7b550(0x1e5),'AMgQF':function(_0x2bdec1,_0x558662){return _0x2bdec1!==_0x558662;},'XYtqa':_0xd7b550(0x1dc),'fEnDx':_0xd7b550(0x11d)},_0x41178f=this[_0xd7b550(0x1cc)]();for(const _0x56af2b of _0x41178f){if(_0x6afe8e[_0xd7b550(0x1ce)](_0x6afe8e[_0xd7b550(0x1c1)],_0x6afe8e[_0xd7b550(0x1c1)]))return _0x246c9c[_0xd7b550(0x1d0)]()[_0xd7b550(0x1db)](IxyZqa[_0xd7b550(0x18a)])[_0xd7b550(0x1d0)]()[_0xd7b550(0x15b)](_0x312832)[_0xd7b550(0x1db)](IxyZqa[_0xd7b550(0x18a)]);else{const _0x26743a=this[_0xd7b550(0x123)](_0x6afe8e['fEnDx'])[_0x56af2b],_0x252e6d=_0xd7b550(0x15d)+_0x56af2b+_0xd7b550(0x1d4),_0x2d8cda=_0x26743a?_0x252e6d:'';_0x3132fe=_0x3132fe['replace']('{{'+_0x56af2b+'}}',_0x2d8cda);}}return _0x3132fe;}async[a13_0x474b93(0x1c9)](_0x1b1e50){return null;}async[a13_0x474b93(0x1c8)](_0x596d97){const _0x2bf6cb=a13_0x474b93;let _0x101a0c;_0x596d97&&(_0x101a0c=new message_util_1[(_0x2bf6cb(0x1d1))](this,_0x596d97));const _0x1e97c1=this['getStopTool']();for(const _0x33743f of _0x1e97c1){this[_0x2bf6cb(0x14f)]({'_stopTool':{[_0x33743f]:!![]}});}const _0x12bf96=await llm_runner_1[_0x2bf6cb(0x14b)][_0x2bf6cb(0x1cd)](this[_0x2bf6cb(0x139)],this,_0x101a0c);return _0x12bf96;}async['runStep'](_0x5ca7d8,_0xd3550){const _0x28dfa3=a13_0x474b93;return await this[_0x28dfa3(0x139)][_0x28dfa3(0x184)](async()=>{const _0x4a42ee=_0x28dfa3;return await Step[_0x4a42ee(0x1ef)](this,async()=>{const _0x180114=_0x4a42ee,_0x109511=await this[_0x180114(0x139)][_0x180114(0x12f)](_0x5ca7d8);try{return await _0x109511['run'](_0xd3550);}finally{await Step['exitScopedActiveStep']();}});});}async[a13_0x474b93(0x17d)](_0x43445a){const _0x88ffbb=a13_0x474b93,_0x1cec1f={'SKJoE':function(_0x8c808,_0x10f59f){return _0x8c808===_0x10f59f;},'eetde':_0x88ffbb(0x13c),'lqpaS':_0x88ffbb(0x177),'PLjtA':'NADZv','XFtQa':_0x88ffbb(0x1a3)},_0x5a535f=_0x43445a[_0x88ffbb(0x12e)](({step:_0x995917,userMessage:_0x128380})=>{const _0x51ebd2=_0x88ffbb,_0x2b4dae={'gDGsI':function(_0x39055b,_0x4634c3){const _0x4389fa=a13_0x157a;return _0x1cec1f[_0x4389fa(0x12c)](_0x39055b,_0x4634c3);},'QXgIl':_0x1cec1f[_0x51ebd2(0x1ad)],'hlVng':_0x1cec1f['lqpaS'],'YLsHM':_0x1cec1f[_0x51ebd2(0x189)],'QabYF':function(_0x4d04a6,_0xcb5e02){return _0x4d04a6!==_0xcb5e02;},'ndBdk':_0x1cec1f[_0x51ebd2(0x142)]};return this[_0x51ebd2(0x139)][_0x51ebd2(0x184)](async()=>{const _0x1db416=_0x51ebd2;return await Step[_0x1db416(0x1ef)](this,async()=>{const _0xf3dbd1=_0x1db416,_0x354e39={'tqAfj':function(_0x3af0ef,_0x37bdc6){const _0x400575=a13_0x157a;return _0x2b4dae[_0x400575(0x128)](_0x3af0ef,_0x37bdc6);},'qSuqV':_0xf3dbd1(0x181)};if(_0x2b4dae['QXgIl']!==_0x2b4dae['hlVng']){const _0x23eeb7=await this[_0xf3dbd1(0x139)]['activateNested'](_0x995917);try{if(_0x2b4dae[_0xf3dbd1(0x128)](_0x2b4dae[_0xf3dbd1(0x192)],_0xf3dbd1(0x1e7)))return await _0x23eeb7[_0xf3dbd1(0x1c8)](_0x128380);else{const _0x4f8591=this['flow'][_0xf3dbd1(0x1b1)](this['memorySpace']);return _0x354e39[_0xf3dbd1(0x186)](_0x4f8591[_0xf3dbd1(0x157)],0x0)&&_0x4f8591[_0xf3dbd1(0x130)](new _0x61af36[(_0xf3dbd1(0x1ae))]({'content':'','id':this[_0xf3dbd1(0x1a6)]()})),_0x4f8591;}}finally{if(_0x2b4dae[_0xf3dbd1(0x127)](_0x2b4dae[_0xf3dbd1(0x13e)],_0x2b4dae[_0xf3dbd1(0x13e)])){const _0x3b17ae=this[_0xf3dbd1(0x123)](_0x354e39[_0xf3dbd1(0x19d)]);return _0x3b17ae?_0x3b17ae[_0xf3dbd1(0x1d0)]():null;}else await Step[_0xf3dbd1(0x13a)]();}}else this[_0xf3dbd1(0x14f)]({'_stopTool':{[_0x265c96]:![]}});});});});return await Promise[_0x88ffbb(0x19a)](_0x5a535f);}[a13_0x474b93(0x1af)](){const _0x327c12=a13_0x474b93,_0xea3447={'VWPmP':function(_0x188909,_0xa38888){return _0x188909===_0xa38888;},'EFdrX':_0x327c12(0x1e8)};return _0xea3447[_0x327c12(0x1c5)](this[_0x327c12(0x139)][_0x327c12(0x19f)]()[_0x327c12(0x149)],_0xea3447[_0x327c12(0x190)]);}['writeDoc'](_0x489670){const _0x310073=a13_0x474b93,_0x541527={'btHcf':_0x310073(0x171),'btXDa':function(_0x99cdd3,_0x1ad5a0){return _0x99cdd3!==_0x1ad5a0;},'iTvGf':_0x310073(0x1ee),'WdOtW':_0x310073(0x1e2),'rLgRq':function(_0x42b24,_0x1ac4a1){return _0x42b24===_0x1ac4a1;}};for(const _0x1052ac of _0x489670){if(_0x541527[_0x310073(0x11c)](_0x541527[_0x310073(0x1b8)],_0x541527['WdOtW']))_0x541527[_0x310073(0x12b)](_0x1052ac[_0x310073(0x196)],this[_0x310073(0x196)])&&(_0x1052ac[_0x310073(0x172)]=this['isActive'],_0x1052ac['state']=(0x0,lodash_1[_0x310073(0x148)])(this[_0x310073(0x1f6)],constants_1['K'][_0x310073(0x11f)]),!this[_0x310073(0x1c3)]()&&(_0x1052ac[_0x310073(0x1eb)]=this[_0x310073(0x1eb)],_0x1052ac['modelParamsName']=this[_0x310073(0x1c7)],_0x1052ac['modelParams']=this['modelParams']));else{const _0x318a72=this[_0x310073(0x1cc)]();for(const _0x5776c0 of _0x318a72){this['saveState']({'_stopTool':{[_0x5776c0]:![]}});}return _0x547541[_0x310073(0x1ac)][_0x541527[_0x310073(0x121)]]=!![],_0x57505d;}}}[a13_0x474b93(0x194)](_0x14eece){const _0x1287f6=a13_0x474b93,_0x10080d={'nMdje':function(_0xb1b6e9,_0x1dbe4a){return _0xb1b6e9!==_0x1dbe4a;},'gncMA':function(_0x1381f9,_0x17665c){return _0x1381f9===_0x17665c;}};for(const _0x3bd2bc of _0x14eece){if(_0x1287f6(0x1a2)!==_0x1287f6(0x1a2)){const _0x5aab49=(0x0,_0x238d8f[_0x1287f6(0x148)])((0x0,_0x10d6ec[_0x1287f6(0x1e1)])(this[_0x1287f6(0x1f6)],_0x91108b['K'][_0x1287f6(0x11f)],{}),_0x3dcae4);this[_0x1287f6(0x1f6)]=(0x0,_0x3046b9[_0x1287f6(0x18f)])({},this[_0x1287f6(0x1f6)],{[_0x442e75['K']['TRANSIENT']]:(0x0,_0x350977[_0x1287f6(0x18f)])({},_0x5aab49,_0x3bc492)});}else{if(_0x3bd2bc['name']===this[_0x1287f6(0x196)]){this[_0x1287f6(0x172)]=_0x3bd2bc['isActive'],this[_0x1287f6(0x1f6)]=_0x3bd2bc[_0x1287f6(0x1f6)];_0x3bd2bc[_0x1287f6(0x1eb)]&&(this[_0x1287f6(0x1eb)]=_0x3bd2bc[_0x1287f6(0x1eb)]);this[_0x1287f6(0x1c7)]=_0x3bd2bc[_0x1287f6(0x1c7)],this[_0x1287f6(0x1f4)]=(0x0,lodash_1[_0x1287f6(0x18f)])({},_0x3bd2bc['modelParams']??{});const _0x25ba33=_0x3bd2bc[_0x1287f6(0x162)];_0x10080d[_0x1287f6(0x1aa)](_0x25ba33,undefined)&&_0x10080d[_0x1287f6(0x1b6)](this[_0x1287f6(0x1f4)]['temperature'],undefined)&&(this['modelParams'][_0x1287f6(0x162)]=_0x25ba33);}}}}[a13_0x474b93(0x1a1)](){const _0x4d894a=a13_0x474b93;return{'name':this['name'],'isActive':this[_0x4d894a(0x172)],'state':this['state'],'modelName':this['modelName'],'modelParamsName':this[_0x4d894a(0x1c7)],'modelParams':this[_0x4d894a(0x1f4)]};}[a13_0x474b93(0x1ba)](){const _0x2e2037=a13_0x474b93,_0x1c5f40=this[_0x2e2037(0x139)][_0x2e2037(0x1b1)](this[_0x2e2037(0x173)]);return _0x1c5f40[_0x2e2037(0x157)]=0x0,_0x1c5f40;}async['callStepTool'](_0x445cb5,_0x43608e){const _0x2ef654=a13_0x474b93,_0x1f4c65={'SHOQl':function(_0x400098,_0x14d9fa){return _0x400098===_0x14d9fa;},'WgXwk':_0x2ef654(0x16c)},_0x1cfaed=this[_0x2ef654(0x139)][_0x2ef654(0x124)](_0x445cb5[_0x2ef654(0x196)]);return _0x1f4c65[_0x2ef654(0x1f8)](typeof this[_0x43608e[_0x2ef654(0x196)]],_0x1f4c65[_0x2ef654(0x158)])?await _0x1cfaed[_0x43608e[_0x2ef654(0x196)]](_0x43608e):_0x445cb5;}['setStopTool'](_0x4a3de9){const _0x34466a=a13_0x474b93,_0x11b0e8={'QjFjd':'stopTool'},_0x93c0a9=this[_0x34466a(0x1cc)]();for(const _0x454a26 of _0x93c0a9){this['saveState']({'_stopTool':{[_0x454a26]:![]}});}return _0x4a3de9[_0x34466a(0x1ac)][_0x11b0e8[_0x34466a(0x15f)]]=!![],_0x4a3de9;}[a13_0x474b93(0x1a6)](){const _0xcde89e=a13_0x474b93,_0x851426={'Vjqyf':_0xcde89e(0x185)};return this[_0xcde89e(0x196)]+'|'+moment_1['default']['utc']()[_0xcde89e(0x1be)](_0x851426['Vjqyf'])+'|'+this['random10Digits']();}['random10Digits'](){const _0x5ad587=a13_0x474b93,_0x5c980c={'CETOB':function(_0x1e59b8,_0x362f80){return _0x1e59b8+_0x362f80;},'JrJoo':function(_0x57051,_0x3fef19){return _0x57051*_0x3fef19;},'VsAvo':function(_0x27ffab,_0x432e23){return _0x27ffab-_0x432e23;}},_0x541aa7=0x3b9aca00,_0x3d9b03=0x2540be3ff;return _0x5c980c[_0x5ad587(0x1f3)](Math[_0x5ad587(0x19b)](_0x5c980c[_0x5ad587(0x18c)](Math['random'](),_0x5c980c[_0x5ad587(0x1ed)](_0x3d9b03,_0x541aa7)+0x1)),_0x541aa7);}[a13_0x474b93(0x150)](){const _0x2af3e8=a13_0x474b93,_0x241a15={'KYBsd':_0x2af3e8(0x180),'eJieN':_0x2af3e8(0x165),'yBNMw':_0x2af3e8(0x141)},_0x3deb5c=this[_0x2af3e8(0x1eb)]||this['flow'][_0x2af3e8(0x1ab)](),_0x1b1df7=_0x3deb5c[_0x2af3e8(0x1d2)]()[_0x2af3e8(0x198)]();if(_0x1b1df7[_0x2af3e8(0x14e)](_0x241a15[_0x2af3e8(0x160)]))return llm_file_js_1[_0x2af3e8(0x11b)][_0x2af3e8(0x145)];if(_0x1b1df7[_0x2af3e8(0x14e)](_0x241a15[_0x2af3e8(0x1e0)]))return llm_file_js_1['LLMType'][_0x2af3e8(0x159)];if(_0x1b1df7[_0x2af3e8(0x14e)](_0x241a15[_0x2af3e8(0x144)]))return llm_file_js_1['LLMType']['ANTHROPIC'];return llm_file_js_1['LLMType']['UNSUPPORTED'];}[a13_0x474b93(0x12a)](){return null;}}exports[a13_0x474b93(0x182)]=Step,Step[a13_0x474b93(0x17a)]=new node_async_hooks_1[(a13_0x474b93(0x135))]();
|
package/index.d.ts
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
// PicoFlow - Type definitions
|
|
2
|
-
export { Flow } from
|
|
3
|
-
export { Step } from
|
|
4
|
-
export { LogicStep } from
|
|
5
|
-
export { EndStep } from
|
|
6
|
-
export { Memory } from
|
|
7
|
-
export { FlowCreator } from
|
|
8
|
-
export { HttpContentType } from
|
|
9
|
-
export * from
|
|
10
|
-
|
|
11
|
-
export { FlowEngine } from
|
|
12
|
-
|
|
13
|
-
export { FlowSession } from
|
|
14
|
-
export { SessionLogger } from
|
|
15
|
-
export { FileSession } from
|
|
16
|
-
export { MongoSession } from
|
|
17
|
-
export { CosmoSession } from
|
|
18
|
-
|
|
19
|
-
export { CoreConfig } from
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
export { Flow } from './flow/flow';
|
|
3
|
+
export { Step } from './flow/step';
|
|
4
|
+
export { LogicStep } from './flow/logic-step';
|
|
5
|
+
export { EndStep } from './flow/end-step';
|
|
6
|
+
export { Memory } from './flow/memory';
|
|
7
|
+
export { FlowCreator } from './flow/flow-creator';
|
|
8
|
+
export { HttpContentType } from './flow/content-type';
|
|
9
|
+
export * from './flow/flow-types';
|
|
10
|
+
|
|
11
|
+
export { FlowEngine } from './services/flow-engine';
|
|
12
|
+
|
|
13
|
+
export { FlowSession } from './session/flow-session';
|
|
14
|
+
export { SessionLogger } from './session/session-logger';
|
|
15
|
+
export { FileSession } from './session/file-session';
|
|
16
|
+
export { MongoSession } from './session/mongo-session';
|
|
17
|
+
export { CosmoSession } from './session/cosmo-session';
|
|
18
|
+
|
|
19
|
+
export { CoreConfig } from './configs/core-config';
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
MessageUtil,
|
|
23
|
+
MessageTypes,
|
|
24
|
+
ToolCallMessage,
|
|
25
|
+
ToolMessageOK,
|
|
26
|
+
ToolMessageInfo,
|
|
27
|
+
} from './utils/message-util';
|
|
28
|
+
export { ToolUtil } from './utils/tool-util';
|
|
29
|
+
export { StringUtil } from './utils/string-util';
|
|
30
|
+
export { Environ } from './utils/environ';
|
|
31
|
+
export { LlmFile } from './utils/llm-file';
|
|
32
|
+
export { K } from './utils/constants';
|
|
33
|
+
|
|
34
|
+
export { Prompt } from './prompt/prompt-util';
|
|
35
|
+
export { FlowPrompt } from './prompt/flow-prompt';
|
|
36
|
+
|
|
37
|
+
export { StopTool } from './decorators/stop-tool';
|
|
38
|
+
|
|
39
|
+
export { HttpClient } from './clients/http-client';
|
package/index.js
CHANGED
|
@@ -8,14 +8,17 @@ const load = (relativePath) => {
|
|
|
8
8
|
path.join(__dirname, "../dist/picoflow", relativePath),
|
|
9
9
|
];
|
|
10
10
|
for (const candidate of candidates) {
|
|
11
|
+
let resolved;
|
|
11
12
|
try {
|
|
12
|
-
|
|
13
|
-
return require(candidate);
|
|
13
|
+
resolved = require.resolve(candidate);
|
|
14
14
|
} catch (err) {
|
|
15
15
|
if (err.code !== "MODULE_NOT_FOUND") {
|
|
16
16
|
throw err;
|
|
17
17
|
}
|
|
18
|
+
continue;
|
|
18
19
|
}
|
|
20
|
+
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
21
|
+
return require(resolved);
|
|
19
22
|
}
|
|
20
23
|
const tried = candidates.join(", ");
|
|
21
24
|
throw new Error(`picoflow.index could not load '${relativePath}'. Tried: ${tried}`);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Model } from './model-registry';
|
|
2
|
-
export declare function createPopularModels(): (Model<"gpt-5.4"> | Model<"gpt-5"> | Model<"gpt-5-mini"> | Model<"gpt-5-nano"> | Model<"gpt-4.1"> | Model<"gpt-4.1-mini"> | Model<"gpt-4o"> | Model<"gpt-4o-mini"> | Model<"claude-opus-4-6"> | Model<"claude-opus-4-6-thinking"> | Model<"claude-sonnet-4-6"> | Model<"claude-sonnet-4-6-thinking"> | Model<"claude-haiku-4-5-20251001"> | Model<"claude-opus-4-1-20250805"> | Model<"claude-opus-4-1-20250805-thinking"> | Model<"claude-3-7-sonnet-latest"> | Model<"claude-3-7-sonnet-thinking"> | Model<"claude-3-5-haiku-latest"> | Model<"gemini-3.1-pro-preview"> | Model<"gemini-3-flash-preview"> | Model<"gemini-3.1-flash-lite-preview"> | Model<"gemini-2.5-pro"> | Model<"gemini-2.5-flash"> | Model<"gemini-2.5-flash-lite"> | Model<"qwen2.5:1.5b">)[];
|
|
2
|
+
export declare function createPopularModels(): (Model<"gpt-5.4"> | Model<"gpt-5"> | Model<"gpt-5-mini"> | Model<"gpt-5-nano"> | Model<"gpt-4.1"> | Model<"gpt-4.1-mini"> | Model<"gpt-4o"> | Model<"gpt-4o-mini"> | Model<"claude-opus-4-6"> | Model<"claude-opus-4-6-thinking"> | Model<"claude-sonnet-4-6"> | Model<"claude-sonnet-4-6-thinking"> | Model<"claude-haiku-4-5-20251001"> | Model<"claude-opus-4-1-20250805"> | Model<"claude-opus-4-1-20250805-thinking"> | Model<"claude-3-7-sonnet-latest"> | Model<"claude-3-7-sonnet-thinking"> | Model<"claude-3-5-haiku-latest"> | Model<"gemini-3.1-pro-preview"> | Model<"gemini-3-flash-preview"> | Model<"gemini-3.1-flash-lite-preview"> | Model<"gemini-2.5-pro"> | Model<"gemini-2.5-flash"> | Model<"gemini-2.5-flash-lite"> | Model<"nvidia-deepseek-v4-flash"> | Model<"nvidia-nemotron-3"> | Model<"qwen2.5:1.5b">)[];
|
package/models/default-models.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x287a77=a14_0x4e0f;function a14_0x4e0f(_0x5c0c32,_0x554e01){const _0x484104=a14_0x1b04();return a14_0x4e0f=function(_0x34fdcc,_0x4ca96e){_0x34fdcc=_0x34fdcc-0x1bd;let _0x1b04ab=_0x484104[_0x34fdcc];return _0x1b04ab;},a14_0x4e0f(_0x5c0c32,_0x554e01);}(function(_0x3e2d1a,_0xba8a5){const _0x310627=a14_0x4e0f,_0x3773f3=_0x3e2d1a();while(!![]){try{const _0x55868a=-parseInt(_0x310627(0x1ee))/0x1*(parseInt(_0x310627(0x1dd))/0x2)+-parseInt(_0x310627(0x1e0))/0x3+parseInt(_0x310627(0x1d4))/0x4+-parseInt(_0x310627(0x1e3))/0x5+-parseInt(_0x310627(0x1f3))/0x6+-parseInt(_0x310627(0x1cc))/0x7+parseInt(_0x310627(0x1f2))/0x8;if(_0x55868a===_0xba8a5)break;else _0x3773f3['push'](_0x3773f3['shift']());}catch(_0x378653){_0x3773f3['push'](_0x3773f3['shift']());}}}(a14_0x1b04,0x5077c));const a14_0x4ca96e=(function(){let _0x4c1a8c=!![];return function(_0x25c2e4,_0x3ce581){const _0x49424b=a14_0x4e0f,_0x13c55d={'KSpHe':function(_0x11f481,_0x62cc97){return _0x11f481!==_0x62cc97;},'NUWBK':_0x49424b(0x1c7)},_0xa0d1a7=_0x4c1a8c?function(){const _0x2e50fb=_0x49424b;if(_0x13c55d[_0x2e50fb(0x1c2)]('VvZFW',_0x13c55d[_0x2e50fb(0x1d8)])){if(_0x3ce581){const _0x407ad7=_0x3ce581[_0x2e50fb(0x1ec)](_0x25c2e4,arguments);return _0x3ce581=null,_0x407ad7;}}else{if(_0x4e77fc){const _0xb72ea8=_0x157209[_0x2e50fb(0x1ec)](_0x5ebbe3,arguments);return _0x460cb3=null,_0xb72ea8;}}}:function(){};return _0x4c1a8c=![],_0xa0d1a7;};}()),a14_0x34fdcc=a14_0x4ca96e(this,function(){const _0x171bbf=a14_0x4e0f,_0x4e7d4e={'QdWQr':_0x171bbf(0x1f6)};return a14_0x34fdcc['toString']()[_0x171bbf(0x1c5)](_0x4e7d4e['QdWQr'])['toString']()['constructor'](a14_0x34fdcc)[_0x171bbf(0x1c5)](_0x171bbf(0x1f6));});a14_0x34fdcc();function a14_0x1b04(){const _0x26afac=['defineProperty','4482625DGlRvz','claude-3-5-haiku-latest','gemini-2.5-pro','xdsHu','GveOD','claude-opus-4-1-20250805-thinking','CoreConfig','gpt-5-mini','2082620BUgiLf','lawMW','LAbPL','gpt-4o-mini','NUWBK','claude-sonnet-4-6','OpenAIKey','AnthropicKey','gpt-4.1-mini','52fetXXz','gemini-2.5-flash-lite','claude-3-7-sonnet-thinking','256431klNccw','AcDNz','HviJC','3081260QMoFSV','wntKC','HKXTI','claude-sonnet-4-6-thinking','qwen2.5:1.5b','./model-registry','claude-opus-4-6','dZWEy','KuLhC','apply','fQdGU','21311DfkqnW','__esModule','GeminiKey','llmTemperature','16575176hSrlOu','2200596iooFZR','createPopularModels','gpt-4.1','(((.+)+)+)+$','VTyeN','medium','llmRetry','WJByg','gemini-2.5-flash','IXQYS','bHzZZ','claude-opus-4-1-20250805','gpt-5.4','gemini-3.1-pro-preview','enabled','gemini-3.1-flash-lite-preview','gemini-3-flash-preview','Model','GCrws','Bxhub','KSpHe','claude-haiku-4-5-20251001','ollama','search','lxSpG','UPEbJ','tIIab','gpt-5-nano','uGIiL'];a14_0x1b04=function(){return _0x26afac;};return a14_0x1b04();}'use strict';Object[a14_0x287a77(0x1cb)](exports,a14_0x287a77(0x1ef),{'value':!![]}),exports[a14_0x287a77(0x1f4)]=createPopularModels;const core_config_1=require('../configs/core-config'),model_registry_1=require(a14_0x287a77(0x1e8));function createPopularModels(){const _0x374c99=a14_0x287a77,_0x19cedf={'xdsHu':_0x374c99(0x1ff),'WJByg':_0x374c99(0x1f8),'wntKC':'gpt-5','IXQYS':_0x374c99(0x1d3),'Bxhub':_0x374c99(0x1c9),'VTyeN':_0x374c99(0x1f5),'KuLhC':_0x374c99(0x1dc),'fQdGU':'gpt-4o','FGrQx':_0x374c99(0x1d7),'bHzZZ':_0x374c99(0x1e9),'lxSpG':'claude-opus-4-6-thinking','nkNlw':_0x374c99(0x1d9),'dZWEy':_0x374c99(0x1e6),'GCrws':_0x374c99(0x201),'uGIiL':_0x374c99(0x1c3),'mowQO':_0x374c99(0x1fe),'LAbPL':_0x374c99(0x1d1),'GveOD':'claude-3-7-sonnet-latest','WtAqe':_0x374c99(0x1cd),'tIIab':_0x374c99(0x200),'lawMW':_0x374c99(0x1bd),'mcYRj':_0x374c99(0x1fb),'HKXTI':_0x374c99(0x1de),'HviJC':_0x374c99(0x1e7),'AcDNz':_0x374c99(0x1c4)};return[new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1cf)],{'apiKey':core_config_1['CoreConfig'][_0x374c99(0x1da)],'maxRetries':core_config_1['CoreConfig']['llmRetry'],'reasoning':{'effort':_0x19cedf[_0x374c99(0x1fa)]}}),new model_registry_1['Model'](_0x19cedf[_0x374c99(0x1e4)],{'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1da)],'maxRetries':core_config_1[_0x374c99(0x1d2)]['llmRetry'],'reasoning':{'effort':_0x19cedf[_0x374c99(0x1fa)]}}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1fc)],{'apiKey':core_config_1['CoreConfig'][_0x374c99(0x1da)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)],'reasoning':{'effort':_0x19cedf[_0x374c99(0x1fa)]}}),new model_registry_1['Model'](_0x19cedf[_0x374c99(0x1c1)],{'apiKey':core_config_1['CoreConfig'][_0x374c99(0x1da)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)],'reasoning':{'effort':_0x19cedf[_0x374c99(0x1fa)]}}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1f7)],{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1da)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1eb)],{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1['CoreConfig'][_0x374c99(0x1da)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1['Model'](_0x19cedf[_0x374c99(0x1ed)],{'temperature':core_config_1[_0x374c99(0x1d2)]['llmTemperature'],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1da)],'maxRetries':core_config_1['CoreConfig'][_0x374c99(0x1f9)]}),new model_registry_1['Model'](_0x19cedf['FGrQx'],{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1da)],'maxRetries':core_config_1['CoreConfig'][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf['bHzZZ'],{'temperature':0x0,'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)]['llmRetry']}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1c6)],{'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)],'thinking':{'type':_0x374c99(0x201),'budget_tokens':0x800}},_0x19cedf[_0x374c99(0x1fd)]),new model_registry_1['Model'](_0x19cedf['nkNlw'],{'temperature':0x0,'apiKey':core_config_1[_0x374c99(0x1d2)]['AnthropicKey'],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1['Model'](_0x19cedf[_0x374c99(0x1ea)],{'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1db)],'maxRetries':core_config_1['CoreConfig'][_0x374c99(0x1f9)],'thinking':{'type':_0x19cedf[_0x374c99(0x1c0)],'budget_tokens':0x800}},_0x374c99(0x1d9)),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1ca)],{'temperature':core_config_1[_0x374c99(0x1d2)]['llmTemperature'],'apiKey':core_config_1['CoreConfig'][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf['mowQO'],{'temperature':0x0,'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1['Model'](_0x19cedf[_0x374c99(0x1d6)],{'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)]['llmRetry'],'thinking':{'type':_0x19cedf['GCrws'],'budget_tokens':0x800}},_0x19cedf['mowQO']),new model_registry_1['Model'](_0x19cedf[_0x374c99(0x1d0)],{'temperature':0x0,'apiKey':core_config_1['CoreConfig'][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x374c99(0x1df),{'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)],'thinking':{'type':_0x19cedf[_0x374c99(0x1c0)],'budget_tokens':0x800}},_0x19cedf[_0x374c99(0x1d0)]),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf['WtAqe'],{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1db)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1['Model'](_0x19cedf[_0x374c99(0x1c8)],{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f0)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x374c99(0x1be),{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f0)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1d5)],{'temperature':core_config_1['CoreConfig']['llmTemperature'],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f0)],'maxRetries':core_config_1['CoreConfig'][_0x374c99(0x1f9)]}),new model_registry_1['Model'](_0x374c99(0x1ce),{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f0)],'maxRetries':core_config_1['CoreConfig'][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf['mcYRj'],{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1['CoreConfig']['GeminiKey'],'maxRetries':core_config_1['CoreConfig']['llmRetry']}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1e5)],{'temperature':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f1)],'apiKey':core_config_1['CoreConfig'][_0x374c99(0x1f0)],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)]}),new model_registry_1[(_0x374c99(0x1bf))](_0x19cedf[_0x374c99(0x1e2)],{'provider':_0x19cedf[_0x374c99(0x1e1)],'think':![],'maxRetries':core_config_1[_0x374c99(0x1d2)][_0x374c99(0x1f9)],'options':{'temperature':core_config_1[_0x374c99(0x1d2)]['llmTemperature']}})];}
|
|
1
|
+
const a14_0x12d3ed=a14_0x4f68;(function(_0x5c88ac,_0x7f73d0){const _0x43ecb4=a14_0x4f68,_0x509b1c=_0x5c88ac();while(!![]){try{const _0x53aed4=parseInt(_0x43ecb4(0xfa))/0x1*(parseInt(_0x43ecb4(0xf9))/0x2)+parseInt(_0x43ecb4(0xe7))/0x3*(-parseInt(_0x43ecb4(0xde))/0x4)+parseInt(_0x43ecb4(0xd5))/0x5+-parseInt(_0x43ecb4(0xf8))/0x6*(-parseInt(_0x43ecb4(0xeb))/0x7)+parseInt(_0x43ecb4(0x10c))/0x8*(parseInt(_0x43ecb4(0x102))/0x9)+-parseInt(_0x43ecb4(0x108))/0xa*(parseInt(_0x43ecb4(0x110))/0xb)+-parseInt(_0x43ecb4(0x113))/0xc;if(_0x53aed4===_0x7f73d0)break;else _0x509b1c['push'](_0x509b1c['shift']());}catch(_0x53362e){_0x509b1c['push'](_0x509b1c['shift']());}}}(a14_0x9a91,0x99db3));const a14_0x2179a6=(function(){let _0x23879d=!![];return function(_0x12a68e,_0x46b8f2){const _0x3451f5=_0x23879d?function(){const _0x5cc247=a14_0x4f68;if(_0x46b8f2){const _0x39be60=_0x46b8f2[_0x5cc247(0xe9)](_0x12a68e,arguments);return _0x46b8f2=null,_0x39be60;}}:function(){};return _0x23879d=![],_0x3451f5;};}()),a14_0x4efec0=a14_0x2179a6(this,function(){const _0x2bbe02=a14_0x4f68;return a14_0x4efec0[_0x2bbe02(0x103)]()[_0x2bbe02(0xe1)](_0x2bbe02(0xf7))['toString']()[_0x2bbe02(0xfd)](a14_0x4efec0)['search'](_0x2bbe02(0xf7));});a14_0x4efec0();'use strict';Object['defineProperty'](exports,a14_0x12d3ed(0x111),{'value':!![]}),exports[a14_0x12d3ed(0x10d)]=createPopularModels;function a14_0x4f68(_0x3e861a,_0x2b3059){const _0x7fd6fd=a14_0x9a91();return a14_0x4f68=function(_0x4efec0,_0x2179a6){_0x4efec0=_0x4efec0-0xd2;let _0x9a91e3=_0x7fd6fd[_0x4efec0];return _0x9a91e3;},a14_0x4f68(_0x3e861a,_0x2b3059);}function a14_0x9a91(){const _0x5dcec5=['47JflYax','Model','ollama','constructor','gemini-3.1-flash-lite-preview','zsUQl','eBaGm','nvidia/nemotron-3-ultra-550b-a55b','72VfYGBP','toString','xyjpR','claude-sonnet-4-6-thinking','deepseek-ai/deepseek-v4-flash','medium','70dCMEkc','gemini-3.1-pro-preview','xJEYF','nvidia-nemotron-3','311864FfCwxR','createPopularModels','XabnS','CoreConfig','581614kTRZMt','__esModule','claude-3-7-sonnet-latest','13661052ZPtRVN','high','claude-sonnet-4-6','Cstia','1089225FaULbS','yLXFF','gJenP','enabled','JfDxW','gemini-2.5-flash','gemini-2.5-pro','claude-opus-4-1-20250805','bmmlm','12WVhddo','NvidiaKey','PhSAL','search','claude-opus-4-1-20250805-thinking','KtdvI','gpt-5-mini','AnthropicKey','OpenAIKey','414417ceGNEF','BgYQY','apply','llmRetry','2286655SjBYPR','GeminiKey','gpt-4o-mini','gpt-4o','llmTemperature','PbbOx','QYCIk','lVoBt','gpt-5.4','JYDGP','lxfZB','claude-opus-4-6','(((.+)+)+)+$','18PUCdiy','44402FWYbsh'];a14_0x9a91=function(){return _0x5dcec5;};return a14_0x9a91();}const core_config_1=require('../configs/core-config'),model_registry_1=require('./model-registry');function createPopularModels(){const _0x943979=a14_0x12d3ed,_0x4e695d={'JYDGP':_0x943979(0xf3),'zsUQl':_0x943979(0x107),'kvRQR':'gpt-5','xJEYF':_0x943979(0xe4),'gJenP':'gpt-5-nano','MSLsD':'gpt-4.1','lHxjJ':'gpt-4.1-mini','bYfSi':_0x943979(0xee),'bmmlm':_0x943979(0xf6),'iAcMr':'claude-opus-4-6-thinking','JfDxW':_0x943979(0xd8),'lVoBt':_0x943979(0xd3),'yLXFF':'claude-haiku-4-5-20251001','XabnS':_0x943979(0xdc),'eBaGm':_0x943979(0xe2),'BgYQY':_0x943979(0x112),'PhSAL':'claude-3-7-sonnet-thinking','RayFO':_0x943979(0xdb),'xyjpR':_0x943979(0xda),'PbbOx':'nvidia','Cstia':_0x943979(0xd2),'QYCIk':_0x943979(0x106),'lxfZB':_0x943979(0x101),'KtdvI':'qwen2.5:1.5b'};return[new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0xf4)],{'apiKey':core_config_1[_0x943979(0x10f)]['OpenAIKey'],'maxRetries':core_config_1['CoreConfig'][_0x943979(0xea)],'reasoning':{'effort':_0x4e695d[_0x943979(0xff)]},'useResponsesApi':!![]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d['kvRQR'],{'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xe6)],'maxRetries':core_config_1['CoreConfig'][_0x943979(0xea)],'reasoning':{'effort':_0x4e695d[_0x943979(0xff)]},'useResponsesApi':!![]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0x10a)],{'apiKey':core_config_1['CoreConfig'][_0x943979(0xe6)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)],'reasoning':{'effort':_0x4e695d[_0x943979(0xff)]},'useResponsesApi':!![]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0xd7)],{'apiKey':core_config_1['CoreConfig'][_0x943979(0xe6)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)],'reasoning':{'effort':_0x4e695d['zsUQl']},'useResponsesApi':!![]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d['MSLsD'],{'temperature':core_config_1['CoreConfig']['llmTemperature'],'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xe6)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d['lHxjJ'],{'temperature':core_config_1[_0x943979(0x10f)]['llmTemperature'],'apiKey':core_config_1['CoreConfig'][_0x943979(0xe6)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]}),new model_registry_1['Model'](_0x4e695d['bYfSi'],{'temperature':core_config_1[_0x943979(0x10f)]['llmTemperature'],'apiKey':core_config_1[_0x943979(0x10f)]['OpenAIKey'],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))](_0x943979(0xed),{'temperature':core_config_1[_0x943979(0x10f)][_0x943979(0xef)],'apiKey':core_config_1['CoreConfig'][_0x943979(0xe6)],'maxRetries':core_config_1[_0x943979(0x10f)]['llmRetry']}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0xdd)],{'temperature':0x0,'apiKey':core_config_1[_0x943979(0x10f)]['AnthropicKey'],'maxRetries':core_config_1['CoreConfig']['llmRetry']}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d['iAcMr'],{'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xe5)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)],'thinking':{'type':_0x943979(0xd8),'budget_tokens':0x800}},_0x943979(0xf6)),new model_registry_1[(_0x943979(0xfb))](_0x943979(0xd3),{'temperature':0x0,'apiKey':core_config_1['CoreConfig'][_0x943979(0xe5)],'maxRetries':core_config_1['CoreConfig']['llmRetry']}),new model_registry_1[(_0x943979(0xfb))](_0x943979(0x105),{'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xe5)],'maxRetries':core_config_1[_0x943979(0x10f)]['llmRetry'],'thinking':{'type':_0x4e695d['JfDxW'],'budget_tokens':0x800}},_0x4e695d[_0x943979(0xf2)]),new model_registry_1['Model'](_0x4e695d[_0x943979(0xd6)],{'temperature':core_config_1[_0x943979(0x10f)]['llmTemperature'],'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xe5)],'maxRetries':core_config_1['CoreConfig'][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0x10e)],{'temperature':0x0,'apiKey':core_config_1['CoreConfig'][_0x943979(0xe5)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0x100)],{'apiKey':core_config_1['CoreConfig'][_0x943979(0xe5)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)],'thinking':{'type':_0x943979(0xd8),'budget_tokens':0x800}},_0x4e695d[_0x943979(0x10e)]),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0xe8)],{'temperature':0x0,'apiKey':core_config_1[_0x943979(0x10f)]['AnthropicKey'],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0xe0)],{'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xe5)],'maxRetries':core_config_1['CoreConfig']['llmRetry'],'thinking':{'type':_0x4e695d[_0x943979(0xd9)],'budget_tokens':0x800}},_0x4e695d[_0x943979(0xe8)]),new model_registry_1[(_0x943979(0xfb))]('claude-3-5-haiku-latest',{'temperature':core_config_1[_0x943979(0x10f)][_0x943979(0xef)],'apiKey':core_config_1['CoreConfig'][_0x943979(0xe5)],'maxRetries':core_config_1['CoreConfig'][_0x943979(0xea)]}),new model_registry_1['Model'](_0x943979(0x109),{'temperature':core_config_1[_0x943979(0x10f)][_0x943979(0xef)],'apiKey':core_config_1[_0x943979(0x10f)]['GeminiKey'],'maxRetries':core_config_1['CoreConfig'][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))]('gemini-3-flash-preview',{'temperature':core_config_1['CoreConfig'][_0x943979(0xef)],'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xec)],'maxRetries':core_config_1['CoreConfig'][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))](_0x943979(0xfe),{'temperature':core_config_1[_0x943979(0x10f)][_0x943979(0xef)],'apiKey':core_config_1[_0x943979(0x10f)]['GeminiKey'],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]}),new model_registry_1[(_0x943979(0xfb))](_0x4e695d['RayFO'],{'temperature':core_config_1[_0x943979(0x10f)]['llmTemperature'],'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xec)],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]}),new model_registry_1['Model'](_0x4e695d[_0x943979(0x104)],{'temperature':core_config_1[_0x943979(0x10f)][_0x943979(0xef)],'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xec)],'maxRetries':core_config_1[_0x943979(0x10f)]['llmRetry']}),new model_registry_1[(_0x943979(0xfb))]('gemini-2.5-flash-lite',{'temperature':core_config_1[_0x943979(0x10f)][_0x943979(0xef)],'apiKey':core_config_1[_0x943979(0x10f)]['GeminiKey'],'maxRetries':core_config_1[_0x943979(0x10f)]['llmRetry']}),new model_registry_1[(_0x943979(0xfb))]('nvidia-deepseek-v4-flash',{'provider':_0x4e695d[_0x943979(0xf0)],'thinking':{'type':_0x4e695d['JfDxW']},'reasoning_effort':_0x4e695d[_0x943979(0xd4)],'apiKey':core_config_1[_0x943979(0x10f)]['NvidiaKey'],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)]},_0x4e695d[_0x943979(0xf1)]),new model_registry_1[(_0x943979(0xfb))](_0x943979(0x10b),{'provider':_0x4e695d[_0x943979(0xf0)],'thinking':{'type':_0x943979(0xd8)},'reasoning_effort':_0x4e695d[_0x943979(0xd4)],'apiKey':core_config_1[_0x943979(0x10f)][_0x943979(0xdf)],'maxRetries':core_config_1[_0x943979(0x10f)]['llmRetry']},_0x4e695d[_0x943979(0xf5)]),new model_registry_1[(_0x943979(0xfb))](_0x4e695d[_0x943979(0xe3)],{'provider':_0x943979(0xfc),'think':![],'maxRetries':core_config_1[_0x943979(0x10f)][_0x943979(0xea)],'options':{'temperature':core_config_1['CoreConfig']['llmTemperature']}})];}
|
|
@@ -8,6 +8,7 @@ type OpenAIModelName = `gpt-${string}` | `o${number}${string}`;
|
|
|
8
8
|
type OpenAIReasoningModelName = `gpt-5${string}` | `o${number}${string}`;
|
|
9
9
|
type GeminiModelName = `gemini-${string}`;
|
|
10
10
|
type ClaudeModelName = `claude-${string}`;
|
|
11
|
+
type NvidiaModelName = `nvidia/${string}`;
|
|
11
12
|
type OpenAIModelConfig<Name extends OpenAIModelName> = Name extends OpenAIReasoningModelName ? Omit<ChatOpenAIFields, 'model' | 'temperature'> & {
|
|
12
13
|
provider?: 'openai';
|
|
13
14
|
temperature?: never;
|
|
@@ -31,8 +32,26 @@ type OllamaModelConfig = OllamaTopLevelConfig & {
|
|
|
31
32
|
provider: 'ollama';
|
|
32
33
|
options?: OllamaOptionConfig;
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
type OpenAICompatibleModelBaseConfig = Omit<ChatOpenAIFields, 'model' | 'configuration'> & BaseChatModelParams & {
|
|
36
|
+
apiKey?: string;
|
|
37
|
+
temperature?: number;
|
|
38
|
+
topP?: number;
|
|
39
|
+
maxTokens?: number;
|
|
40
|
+
maxRetries?: number;
|
|
41
|
+
timeout?: number;
|
|
42
|
+
baseURL?: string;
|
|
43
|
+
baseUrl?: string;
|
|
44
|
+
configuration?: ChatOpenAIFields['configuration'];
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
};
|
|
47
|
+
type NvidiaModelConfig = OpenAICompatibleModelBaseConfig & {
|
|
48
|
+
provider?: 'nvidia';
|
|
49
|
+
};
|
|
50
|
+
type ExplicitNvidiaModelConfig = OpenAICompatibleModelBaseConfig & {
|
|
51
|
+
provider: 'nvidia';
|
|
52
|
+
};
|
|
53
|
+
export type ModelConfig<Name extends string> = Name extends OpenAIModelName ? OpenAIModelConfig<Name> : Name extends GeminiModelName ? GeminiModelConfig : Name extends ClaudeModelName ? AnthropicModelConfig : Name extends NvidiaModelName ? NvidiaModelConfig : AzureOpenAIModelConfig | OllamaModelConfig | ExplicitNvidiaModelConfig;
|
|
54
|
+
export type ModelProvider = 'openai' | 'azure-openai' | 'google' | 'anthropic' | 'ollama' | 'nvidia';
|
|
36
55
|
export type SupportedChatModel = ChatGoogleGenerativeAI | ChatOpenAI | AzureChatOpenAI | ChatAnthropic | ChatOllama;
|
|
37
56
|
type Primitive = string | number | boolean | null | undefined;
|
|
38
57
|
export type DeepPartial<T> = T extends Primitive ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : {
|
|
@@ -51,6 +70,7 @@ export declare class Model<Name extends string = string> {
|
|
|
51
70
|
useTools(llm: SupportedChatModel, tools?: DynamicStructuredTool[]): SupportedChatModel;
|
|
52
71
|
private buildParams;
|
|
53
72
|
private buildOllamaParams;
|
|
73
|
+
private buildOpenAICompatibleParams;
|
|
54
74
|
private getModelClass;
|
|
55
75
|
private static detectProvider;
|
|
56
76
|
private static isOpenAIModel;
|
package/models/model-registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a15_0x54f17e=a15_0x14cd;function a15_0x14cd(_0x8acca,_0x5ced11){const _0x40cd64=a15_0x2174();return a15_0x14cd=function(_0x58e9fe,_0x19171d){_0x58e9fe=_0x58e9fe-0xfb;let _0x2174e7=_0x40cd64[_0x58e9fe];return _0x2174e7;},a15_0x14cd(_0x8acca,_0x5ced11);}(function(_0x6f714a,_0x156103){const _0x33c97f=a15_0x14cd,_0x3caeaf=_0x6f714a();while(!![]){try{const _0x204c9f=-parseInt(_0x33c97f(0x107))/0x1+parseInt(_0x33c97f(0x108))/0x2*(-parseInt(_0x33c97f(0xfc))/0x3)+-parseInt(_0x33c97f(0x125))/0x4+-parseInt(_0x33c97f(0x11a))/0x5*(-parseInt(_0x33c97f(0x109))/0x6)+-parseInt(_0x33c97f(0x12d))/0x7*(parseInt(_0x33c97f(0x106))/0x8)+-parseInt(_0x33c97f(0x14b))/0x9+-parseInt(_0x33c97f(0x121))/0xa*(-parseInt(_0x33c97f(0x122))/0xb);if(_0x204c9f===_0x156103)break;else _0x3caeaf['push'](_0x3caeaf['shift']());}catch(_0x23494e){_0x3caeaf['push'](_0x3caeaf['shift']());}}}(a15_0x2174,0x5997c));const a15_0x19171d=(function(){const _0x4f0ae4=a15_0x14cd,_0x33a65e={'DXkbM':_0x4f0ae4(0x147),'BZciP':_0x4f0ae4(0x120),'YntRa':function(_0x4a3eb4,_0x4760a8){return _0x4a3eb4===_0x4760a8;},'IwSVa':_0x4f0ae4(0xfe),'ngZmA':_0x4f0ae4(0x12f)};let _0x4e7f55=!![];return function(_0xced19c,_0x47d576){const _0x4a7f24=_0x4f0ae4,_0x59b744={'qxNRe':_0x33a65e[_0x4a7f24(0x14c)],'Wtxrj':_0x33a65e[_0x4a7f24(0x124)]};if(_0x33a65e['YntRa'](_0x33a65e[_0x4a7f24(0x116)],_0x33a65e[_0x4a7f24(0x14f)]))return _0x1c3ab1;else{const _0x5cf046=_0x4e7f55?function(){const _0x4d5e04=_0x4a7f24;if(_0x47d576){if(_0x59b744[_0x4d5e04(0x128)]===_0x59b744['Wtxrj']){const _0x5c3450=_0x47d576[_0x4d5e04(0x127)](_0xced19c,arguments);return _0x47d576=null,_0x5c3450;}else{if(!_0x2b0d72){const _0x1d5802=this[_0x4d5e04(0x149)][_0x4d5e04(0x137)]()[_0x4d5e04(0x13d)]()[_0x4d5e04(0x10e)];if(!_0x1d5802)throw new _0x38ce98(_0x59b744[_0x4d5e04(0x132)]);return _0x1d5802;}const _0x15d270=this[_0x4d5e04(0x149)][_0x4d5e04(0x111)](_0x5a5cd6);if(!_0x15d270)throw new _0x4d1b28(_0x4d5e04(0x11f)+_0x1878dc+_0x4d5e04(0x154));return _0x15d270;}}}:function(){};return _0x4e7f55=![],_0x5cf046;}};}()),a15_0x58e9fe=a15_0x19171d(this,function(){const _0x514f7b=a15_0x14cd,_0x359fb0={'OCKUy':_0x514f7b(0x117)};return a15_0x58e9fe[_0x514f7b(0x135)]()['search'](_0x359fb0['OCKUy'])[_0x514f7b(0x135)]()['constructor'](a15_0x58e9fe)[_0x514f7b(0x151)](_0x359fb0[_0x514f7b(0x139)]);});a15_0x58e9fe();'use strict';Object[a15_0x54f17e(0x14d)](exports,a15_0x54f17e(0x119),{'value':!![]}),exports['ModelRegistry']=exports['Model']=void 0x0;function a15_0x2174(){const _0x121546=['aoWXA','temperatureOverride','next','test','ollama','getModelClass','Model','name','set','NvgYx','BFjZR','claude-','No\x20model\x20registered','targetName','models','useTools','4272471TXKUjj','DXkbM','defineProperty','Zfxty','ngZmA','ChatOllama','search','RDrtv','@langchain/openai','\x27\x20not\x20registered.','ModelRegistry','906249EwogaB','bindTools','ICzWT','CRAXZ','yZYdb','isOpenAIReasoningModel','ChatGoogleGenerativeAI','startsWith','\x27.\x20Set\x20config.provider\x20explicitly.','google','776qYkSAe','342486TwgimR','2PuXMyf','11166wtzXkK','openai','bTIDj','buildParams','createInstance','value','ffBwn','lBEIk','get','WSyiP','provider','detectProvider','getName','IwSVa','(((.+)+)+)+$','GZGnb','__esModule','25GpVHYy','@langchain/anthropic','iOAlj','VmOop','@langchain/google-genai','Model\x20\x27','WvQNe','36450YMriED','6204OVnDYL','AzureChatOpenAI','BZciP','360168Tyybwl','ChatAnthropic','apply','Wtxrj','nisvf','buildOllamaParams','register','anthropic','35273cROlqy','gemini-','ZghYz','merge','registerMany','qxNRe','temperature','config','toString','DlNzi','values','QLgQc','OCKUy','tjGVH'];a15_0x2174=function(){return _0x121546;};return a15_0x2174();}const lodash_1=require('lodash'),anthropic_1=require(a15_0x54f17e(0x11b)),google_genai_1=require(a15_0x54f17e(0x11e)),ollama_1=require('@langchain/ollama'),openai_1=require(a15_0x54f17e(0x153));class Model{constructor(_0x4c8a01,_0x7153a6,_0x155cf9){const _0x35e1f8=a15_0x54f17e,_0x3f8a06={'lBEIk':function(_0x4c0e42,_0x46dfb8){return _0x4c0e42??_0x46dfb8;}};this['name']=_0x4c8a01,this[_0x35e1f8(0x134)]=_0x7153a6,this[_0x35e1f8(0x148)]=_0x3f8a06[_0x35e1f8(0x110)](_0x155cf9,_0x4c8a01),this[_0x35e1f8(0x113)]=Model['detectProvider'](_0x4c8a01,_0x7153a6);}['supportsTemperatureOverride'](){const _0x4ff6a0=a15_0x54f17e;return!Model['isOpenAIReasoningModel'](this[_0x4ff6a0(0x142)]);}[a15_0x54f17e(0x10d)](_0x2ed3e0){const _0x174b5b=a15_0x54f17e,_0x21f666=this[_0x174b5b(0x10c)](_0x2ed3e0),_0x53726a=this[_0x174b5b(0x140)]();return new _0x53726a(_0x21f666);}[a15_0x54f17e(0x13c)](_0x4a4c44){const _0x5971d1=a15_0x54f17e,_0x2db38a={'aoWXA':_0x5971d1(0x13f)};if(this['provider']===_0x2db38a[_0x5971d1(0x13b)])return{'options':{'temperature':_0x4a4c44}};return{'temperature':_0x4a4c44};}[a15_0x54f17e(0x14a)](_0x25e567,_0x994ae3){const _0x22c35c=a15_0x54f17e,_0x3c1dea={'RDrtv':function(_0xc00c06,_0x2a5199){return _0xc00c06===_0x2a5199;},'CRAXZ':_0x22c35c(0x13f),'bTIDj':function(_0xfe409d,_0x3d8ff3){return _0xfe409d===_0x3d8ff3;},'ffBwn':_0x22c35c(0x118)};if(!_0x994ae3||_0x3c1dea['RDrtv'](_0x994ae3['length'],0x0))return _0x25e567;if(_0x3c1dea[_0x22c35c(0x152)](this['provider'],_0x3c1dea[_0x22c35c(0xff)]))return _0x3c1dea[_0x22c35c(0x10b)](_0x3c1dea[_0x22c35c(0x10f)],_0x3c1dea[_0x22c35c(0x10f)])?_0x25e567['bind']({'tools':_0x994ae3}):this[_0x22c35c(0x111)](_0x53a612)['name'];return _0x25e567[_0x22c35c(0xfd)](_0x994ae3);}[a15_0x54f17e(0x10c)](_0x944733){const _0x3f4a16=a15_0x54f17e,_0x5db462={'iOAlj':function(_0x2f3514,_0xa2b4e8){return _0x2f3514??_0xa2b4e8;}},_0x1e8bc1=this[_0x3f4a16(0x113)]===_0x3f4a16(0x13f)?this[_0x3f4a16(0x12a)]():{...this[_0x3f4a16(0x134)],'model':this[_0x3f4a16(0x148)]},_0xc930cc=(0x0,lodash_1[_0x3f4a16(0x130)])({},_0x1e8bc1,_0x5db462[_0x3f4a16(0x11c)](_0x944733,{}));return delete _0xc930cc[_0x3f4a16(0x113)],!this['supportsTemperatureOverride']()&&delete _0xc930cc[_0x3f4a16(0x133)],_0xc930cc;}[a15_0x54f17e(0x12a)](){const _0x25c598=a15_0x54f17e,_0xa3fcce=this['config'],{options:_0x2153d5,..._0x1225dc}=_0xa3fcce;return{..._0x1225dc,..._0x2153d5,'model':this[_0x25c598(0x148)]};}[a15_0x54f17e(0x140)](){const _0x44ec47=a15_0x54f17e,_0x45fa8={'WSyiP':_0x44ec47(0x10a),'DfwIv':'azure-openai','BFjZR':_0x44ec47(0x105),'QLgQc':_0x44ec47(0x12c)};switch(this[_0x44ec47(0x113)]){case _0x45fa8[_0x44ec47(0x112)]:return openai_1['ChatOpenAI'];case _0x45fa8['DfwIv']:return openai_1[_0x44ec47(0x123)];case _0x45fa8[_0x44ec47(0x145)]:return google_genai_1[_0x44ec47(0x102)];case _0x45fa8[_0x44ec47(0x138)]:return anthropic_1[_0x44ec47(0x126)];case _0x44ec47(0x13f):return ollama_1[_0x44ec47(0x150)];}}static[a15_0x54f17e(0x114)](_0x1f68db,_0x231013){const _0x2d867e=a15_0x54f17e,_0x255dd6={'nisvf':function(_0x4246eb,_0x5daec1){return _0x4246eb in _0x5daec1;},'CseQX':_0x2d867e(0x113),'DlNzi':function(_0x288c14,_0x452d1e){return _0x288c14!==_0x452d1e;},'VmOop':_0x2d867e(0x13a),'yZYdb':'openai','NvgYx':_0x2d867e(0x105),'PsdGD':_0x2d867e(0x146)};if(_0x255dd6[_0x2d867e(0x129)](_0x255dd6['CseQX'],_0x231013)&&_0x231013[_0x2d867e(0x113)]){if(_0x255dd6[_0x2d867e(0x136)](_0x255dd6[_0x2d867e(0x11d)],_0x255dd6[_0x2d867e(0x11d)])){const _0x15aca7=_0x26f1f2?function(){const _0x506866=_0x2d867e;if(_0x25eedf){const _0x4df96e=_0x9f098e[_0x506866(0x127)](_0x477b25,arguments);return _0x70d822=null,_0x4df96e;}}:function(){};return _0x4df1aa=![],_0x15aca7;}else return _0x231013[_0x2d867e(0x113)];}if(Model['isOpenAIModel'](_0x1f68db))return _0x255dd6[_0x2d867e(0x100)];if(_0x1f68db[_0x2d867e(0x103)](_0x2d867e(0x12e)))return _0x255dd6[_0x2d867e(0x144)];if(_0x1f68db[_0x2d867e(0x103)](_0x255dd6['PsdGD']))return _0x2d867e(0x12c);throw new Error('Cannot\x20infer\x20provider\x20for\x20model\x20\x27'+_0x1f68db+_0x2d867e(0x104));}static['isOpenAIModel'](_0x2a295c){return/^gpt-|^o\d/['test'](_0x2a295c);}static[a15_0x54f17e(0x101)](_0x3aef8c){const _0x33e9e3=a15_0x54f17e;return/^gpt-5(?:$|[-:])|^o\d/[_0x33e9e3(0x13e)](_0x3aef8c);}}exports[a15_0x54f17e(0x141)]=Model;class ModelRegistry{constructor(){const _0x5d50bb=a15_0x54f17e;this[_0x5d50bb(0x149)]=new Map();}[a15_0x54f17e(0x12b)](_0x5e763a,_0x2f2888=![]){const _0x1594f5=a15_0x54f17e;if(this[_0x1594f5(0x149)]['has'](_0x5e763a[_0x1594f5(0x142)])&&!_0x2f2888)return this[_0x1594f5(0x149)][_0x1594f5(0x111)](_0x5e763a[_0x1594f5(0x142)]);return this[_0x1594f5(0x149)][_0x1594f5(0x143)](_0x5e763a[_0x1594f5(0x142)],_0x5e763a),_0x5e763a;}[a15_0x54f17e(0x131)](_0xb6e735,_0x3e328f=![]){const _0x3a879b=a15_0x54f17e;for(const _0x1ac0df of _0xb6e735){this[_0x3a879b(0x12b)](_0x1ac0df,_0x3e328f);}}['get'](_0x3886c7){const _0x3cacd1=a15_0x54f17e,_0xd048f={'Zfxty':_0x3cacd1(0x147)};if(!_0x3886c7){const _0x535b93=this[_0x3cacd1(0x149)]['values']()['next']()[_0x3cacd1(0x10e)];if(!_0x535b93)throw new Error(_0xd048f[_0x3cacd1(0x14e)]);return _0x535b93;}const _0xb309c5=this[_0x3cacd1(0x149)]['get'](_0x3886c7);if(!_0xb309c5)throw new Error(_0x3cacd1(0x11f)+_0x3886c7+_0x3cacd1(0x154));return _0xb309c5;}[a15_0x54f17e(0x115)](_0x353888){const _0x246a16=a15_0x54f17e;return this[_0x246a16(0x111)](_0x353888)[_0x246a16(0x142)];}}exports[a15_0x54f17e(0xfb)]=ModelRegistry;
|
|
1
|
+
function a15_0x5334(){const _0x2362b0=['detectProvider','pLJcP','cIObL','pTZyb','858JXwOMn','zsdCq','__esModule','RvcDr','registerMany','sGRZE','OnOMN','Ufuhv','search','AvZYA','nRCfo','BdyJB','@langchain/ollama','lSvoM','buildOpenAICompatibleParams','1492750YDaanV','Model','bind','get','zZWbB','value','LXzvm','startsWith','18ZAEZsu','omCmZ','set','ChatOllama','PJxhX','name','(((.+)+)+)+$','YnYFz','DSIyQ','openai','uNukz','DpZVF','CMTbN','gemini-','useTools','763252TXkifQ','xkIdO','sJErx','ModelRegistry','claude-','baseURL','15640120ODdrDO','ChatAnthropic','5662DqBnrf','apply','gkdfr','provider','RLsSm','pTQwE','buildParams','Bdtgz','HHRKV','isOpenAIModel','qhRQL','rckHZ','lodash','buildOllamaParams','16592HKalMY','uNXif','vJFXa','bNyVb','hZgTe','cBzXn','No\x20model\x20registered','models','AmKtg','XXBpA','createInstance','EWArY','getName','test','uJZGV','azure-openai','@langchain/anthropic','length','Jkkss','2115nvkgWp','3046108WAADps','44856PQfdCi','VPnnh','google','ChatGoogleGenerativeAI','isOpenAIReasoningModel','nvidia/','XVPqy','XiTey','ollama','getModelClass','values','TrhCa','has','Cannot\x20infer\x20provider\x20for\x20model\x20\x27','https://integrate.api.nvidia.com/v1','targetName','anthropic','temperatureOverride','XauCs','PZXYr','constructor','next','config','isgmX','mvZEH','qXMpB','Model\x20\x27','nvidia','supportsTemperatureOverride','XPcIz','\x27\x20not\x20registered.','merge'];a15_0x5334=function(){return _0x2362b0;};return a15_0x5334();}const a15_0x114ed2=a15_0x4d01;(function(_0x3a82b2,_0x5c16bc){const _0x3e9725=a15_0x4d01,_0x9e3f14=_0x3a82b2();while(!![]){try{const _0x5e6ebf=parseInt(_0x3e9725(0x1d2))/0x1+parseInt(_0x3e9725(0x1da))/0x2*(parseInt(_0x3e9725(0x221))/0x3)+parseInt(_0x3e9725(0x1fc))/0x4+parseInt(_0x3e9725(0x1bb))/0x5+parseInt(_0x3e9725(0x1c3))/0x6*(parseInt(_0x3e9725(0x1fd))/0x7)+-parseInt(_0x3e9725(0x1e8))/0x8*(parseInt(_0x3e9725(0x1fb))/0x9)+-parseInt(_0x3e9725(0x1d8))/0xa;if(_0x5e6ebf===_0x5c16bc)break;else _0x9e3f14['push'](_0x9e3f14['shift']());}catch(_0x23f693){_0x9e3f14['push'](_0x9e3f14['shift']());}}}(a15_0x5334,0x92af1));const a15_0x50fd77=(function(){const _0x4084e5=a15_0x4d01,_0x22d65d={'HMZvc':function(_0x5911c9,_0x3d4662){return _0x5911c9===_0x3d4662;},'DpZVF':_0x4084e5(0x21e)};let _0x40ddff=!![];return function(_0x52b471,_0x27af3f){const _0x57f81a=_0x4084e5,_0x250d0a={'vJFXa':function(_0x26e0a4,_0x54cded){return _0x22d65d['HMZvc'](_0x26e0a4,_0x54cded);},'TrhCa':_0x22d65d[_0x57f81a(0x1ce)],'AmKtg':_0x57f81a(0x220)},_0x2ff262=_0x40ddff?function(){const _0x40dafe=_0x57f81a;if(_0x250d0a[_0x40dafe(0x1ea)](_0x250d0a[_0x40dafe(0x208)],_0x250d0a[_0x40dafe(0x1f0)])){const _0x35f253=this[_0x40dafe(0x213)],{options:_0x2e0b8e,..._0x1331e0}=_0x35f253;return{..._0x1331e0,..._0x2e0b8e,'model':this[_0x40dafe(0x20c)]};}else{if(_0x27af3f){const _0x3a3100=_0x27af3f[_0x40dafe(0x1db)](_0x52b471,arguments);return _0x27af3f=null,_0x3a3100;}}}:function(){};return _0x40ddff=![],_0x2ff262;};}()),a15_0x161db4=a15_0x50fd77(this,function(){const _0x2734a5=a15_0x4d01,_0x50c6b2={'sGRZE':_0x2734a5(0x1c9)};return a15_0x161db4['toString']()[_0x2734a5(0x229)](_0x50c6b2['sGRZE'])['toString']()[_0x2734a5(0x211)](a15_0x161db4)['search'](_0x50c6b2[_0x2734a5(0x226)]);});a15_0x161db4();'use strict';Object['defineProperty'](exports,a15_0x114ed2(0x223),{'value':!![]}),exports[a15_0x114ed2(0x1d5)]=exports[a15_0x114ed2(0x1bc)]=void 0x0;const lodash_1=require(a15_0x114ed2(0x1e6)),anthropic_1=require(a15_0x114ed2(0x1f8)),google_genai_1=require('@langchain/google-genai'),ollama_1=require(a15_0x114ed2(0x22d)),openai_1=require('@langchain/openai'),NVIDIA_OPENAI_BASE_URL=a15_0x114ed2(0x20b);function a15_0x4d01(_0x16d055,_0x48fa95){const _0x577829=a15_0x5334();return a15_0x4d01=function(_0x161db4,_0x50fd77){_0x161db4=_0x161db4-0x1ba;let _0x5334bb=_0x577829[_0x161db4];return _0x5334bb;},a15_0x4d01(_0x16d055,_0x48fa95);}class Model{constructor(_0x1fc29f,_0x313caf,_0x2ec7c2){const _0x4313e8=a15_0x114ed2,_0x54b809={'omCmZ':function(_0x2c908e,_0x11c75e){return _0x2c908e??_0x11c75e;}};this[_0x4313e8(0x1c8)]=_0x1fc29f,this[_0x4313e8(0x213)]=_0x313caf,this[_0x4313e8(0x20c)]=_0x54b809[_0x4313e8(0x1c4)](_0x2ec7c2,_0x1fc29f),this[_0x4313e8(0x1dd)]=Model['detectProvider'](_0x1fc29f,_0x313caf);}[a15_0x114ed2(0x219)](){const _0x2339c4=a15_0x114ed2;return!Model[_0x2339c4(0x201)](this['name']);}[a15_0x114ed2(0x1f2)](_0x1a4ed8){const _0x179ae9=a15_0x114ed2,_0x4262e1=this[_0x179ae9(0x1e0)](_0x1a4ed8),_0x57f8da=this[_0x179ae9(0x206)]();return new _0x57f8da(_0x4262e1);}[a15_0x114ed2(0x20e)](_0x2deaa3){const _0x146d52=a15_0x114ed2,_0x45744b={'isgmX':function(_0xe1d74d,_0x26e0f6){return _0xe1d74d===_0x26e0f6;},'VPnnh':'ollama'};if(_0x45744b[_0x146d52(0x214)](this[_0x146d52(0x1dd)],_0x45744b[_0x146d52(0x1fe)]))return{'options':{'temperature':_0x2deaa3}};return{'temperature':_0x2deaa3};}[a15_0x114ed2(0x1d1)](_0x1784f1,_0x302905){const _0x38ab9a=a15_0x114ed2,_0x8b287={'PJxhX':_0x38ab9a(0x205),'LXzvm':_0x38ab9a(0x1e4)};if(!_0x302905||_0x302905[_0x38ab9a(0x1f9)]===0x0)return _0x1784f1;if(this[_0x38ab9a(0x1dd)]===_0x8b287[_0x38ab9a(0x1c7)]){if(_0x8b287[_0x38ab9a(0x1c1)]==='qhRQL')return _0x1784f1[_0x38ab9a(0x1bd)]({'tools':_0x302905});else throw new _0x512eef(_0x38ab9a(0x217)+_0x183ea1+_0x38ab9a(0x21b));}return _0x1784f1['bindTools'](_0x302905);}[a15_0x114ed2(0x1e0)](_0x5f5bfe){const _0x376721=a15_0x114ed2,_0x8ac863={'ZctHw':_0x376721(0x1ff),'mvZEH':function(_0x39b5ed,_0x46b480){return _0x39b5ed===_0x46b480;},'XVPqy':function(_0x8fc47e,_0x290e19){return _0x8fc47e??_0x290e19;},'PGEPz':_0x376721(0x1d4)},_0x1a2183=_0x8ac863[_0x376721(0x215)](this[_0x376721(0x1dd)],_0x376721(0x218))?this[_0x376721(0x1ba)](NVIDIA_OPENAI_BASE_URL,_0x5f5bfe):(0x0,lodash_1[_0x376721(0x21c)])({},this['provider']===_0x376721(0x205)?this[_0x376721(0x1e7)]():{...this[_0x376721(0x213)],'model':this['targetName']},_0x8ac863[_0x376721(0x203)](_0x5f5bfe,{}));delete _0x1a2183[_0x376721(0x1dd)];if(!this[_0x376721(0x219)]()){if(_0x8ac863[_0x376721(0x215)](_0x376721(0x21f),_0x8ac863['PGEPz']))return _0x8ac863['ZctHw'];else delete _0x1a2183['temperature'];}return _0x1a2183;}[a15_0x114ed2(0x1e7)](){const _0x3115fe=a15_0x114ed2,_0x5904f8=this['config'],{options:_0x15921c,..._0x2c822c}=_0x5904f8;return{..._0x2c822c,..._0x15921c,'model':this[_0x3115fe(0x20c)]};}[a15_0x114ed2(0x1ba)](_0x2c5320,_0x110555){const _0x4469a2=a15_0x114ed2,_0x7651b7={'pCtIj':function(_0x1460cc,_0x1a7193){return _0x1460cc??_0x1a7193;}},_0x1bcec4=(0x0,lodash_1[_0x4469a2(0x21c)])({},this[_0x4469a2(0x213)],_0x110555??{}),{baseURL:_0x4b9522,baseUrl:_0x5317e8,configuration:_0x47bc28,..._0x474116}=_0x1bcec4,_0x10cf30=_0x7651b7['pCtIj'](_0x4b9522,_0x5317e8)??_0x47bc28?.[_0x4469a2(0x1d7)]??_0x2c5320;return{..._0x474116,'model':this[_0x4469a2(0x20c)],'configuration':{..._0x47bc28,'baseURL':_0x10cf30}};}[a15_0x114ed2(0x206)](){const _0x219d0e=a15_0x114ed2,_0xab9c15={'YnYFz':_0x219d0e(0x1cc),'rckHZ':_0x219d0e(0x1f7),'Jkkss':_0x219d0e(0x1ff),'zsdCq':_0x219d0e(0x20d),'XXBpA':_0x219d0e(0x205)};switch(this[_0x219d0e(0x1dd)]){case _0xab9c15[_0x219d0e(0x1ca)]:return openai_1['ChatOpenAI'];case _0xab9c15[_0x219d0e(0x1e5)]:return openai_1['AzureChatOpenAI'];case _0xab9c15[_0x219d0e(0x1fa)]:return google_genai_1[_0x219d0e(0x200)];case _0xab9c15[_0x219d0e(0x222)]:return anthropic_1[_0x219d0e(0x1d9)];case _0xab9c15[_0x219d0e(0x1f1)]:return ollama_1[_0x219d0e(0x1c6)];case _0x219d0e(0x218):return openai_1['ChatOpenAI'];}}static[a15_0x114ed2(0x21d)](_0x469683,_0x575c30){const _0x52f0f6=a15_0x114ed2,_0x39c5cd={'lSvoM':function(_0x285dfb,_0x265a7d){return _0x285dfb in _0x265a7d;},'bbOXv':_0x52f0f6(0x1dd),'Ufuhv':function(_0x4e2faf,_0x112ab1){return _0x4e2faf===_0x112ab1;},'BXxUm':function(_0x50de32,_0x2aee22){return _0x50de32!==_0x2aee22;},'BdyJB':_0x52f0f6(0x1d3),'XauCs':_0x52f0f6(0x1cc),'Bdtgz':_0x52f0f6(0x1d0),'XPcIz':function(_0x186731,_0x3f9e0a){return _0x186731!==_0x3f9e0a;},'XiTey':_0x52f0f6(0x1e2),'EWArY':_0x52f0f6(0x1eb),'LCSwL':_0x52f0f6(0x1d6),'RLsSm':_0x52f0f6(0x20d),'CMTbN':_0x52f0f6(0x202),'nRCfo':'nvidia'};if(_0x39c5cd[_0x52f0f6(0x22e)](_0x39c5cd['bbOXv'],_0x575c30)&&_0x575c30[_0x52f0f6(0x1dd)]){if(_0x39c5cd[_0x52f0f6(0x228)](_0x52f0f6(0x1cb),_0x52f0f6(0x1cb)))return _0x575c30[_0x52f0f6(0x1dd)];else{const _0x545102=_0x3eebcd['apply'](_0x5d91f6,arguments);return _0x5f2844=null,_0x545102;}}if(Model[_0x52f0f6(0x1e3)](_0x469683)){if(_0x39c5cd['BXxUm'](_0x39c5cd[_0x52f0f6(0x22c)],_0x52f0f6(0x1ec)))return _0x39c5cd[_0x52f0f6(0x20f)];else{const _0x172ad2=(0x0,_0xe19a9[_0x52f0f6(0x21c)])({},this['config'],_0x45e1e6??{}),{baseURL:_0x14ef0e,baseUrl:_0x536c74,configuration:_0x4cf6b0,..._0xa2afcb}=_0x172ad2,_0x4f934e=_0x14ef0e??_0x536c74??_0x4cf6b0?.[_0x52f0f6(0x1d7)]??_0x21ee69;return{..._0xa2afcb,'model':this[_0x52f0f6(0x20c)],'configuration':{..._0x4cf6b0,'baseURL':_0x4f934e}};}}if(_0x469683[_0x52f0f6(0x1c2)](_0x39c5cd[_0x52f0f6(0x1e1)]))return _0x39c5cd[_0x52f0f6(0x21a)](_0x39c5cd[_0x52f0f6(0x204)],_0x39c5cd[_0x52f0f6(0x1f3)])?_0x52f0f6(0x1ff):_0x2edbce[_0x52f0f6(0x1bd)]({'tools':_0x5796a6});if(_0x469683[_0x52f0f6(0x1c2)](_0x39c5cd['LCSwL']))return _0x39c5cd[_0x52f0f6(0x1de)];if(_0x469683[_0x52f0f6(0x1c2)](_0x39c5cd[_0x52f0f6(0x1cf)]))return _0x39c5cd[_0x52f0f6(0x22b)];throw new Error(_0x52f0f6(0x20a)+_0x469683+'\x27.\x20Set\x20config.provider\x20explicitly.');}static[a15_0x114ed2(0x1e3)](_0x4deb91){const _0x366657=a15_0x114ed2;return/^gpt-|^o\d/[_0x366657(0x1f5)](_0x4deb91);}static[a15_0x114ed2(0x201)](_0x3e09be){const _0x3e9c45=a15_0x114ed2;return/^gpt-5(?:$|[-:])|^o\d/[_0x3e9c45(0x1f5)](_0x3e09be);}}exports[a15_0x114ed2(0x1bc)]=Model;class ModelRegistry{constructor(){const _0x426b5f=a15_0x114ed2;this[_0x426b5f(0x1ef)]=new Map();}['register'](_0x3b2bcc,_0xd94d79=![]){const _0x595b79=a15_0x114ed2,_0x3d668e={'pTQwE':function(_0x156574,_0x31ba90){return _0x156574===_0x31ba90;},'PZXYr':_0x595b79(0x218),'RvcDr':_0x595b79(0x205),'OnOMN':function(_0x735266,_0x13a843){return _0x735266??_0x13a843;},'gkdfr':function(_0x6848fc,_0x4f5987){return _0x6848fc!==_0x4f5987;},'qXMpB':_0x595b79(0x1ed)};if(this[_0x595b79(0x1ef)][_0x595b79(0x209)](_0x3b2bcc[_0x595b79(0x1c8)])&&!_0xd94d79){if(_0x3d668e[_0x595b79(0x1dc)](_0x3d668e[_0x595b79(0x216)],_0x3d668e['qXMpB'])){const _0x4f3c4b=_0x3d668e[_0x595b79(0x1df)](this[_0x595b79(0x1dd)],_0x3d668e[_0x595b79(0x210)])?this[_0x595b79(0x1ba)](_0x4c1ae8,_0x27ab43):(0x0,_0x3ec6a2[_0x595b79(0x21c)])({},this[_0x595b79(0x1dd)]===_0x3d668e[_0x595b79(0x224)]?this[_0x595b79(0x1e7)]():{...this[_0x595b79(0x213)],'model':this[_0x595b79(0x20c)]},_0x3d668e[_0x595b79(0x227)](_0x58f985,{}));return delete _0x4f3c4b[_0x595b79(0x1dd)],!this['supportsTemperatureOverride']()&&delete _0x4f3c4b['temperature'],_0x4f3c4b;}else return this[_0x595b79(0x1ef)][_0x595b79(0x1be)](_0x3b2bcc['name']);}return this[_0x595b79(0x1ef)][_0x595b79(0x1c5)](_0x3b2bcc[_0x595b79(0x1c8)],_0x3b2bcc),_0x3b2bcc;}[a15_0x114ed2(0x225)](_0x29f29c,_0x2613ea=![]){const _0x44f480=a15_0x114ed2,_0x3f0312={'zZWbB':_0x44f480(0x1ee),'uNukz':_0x44f480(0x1e9)};for(const _0x40a4a4 of _0x29f29c){if('uNXif'===_0x3f0312[_0x44f480(0x1cd)])this['register'](_0x40a4a4,_0x2613ea);else{if(!_0x2fb4b6){const _0x55e5c8=this['models'][_0x44f480(0x207)]()[_0x44f480(0x212)]()[_0x44f480(0x1c0)];if(!_0x55e5c8)throw new _0x3c89c0(_0x3f0312[_0x44f480(0x1bf)]);return _0x55e5c8;}const _0x1154ec=this[_0x44f480(0x1ef)][_0x44f480(0x1be)](_0x175de1);if(!_0x1154ec)throw new _0x47381d(_0x44f480(0x217)+_0x3494e1+_0x44f480(0x21b));return _0x1154ec;}}}[a15_0x114ed2(0x1be)](_0x5b97ac){const _0x3be010=a15_0x114ed2,_0x19400e={'rHEPW':_0x3be010(0x1ee),'uJZGV':function(_0x5ae546,_0x57114c){return _0x5ae546===_0x57114c;},'DpygQ':'NGfBx','FaQwy':_0x3be010(0x22a)};if(!_0x5b97ac){if(_0x19400e[_0x3be010(0x1f6)](_0x19400e['DpygQ'],_0x19400e['FaQwy'])){const _0x1b9319=this[_0x3be010(0x1ef)][_0x3be010(0x207)]()['next']()[_0x3be010(0x1c0)];if(!_0x1b9319)throw new _0x5baa6d(_0x19400e['rHEPW']);return _0x1b9319;}else{const _0x4e9aed=this['models'][_0x3be010(0x207)]()[_0x3be010(0x212)]()['value'];if(!_0x4e9aed)throw new Error(_0x19400e['rHEPW']);return _0x4e9aed;}}const _0x149ee4=this[_0x3be010(0x1ef)]['get'](_0x5b97ac);if(!_0x149ee4)throw new Error('Model\x20\x27'+_0x5b97ac+_0x3be010(0x21b));return _0x149ee4;}[a15_0x114ed2(0x1f4)](_0x4762b9){const _0x5adb15=a15_0x114ed2;return this[_0x5adb15(0x1be)](_0x4762b9)[_0x5adb15(0x1c8)];}}exports[a15_0x114ed2(0x1d5)]=ModelRegistry;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picoflow/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "PicoFlow - Agentic Flow Framework",
|
|
5
5
|
"author": "picoflow.io LLC",
|
|
6
6
|
"license": "Proprietarily Licensed",
|
|
@@ -26,24 +26,26 @@
|
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": ">=20.0.0"
|
|
28
28
|
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"@nestjs/common": "^10.4.7",
|
|
31
|
-
"@nestjs/config": "^4.0.1"
|
|
32
|
-
},
|
|
33
29
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"@
|
|
37
|
-
"@langchain/
|
|
38
|
-
"@langchain/
|
|
39
|
-
"@langchain/
|
|
40
|
-
"@langchain/
|
|
30
|
+
"@fastify/error": "^4.2.0",
|
|
31
|
+
"openai": "^6.45.0",
|
|
32
|
+
"@google/genai": "^2.10.0",
|
|
33
|
+
"@langchain/anthropic": "1.5.1",
|
|
34
|
+
"@langchain/core": "1.2.1",
|
|
35
|
+
"@langchain/google-genai": "2.2.0",
|
|
36
|
+
"@langchain/ollama": "1.3.0",
|
|
37
|
+
"@langchain/openai": "1.5.3",
|
|
41
38
|
"@azure/cosmos": "^4.2.0",
|
|
42
39
|
"@azure/identity": "^4.5.0",
|
|
40
|
+
"@nestjs/common": "^10.4.7",
|
|
41
|
+
"@nestjs/config": "^4.0.1",
|
|
42
|
+
"fastify": "^4.28.1",
|
|
43
43
|
"mongodb": "^6.14.1",
|
|
44
44
|
"axios": "^1.7.7",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
|
-
"
|
|
46
|
+
"reflect-metadata": "^0.2.0",
|
|
47
|
+
"rxjs": "^7.8.1",
|
|
48
|
+
"zod": "^3.25.76",
|
|
47
49
|
"tweetnacl": "^1.0.3"
|
|
48
50
|
}
|
|
49
51
|
}
|
package/prompt/flow-prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x4db51e=a16_0x519c;(function(_0x5aad56,_0x5698bd){const _0x3ba1ea=a16_0x519c,_0x21c421=_0x5aad56();while(!![]){try{const _0x44e1a4=-parseInt(_0x3ba1ea(0x1ef))/0x1+-parseInt(_0x3ba1ea(0x1e9))/0x2*(-parseInt(_0x3ba1ea(0x1ee))/0x3)+-parseInt(_0x3ba1ea(0x1f0))/0x4+-parseInt(_0x3ba1ea(0x1e7))/0x5*(-parseInt(_0x3ba1ea(0x1f3))/0x6)+parseInt(_0x3ba1ea(0x1f4))/0x7*(-parseInt(_0x3ba1ea(0x1e6))/0x8)+parseInt(_0x3ba1ea(0x1f6))/0x9*(-parseInt(_0x3ba1ea(0x1f1))/0xa)+parseInt(_0x3ba1ea(0x1f2))/0xb;if(_0x44e1a4===_0x5698bd)break;else _0x21c421['push'](_0x21c421['shift']());}catch(_0x5457e9){_0x21c421['push'](_0x21c421['shift']());}}}(a16_0x267c,0x695c7));function a16_0x267c(){const _0x48ba24=['7XeICsm','./prompt-util','255357rzzmzw','file','fDNAe','constructor','FlowPrompt','toString','search','1208920gaKoEV','714785RaCmft','defineProperty','1526698qhSCeT','endchat.md','apply','EndChat','(((.+)+)+)+$','3lcPStZ','826524GZxkEy','890972QwMwga','140qBfdCB','12351427pJXlFY','6wBfTfA'];a16_0x267c=function(){return _0x48ba24;};return a16_0x267c();}const a16_0x14d458=(function(){let _0x1a2b8e=!![];return function(_0x5a03f9,_0x5c4746){const _0x4d0708=_0x1a2b8e?function(){const _0xf0ec96=a16_0x519c;if(_0x5c4746){const _0x2fdedc=_0x5c4746[_0xf0ec96(0x1eb)](_0x5a03f9,arguments);return _0x5c4746=null,_0x2fdedc;}}:function(){};return _0x1a2b8e=![],_0x4d0708;};}()),a16_0x2eec86=a16_0x14d458(this,function(){const _0x43c1a1=a16_0x519c,_0x3468d1={'fDNAe':_0x43c1a1(0x1ed)};return a16_0x2eec86[_0x43c1a1(0x1e4)]()[_0x43c1a1(0x1e5)](_0x3468d1[_0x43c1a1(0x1e1)])['toString']()[_0x43c1a1(0x1e2)](a16_0x2eec86)['search'](_0x3468d1[_0x43c1a1(0x1e1)]);});a16_0x2eec86();'use strict';Object[a16_0x4db51e(0x1e8)](exports,'__esModule',{'value':!![]}),exports[a16_0x4db51e(0x1e3)]=void 0x0;const prompt_util_1=require(a16_0x4db51e(0x1f5));class FlowPrompt{}function a16_0x519c(_0x1f2742,_0x459009){const _0x144288=a16_0x267c();return a16_0x519c=function(_0x2eec86,_0x14d458){_0x2eec86=_0x2eec86-0x1e0;let _0x267cde=_0x144288[_0x2eec86];return _0x267cde;},a16_0x519c(_0x1f2742,_0x459009);}exports[a16_0x4db51e(0x1e3)]=FlowPrompt,FlowPrompt[a16_0x4db51e(0x1ec)]=prompt_util_1['Prompt'][a16_0x4db51e(0x1e0)](a16_0x4db51e(0x1ea));
|
package/prompt/prompt-util.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x2da5e5=a17_0x5994;(function(_0x14219b,_0x157f2f){const _0x3218f4=a17_0x5994,_0xc9c5a4=_0x14219b();while(!![]){try{const _0x142dbe=parseInt(_0x3218f4(0x1a4))/0x1*(-parseInt(_0x3218f4(0x19a))/0x2)+-parseInt(_0x3218f4(0x1a2))/0x3*(parseInt(_0x3218f4(0x1ab))/0x4)+parseInt(_0x3218f4(0x18f))/0x5+-parseInt(_0x3218f4(0x1a1))/0x6+-parseInt(_0x3218f4(0x192))/0x7+-parseInt(_0x3218f4(0x1ad))/0x8+parseInt(_0x3218f4(0x18e))/0x9;if(_0x142dbe===_0x157f2f)break;else _0xc9c5a4['push'](_0xc9c5a4['shift']());}catch(_0x259e60){_0xc9c5a4['push'](_0xc9c5a4['shift']());}}}(a17_0x15b9,0xc7843));function a17_0x15b9(){const _0x60cb91=['file','set','__importDefault','rAbuL','zuiJU','SRykx','4zPfsnR','replace','1511432KykojT','__esModule','cache','path','PvcvZ','tWnlh','getFileName','32891274HdePFm','3088265XtvmeS','readFileSync','default','378553ZEeiFD','utf-8','toString','Prompt','CeGyY','search','getCallerDir','Unable\x20to\x20determine\x20caller\x20file\x20path','24YFRtur','apply','BzpPy','prepareStackTrace','wwcGo','constructor','stack','1574262NKexVr','4334433AQgnvZ','eCYBp','125402WkJsyr'];a17_0x15b9=function(){return _0x60cb91;};return a17_0x15b9();}const a17_0x40a1df=(function(){const _0x3c0908=a17_0x5994,_0x3c71b7={'rAbuL':function(_0x4c9438,_0x59c8ab){return _0x4c9438===_0x59c8ab;},'SRykx':_0x3c0908(0x18b)};let _0x5b9a0d=!![];return function(_0x26cbdd,_0x54a301){const _0xb11b01=_0x3c0908;if(_0x3c71b7[_0xb11b01(0x1a8)](_0x3c71b7[_0xb11b01(0x1aa)],_0x3c71b7['SRykx'])){const _0x10c2d9=_0x5b9a0d?function(){const _0x44b2a9=_0xb11b01;if(_0x54a301){const _0x331d7b=_0x54a301[_0x44b2a9(0x19b)](_0x26cbdd,arguments);return _0x54a301=null,_0x331d7b;}}:function(){};return _0x5b9a0d=![],_0x10c2d9;}else{const _0x332a39=_0x2249a5['apply'](_0x3edfa4,arguments);return _0x378434=null,_0x332a39;}};}()),a17_0x37f13b=a17_0x40a1df(this,function(){const _0xffa06=a17_0x5994,_0x54f7ed={'CeGyY':'(((.+)+)+)+$'};return a17_0x37f13b[_0xffa06(0x194)]()[_0xffa06(0x197)](_0x54f7ed[_0xffa06(0x196)])[_0xffa06(0x194)]()[_0xffa06(0x19f)](a17_0x37f13b)[_0xffa06(0x197)](_0x54f7ed[_0xffa06(0x196)]);});function a17_0x5994(_0xaf76d6,_0x15dc49){const _0x3c1ac8=a17_0x15b9();return a17_0x5994=function(_0x37f13b,_0x40a1df){_0x37f13b=_0x37f13b-0x18a;let _0x15b9dc=_0x3c1ac8[_0x37f13b];return _0x15b9dc;},a17_0x5994(_0xaf76d6,_0x15dc49);}a17_0x37f13b();'use strict';var __importDefault=this&&this[a17_0x2da5e5(0x1a7)]||function(_0x2ca53f){return _0x2ca53f&&_0x2ca53f['__esModule']?_0x2ca53f:{'default':_0x2ca53f};};Object['defineProperty'](exports,a17_0x2da5e5(0x1ae),{'value':!![]}),exports[a17_0x2da5e5(0x195)]=void 0x0;const fs_1=require('fs'),path_1=__importDefault(require(a17_0x2da5e5(0x18a)));class Prompt{static[a17_0x2da5e5(0x1a5)](_0x101f44){const _0x531e8e=a17_0x2da5e5,_0x5d2070={'NAUSE':function(_0x2a7d95,_0x164d93){return _0x2a7d95!==_0x164d93;},'wwcGo':_0x531e8e(0x193)},_0x1b2959=this[_0x531e8e(0x198)](),_0x28fa96=path_1[_0x531e8e(0x191)]['resolve'](_0x1b2959,_0x101f44);if(this['cache']['has'](_0x28fa96)){if(_0x5d2070['NAUSE'](_0x531e8e(0x19c),_0x531e8e(0x19c))){const _0x29ea07=_0x1e93f0?function(){const _0x43cb32=_0x531e8e;if(_0x19202f){const _0x4b7faa=_0x41cccd[_0x43cb32(0x19b)](_0x45d585,arguments);return _0x3839d5=null,_0x4b7faa;}}:function(){};return _0x52fd69=![],_0x29ea07;}else return this[_0x531e8e(0x1af)]['get'](_0x28fa96);}const _0x513993=(0x0,fs_1[_0x531e8e(0x190)])(_0x28fa96,_0x5d2070[_0x531e8e(0x19e)]);return this[_0x531e8e(0x1af)]['set'](_0x28fa96,_0x513993),_0x513993;}static[a17_0x2da5e5(0x198)](){const _0x9ba64c=a17_0x2da5e5,_0x30ad1e={'tWnlh':_0x9ba64c(0x199)},_0x33dbd3=Error[_0x9ba64c(0x19d)];Error['prepareStackTrace']=(_0x3399e2,_0x4feaa3)=>_0x4feaa3;const _0x58ede3=new Error(),_0x5a1b09=_0x58ede3[_0x9ba64c(0x1a0)];Error[_0x9ba64c(0x19d)]=_0x33dbd3;const _0x126e71=_0x5a1b09?.[0x2]?.[_0x9ba64c(0x18d)]();if(!_0x126e71)throw new Error(_0x30ad1e[_0x9ba64c(0x18c)]);return path_1[_0x9ba64c(0x191)]['dirname'](_0x126e71);}static[a17_0x2da5e5(0x1a6)](_0x1c5cf4,_0x983ad1,_0x4c4fd5){const _0x25e51a=a17_0x2da5e5;return _0x1c5cf4[_0x25e51a(0x1ac)]('{{'+_0x983ad1+'}}',_0x4c4fd5);}static['replace'](_0x26d049,_0x2db162){const _0x581eda=a17_0x2da5e5,_0x1bd379={'mfNMW':function(_0x4fb1fe,_0x3acb27){return _0x4fb1fe===_0x3acb27;},'eCYBp':_0x581eda(0x1a9)};return _0x26d049[_0x581eda(0x1ac)](/{{(.*?)}}/g,(_0xacecbf,_0x12211d)=>{const _0x27f85e=_0x581eda;if(_0x1bd379['mfNMW'](_0x1bd379[_0x27f85e(0x1a3)],_0x1bd379['eCYBp']))return _0x2db162[_0x12211d]||_0xacecbf;else throw new _0x1c90e0(_0x27f85e(0x199));});}}exports['Prompt']=Prompt,Prompt['cache']=new Map();
|
package/services/flow-engine.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a18_0x4d33ca=a18_0x3867;(function(_0x8e4e30,_0x47b786){const _0x5b52a3=a18_0x3867,_0x55d6c7=_0x8e4e30();while(!![]){try{const _0x21f963=parseInt(_0x5b52a3(0x148))/0x1*(parseInt(_0x5b52a3(0x131))/0x2)+parseInt(_0x5b52a3(0x10d))/0x3+-parseInt(_0x5b52a3(0x15e))/0x4+-parseInt(_0x5b52a3(0x125))/0x5*(-parseInt(_0x5b52a3(0x124))/0x6)+-parseInt(_0x5b52a3(0x109))/0x7+parseInt(_0x5b52a3(0x107))/0x8*(-parseInt(_0x5b52a3(0x134))/0x9)+-parseInt(_0x5b52a3(0x153))/0xa;if(_0x21f963===_0x47b786)break;else _0x55d6c7['push'](_0x55d6c7['shift']());}catch(_0x32e8fe){_0x55d6c7['push'](_0x55d6c7['shift']());}}}(a18_0x20f5,0x84619));const a18_0x29deb8=(function(){let _0x5e2d8b=!![];return function(_0x5bff49,_0x3f2440){const _0x2d6876=_0x5e2d8b?function(){const _0x589fb7=a18_0x3867;if(_0x3f2440){const _0x3cdf4f=_0x3f2440[_0x589fb7(0x111)](_0x5bff49,arguments);return _0x3f2440=null,_0x3cdf4f;}}:function(){};return _0x5e2d8b=![],_0x2d6876;};}()),a18_0x491991=a18_0x29deb8(this,function(){const _0x25902d=a18_0x3867,_0x5af367={'TMjHE':'(((.+)+)+)+$'};return a18_0x491991[_0x25902d(0x116)]()[_0x25902d(0x14b)](_0x5af367[_0x25902d(0x15a)])[_0x25902d(0x116)]()[_0x25902d(0x163)](a18_0x491991)['search'](_0x5af367['TMjHE']);});a18_0x491991();'use strict';var __decorate=this&&this[a18_0x4d33ca(0x160)]||function(_0x33d67f,_0x1e5bc4,_0x3d2da9,_0x8022d6){const _0x3614c1=a18_0x4d33ca,_0x35408a={'MDMEH':function(_0xbc9242,_0x45f7f5){return _0xbc9242<_0x45f7f5;},'PDsPz':function(_0xa1bb35,_0x41e5ec){return _0xa1bb35===_0x41e5ec;},'Nmwhg':function(_0x48a062,_0x65506b){return _0x48a062===_0x65506b;},'MNKwl':_0x3614c1(0x164),'OtSqf':function(_0x373f2a,_0x1a5e7f){return _0x373f2a-_0x1a5e7f;},'snjCx':function(_0x504124,_0x528769){return _0x504124>=_0x528769;},'yFzAI':function(_0x6a150d,_0x21e6a2){return _0x6a150d>_0x21e6a2;},'ierXV':function(_0x11c22e,_0x347c29,_0x1cb3de,_0x5d8154){return _0x11c22e(_0x347c29,_0x1cb3de,_0x5d8154);},'ElMMG':function(_0x4a3041,_0x12d22d,_0x1fca60){return _0x4a3041(_0x12d22d,_0x1fca60);}};var _0x55176e=arguments[_0x3614c1(0x15d)],_0x1760a5=_0x35408a[_0x3614c1(0x113)](_0x55176e,0x3)?_0x1e5bc4:_0x35408a[_0x3614c1(0x13e)](_0x8022d6,null)?_0x8022d6=Object['getOwnPropertyDescriptor'](_0x1e5bc4,_0x3d2da9):_0x8022d6,_0x3abb22;if(_0x35408a[_0x3614c1(0x130)](typeof Reflect,'object')&&_0x35408a['PDsPz'](typeof Reflect[_0x3614c1(0x127)],_0x35408a[_0x3614c1(0x166)]))_0x1760a5=Reflect[_0x3614c1(0x127)](_0x33d67f,_0x1e5bc4,_0x3d2da9,_0x8022d6);else{for(var _0x215dba=_0x35408a[_0x3614c1(0x13a)](_0x33d67f[_0x3614c1(0x15d)],0x1);_0x35408a[_0x3614c1(0x101)](_0x215dba,0x0);_0x215dba--)if(_0x3abb22=_0x33d67f[_0x215dba])_0x1760a5=(_0x35408a[_0x3614c1(0x113)](_0x55176e,0x3)?_0x3abb22(_0x1760a5):_0x35408a[_0x3614c1(0x10f)](_0x55176e,0x3)?_0x35408a['ierXV'](_0x3abb22,_0x1e5bc4,_0x3d2da9,_0x1760a5):_0x35408a[_0x3614c1(0x140)](_0x3abb22,_0x1e5bc4,_0x3d2da9))||_0x1760a5;}return _0x55176e>0x3&&_0x1760a5&&Object[_0x3614c1(0xff)](_0x1e5bc4,_0x3d2da9,_0x1760a5),_0x1760a5;},__metadata=this&&this[a18_0x4d33ca(0x115)]||function(_0x23b82d,_0x331054){const _0x262d3a=a18_0x4d33ca,_0x125447={'WyCsc':function(_0x58f0f1,_0x6bef83){return _0x58f0f1===_0x6bef83;},'JZKSY':_0x262d3a(0x129),'kZFYH':function(_0x66fa75,_0x25df34){return _0x66fa75===_0x25df34;}};if(_0x125447[_0x262d3a(0x119)](typeof Reflect,_0x125447[_0x262d3a(0x11d)])&&_0x125447[_0x262d3a(0x12d)](typeof Reflect[_0x262d3a(0x16a)],_0x262d3a(0x164)))return Reflect['metadata'](_0x23b82d,_0x331054);};Object[a18_0x4d33ca(0xff)](exports,a18_0x4d33ca(0x12a),{'value':!![]}),exports[a18_0x4d33ca(0x159)]=void 0x0;const common_1=require(a18_0x4d33ca(0x149)),flow_creator_1=require(a18_0x4d33ca(0x157)),flow_session_1=require('../session/flow-session'),session_logger_1=require(a18_0x4d33ca(0x15c)),core_config_1=require(a18_0x4d33ca(0x146)),config_1=require(a18_0x4d33ca(0x137)),content_type_1=require(a18_0x4d33ca(0x152)),constants_1=require(a18_0x4d33ca(0x155)),model_registry_1=require(a18_0x4d33ca(0x138)),default_models_1=require(a18_0x4d33ca(0x154));function a18_0x3867(_0x419883,_0x581a77){const _0x43085c=a18_0x20f5();return a18_0x3867=function(_0x491991,_0x29deb8){_0x491991=_0x491991-0xff;let _0x20f595=_0x43085c[_0x491991];return _0x20f595;},a18_0x3867(_0x419883,_0x581a77);}let FlowEngine=class FlowEngine{constructor(_0x39184c){const _0xc20c49=a18_0x4d33ca,_0x19e9fa=_0xc20c49(0x10e)[_0xc20c49(0x12e)]('|');let _0x471a7a=0x0;while(!![]){switch(_0x19e9fa[_0x471a7a++]){case'0':this[_0xc20c49(0x11a)]={};continue;case'1':core_config_1[_0xc20c49(0x11b)][_0xc20c49(0x14e)](_0x39184c);continue;case'2':this[_0xc20c49(0x143)]=new flow_session_1[(_0xc20c49(0x108))]();continue;case'3':this['modelRegistry']=new model_registry_1[(_0xc20c49(0x144))]();continue;case'4':this[_0xc20c49(0x10a)]((0x0,default_models_1[_0xc20c49(0x103)])());continue;}break;}}[a18_0x4d33ca(0x12f)](){const _0x3c6a76=a18_0x4d33ca;return this[_0x3c6a76(0x143)];}async['run'](_0x1f2885,_0x1fd9b0,_0xf5140b,_0x16ecd6,_0x4e4cea){const _0x38f992=a18_0x4d33ca,_0x2540b9=await this[_0x38f992(0x100)](_0x1fd9b0,_0xf5140b,_0x16ecd6,{'config':_0x4e4cea});await this['composeHttpResponse'](_0x2540b9,_0x1f2885);}async[a18_0x4d33ca(0x100)](_0x555571,_0x434afe,_0x5c600e,_0x3b72a0){const _0x3eae31=a18_0x4d33ca;let _0x525eb5;try{_0x525eb5=await flow_creator_1[_0x3eae31(0x13f)][_0x3eae31(0x15f)](_0x555571,_0x5c600e,this,_0x3b72a0),_0x5c600e=_0x525eb5[_0x3eae31(0x120)]();const _0x5a717d=await _0x525eb5[_0x3eae31(0x167)](_0x434afe);return await _0x525eb5['saveSession'](),_0x5a717d;}catch(_0x1ac44b){return await this[_0x3eae31(0x14a)](_0x525eb5,_0x5c600e,_0x1ac44b);}}[a18_0x4d33ca(0x121)](_0x362f03,_0x21deeb){const _0x8af2e=a18_0x4d33ca,_0xfb73df={'JxDQW':function(_0x3173e9,_0x4c1e37){return _0x3173e9!=_0x4c1e37;},'uEzMQ':_0x8af2e(0x11f)};_0x21deeb[_0x8af2e(0x147)](constants_1['K'][_0x8af2e(0x132)],_0x362f03[_0x8af2e(0x14c)]),!_0x362f03[_0x8af2e(0x13d)]&&_0x21deeb['status'](common_1['HttpStatus'][_0x8af2e(0x102)]),_0x362f03[_0x8af2e(0x12b)]&&_0xfb73df[_0x8af2e(0x104)](_0x362f03[_0x8af2e(0x12b)],content_type_1[_0x8af2e(0x114)][_0x8af2e(0x106)])?(_0x21deeb[_0x8af2e(0x147)](_0xfb73df['uEzMQ'],_0x362f03[_0x8af2e(0x12b)]),_0x21deeb[_0x8af2e(0x126)](_0x362f03[_0x8af2e(0x14d)])):_0x21deeb['send'](_0x362f03);}async[a18_0x4d33ca(0x14a)](_0x4ce3f8,_0x48de56,_0x598e95){const _0x27d19e=a18_0x4d33ca,_0x5aefee={'QoldH':function(_0x1572bd,_0x43832c){return _0x1572bd===_0x43832c;},'BNsnn':_0x27d19e(0x158),'uMwrt':'bDgCW','QKDXg':_0x27d19e(0x14f),'GEThT':_0x27d19e(0x14d)};if(_0x4ce3f8)try{if(_0x5aefee[_0x27d19e(0x13b)](_0x5aefee[_0x27d19e(0x11e)],_0x5aefee[_0x27d19e(0x110)]))_0x29222e[_0x27d19e(0x168)](_0x1341c2[_0x27d19e(0x117)]['BAD_REQUEST']);else{const _0x51670c=_0x4ce3f8[_0x27d19e(0x142)]();_0x51670c[_0x27d19e(0x112)]=_0x5aefee[_0x27d19e(0x122)],new session_logger_1[(_0x27d19e(0x169))](_0x51670c)['error'](_0x598e95?.[_0x27d19e(0x14d)]),await _0x4ce3f8[_0x27d19e(0x139)]();}}catch(_0x4b6b67){}else{const [_0x458325,_0x28e597]=await this['flowSession'][_0x27d19e(0x136)](_0x48de56);_0x28e597[_0x27d19e(0x112)]=_0x5aefee['QKDXg'],new session_logger_1[(_0x27d19e(0x169))](_0x28e597)['error'](_0x598e95?.['message']),await this[_0x27d19e(0x143)]['save'](_0x28e597);}return{'success':![],'message':_0x598e95[_0x5aefee[_0x27d19e(0x12c)]],'completed':!![]};}async['endChat'](_0x59fc23){const _0x260d9b=a18_0x4d33ca,_0x5b10e5={'cSTHT':_0x260d9b(0x11f),'zAarh':_0x260d9b(0x133),'WljOt':'TOkiI','rchIg':function(_0x5a43a4,_0x85c281){return _0x5a43a4===_0x85c281;},'rhGdw':'EawLW','Vsaze':_0x260d9b(0x150)};try{if(_0x5b10e5['zAarh']!==_0x5b10e5['WljOt']){if(_0x59fc23){const _0x336a4e=await this[_0x260d9b(0x143)][_0x260d9b(0x145)](_0x59fc23);_0x336a4e&&(_0x5b10e5['rchIg'](_0x5b10e5['rhGdw'],_0x5b10e5[_0x260d9b(0x13c)])?this[_0x260d9b(0x118)][_0x260d9b(0x156)](_0x31a82c,_0x14016e):await this[_0x260d9b(0x143)]['delete'](_0x336a4e['id']));}}else _0x49aa1c['header'](_0xef4e1d['K'][_0x260d9b(0x132)],_0x4025c7[_0x260d9b(0x14c)]),!_0x359e10['success']&&_0x1fcf68['status'](_0x304d1['HttpStatus'][_0x260d9b(0x102)]),_0x8fa761[_0x260d9b(0x12b)]&&_0x153e5f['contentType']!=_0x144812[_0x260d9b(0x114)][_0x260d9b(0x106)]?(_0x289c45[_0x260d9b(0x147)](_0x5b10e5[_0x260d9b(0x11c)],_0x216c23[_0x260d9b(0x12b)]),_0x535d74[_0x260d9b(0x126)](_0x23eb56[_0x260d9b(0x14d)])):_0x11147f[_0x260d9b(0x126)](_0x4c15a5);}catch(_0x294236){return{'false':!![],'message':_0x260d9b(0x165)+_0x59fc23+_0x260d9b(0x128)};}return{'success':!![],'session':_0x59fc23};}async[a18_0x4d33ca(0x15b)](_0x3e293b){const _0x37bb28=a18_0x4d33ca;this[_0x37bb28(0x11a)]={...this[_0x37bb28(0x11a)],..._0x3e293b};}[a18_0x4d33ca(0x162)](_0x490348){const _0x57536f=a18_0x4d33ca;return this[_0x57536f(0x11a)][_0x490348];}[a18_0x4d33ca(0x10c)](){const _0x4b24e8=a18_0x4d33ca;return Object[_0x4b24e8(0x105)](this['flowRegistry']);}[a18_0x4d33ca(0x10a)](_0x40d39e,_0x182b8e=![]){const _0x5e9eca=a18_0x4d33ca;this[_0x5e9eca(0x118)]['registerMany'](_0x40d39e,_0x182b8e);}[a18_0x4d33ca(0x141)](_0xc399dc,_0x47b4af=![]){const _0x2129e7=a18_0x4d33ca;this[_0x2129e7(0x118)][_0x2129e7(0x123)](_0xc399dc,_0x47b4af);}[a18_0x4d33ca(0x10b)](_0x15a1d8){const _0x3edec5=a18_0x4d33ca;return this[_0x3edec5(0x118)][_0x3edec5(0x151)](_0x15a1d8);}[a18_0x4d33ca(0x161)](_0x14cbc1){return this['modelRegistry']['getName'](_0x14cbc1);}};exports[a18_0x4d33ca(0x159)]=FlowEngine,exports[a18_0x4d33ca(0x159)]=FlowEngine=__decorate([(0x0,common_1['Injectable'])(),__metadata('design:paramtypes',[config_1[a18_0x4d33ca(0x135)]])],FlowEngine);function a18_0x20f5(){const _0x19f961=['BNsnn','Content-Type','getSessionId','composeHttpResponse','QKDXg','register','1553754xZcabi','20DpTXoA','send','decorate','\x20failed','object','__esModule','contentType','GEThT','kZFYH','split','getFlowSession','Nmwhg','2129874FfTXkK','ChatSessionID','QNLce','6876LuUiLf','ConfigService','fetch','@nestjs/config','../models/model-registry','saveSession','OtSqf','QoldH','Vsaze','success','PDsPz','FlowCreator','ElMMG','registerModel','getSessionDoc','flowSession','ModelRegistry','fetchAll','../configs/core-config','header','1DPDbEx','@nestjs/common','handleException','search','session','message','setup','aborted','yxgeN','get','../flow/content-type','5128960OYReLb','../models/default-models','../utils/constants','registerMany','../flow/flow-creator','xjfLE','FlowEngine','TMjHE','registerFlows','../session/session-logger','length','1367532JAjZep','create','__decorate','getModelName','getFlow','constructor','function','Delete\x20session\x20','MNKwl','run','status','SessionLogger','metadata','defineProperty','runFlow','snjCx','BAD_REQUEST','createPopularModels','JxDQW','keys','Plain','3216QkPdcF','FlowSession','5143418JZUnuk','registerModels','getModel','getFlowNames','1014423ZLIwOA','0|3|1|2|4','yFzAI','uMwrt','apply','runStatus','MDMEH','HttpContentType','__metadata','toString','HttpStatus','modelRegistry','WyCsc','flowRegistry','CoreConfig','cSTHT','JZKSY'];a18_0x20f5=function(){return _0x19f961;};return a18_0x20f5();}
|
|
1
|
+
const a18_0x2b2c6e=a18_0x1dab;(function(_0x2babcd,_0x131d89){const _0x519c32=a18_0x1dab,_0x4ddb97=_0x2babcd();while(!![]){try{const _0x35c64e=parseInt(_0x519c32(0x180))/0x1*(parseInt(_0x519c32(0x190))/0x2)+parseInt(_0x519c32(0x16c))/0x3+-parseInt(_0x519c32(0x16f))/0x4*(-parseInt(_0x519c32(0x1be))/0x5)+parseInt(_0x519c32(0x158))/0x6*(parseInt(_0x519c32(0x169))/0x7)+parseInt(_0x519c32(0x1a1))/0x8+parseInt(_0x519c32(0x185))/0x9*(-parseInt(_0x519c32(0x164))/0xa)+-parseInt(_0x519c32(0x1a5))/0xb;if(_0x35c64e===_0x131d89)break;else _0x4ddb97['push'](_0x4ddb97['shift']());}catch(_0x54844b){_0x4ddb97['push'](_0x4ddb97['shift']());}}}(a18_0x24aa,0x8501d));const a18_0x3a88ad=(function(){let _0x75ec16=!![];return function(_0x3e070d,_0x11c864){const _0x5298d4=_0x75ec16?function(){if(_0x11c864){const _0x8c8e81=_0x11c864['apply'](_0x3e070d,arguments);return _0x11c864=null,_0x8c8e81;}}:function(){};return _0x75ec16=![],_0x5298d4;};}()),a18_0xa5a8f4=a18_0x3a88ad(this,function(){const _0x451ac7=a18_0x1dab,_0xba4e6={'mmlMQ':_0x451ac7(0x167)};return a18_0xa5a8f4['toString']()['search'](_0xba4e6['mmlMQ'])['toString']()[_0x451ac7(0x14f)](a18_0xa5a8f4)[_0x451ac7(0x1ac)](_0xba4e6[_0x451ac7(0x196)]);});a18_0xa5a8f4();function a18_0x1dab(_0x56e024,_0x1d4ab0){const _0x76bbe9=a18_0x24aa();return a18_0x1dab=function(_0xa5a8f4,_0x3a88ad){_0xa5a8f4=_0xa5a8f4-0x14d;let _0x24aa90=_0x76bbe9[_0xa5a8f4];return _0x24aa90;},a18_0x1dab(_0x56e024,_0x1d4ab0);}'use strict';function a18_0x24aa(){const _0x207c49=['BpmcE','defineProperty','getFlowSession','inCJP','message','PxhsL','CQHbb','6453912NdQIWi','YeYyY','OkfoV','XfZmP','19574170NciBQL','status','decorate','../models/model-registry','FlowSession','success','../session/session-logger','search','metadata','ChatSessionID','apply','HttpStatus','get','cEdJV','RJoAp','registerFlows','fetch','MYjiD','EnSWf','../configs/core-config','kbGak','SessionLogger','saveSession','register','aYUDl','1333415XGyZzW','iQraY','../session/flow-session','header','getModel','object','HttpContentType','\x20failed','RUSzq','tSaMJ','EMwHq','fetchAll','error','BAD_REQUEST','getFlow','JIGwH','endChat','handleException','__metadata','constructor','fLGbn','oMBpd','JHfKt','@nestjs/config','LWyxh','FlowEngine','MLzHi','create','18jXgIuB','design:paramtypes','function','tDdNb','__decorate','modelRegistry','aborted','UUSWi','ConfigService','send','SRfrt','getSessionId','140DSdXbV','runFlow','Delete\x20session\x20','(((.+)+)+)+$','flowRegistry','1443953dxpwLh','composeHttpResponse','LbWPh','1388487dHuvSj','registerMany','Content-Type','8azIFyQ','Injectable','zFuCN','length','getSessionDoc','JesRn','ucFJj','Plain','run','fojjK','QZyUl','contentType','getFlowNames','registerModels','tJJsq','registerModel','lbGOT','286012iRZiom','session','flowSession','MwJkE','keys','246546TtpSXg','Hgkfl','hcJFi','CoreConfig','kkNWw','YlIob','lTUcY','DmzBz','amFXO','getOwnPropertyDescriptor','0|3|1|4|2','2CUajDR','QSOwv','toString','runStatus','QDxJA','../models/default-models','mmlMQ','../flow/flow-creator','IeirH','__esModule'];a18_0x24aa=function(){return _0x207c49;};return a18_0x24aa();}var __decorate=this&&this[a18_0x2b2c6e(0x15c)]||function(_0x50909b,_0x5353cc,_0x5ef80b,_0x16b250){const _0x356abc=a18_0x2b2c6e,_0x5ca36f={'ucFJj':function(_0x26d099,_0x32fc06){return _0x26d099<_0x32fc06;},'inCJP':function(_0x589910,_0x1e35a4){return _0x589910===_0x1e35a4;},'UUSWi':function(_0x2dfa6c,_0x2d12e3){return _0x2dfa6c===_0x2d12e3;},'YxMXk':_0x356abc(0x1c3),'IeirH':function(_0x5cdb77,_0x301089){return _0x5cdb77===_0x301089;},'BpmcE':'function','YeYyY':function(_0xf6afe2,_0x443b81){return _0xf6afe2-_0x443b81;},'tJJsq':function(_0x171ded,_0x2bb97d){return _0x171ded<_0x2bb97d;},'tSaMJ':function(_0x1f1193,_0x11567f){return _0x1f1193(_0x11567f);},'MLzHi':function(_0x3df5cc,_0x52a566,_0x569851,_0x538ff6){return _0x3df5cc(_0x52a566,_0x569851,_0x538ff6);},'JHfKt':function(_0x31747d,_0x28026e,_0x506f25){return _0x31747d(_0x28026e,_0x506f25);},'RUSzq':function(_0x12703,_0x1f55c4){return _0x12703>_0x1f55c4;}};var _0x18578a=arguments[_0x356abc(0x172)],_0x149c97=_0x5ca36f[_0x356abc(0x175)](_0x18578a,0x3)?_0x5353cc:_0x5ca36f[_0x356abc(0x19d)](_0x16b250,null)?_0x16b250=Object[_0x356abc(0x18e)](_0x5353cc,_0x5ef80b):_0x16b250,_0x41058b;if(_0x5ca36f[_0x356abc(0x15f)](typeof Reflect,_0x5ca36f['YxMXk'])&&_0x5ca36f[_0x356abc(0x198)](typeof Reflect['decorate'],_0x5ca36f[_0x356abc(0x19a)]))_0x149c97=Reflect[_0x356abc(0x1a7)](_0x50909b,_0x5353cc,_0x5ef80b,_0x16b250);else{for(var _0x3b8016=_0x5ca36f[_0x356abc(0x1a2)](_0x50909b[_0x356abc(0x172)],0x1);_0x3b8016>=0x0;_0x3b8016--)if(_0x41058b=_0x50909b[_0x3b8016])_0x149c97=(_0x5ca36f[_0x356abc(0x17d)](_0x18578a,0x3)?_0x5ca36f[_0x356abc(0x1c7)](_0x41058b,_0x149c97):_0x18578a>0x3?_0x5ca36f[_0x356abc(0x156)](_0x41058b,_0x5353cc,_0x5ef80b,_0x149c97):_0x5ca36f[_0x356abc(0x152)](_0x41058b,_0x5353cc,_0x5ef80b))||_0x149c97;}return _0x5ca36f[_0x356abc(0x1c6)](_0x18578a,0x3)&&_0x149c97&&Object[_0x356abc(0x19b)](_0x5353cc,_0x5ef80b,_0x149c97),_0x149c97;},__metadata=this&&this[a18_0x2b2c6e(0x14e)]||function(_0x1646b5,_0x3eda44){const _0x3cac60=a18_0x2b2c6e,_0xa5a60d={'SRfrt':function(_0x58a8b7,_0x323bd9){return _0x58a8b7===_0x323bd9;},'kbGak':'object','fojjK':_0x3cac60(0x15a)};if(_0xa5a60d['SRfrt'](typeof Reflect,_0xa5a60d[_0x3cac60(0x1b9)])&&_0xa5a60d[_0x3cac60(0x162)](typeof Reflect[_0x3cac60(0x1ad)],_0xa5a60d[_0x3cac60(0x178)]))return Reflect[_0x3cac60(0x1ad)](_0x1646b5,_0x3eda44);};Object[a18_0x2b2c6e(0x19b)](exports,a18_0x2b2c6e(0x199),{'value':!![]}),exports[a18_0x2b2c6e(0x155)]=void 0x0;const common_1=require('@nestjs/common'),flow_creator_1=require(a18_0x2b2c6e(0x197)),flow_session_1=require(a18_0x2b2c6e(0x1c0)),session_logger_1=require(a18_0x2b2c6e(0x1ab)),core_config_1=require(a18_0x2b2c6e(0x1b8)),config_1=require(a18_0x2b2c6e(0x153)),content_type_1=require('../flow/content-type'),constants_1=require('../utils/constants'),model_registry_1=require(a18_0x2b2c6e(0x1a8)),default_models_1=require(a18_0x2b2c6e(0x195));let FlowEngine=class FlowEngine{constructor(_0xa70768){const _0x5d154d=a18_0x2b2c6e,_0x39b58d={'QDxJA':_0x5d154d(0x18f)},_0x16cf76=_0x39b58d[_0x5d154d(0x194)]['split']('|');let _0x2e2666=0x0;while(!![]){switch(_0x16cf76[_0x2e2666++]){case'0':this[_0x5d154d(0x168)]={};continue;case'1':core_config_1[_0x5d154d(0x188)]['setup'](_0xa70768);continue;case'2':this['registerModels']((0x0,default_models_1['createPopularModels'])());continue;case'3':this['modelRegistry']=new model_registry_1['ModelRegistry']();continue;case'4':this[_0x5d154d(0x182)]=new flow_session_1[(_0x5d154d(0x1a9))]();continue;}break;}}[a18_0x2b2c6e(0x19c)](){const _0x5f0014=a18_0x2b2c6e;return this[_0x5f0014(0x182)];}async[a18_0x2b2c6e(0x177)](_0x105a52,_0x297c85,_0xe3bcb0,_0x5cae2c,_0x36dfdd){const _0x3baf05=a18_0x2b2c6e,_0x1a9f80=await this[_0x3baf05(0x165)](_0x297c85,_0xe3bcb0,_0x5cae2c,{'config':_0x36dfdd});await this[_0x3baf05(0x16a)](_0x1a9f80,_0x105a52);}async[a18_0x2b2c6e(0x165)](_0x1ccae6,_0x51adc0,_0x3de609,_0x3df7e0){const _0xb6fb8b=a18_0x2b2c6e,_0x257549={'iQraY':function(_0x72eb40,_0x5ce910){return _0x72eb40!==_0x5ce910;},'amFXO':_0xb6fb8b(0x151),'eKrXl':function(_0x5756eb,_0x13ac86){return _0x5756eb!==_0x13ac86;}};let _0x4e877d;try{if(_0x257549[_0xb6fb8b(0x1bf)](_0x257549[_0xb6fb8b(0x18d)],_0x257549[_0xb6fb8b(0x18d)])){const _0x36c436=_0x5920c5[_0xb6fb8b(0x1af)](_0x2f22c5,arguments);return _0x3cb11a=null,_0x36c436;}else{_0x4e877d=await flow_creator_1['FlowCreator'][_0xb6fb8b(0x157)](_0x1ccae6,_0x3de609,this,_0x3df7e0),_0x3de609=_0x4e877d[_0xb6fb8b(0x163)]();const _0x3ff142=await _0x4e877d[_0xb6fb8b(0x177)](_0x51adc0);return await _0x4e877d[_0xb6fb8b(0x1bb)](),_0x3ff142;}}catch(_0x321dde){return _0x257549['eKrXl']('RYAjD',_0xb6fb8b(0x1a4))?await this[_0xb6fb8b(0x14d)](_0x4e877d,_0x3de609,_0x321dde):_0x2859a9['keys'](this[_0xb6fb8b(0x168)]);}}[a18_0x2b2c6e(0x16a)](_0x1afc68,_0x1207f9){const _0x389da6=a18_0x2b2c6e,_0x28d43e={'QSOwv':function(_0x4275be,_0x41a2f3){return _0x4275be===_0x41a2f3;},'YlIob':'MwJkE','Hgkfl':function(_0x31e3b7,_0x556580){return _0x31e3b7!=_0x556580;},'MYjiD':'Content-Type','OkfoV':function(_0x3f3478,_0x5f2e17){return _0x3f3478===_0x5f2e17;},'LbWPh':_0x389da6(0x1b7)};_0x1207f9['header'](constants_1['K'][_0x389da6(0x1ae)],_0x1afc68['session']),!_0x1afc68[_0x389da6(0x1aa)]&&(_0x28d43e[_0x389da6(0x191)](_0x389da6(0x183),_0x28d43e[_0x389da6(0x18a)])?_0x1207f9[_0x389da6(0x1a6)](common_1[_0x389da6(0x1b0)][_0x389da6(0x1cb)]):_0x399928['send'](_0x393870)),_0x1afc68[_0x389da6(0x17a)]&&_0x28d43e[_0x389da6(0x186)](_0x1afc68[_0x389da6(0x17a)],content_type_1[_0x389da6(0x1c4)][_0x389da6(0x176)])?(_0x1207f9[_0x389da6(0x1c1)](_0x28d43e[_0x389da6(0x1b6)],_0x1afc68[_0x389da6(0x17a)]),_0x1207f9[_0x389da6(0x161)](_0x1afc68[_0x389da6(0x19e)])):_0x28d43e[_0x389da6(0x1a3)](_0x389da6(0x18c),_0x28d43e[_0x389da6(0x16b)])?this['flowRegistry']={...this[_0x389da6(0x168)],..._0x5a73ec}:_0x1207f9[_0x389da6(0x161)](_0x1afc68);}async[a18_0x2b2c6e(0x14d)](_0x4b6ffb,_0x399e76,_0x3f9dc6){const _0x51ad12=a18_0x2b2c6e,_0xd8dc89={'QZyUl':_0x51ad12(0x15e),'zFuCN':_0x51ad12(0x19e)};if(_0x4b6ffb)try{const _0x3b939f=_0x4b6ffb[_0x51ad12(0x173)]();_0x3b939f[_0x51ad12(0x193)]=_0xd8dc89[_0x51ad12(0x179)],new session_logger_1[(_0x51ad12(0x1ba))](_0x3b939f)[_0x51ad12(0x1ca)](_0x3f9dc6?.['message']),await _0x4b6ffb['saveSession']();}catch(_0x2abf04){}else{const [_0x14aec8,_0x4aab2b]=await this[_0x51ad12(0x182)][_0x51ad12(0x1b5)](_0x399e76);_0x4aab2b[_0x51ad12(0x193)]=_0xd8dc89['QZyUl'],new session_logger_1['SessionLogger'](_0x4aab2b)[_0x51ad12(0x1ca)](_0x3f9dc6?.[_0x51ad12(0x19e)]),await this['flowSession']['save'](_0x4aab2b);}return{'success':![],'message':_0x3f9dc6[_0xd8dc89[_0x51ad12(0x171)]],'completed':!![]};}async[a18_0x2b2c6e(0x1ce)](_0x49bd4a){const _0x107871=a18_0x2b2c6e,_0xe41360={'fDEYf':function(_0x1c9b7a,_0x28ba98){return _0x1c9b7a!=_0x28ba98;},'PxhsL':_0x107871(0x16e),'JIGwH':function(_0x5af515,_0x426ead){return _0x5af515===_0x426ead;},'RJoAp':_0x107871(0x1c3),'kkNWw':'function','RzicY':'(((.+)+)+)+$','aYUDl':_0x107871(0x187),'MjRED':_0x107871(0x1c8),'LWyxh':_0x107871(0x15b),'lbGOT':_0x107871(0x1a0),'JesRn':_0x107871(0x18b),'fLGbn':function(_0x144a59,_0x13262a){return _0x144a59!==_0x13262a;},'cEdJV':'kcDTC'};try{if(_0xe41360[_0x107871(0x1bd)]!==_0xe41360['MjRED']){if(_0x49bd4a){if(_0xe41360[_0x107871(0x1cd)](_0xe41360[_0x107871(0x154)],_0xe41360[_0x107871(0x17f)]))_0x4b0e14[_0x107871(0x1c1)](_0x2148f4['K']['ChatSessionID'],_0x5e7a21[_0x107871(0x181)]),!_0x20f260[_0x107871(0x1aa)]&&_0x416563['status'](_0x357677['HttpStatus'][_0x107871(0x1cb)]),_0x4ed2e8[_0x107871(0x17a)]&&_0xe41360['fDEYf'](_0x297868['contentType'],_0x420bc8[_0x107871(0x1c4)][_0x107871(0x176)])?(_0x518416['header'](_0xe41360[_0x107871(0x19f)],_0x4c3ddd[_0x107871(0x17a)]),_0x599048[_0x107871(0x161)](_0xfb3174['message'])):_0x163325[_0x107871(0x161)](_0x4eee16);else{const _0x311daa=await this['flowSession'][_0x107871(0x1c9)](_0x49bd4a);_0x311daa&&(_0xe41360[_0x107871(0x1cd)](_0xe41360[_0x107871(0x174)],'xVlYe')?this[_0x107871(0x15d)][_0x107871(0x1bc)](_0x8134cc,_0x145355):await this[_0x107871(0x182)]['delete'](_0x311daa['id']));}}}else{if(_0xe41360[_0x107871(0x1cd)](typeof _0x1e841e,_0xe41360[_0x107871(0x1b3)])&&_0xe41360[_0x107871(0x1cd)](typeof _0x22887a[_0x107871(0x1ad)],_0xe41360[_0x107871(0x189)]))return _0x3ca96f['metadata'](_0x21973f,_0x380123);}}catch(_0x229a07){return _0xe41360[_0x107871(0x150)]('kcDTC',_0xe41360[_0x107871(0x1b2)])?_0x441402['toString']()[_0x107871(0x1ac)](vnRYdh['RzicY'])[_0x107871(0x192)]()[_0x107871(0x14f)](_0x493023)[_0x107871(0x1ac)](_0x107871(0x167)):{'false':!![],'message':_0x107871(0x166)+_0x49bd4a+_0x107871(0x1c5)};}return{'success':!![],'session':_0x49bd4a};}async[a18_0x2b2c6e(0x1b4)](_0x4cc8ce){const _0x4a96a6=a18_0x2b2c6e;this[_0x4a96a6(0x168)]={...this[_0x4a96a6(0x168)],..._0x4cc8ce};}[a18_0x2b2c6e(0x1cc)](_0x80a812){const _0x1b2f09=a18_0x2b2c6e;return this[_0x1b2f09(0x168)][_0x80a812];}[a18_0x2b2c6e(0x17b)](){const _0x510d0f=a18_0x2b2c6e;return Object[_0x510d0f(0x184)](this['flowRegistry']);}[a18_0x2b2c6e(0x17c)](_0x2bda79,_0x2050a7=![]){const _0x4559f4=a18_0x2b2c6e;this[_0x4559f4(0x15d)][_0x4559f4(0x16d)](_0x2bda79,_0x2050a7);}[a18_0x2b2c6e(0x17e)](_0x10bfd2,_0x3d3bf1=![]){const _0x3eba0e=a18_0x2b2c6e;this[_0x3eba0e(0x15d)]['register'](_0x10bfd2,_0x3d3bf1);}[a18_0x2b2c6e(0x1c2)](_0x3d3240){const _0xf50c2c=a18_0x2b2c6e;return this[_0xf50c2c(0x15d)][_0xf50c2c(0x1b1)](_0x3d3240);}['getModelName'](_0x9d4e79){const _0x19bd06=a18_0x2b2c6e;return this[_0x19bd06(0x15d)]['getName'](_0x9d4e79);}};exports[a18_0x2b2c6e(0x155)]=FlowEngine,exports[a18_0x2b2c6e(0x155)]=FlowEngine=__decorate([(0x0,common_1[a18_0x2b2c6e(0x170)])(),__metadata(a18_0x2b2c6e(0x159),[config_1[a18_0x2b2c6e(0x160)]])],FlowEngine);
|