Upload case.js
Browse files
case.js
CHANGED
|
@@ -973,6 +973,7 @@ module.exports = async (conn, dev, chatUpdate, store) => {
|
|
| 973 |
> ${sign} ${prefix}tts
|
| 974 |
> ${sign} ${prefix}blueai
|
| 975 |
> ${sign} ${prefix}gemini
|
|
|
|
| 976 |
> ${sign} ${prefix}blackbox
|
| 977 |
> ${sign} ${prefix}bing
|
| 978 |
> ${sign} ${prefix}gemini-pro
|
|
@@ -1774,6 +1775,35 @@ case 'flux': {
|
|
| 1774 |
}
|
| 1775 |
break;
|
| 1776 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1777 |
case 'blackbox': {
|
| 1778 |
if (!q) return reply("β Please enter a question or prompt.\n\nExample: .blackbox How do I code in JavaScript?");
|
| 1779 |
await loading();
|
|
|
|
| 973 |
> ${sign} ${prefix}tts
|
| 974 |
> ${sign} ${prefix}blueai
|
| 975 |
> ${sign} ${prefix}gemini
|
| 976 |
+
> ${sign} ${prefix}llama3.4
|
| 977 |
> ${sign} ${prefix}blackbox
|
| 978 |
> ${sign} ${prefix}bing
|
| 979 |
> ${sign} ${prefix}gemini-pro
|
|
|
|
| 1775 |
}
|
| 1776 |
break;
|
| 1777 |
}
|
| 1778 |
+
case 'llama3.4': {
|
| 1779 |
+
if (!q) return reply(`β Please enter a question or prompt.\n\nExample: *${prefix + command} What is AI?*`);
|
| 1780 |
+
|
| 1781 |
+
await loading(); // Display loading message
|
| 1782 |
+
|
| 1783 |
+
try {
|
| 1784 |
+
let apiUrl = `https://api.siputzx.my.id/api/ai/meta-llama-33-70B-instruct-turbo?query=${encodeURIComponent(q)}`;
|
| 1785 |
+
let imageUrl = "https://huggingface.co/spaces/API-XX/TEST/resolve/main/Links/Llama3.4.jpg";
|
| 1786 |
+
|
| 1787 |
+
let response = await fetch(apiUrl);
|
| 1788 |
+
let json = await response.json();
|
| 1789 |
+
|
| 1790 |
+
if (!json.status || !json.data) {
|
| 1791 |
+
return reply("β No response received. Try again later.");
|
| 1792 |
+
}
|
| 1793 |
+
|
| 1794 |
+
let aiResponse = json.data;
|
| 1795 |
+
|
| 1796 |
+
await conn.sendMessage(m.chat, {
|
| 1797 |
+
image: { url: imageUrl },
|
| 1798 |
+
caption: fontx(`π€ *Llama 3.4 AI Response*\n\nπ¬ *Query:* ${q}\nπ§ *Response:* ${aiResponse}\n> ${caption}`),
|
| 1799 |
+
}, { quoted: m });
|
| 1800 |
+
|
| 1801 |
+
} catch (error) {
|
| 1802 |
+
console.error("Error in llama3.4 case:", error);
|
| 1803 |
+
reply("β An error occurred while processing your request. Please try again later.");
|
| 1804 |
+
}
|
| 1805 |
+
break;
|
| 1806 |
+
}
|
| 1807 |
case 'blackbox': {
|
| 1808 |
if (!q) return reply("β Please enter a question or prompt.\n\nExample: .blackbox How do I code in JavaScript?");
|
| 1809 |
await loading();
|