ilhamdev commited on
Commit
590f76a
·
verified ·
1 Parent(s): 8215083

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -59,9 +59,9 @@ const post = async (url, form, headers = {}) => {
59
  async function bimg(query) {
60
  const { BingApi } = await import("bing-nodejs");
61
  const bing = new BingApi({
62
- cookie: process.env.BING_IMAGE_COOKIE || "1hPKd66tX-wvyQtYG5F-UIzIYgcsNB1rgZ5jAGGDCu30pMnoh-X8tHkZ92BNUmQ_MlPKKMrERVXwPqf4XhUZRTjrfOrrAxH4CCqoJfdfDptUXPJXJOQ7duuJEy-2C4uSabwUjuvkRIlifbB-3WEa4Y4dTpcNm9dVnkT14Lawhf4ceGJax0IXF5gbgnlhtLZdUJ08WyGQSnllQVNc-IzsVbQ"
63
  });
64
- let data = await bing.createImage("cute cat").then((res) => {
65
  return res.urls; // string[]
66
  });
67
 
@@ -71,7 +71,7 @@ const bing = new BingApi({
71
  }
72
  async function bingChat(text) {
73
  const api = new BingChat({
74
- cookie: process.env.BING_IMAGE_COOKIE || "1hPKd66tX-wvyQtYG5F-UIzIYgcsNB1rgZ5jAGGDCu30pMnoh-X8tHkZ92BNUmQ_MlPKKMrERVXwPqf4XhUZRTjrfOrrAxH4CCqoJfdfDptUXPJXJOQ7duuJEy-2C4uSabwUjuvkRIlifbB-3WEa4Y4dTpcNm9dVnkT14Lawhf4ceGJax0IXF5gbgnlhtLZdUJ08WyGQSnllQVNc-IzsVbQ"
75
  })
76
  const res = await api.sendMessage(text, { variant: 'Precise' })
77
  return res?.text
 
59
  async function bimg(query) {
60
  const { BingApi } = await import("bing-nodejs");
61
  const bing = new BingApi({
62
+ cookie: process.env.BING_IMAGE_COOKIE
63
  });
64
+ let data = await bing.createImage(query).then((res) => {
65
  return res.urls; // string[]
66
  });
67
 
 
71
  }
72
  async function bingChat(text) {
73
  const api = new BingChat({
74
+ cookie: process.env.BING_IMAGE_COOKIE
75
  })
76
  const res = await api.sendMessage(text, { variant: 'Precise' })
77
  return res?.text