WAppAI / assistant

A WhatsApp chatbot that leverages Bing AI's and others LLMs conversational capabilities.
MIT License
85 stars 27 forks source link

when !jailbreak on not response and this is in console #249

Closed estilodevida closed 4 months ago

estilodevida commented 6 months ago

when !jailbreak on not response and this is in console:

node --loader ts-node/esm src/index.ts (node:7494) ExperimentalWarning: --experimental-loader may be removed in the future; instead use register(): --import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));' (Use node --trace-warnings ... to show where the warning was created) Loading WhatsApp Web... 0% Loading WhatsApp Web... 100% Authenticated WhatsApp Web ready Scheduled 0 reminders. Bot is ready /Users/devopt/Documents/IA-software/assistant/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123 )}var Bi=(e,t)=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:mr(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:mr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":{n=r.text,i={values:mr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ya(r),i={values:mr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(The ${e} provider does not support ${t})}return i?.values?tl(prisma.${t}(${n}, ${i.values})):tl(prisma.${t}(${n})),{query:n,parameters:i}},rl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new oe(t,r)}},nl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Ui(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??(n=il(r(o))):il(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function il(e){return typeof e.then=="function"?e:Promise.resolve(e)}var ol={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Ki=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??ol}};function sl(e){return e.includes("tracing")?new Ki:ol}function al(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function ll(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}var Fd=["$connect","$disconnect","$on","$transaction","$use","$extends"],ul=Fd;var hn=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};var pl=S(ni());function xn(e){return typeof e.batchRequestIdx=="number"}function bn(e){return e===null?e:Array.isArray(e)?e.map(bn):typeof e=="object"?kd(e)?Od(e):ct(e,bn):e}function kd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Od({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new we(t);case"Json":return JSON.parse(t);default:Ge(t,"Unknown tagged value")}}function cl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Qi(e.query.arguments)),t.push(Qi(e.query.selection)),t.join("")}function Qi(e){return(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?(${r} ${Qi(n)}):r}).join(" ")})}var Dd={aggregate:!1,aggregateRaw:!1,createMany:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Ji(e){return Dd[e]}var En=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i<r.length;i++)r[i].reject(n);else for(let i=0;i<r.length;i++){let o=n[i];o instanceof Error?r[i].reject(o):r[i].resolve(o)}}).catch(n=>{for(let i=0;i<r.length;i++)r[i].reject(n)}))}}get[Symbol.toStringTag](){return"DataLoader"}};var _d=D("prisma:client:request_handler"),wn=class{constructor(t,r){this.logEmitter=r,this.client=t,this.dataloader=new En({batchLoader:na(async({requests:n,customDataProxyFetch:i})=>{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Ji(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Nd(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?dl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Ji(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?transaction-${n.transaction.id}:cl(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o}){if(_d(t),Ld(t,i)||t instanceof Ce)throw t;if(t instanceof U&&$d(t)){let a=ml(t.meta);yn({args:o,errors:[a],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let s=t.message;throw n&&(s=wt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:s})),s=this.sanitizeMessage(s),t.code?new U(s,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new ue(s,this.client._clientVersion):t instanceof K?new K(s,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof k?new k(s,this.client._clientVersion):t instanceof ue?new ue(s,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,pl.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=bn(wi(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Nd(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:dl(e)};Ge(e,"Unknown transaction kind")}}function dl(e){return{id:e.id,payload:e.payload}}function Ld(e,t){return xn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function $d(e){return e.code==="P2009"||e.code==="P2012"}function ml(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ml)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var fl="5.3.1";var gl=fl;function yl(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=hl(t[n]);return r})}function hl({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return Buffer.from(t,"base64");case"decimal":return new we(t);case"datetime":case"date":return new Date(t);case"time":return new Date(1970-01-01T${t}Z);case"array":return t.map(hl);default:return t}}var wl=S($i());var V=class extends Error{constructor(t){super(t+

PrismaClientKnownRequestError: Invalid prisma.bingConversation.update() invocation:

An operation failed because it depends on one or more records that were required but not found. Record to update not found. at wn.handleRequestError (/Users/devopt/Documents/IA-software/assistant/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:6730) at wn.handleAndLogRequestError (/Users/devopt/Documents/IA-software/assistant/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:6119) at wn.request (/Users/devopt/Documents/IA-software/assistant/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:5839) at async l (/Users/devopt/Documents/IA-software/assistant/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:128:9763) at async setChatJailbroken (file:///Users/devopt/Documents/IA-software/assistant/src/handlers/command/jailbreak.ts:8:5) at async handleJailbreak (file:///Users/devopt/Documents/IA-software/assistant/src/handlers/command/jailbreak.ts:40:13) at async handleCommand (file:///Users/devopt/Documents/IA-software/assistant/src/handlers/command/index.ts:39:21) at async Client. (file:///Users/devopt/Documents/IA-software/assistant/src/clients/whatsapp.ts:65:16) { code: 'P2025', clientVersion: '5.3.1', meta: { cause: 'Record to update not found.' } }

Node.js v20.10.0

Luisotee commented 6 months ago

Maige Do you know how to fix it?

maige-app[bot] commented 6 months ago

@Luisotee It seems like the issue is related to a record that the update operation expects to find but does not exist in the database. This could be due to a variety of reasons such as the record being deleted or never created in the first place.

To fix this, you'll need to ensure that the record you're trying to update actually exists. You can do this by checking the database directly or by adding error handling in your code to check for the existence of the record before attempting to update it.

If you're certain that the record should exist, you may also want to check for any issues with your database query or the conditions used to identify the record for updating.

By Maige. How's my driving?

Luisotee commented 6 months ago

@estilodevida A pnpm build should fix this