wang-dev/bingo
0
1import FormData from 'form-data'2 3import { fetch } from '@/lib/isomorphic'4 5const formData = new FormData()6 7const knowledgeRequest = {"imageInfo":{"url":"https://www.baidu.com/img/PCfb_5bf082d29588c07f842ccde3f97243ea.png"},"knowledgeRequest":{"invokedSkills":["ImageById"],"subscriptionId":"Bing.Chat.Multimodal","invokedSkillsRequestData":{"enableFaceBlur":true},"convoData":{"convoid":"51D|BingProdUnAuthenticatedUsers|E3DCA904FF236C67C3450163BCEC64CFF3F618CC8A4AFD75FD518F5ED0ADA080","convotone":"Creative"}}}8 9formData.append('knowledgeRequest', JSON.stringify(knowledgeRequest))10 11 12fetch('https://bing.vcanbb.top/images/kblob',13 {14 method: 'POST',15 body: formData.getBuffer(),16 headers: {17 "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",18 "sec-ch-ua-mobile": "?0",19 "sec-ch-ua-platform": "\"Windows\"",20 "Referer": "https://bing.vcanbb.top/web/index.html",21 "Referrer-Policy": "origin-when-cross-origin",22 ...formData.getHeaders()23 }24 25 }26).then(res => res.text())27.then(res => console.log('res', res))28 