File size: 950 Bytes
a2b2aac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//const { Configuration, OpenAIApi } = await import("openai");
import fetch from 'node-fetch'
var c = `OPENAI`
let imgr = flaaa.getRandom()
let handler = async (m, { args, usedPrefix, command, text }) => {
  if(!text) return m.reply(`Masukkan teks yang mau ditanyakan ke OpenAI \nContoh: ${usedPrefix+command} Apa itu chat GPT?`)
  try{  
  m.reply(wait)
  let request = (await axios.get(`https://hercai.onrender.com/v3-beta/hercai?question=${text}`))
  let wtf = request.data.reply
  await conn.sendMessage(m.chat, {
  text: wtf,
  contextInfo: {
  externalAdReply: {
  title: `CHAT GPT3.5`,
  thumbnailUrl: `https://telegra.ph/file/8a2b4778c9413704297c5.png`,
  mediaType: 1,
  renderLargerThumbnail: true
  }}}, { quoted: m})
  //m.reply(wtf);
  } catch(e) {
  console.log(e)
  m.reply(`🚩 Tidak di temukan`)
  }
}
handler.help = ['openai']
handler.tags = ['tools']
handler.command = /^(ai|openai)$/i
handler.limit = true

export default handler