sansekai / wa-openai Goto Github PK
View Code? Open in Web Editor NEWWhatsApp Bot OpenAI ChatGPT NodeJS Using Library Baileys
Home Page: https://saweria.co/Sansekai
License: MIT License
WhatsApp Bot OpenAI ChatGPT NodeJS Using Library Baileys
Home Page: https://saweria.co/Sansekai
License: MIT License
TypeError: openai.createChatCompletion is not a function
at sansekai (/home/snhxr/Wa-OpenAI/sansekai.js:104:43)
how to fix it?
his github repo copy paster kid: https://github.com/harshitethic/whatsapp-chatgpt
Baileys lib is not available anymore
429
{
error: {
message: 'You exceeded your current quota, please check your plan and billing details.',
type: 'insufficient_quota',
param: null,
code: null
}
}
429
hmm :(
when i tried to upload the bot to a server it fails to deploy. Here is what i get:
Jan 22 10:18:16 PM Bot success conneted to server
Jan 22 10:18:16 PM Donate for creator https://saweria.co/sansekai
Jan 22 10:18:16 PM Type /menu to see menu
Jan 22 10:18:16 PM Closing open session in favor of incoming prekey bundle
Jan 22 10:18:16 PM Closing session: SessionEntry {
Jan 22 10:18:16 PM _chains: {
Jan 22 10:18:16 PM 'Be9l9Ldvl81rhxlNzv4JOUit/y9feOX2cIY3aVQuWGg4': { chainKey: [Object], chainType: 1, messageKeys: {} }
Jan 22 10:18:16 PM },
Jan 22 10:18:16 PM registrationId: 1981289101,
Jan 22 10:18:16 PM currentRatchet: {
Jan 22 10:18:16 PM ephemeralKeyPair: {
Jan 22 10:18:16 PM pubKey: <Buffer 05 ef 65 f4 b7 6f 97 cd 6b 87 19 4d ce fe 09 39 48 ad ff 2f 5f 78 e5 f6 70 86 37 69 54 2e 58 68 38>,
Jan 22 10:18:16 PM privKey: <Buffer f0 d4 13 47 c4 7e 6f cd 08 9c 04 eb 64 c7 bf 1b 8f 71 da 63 55 99 d0 82 dc 62 04 08 dc 69 4a 7d>
Jan 22 10:18:16 PM },
Jan 22 10:18:16 PM lastRemoteEphemeralKey: <Buffer 05 4f b0 b5 41 8d 26 5c 6f 45 c7 c3 25 bd ef fb 35 2f 1f 6c 77 ce d9 79 14 f5 74 dc f6 89 64 ce 41>,
Jan 22 10:18:16 PM previousCounter: 0,
Jan 22 10:18:16 PM rootKey: <Buffer 93 c2 c8 dc 1e 45 4e f3 78 c5 82 ab 0d ec f6 0d 82 fe 25 d3 5a 08 9e b3 ae 07 8b 50 d8 2d 0e e6>
Jan 22 10:18:16 PM },
Jan 22 10:18:16 PM indexInfo: {
Jan 22 10:18:16 PM baseKey: <Buffer 05 0f 1d b0 79 a0 35 b6 29 ca 88 ea 93 63 aa 51 6e 79 39 c9 46 31 ed b8 69 8c 89 a2 ca 8a c7 77 0a>,
Jan 22 10:18:16 PM baseKeyType: 1,
Jan 22 10:18:16 PM closed: -1,
Jan 22 10:18:16 PM used: 1674406096464,
Jan 22 10:18:16 PM created: 1674406096464,
Jan 22 10:18:16 PM remoteIdentityKey: <Buffer 05 8e aa f5 8f 47 b0 a0 35 f1 23 a5 71 03 af 9f 3d e9 3a 69 13 00 03 df 31 17 77 21 6c 40 15 19 17>
Jan 22 10:18:16 PM },
Jan 22 10:18:16 PM pendingPreKey: {
Jan 22 10:18:16 PM signedKeyId: 0,
Jan 22 10:18:16 PM baseKey: <Buffer 05 0f 1d b0 79 a0 35 b6 29 ca 88 ea 93 63 aa 51 6e 79 39 c9 46 31 ed b8 69 8c 89 a2 ca 8a c7 77 0a>,
Jan 22 10:18:16 PM preKeyId: 1136569
Jan 22 10:18:16 PM }
Jan 22 10:18:16 PM }
Jan 22 10:18:16 PM Decrypted message with closed session.
Jan 22 10:18:17 PM Decrypted message with closed session.
Jan 22 10:18:17 PM Decrypted message with closed session.
Jan 22 10:18:17 PM Decrypted message with closed session.
Jan 22 10:18:18 PM Decrypted message with closed session.
Jan 22 10:18:18 PM Decrypted message with closed session.
405 .. baileys lib is now removed from github.
qt
jadi mengirim pesan "Apikey habis, bot tidak dapat digunakan lagi" jika ada orang menggunakan perintah (kecuali /menu) saat apikey limit
Sekarang pake wa 2.2323.4 karna pake versi sekarang itu sering reconnect tolong yaa
Maaf bang gw run di panel, kok gini mulu
Maaf, sepertinya ada yang error :Error: Request failed with status code 429
/home/botit4601/Wa-OpenAI/index.js:224
let reason = new Boom(lastDisconnect?.error)?.output.statusCode
^
SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
Keren banget bang liat demo nya di Youtube, tapi setelah di coba ada error 429 sama 400. Thanks!
karena node_modules itu sendiri dari npm install
menu auto chat nya di hilangkan?
Key.json sama sansekai.js udh diisi sama aja. Run by termux
Hey, I'm unable to figure out how to use/add custom prompts (in sansekai.js)
Cara install node modulesnya gmnq ya om
api ane ga kedetek, padahal udh diganti
Error nya kek gini Maaf, sepertinya ada yang error
cara ganti api key gmn
Bang klo botnya nyala Notif pesan sama Telpon di HP jadi gk ada deringnya..
Haloo, saya ingin menanyakan, bagaimana cara mengupdate tanggal dan waktu pada bot ini?
Karena saya coba bertanya dengan command "/ai jam berapa sekarang" dan "/ai tanggal berapa sekarang" menunjukan hasil seperti gambar dibawah dan tidak dapat terupdate(selalu menampilkan tanggal 28 April 2020 dan jam 11.30)
Jika ada cara untuk mengatasi ini, saya mohon untuk bantuannya :)
Namun jika memang tidak bisa, mohon konfirmasinya untuk berkenan membalas pertanyaan saya ini :)
Terimakasih
error code:
index.js:226
let reason = new Boom(lastDisconnect?.error)?.output.statusCode
^
SyntaxError: Unexpected token '.'
[ LOGS ] /ai halo From Haidir men [ ########## ]
401
{
error: {
message: 'Incorrect API key provided: sk-R9hSL***************************************1J01. You can find your API key at https://platform.openai.com/account/api-keys.',
type: 'invalid_request_error',
param: null,
code: 'invalid_api_key'
}
}
401
[object Object]
keren banget
ini kenapa ya bang?
_closed: false,
socket: [TLSSocket],
_header: 'POST /v1/completions HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json\r\n' +
'User-Agent: OpenAI/NodeJS/3.1.0\r\n' +
'Authorization: Bearer undefined\r\n' +
'Content-Length: 146\r\n' +
'Host: api.openai.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/v1/completions',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'api.openai.com',
protocol: 'https:',
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(kUniqueHeaders)]: null
},
data: { error: [Object] }
},
isAxiosError: true,
toJSON: [Function: toJSON]
Tiap kirim pesan pasti daper error itu mulu
Error: Request failed with status code 429
UBUNTU 22.04
Tambahin fitur supaya bisa kirim gambar atau file bang biar makin bagus.
Goodnight. How do I remove the / from the command? Example: I want to do a restaurant service where the user enters:
menu
1
two
3
4
5
6
7
and when the bot responds as it does without tagging the user's original message?
log nya
Error: Request failed with status code 401
İts give this error
Hello Sansekai, I hope you are all right. I want to know how to deploy the bot on Koyeb please.
let reason = new Boom(lastDisconnect?.error)?.output.statusCode
SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
kemaren jalan terus tiba tiba mati, nah pas gw jalanin lagi malah gini
coder@coder:~/project/Wa-OpenAI$ node index.js
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at useSingleFileAuthState (/home/coder/project/Wa-OpenAI/node_modules/@adiwajshing/baileys/lib/Utils/use-single-file-auth-state.js:36:29)
at Object.<anonymous> (/home/coder/project/Wa-OpenAI/index.js:19:30)
at Module._compile (node:internal/modules/cjs/loader:1165:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
at Module.load (node:internal/modules/cjs/loader:1043:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47
TypeError: openai.createChatCompletion is not a function
at sansekai (/data/data/com.termux/files/home/Wa-OpenAI/sansekai.js:108:43
any way to deploy this on heroku?
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/amiruldev20/Baileys.git
permisi izin tanya, ini bot nya cara biar engga pakai cmd gimna kak, jadi auto respon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.