diff --git a/README.md b/README.md index a37896f8..ed64d2fd 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,12 @@ **🍔MaiCore 是一个基于大语言模型的可交互智能体** -- 💭 **智能对话系统**:基于 LLM 的自然语言交互,聊天时机控制。 -- 🤔 **实时思维系统**:模拟人类思考过程。 -- 🧠 **表达学习功能**:学习群友的说话风格和表达方式 -- 💝 **情感表达系统**:情绪系统和表情包系统。 -- 🔌 **强大插件系统**:提供API和事件系统,可编写强大插件。 +- 💭 **拟人构建的prompt**:使用自然语言风格构建回复器的prompt,实现近似人类言语习惯的回复。 +- 💭 **行为规划**:在合适的时间说话,使用合适的动作 +- 🧠 **表达学习**:学习群友的说话风格和表达方式,学会真实人类的说话风格 +- 🤔 **黑话学习**:自主的学习没有见过的词语,尝试理解并认知含义 +- 🔌 **插件系统**:提供API和事件系统,可编写丰富插件。 +- 💝 **情感表达**:情绪系统和表情包系统。
{if(u==null&&(u=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Rn(c)).precision==null&&(c.trim=!0),c=dh(c)),u===1/0)return c;const s=Math.max(1,n*u/t.ticks().length);return f=>{let l=f/a(Math.round(i(f)));return l*n q)break;var ge=X.transferSize,we=X.initiatorType;ge&&lk(we)&&(X=X.responseEnd,P+=ge*(Xp).right(o,h);if(d===o.length)return e.every(ql(s/Ps,f/Ps,l));if(d===0)return Xi.every(Math.max(ql(s,f,l),1));const[y,v]=o[h/o[d-1][2]=0;){for(t=0,i=c+n;i>n;)u=a[i]+d[n]*h[i-n-1]+t,a[i--]=u%Pe|0,t=u/Pe|0;a[i]=(a[i]+t)%Pe|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,pe?ue(e,l.precision):e};z.toDecimalPlaces=z.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(st(e,0,en),t===void 0?t=n.rounding:st(t,0,8),ue(r,e+ge(r)+1,t))};z.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=nr(n,!0):(st(e,0,en),t===void 0?t=i.rounding:st(t,0,8),n=ue(new i(n),e+1,t),r=nr(n,!0,e+1)),r};z.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?nr(i):(st(e,0,en),t===void 0?t=a.rounding:st(t,0,8),n=ue(new a(i),e+ge(i)+1,t),r=nr(n.abs(),!1,e+ge(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};z.toInteger=z.toint=function(){var e=this,t=e.constructor;return ue(new t(e),ge(e)+1,t.rounding)};z.toNumber=function(){return+this};z.toPower=z.pow=function(e){var t,r,n,i,a,o,u=this,c=u.constructor,s=12,f=+(e=new c(e));if(!e.s)return new c(Ue);if(u=new c(u),!u.s){if(e.s<1)throw Error(Je+"Infinity");return u}if(u.eq(Ue))return u;if(n=c.precision,e.eq(Ue))return ue(u,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=u.s,o){if((r=f<0?-f:f)<=jx){for(i=new c(Ue),t=Math.ceil(n/he+4),pe=!1;r%2&&(i=i.times(u),Em(i.d,t)),r=tn(r/2),r!==0;)u=u.times(u),Em(u.d,t);return pe=!0,e.s<0?new c(Ue).div(i):ue(i,n)}}else if(a<0)throw Error(Je+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,pe=!1,i=e.times(Dn(u,n+s)),pe=!0,i=$x(i),i.s=a,i};z.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ge(i),n=nr(i,r<=a.toExpNeg||r>=a.toExpPos)):(st(e,1,en),t===void 0?t=a.rounding:st(t,0,8),i=ue(new a(i),e,t),r=ge(i),n=nr(i,e<=r||r<=a.toExpNeg,e)),n};z.toSignificantDigits=z.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(st(e,1,en),t===void 0?t=n.rounding:st(t,0,8)),ue(new n(r),e,t)};z.toString=z.valueOf=z.val=z.toJSON=z[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ge(e),r=e.constructor;return nr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Mx(e,t){var r,n,i,a,o,u,c,s,f=e.constructor,l=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),pe?ue(t,l):t;if(c=e.d,s=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(n=c,a=-a,u=s.length):(n=s,i=o,u=c.length),o=Math.ceil(l/he),u=o>u?o+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=c.length,a=s.length,u-a<0&&(a=u,n=s,s=c,c=n),r=0;a;)r=(c[--a]=c[a]+s[a]+r)/Pe|0,c[a]%=Pe;for(r&&(c.unshift(r),++i),u=c.length;c[--u]==0;)c.pop();return t.d=c,t.e=i,pe?ue(t,l):t}function st(e,t,r){if(e!==~~e||e=0});if(g&&g.length){var x=g[0].type.defaultProps,w=x!==void 0?ve(ve({},x),g[0].props):g[0].props,O=w.barSize,m=w[p];o[m]||(o[m]=[]);var b=Y(O)?r:O;o[m].push({item:g[0],stackList:g.slice(1),barSize:Y(b)?void 0:Ie(b,n,0)})}}return o},oM=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,u=t.maxBarSize,c=o.length;if(c<1)return null;var s=Ie(r,i,0,!0),f,l=[];if(o[0].barSize===+o[0].barSize){var h=!1,d=i/c,y=o.reduce(function(O,m){return O+m.barSize||0},0);y+=(c-1)*s,y>=i&&(y-=(c-1)*s,s=0),y>=i&&d>0&&(h=!0,d*=.9,y=c*d);var v=(i-y)/2>>0,p={offset:v-s,size:0};f=o.reduce(function(O,m){var b={item:m.item,position:{offset:p.offset+p.size+s,size:h?d:m.barSize}},_=[].concat(Cm(O),[b]);return p=_[_.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(A){_.push({item:A,position:p})}),_},l)}else{var g=Ie(n,i,0,!0);i-2*g-(c-1)*s<=0&&(s=0);var x=(i-2*g-(c-1)*s)/c;x>1&&(x>>=0);var w=u===+u?Math.min(x,u):x;f=o.reduce(function(O,m,b){var _=[].concat(Cm(O),[{item:m.item,position:{offset:g+(x+s)*b+(x-w)/2,size:w}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(A){_.push({item:A,position:_[_.length-1].position})}),_},l)}return f},uM=function(t,r,n,i){var a=n.children,o=n.width,u=n.margin,c=o-(u.left||0)-(u.right||0),s=Ux({children:a,legendWidth:c});if(s){var f=i||{},l=f.width,h=f.height,d=s.align,y=s.verticalAlign,v=s.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&d!=="center"&&q(t[d]))return ve(ve({},t),{},_r({},d,t[d]+(l||0)));if((v==="horizontal"||v==="vertical"&&d==="center")&&y!=="middle"&&q(t[y]))return ve(ve({},t),{},_r({},y,t[y]+(h||0)))}return t},cM=function(t,r,n){return Y(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Hx=function(t,r,n,i,a){var o=r.props.children,u=Ke(o,pi).filter(function(s){return cM(i,a,s.props.direction)});if(u&&u.length){var c=u.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var l=_e(f,n);if(Y(l))return s;var h=Array.isArray(l)?[Va(l),Ga(l)]:[l,l],d=c.reduce(function(y,v){var p=_e(f,v,0),g=h[0]-Math.abs(Array.isArray(p)?p[0]:p),x=h[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(g,y[0]),Math.max(x,y[1])]},[1/0,-1/0]);return[Math.min(d[0],s[0]),Math.max(d[1],s[1])]},[1/0,-1/0])}return null},sM=function(t,r,n,i,a){var o=r.map(function(u){return Hx(t,u,n,a,i)}).filter(function(u){return!Y(u)});return o&&o.length?o.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]):null},Kx=function(t,r,n,i,a){var o=r.map(function(c){var s=c.props.dataKey;return n==="number"&&s&&Hx(t,c,s,i)||bn(t,s,n,a)});if(n==="number")return o.reduce(function(c,s){return[Math.min(c[0],s[0]),Math.max(c[1],s[1])]},[1/0,-1/0]);var u={};return o.reduce(function(c,s){for(var f=0,l=s.length;fJe?(dt=De,De=null):dt=De.sibling;var mt=ce(re,De,ie[Je],be);if(mt===null){De===null&&(De=dt);break}s&&De&&mt.alternate===null&&c(re,De),Q=_(mt,Q,Je),ht===null?Ie=mt:ht.sibling=mt,ht=mt,De=dt}if(Je===ie.length)return h(re,De),ft&&Ei(re,Je),Ie;if(De===null){for(;Je"u"?null:document;function bk(s,c,h){var v=gc;if(v&&typeof c=="string"&&c){var S=la(c);S='link[rel="'+s+'"][href="'+S+'"]',typeof h=="string"&&(S+='[crossorigin="'+h+'"]'),xk.has(S)||(xk.add(S),s={rel:s,crossOrigin:h,href:c},v.querySelector(S)===null&&(c=v.createElement("link"),Qn(c,"link",s),Ln(c),v.head.appendChild(c)))}}function SV(s){qi.D(s),bk("dns-prefetch",s,null)}function _V(s,c){qi.C(s,c),bk("preconnect",s,c)}function NV(s,c,h){qi.L(s,c,h);var v=gc;if(v&&s&&c){var S='link[rel="preload"][as="'+la(c)+'"]';c==="image"&&h&&h.imageSrcSet?(S+='[imagesrcset="'+la(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(S+='[imagesizes="'+la(h.imageSizes)+'"]')):S+='[href="'+la(s)+'"]';var _=S;switch(c){case"style":_=yc(s);break;case"script":_=xc(s)}va.has(_)||(s=p({rel:"preload",href:c==="image"&&h&&h.imageSrcSet?void 0:s,as:c},h),va.set(_,s),v.querySelector(S)!==null||c==="style"&&v.querySelector(Id(_))||c==="script"&&v.querySelector(Ld(_))||(c=v.createElement("link"),Qn(c,"link",s),Ln(c),v.head.appendChild(c)))}}function CV(s,c){qi.m(s,c);var h=gc;if(h&&s){var v=c&&typeof c.as=="string"?c.as:"script",S='link[rel="modulepreload"][as="'+la(v)+'"][href="'+la(s)+'"]',_=S;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=xc(s)}if(!va.has(_)&&(s=p({rel:"modulepreload",href:s},c),va.set(_,s),h.querySelector(S)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Ld(_)))return}v=h.createElement("link"),Qn(v,"link",s),Ln(v),h.head.appendChild(v)}}}function OV(s,c,h){qi.S(s,c,h);var v=gc;if(v&&s){var S=zl(v).hoistableStyles,_=yc(s);c=c||"default";var P=S.get(_);if(!P){var q={loading:0,preload:null};if(P=v.querySelector(Id(_)))q.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":c},h),(h=va.get(_))&&d0(s,h);var X=P=v.createElement("link");Ln(X),Qn(X,"link",s),X._p=new Promise(function(se,ge){X.onload=se,X.onerror=ge}),X.addEventListener("load",function(){q.loading|=1}),X.addEventListener("error",function(){q.loading|=2}),q.loading|=4,sp(P,c,v)}P={type:"stylesheet",instance:P,count:1,state:q},S.set(_,P)}}}function EV(s,c){qi.X(s,c);var h=gc;if(h&&s){var v=zl(h).hoistableScripts,S=xc(s),_=v.get(S);_||(_=h.querySelector(Ld(S)),_||(s=p({src:s,async:!0},c),(c=va.get(S))&&f0(s,c),_=h.createElement("script"),Ln(_),Qn(_,"link",s),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},v.set(S,_))}}function AV(s,c){qi.M(s,c);var h=gc;if(h&&s){var v=zl(h).hoistableScripts,S=xc(s),_=v.get(S);_||(_=h.querySelector(Ld(S)),_||(s=p({src:s,async:!0,type:"module"},c),(c=va.get(S))&&f0(s,c),_=h.createElement("script"),Ln(_),Qn(_,"link",s),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},v.set(S,_))}}function wk(s,c,h,v){var S=(S=xe.current)?op(S):null;if(!S)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(c=yc(h.href),h=zl(S).hoistableStyles,v=h.get(c),v||(v={type:"style",instance:null,count:0,state:null},h.set(c,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){s=yc(h.href);var _=zl(S).hoistableStyles,P=_.get(s);if(P||(S=S.ownerDocument||S,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(s,P),(_=S.querySelector(Id(s)))&&!_._p&&(P.instance=_,P.state.loading=5),va.has(s)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},va.set(s,h),_||TV(S,s,h,P.state))),c&&v===null)throw Error(r(528,""));return P}if(c&&v!==null)throw Error(r(529,""));return null;case"script":return c=h.async,h=h.src,typeof h=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=xc(h),h=zl(S).hoistableScripts,v=h.get(c),v||(v={type:"script",instance:null,count:0,state:null},h.set(c,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function yc(s){return'href="'+la(s)+'"'}function Id(s){return'link[rel="stylesheet"]['+s+"]"}function jk(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function TV(s,c,h,v){s.querySelector('link[rel="preload"][as="style"]['+c+"]")?v.loading=1:(c=s.createElement("link"),v.preload=c,c.addEventListener("load",function(){return v.loading|=1}),c.addEventListener("error",function(){return v.loading|=2}),Qn(c,"link",h),Ln(c),s.head.appendChild(c))}function xc(s){return'[src="'+la(s)+'"]'}function Ld(s){return"script[async]"+s}function Sk(s,c,h){if(c.count++,c.instance===null)switch(c.type){case"style":var v=s.querySelector('style[data-href~="'+la(h.href)+'"]');if(v)return c.instance=v,Ln(v),v;var S=p({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(s.ownerDocument||s).createElement("style"),Ln(v),Qn(v,"style",S),sp(v,h.precedence,s),c.instance=v;case"stylesheet":S=yc(h.href);var _=s.querySelector(Id(S));if(_)return c.state.loading|=4,c.instance=_,Ln(_),_;v=jk(h),(S=va.get(S))&&d0(v,S),_=(s.ownerDocument||s).createElement("link"),Ln(_);var P=_;return P._p=new Promise(function(q,X){P.onload=q,P.onerror=X}),Qn(_,"link",v),c.state.loading|=4,sp(_,h.precedence,s),c.instance=_;case"script":return _=xc(h.src),(S=s.querySelector(Ld(_)))?(c.instance=S,Ln(S),S):(v=h,(S=va.get(_))&&(v=p({},h),f0(v,S)),s=s.ownerDocument||s,S=s.createElement("script"),Ln(S),Qn(S,"link",v),s.head.appendChild(S),c.instance=S);case"void":return null;default:throw Error(r(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(v=c.instance,c.state.loading|=4,sp(v,h.precedence,s));return c.instance}function sp(s,c,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=v.length?v[v.length-1]:null,_=S,P=0;P