Update index.js
Browse files
index.js
CHANGED
|
@@ -61,14 +61,13 @@ async function bimg(query) {
|
|
| 61 |
const bing = new BingApi({
|
| 62 |
cookie: process.env.BING_IMAGE_COOKIE || "1hPKd66tX-wvyQtYG5F-UIzIYgcsNB1rgZ5jAGGDCu30pMnoh-X8tHkZ92BNUmQ_MlPKKMrERVXwPqf4XhUZRTjrfOrrAxH4CCqoJfdfDptUXPJXJOQ7duuJEy-2C4uSabwUjuvkRIlifbB-3WEa4Y4dTpcNm9dVnkT14Lawhf4ceGJax0IXF5gbgnlhtLZdUJ08WyGQSnllQVNc-IzsVbQ"
|
| 63 |
});
|
| 64 |
-
let credit = await bing.getDalleCredits()
|
| 65 |
let data = await bing.createImage("cute cat").then((res) => {
|
| 66 |
return res.urls; // string[]
|
| 67 |
});
|
| 68 |
|
| 69 |
// Filter out links that end with '.svg'
|
| 70 |
let filteredData = data.filter(i => !i.includes('.svg'));
|
| 71 |
-
return
|
| 72 |
}
|
| 73 |
async function bingChat(text) {
|
| 74 |
const api = new BingChat({
|
|
|
|
| 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 |
|
| 68 |
// Filter out links that end with '.svg'
|
| 69 |
let filteredData = data.filter(i => !i.includes('.svg'));
|
| 70 |
+
return filteredData
|
| 71 |
}
|
| 72 |
async function bingChat(text) {
|
| 73 |
const api = new BingChat({
|