API-XX commited on
Commit
6b86fee
Β·
verified Β·
1 Parent(s): 392a006

Upload case.js

Browse files
Files changed (1) hide show
  1. case.js +92 -3
case.js CHANGED
@@ -65,8 +65,7 @@ const {
65
  const ephoto = require('../lib/scraper')
66
  const {
67
  vnMenu,
68
- images,
69
- zoroimages
70
  } = require('../temp/media/links.js')
71
  const {
72
  virtex
@@ -973,7 +972,10 @@ module.exports = async (conn, dev, chatUpdate, store) => {
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
@@ -1804,6 +1806,93 @@ case 'llama': {
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();
 
65
  const ephoto = require('../lib/scraper')
66
  const {
67
  vnMenu,
68
+ images
 
69
  } = require('../temp/media/links.js')
70
  const {
71
  virtex
 
972
  > ${sign} ${prefix}tts
973
  > ${sign} ${prefix}blueai
974
  > ${sign} ${prefix}gemini
975
+ > ${sign} ${prefix}llama
976
+ > ${sign} ${prefix}mistral
977
+ > ${sign} ${prefix}deepseek
978
+ > ${sign} ${prefix}deepseek2
979
  > ${sign} ${prefix}blackbox
980
  > ${sign} ${prefix}bing
981
  > ${sign} ${prefix}gemini-pro
 
1806
  }
1807
  break;
1808
  }
1809
+ case 'deepseek': {
1810
+ if (!q) return reply(`❌ Please enter a question or prompt.\n\nExample: *${prefix + command} What is AI?*`);
1811
+
1812
+ await loading(); // Show loading message
1813
+
1814
+ try {
1815
+ let apiUrl = `https://api.siputzx.my.id/api/ai/deepseek-r1?content=${encodeURIComponent(q)}`;
1816
+ let imageUrl = "https://huggingface.co/spaces/API-XX/TEST/resolve/main/Links/deepseek.jpg";
1817
+
1818
+ let response = await fetch(apiUrl);
1819
+ let json = await response.json();
1820
+
1821
+ if (!json.status || !json.data) {
1822
+ return reply("❌ No response received. Try again later.");
1823
+ }
1824
+
1825
+ let aiResponse = json.data.replace("</think>\n\n", ""); // Clean output if necessary
1826
+
1827
+ await conn.sendMessage(m.chat, {
1828
+ image: { url: imageUrl },
1829
+ caption: fontx(`🧠 *DeepSeek AI Response*\n\nπŸ’¬ *Query:* ${q}\nπŸ€– *Response:* ${aiResponse}\n> ${caption}`),
1830
+ }, { quoted: m });
1831
+
1832
+ } catch (error) {
1833
+ console.error("Error in deepseek case:", error);
1834
+ reply("❌ An error occurred while processing your request. Please try again later.");
1835
+ }
1836
+ break;
1837
+ }
1838
+ case 'deepseek2': {
1839
+ if (!q) return reply(`❌ Please enter a question or prompt.\n\nExample: *${prefix + command} What is AI?*`);
1840
+
1841
+ await loading(); // Show loading message
1842
+
1843
+ try {
1844
+ let apiUrl = `https://api.siputzx.my.id/api/ai/deepseek-llm-67b-chat?content=${encodeURIComponent(q)}`;
1845
+ let imageUrl = "https://huggingface.co/spaces/API-XX/TEST/resolve/main/Links/deepseek.jpg";
1846
+
1847
+ let response = await fetch(apiUrl);
1848
+ let json = await response.json();
1849
+
1850
+ if (!json.status || !json.data) {
1851
+ return reply("❌ No response received. Try again later.");
1852
+ }
1853
+
1854
+ let aiResponse = json.data;
1855
+
1856
+ await conn.sendMessage(m.chat, {
1857
+ image: { url: imageUrl },
1858
+ caption: fontx(`🧠 *DeepSeek 67B AI Response*\n\nπŸ’¬ *Query:* ${q}\nπŸ€– *Response:* ${aiResponse}\n> ${caption}`),
1859
+ }, { quoted: m });
1860
+
1861
+ } catch (error) {
1862
+ console.error("Error in deepseek2 case:", error);
1863
+ reply("❌ An error occurred while processing your request. Please try again later.");
1864
+ }
1865
+ break;
1866
+ }
1867
+ case 'mistral': {
1868
+ if (!q) return reply(`❌ Please enter a question or prompt.\n\nExample: *${prefix + command} What is AI?*`);
1869
+
1870
+ await loading(); // Show loading animation
1871
+
1872
+ try {
1873
+ let apiUrl = `https://api.siputzx.my.id/api/ai/mistral-7b-instruct-v0.2?content=${encodeURIComponent(q)}`;
1874
+ let imageUrl = "https://huggingface.co/spaces/API-XX/TEST/resolve/main/Links/mistral.jpg";
1875
+
1876
+ let response = await fetch(apiUrl);
1877
+ let json = await response.json();
1878
+
1879
+ if (!json.status || !json.data) {
1880
+ return reply("❌ No response received. Try again later.");
1881
+ }
1882
+
1883
+ let aiResponse = json.data;
1884
+
1885
+ await conn.sendMessage(m.chat, {
1886
+ image: { url: imageUrl },
1887
+ caption: fontx(`🌬️ *Mistral 7B AI Response*\n\nπŸ’¬ *Query:* ${q}\nπŸ€– *Response:* ${aiResponse}\n> ${caption}`),
1888
+ }, { quoted: m });
1889
+
1890
+ } catch (error) {
1891
+ console.error("Error in mistral case:", error);
1892
+ reply("❌ An error occurred while processing your request. Please try again later.");
1893
+ }
1894
+ break;
1895
+ }
1896
  case 'blackbox': {
1897
  if (!q) return reply("❌ Please enter a question or prompt.\n\nExample: .blackbox How do I code in JavaScript?");
1898
  await loading();