Jump to content
Get 20% off with our White Friday Deal🥳 ×

Whatsapp Gateway | Multi Device v8.5.1


Magd Almuntaser

Recommended Posts

36 minutes ago, Pebrian said:
async function sendGemini({
  command,
  senderNumber,
  chatgptKey,
  participantNumber,
}) {
  try {
    const geminiUrl = process.env.GEIMINI_URL;
    const geminiData = {
      contents: [
        {
          parts: [
            { text: `Tolong balas dengan bahasa yang santai: ${command}` }
          ]
        }
      ],
      model_parameters: {
        language: "id-ID" // GANTI KE BAHASA KELEAN
      }
    };
    const headers = {
      'Content-Type': 'application/json'
    };
    
    const response = await axios.post(`${geminiUrl}?key=${chatgptKey}`, geminiData, { headers: headers }).catch(() => {
      return false;
    });

    if (response && response.data && response.data.candidates && response.data.candidates.length > 0) {
      let content = response.data.candidates[0].content.parts[0].text;
      content = content.replace(/["']/g, '');
      let resText = JSON.stringify({ text: content, quoted: false });
      return resText;
    } else {
      return false;
    }
  } catch (error) {
    console.log('error send Gemini', error);
    return false;
  }
}

Gemini lebih santai buat ngebales. udh w coba bahasa nya gak terlalu baku

Naruhnya dimana?

Link to comment
Share on other sites

  • DW Members
42 minutes ago, Pebrian said:
async function sendGemini({
  command,
  senderNumber,
  chatgptKey,
  participantNumber,
}) {
  try {
    const geminiUrl = process.env.GEIMINI_URL;
    const geminiData = {
      contents: [
        {
          parts: [
            { text: `Tolong balas dengan bahasa yang santai: ${command}` }
          ]
        }
      ],
      model_parameters: {
        language: "id-ID" // GANTI KE BAHASA KELEAN
      }
    };
    const headers = {
      'Content-Type': 'application/json'
    };
    
    const response = await axios.post(`${geminiUrl}?key=${chatgptKey}`, geminiData, { headers: headers }).catch(() => {
      return false;
    });

    if (response && response.data && response.data.candidates && response.data.candidates.length > 0) {
      let content = response.data.candidates[0].content.parts[0].text;
      content = content.replace(/["']/g, '');
      let resText = JSON.stringify({ text: content, quoted: false });
      return resText;
    } else {
      return false;
    }
  } catch (error) {
    console.log('error send Gemini', error);
    return false;
  }
}

Gemini lebih santai buat ngebales. udh w coba bahasa nya gak terlalu baku

It's good that you modified it for you, but I removed all these options to make it universal for all people for English, Arabic, Indonesian and other languages 👍

9 minutes ago, Upal Mukherjee said:

Hey can I get the link to the 7.0.0.5 or 7.0.0.6?

I will replace the server.js with the 7.0.0.4 version or whatever you have stable.

Thanking you in advance!

Look at my signature on any post I write and you'll find the link. Look at the bottom of my post 👇

Link to comment
Share on other sites

3 minutes ago, Magd Almuntaser said:

It's good that you modified it for you, but I removed all these options to make it universal for all people for English, Arabic, Indonesian and other languages 👍

Look at my signature on any post I write and you'll find the link. Look at the bottom of my post 👇

I can only find v7.0.0.2 😞

Link to comment
Share on other sites

38 minutes ago, Magd Almuntaser said:

i've update my signature you can check again

Any way to get the OpenAI?

I can see everything apart from that.

Edit: Found it!

Edited by Upal Mukherjee
Link to comment
Share on other sites

2 hours ago, Pebrian said:
async function sendGemini({
  command,
  senderNumber,
  chatgptKey,
  participantNumber,
}) {
  try {
    const geminiUrl = process.env.GEIMINI_URL;
    const geminiData = {
      contents: [
        {
          parts: [
            { text: `Tolong balas dengan bahasa yang santai: ${command}` }
          ]
        }
      ],
      model_parameters: {
        language: "id-ID" // GANTI KE BAHASA KELEAN
      }
    };
    const headers = {
      'Content-Type': 'application/json'
    };
    
    const response = await axios.post(`${geminiUrl}?key=${chatgptKey}`, geminiData, { headers: headers }).catch(() => {
      return false;
    });

    if (response && response.data && response.data.candidates && response.data.candidates.length > 0) {
      let content = response.data.candidates[0].content.parts[0].text;
      content = content.replace(/["']/g, '');
      let resText = JSON.stringify({ text: content, quoted: false });
      return resText;
    } else {
      return false;
    }
  } catch (error) {
    console.log('error send Gemini', error);
    return false;
  }
}

Gemini lebih santai buat ngebales. udh w coba bahasa nya gak terlalu baku

penerapannya ini gmn? sy ga ngerti

Link to comment
Share on other sites

Sallam, saya sudah mengikuti update dan sudah menggunakan v7...5, ai bot belum berfungsi, adakah node atau cron settingan yang tepat?

Boleh tunjukkan postingan yang tepat untuk saya ikuti, atau file perihal ai bot yang mungkin saya lewati, please tag.

 

cron

curl "http://domain.com/schedule-run" >>/dev/null 2>&1    
curl "http://domain.com/blast-start" >/dev/null 2>&1    
/opt/cpanel/ea-php82/root/usr/bin/php /home/yudijali/public_html/domain.com/artisan schedule:run > /dev/null 2>&1    
/opt/cpanel/ea-php82/root/usr/bin/php /home/yudijali/public_html/domain.com/artisan start:blast > /dev/null 2>&1

 

Terima kasih 🙏

Edited by JangE
Link to comment
Share on other sites

  • DW Members
4 minutes ago, JangE said:

Sallam, saya sudah mengikuti update dan sudah menggunakan v7...5, ai bot belum berfungsi, adakah node atau cron settingan yang tepat?

 

Terima kasih 🙏

Apakah pengiriman message text berfungsi dengan kamu? Coba klik Text Message, tulis pesan, dan kirim ke nomor kamu. Apakah pesan tersebut berhasil terkirim?

Jika tidak berfungsi, pergi ke Admin->Setting Server dan periksa apakah ada tanda X pada port."

  • Thanks 1
Link to comment
Share on other sites

@Magd Almuntaser  pesan terkirim dan tidak ada masalah Tuan, namun tanda X masih ada.

 

.env

.....

APP_NAME=MPWA
APP_ENV=local
APP_KEY=base64:PxG....3lMJwYFWpdxufKRbugeq8=
APP_DEBUG=true
APP_URL=https://domain.com
WA_URL_SERVER=https://domain.com
PORT_NODE=3100
APP_INSTALLED=true
LICENSE_KEY=MagdAlmuntaser-ttmtt
BUYER_EMAIL=doniaweb.com
TYPE_SERVER=hosting
DB_CONNECTION=mysql
DB_HOST=localhost    
....

 

Terima kasih sudah berkenan reply 🙏

 

image.thumb.png.0b81acf920168de6e933137e942a6e6f.png

Edited by JangE
Link to comment
Share on other sites

3 hours ago, Pebrian said:
async function sendGemini({
  command,
  senderNumber,
  chatgptKey,
  participantNumber,
}) {
  try {
    const geminiUrl = process.env.GEIMINI_URL;
    const geminiData = {
      contents: [
        {
          parts: [
            { text: `Tolong balas dengan bahasa yang santai: ${command}` }
          ]
        }
      ],
      model_parameters: {
        language: "id-ID" // GANTI KE BAHASA KELEAN
      }
    };
    const headers = {
      'Content-Type': 'application/json'
    };
    
    const response = await axios.post(`${geminiUrl}?key=${chatgptKey}`, geminiData, { headers: headers }).catch(() => {
      return false;
    });

    if (response && response.data && response.data.candidates && response.data.candidates.length > 0) {
      let content = response.data.candidates[0].content.parts[0].text;
      content = content.replace(/["']/g, '');
      let resText = JSON.stringify({ text: content, quoted: false });
      return resText;
    } else {
      return false;
    }
  } catch (error) {
    console.log('error send Gemini', error);
    return false;
  }
}

Gemini lebih santai buat ngebales. udh w coba bahasa nya gak terlalu baku

Tapi bener kata master @Magd Almuntaser lebih bagus default krn bisa multi bahasa.

kalo kita ngomong bahasa sunda/ jawa dia juga akan jawab dengan bahasa yang sama.

mungkin cocok jika digunakan untuk indonesia only, yg tidak diakses orang luar

Link to comment
Share on other sites

4 hours ago, Pebrian said:
async function sendGemini({
  command,
  senderNumber,
  chatgptKey,
  participantNumber,
}) {
  try {
    const geminiUrl = process.env.GEIMINI_URL;
    const geminiData = {
      contents: [
        {
          parts: [
            { text: `Tolong balas dengan bahasa yang santai: ${command}` }
          ]
        }
      ],
      model_parameters: {
        language: "id-ID" // GANTI KE BAHASA KELEAN
      }
    };
    const headers = {
      'Content-Type': 'application/json'
    };
    
    const response = await axios.post(`${geminiUrl}?key=${chatgptKey}`, geminiData, { headers: headers }).catch(() => {
      return false;
    });

    if (response && response.data && response.data.candidates && response.data.candidates.length > 0) {
      let content = response.data.candidates[0].content.parts[0].text;
      content = content.replace(/["']/g, '');
      let resText = JSON.stringify({ text: content, quoted: false });
      return resText;
    } else {
      return false;
    }
  } catch (error) {
    console.log('error send Gemini', error);
    return false;
  }
}

Gemini lebih santai buat ngebales. udh w coba bahasa nya gak terlalu baku

kok no respon ya gw ganti jadi ini di incoming message.js, udah restart node juga. dia jadi ga balas2

 

edited:

saya cuma ganti spt di gambar, dan si bobotpun membalas dengan centilnya 🙂

image.png.8feb070c6082c353d74a4722a3ee8083.png

Edited by kecoamumet

coffee

Need Help?? just buy me a cup of coffee

Link to comment
Share on other sites

  • DW Members
37 minutes ago, Upal said:

@Magd Almuntaser It worked amazingly with your version. Funny to see the devs are trying to copy you with their webhooks now haha.

Could you please tell me if there is any WHMCS module with it?

There are plugins coming soon for whmcs and wordpress 👍

  • Love 1
Link to comment
Share on other sites

2 hours ago, JangE said:

@Magd Almuntaser  pesan terkirim dan tidak ada masalah Tuan, namun tanda X masih ada.

 

.env

.....

APP_NAME=MPWA
APP_ENV=local
APP_KEY=base64:PxG....3lMJwYFWpdxufKRbugeq8=
APP_DEBUG=true
APP_URL=https://domain.com
WA_URL_SERVER=https://domain.com
PORT_NODE=3100
APP_INSTALLED=true
LICENSE_KEY=MagdAlmuntaser-ttmtt
BUYER_EMAIL=doniaweb.com
TYPE_SERVER=hosting
DB_CONNECTION=mysql
DB_HOST=localhost    
....

 

Terima kasih sudah berkenan reply 🙏

 

image.thumb.png.0b81acf920168de6e933137e942a6e6f.png

sudah saya perbaiki Tuan
image.thumb.png.c68e498726cf8bc6f1b84aaa114b83d6.png

 

semua fitur bisa kecuali AI nya...

ada yang alami?
saya coba ikuti, sudah update 7...5 pun sudah

 

terima kasih 😊

Link to comment
Share on other sites

4 hours ago, Magd Almuntaser said:

It's good that you modified it for you, but I removed all these options to make it universal for all people for English, Arabic, Indonesian and other languages 👍

Look at my signature on any post I write and you'll find the link. Look at the bottom of my post 👇

hahaha only for indonesian brother 🤣

3 hours ago, Enno The Explorer said:

penerapannya ini gmn? sy ga ngerti

incomingMessage.js edit paling bawah

1 hour ago, Unicode said:

Tapi bener kata master @Magd Almuntaser lebih bagus default krn bisa multi bahasa.

kalo kita ngomong bahasa sunda/ jawa dia juga akan jawab dengan bahasa yang sama.

mungkin cocok jika digunakan untuk indonesia only, yg tidak diakses orang luar

personal sih bang. kalo kita pengen yg sederhana seperti chatgpt harus kasih prompt

1 hour ago, kecoamumet said:

kok no respon ya gw ganti jadi ini di incoming message.js, udah restart node juga. dia jadi ga balas2

 

edited:

saya cuma ganti spt di gambar, dan si bobotpun membalas dengan centilnya 🙂

image.png.8feb070c6082c353d74a4722a3ee8083.png

mantap bang tinggal edit2 dikit.

  • Like 1
Link to comment
Share on other sites

2 minutes ago, JangE said:

sudah saya perbaiki Tuan
image.thumb.png.c68e498726cf8bc6f1b84aaa114b83d6.png

 

semua fitur bisa kecuali AI nya...

ada yang alami?
saya coba ikuti, sudah update 7...5 pun sudah

 

terima kasih 😊

Udah dicoba masukin apikey gemini?

untuk chatgpt pastikan ada saldo di openai

  • Love 1
  • Thanks 1
Link to comment
Share on other sites

20 minutes ago, Unicode said:

Udah dicoba masukin apikey gemini?

untuk chatgpt pastikan ada saldo di openai

sudah kak, pun sudah saya coba 1 persatu untuk pastikan, tetap belum ada respon.

 

Edited, ada masalah, tiba2 sepperti ini

image.png.f74e6de682659e9c29349bf3689b4409.png

🙏

Edited by JangE
Link to comment
Share on other sites

Just now, JangE said:

sudah kak, pun sudah saya coba 1 persatu untuk pastikan, tetap belum ada respon.

Coba restart node js. pake versi berapa?
Aku pake node js v19 aman jaya. Sudah 4 hari tidak terputus juga.

aku juga mendapati kasus yang sama di hosting yang lain. 
btw pake hosting apa vps?

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...