wolfyflutter

exomlapi.com [ai] [text generation] [conversation]

Jun 7th, 2025 (edited)
388
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 4.04 KB | Source Code | 0 0
  1. /*
  2.     base        : https://exomlapi.com/
  3.     fungsi      : ai text completion,
  4.     note        : skrep ini cuma support teks doang, tapi bisa conversation
  5.                   otak atik aja param di fungsi ai.generate()
  6.                   maaf kalau parsing hasil nya kadang kurang pas, cek di
  7.                   variabel yang namanya anu. tapi gw coba udah lumayan sih :v
  8.                   oh ya lu bisa pilih model lain jg ai nya. cuman beberapa
  9.                   model gw test malah ngehang.. fetch nya lama banget!
  10.                   gw belum test semua :v, paling gw pakek yg model chat gpt
  11.     last update : 7 Juni 2025 : 20:00 WITA
  12.     by          : wolep
  13. */
  14.  
  15. const ai = {
  16.     getRandom: () => {
  17.         const gen = (length, charSet = {}) => {
  18.             const l = "abcdefghijklmnopqrstuvwxyz" // lowercase
  19.             const u = l.toUpperCase() // uppercase
  20.             const s = "-_" // symbol
  21.             const n = "0123456789" // number
  22.  
  23.             let cs = "" // character set
  24.             const { lowerCase = false, upperCase = false, symbol = false, number = false } = charSet
  25.  
  26.             if (!lowerCase && !upperCase && !symbol && !number) {
  27.                 cs += l + u + s + n
  28.             } else {
  29.                 if (lowerCase) cs += l
  30.                 if (upperCase) cs += u
  31.                 if (symbol) cs += s
  32.                 if (number) cs += n
  33.             }
  34.  
  35.             const result = Array.from({ length }, (_ => cs[Math.floor(Math.random() * cs.length)])).join("") || null
  36.             return result
  37.         }
  38.  
  39.         const id = gen(16, { upperCase: true, lowerCase: true, number: true }) //TXulzbGqk0EDzPeT
  40.         const chatId = `chat-${new Date().getTime()}-${gen(9, { lowerCase: true, number: true })}` //chat-1749292523602-k0tna5ef8
  41.         const userId = `local-user-${new Date().getTime()}-${gen(9, { lowerCase: true, number: true })}` //local-user-1749292766705-b49yu10mm
  42.         const antiBotId = `${gen(32)}-${gen(8, { number: true, lowerCase: true })}` //jUxRXb2xJbf8BVmIn2NGhncRQePiIiNE-8gvna4dd
  43.         return { id, chatId, userId, antiBotId }
  44.     },
  45.  
  46.     generate: async (messages, systemPrompt, model) => {
  47.  
  48.         const body = JSON.stringify(
  49.             {
  50.                 messages,
  51.                 systemPrompt,
  52.                 model,
  53.                 "isAuthenticated": true,
  54.                 ...ai.getRandom()
  55.             }
  56.         )
  57.  
  58.         const headers = {
  59.             "content-type": "application/json",
  60.         }
  61.  
  62.         const response = await fetch("https://exomlapi.com/api/chat", {
  63.             headers,
  64.             body,
  65.             "method": "post"
  66.         })
  67.  
  68.         if (!response.ok) throw Error(`woops.. response is not ok! ${response.status} ${response.statusText}\n\n${await response.text()}`)
  69.  
  70.         const data = await response.text()
  71.        
  72.         // aku buruk dalam memparsing ini
  73.         const anu = [...data.matchAll(/^0:"(.*?)"$/gm)].map(v => v[1]).join("").replaceAll("\\n","\n").replaceAll("\\\"","\"")
  74.         if (!anu) throw Error(`gagal parsing pesan dari server, kemungkinan pesan kosong / error.\n\n${data}`)
  75.         return anu
  76.  
  77.     }
  78. }
  79.  
  80. // cara pakai
  81. const yourQuestion = "apa bedanya undefined dan null pada javascript"
  82. const systemPrompt = "balas singkat. tidak bertele tele. straight to the poin."
  83.  
  84. const modelList = [
  85.     "llama",
  86.     "gemma",
  87.     "qwen-3-235b",
  88.     "gpt-4.1",
  89.     "gpt-4o",
  90.     "gpt-4o-mini",
  91.     "llama-4-scout",
  92.     "llama-4-maverick",
  93.     "deepseek-r1",
  94.     "qwq-32b"]
  95.    
  96. const model = modelList[3] //gpt-4.1
  97.  
  98. const messages = [
  99.     {
  100.         "role": "user",
  101.         "content": "halo",
  102.  
  103.     },
  104.     {
  105.         "role": "assistant",
  106.         "content": "Halo! Ada yang bisa saya bantu?",
  107.  
  108.     },
  109.     {
  110.         "role": "user",
  111.         "content": yourQuestion,
  112.  
  113.     }
  114. ]
  115.  
  116. ai.generate(messages, systemPrompt, model)
  117. .then(console.log)
  118. .catch(err => console.log(err.message))
  119.  
  120. /*output
  121. Undefined berarti variabel sudah dideklarasikan tapi belum diberi nilai.  
  122. Null berarti variabel sengaja di-set tanpa nilai (kosong).
  123. */
Tags: ai
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • Umbvasty
    20 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment