Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
@@ -6,8 +6,7 @@ const express = require('express')
|
|
6 |
const PDFDocument = require('pdfkit')
|
7 |
const axios = require("axios")
|
8 |
const FormData = require("form-data")
|
9 |
-
const { BingChat } = (await import("bing-chat")).default
|
10 |
-
("bing-chat")
|
11 |
const apikey = "@SadTeam77"
|
12 |
|
13 |
const app = express()
|
@@ -136,7 +135,7 @@ app.post('/api/waifu2x', async (req, res) => {
|
|
136 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
137 |
}
|
138 |
})
|
139 |
-
app.post('/api/bingchat', async (req, res) => {
|
140 |
try {
|
141 |
console.log(req.body)
|
142 |
const { prompt, status } = req.body
|
@@ -157,7 +156,7 @@ app.post('/api/bingchat', async (req, res) => {
|
|
157 |
e = String(e)
|
158 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
159 |
}
|
160 |
-
})
|
161 |
|
162 |
const PORT = process.env.PORT || 7860
|
163 |
app.listen(PORT, () => console.log('App running on port', PORT))
|
|
|
6 |
const PDFDocument = require('pdfkit')
|
7 |
const axios = require("axios")
|
8 |
const FormData = require("form-data")
|
9 |
+
//const { BingChat } = (await import("bing-chat")).default
|
|
|
10 |
const apikey = "@SadTeam77"
|
11 |
|
12 |
const app = express()
|
|
|
135 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
136 |
}
|
137 |
})
|
138 |
+
/*app.post('/api/bingchat', async (req, res) => {
|
139 |
try {
|
140 |
console.log(req.body)
|
141 |
const { prompt, status } = req.body
|
|
|
156 |
e = String(e)
|
157 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
158 |
}
|
159 |
+
})*/
|
160 |
|
161 |
const PORT = process.env.PORT || 7860
|
162 |
app.listen(PORT, () => console.log('App running on port', PORT))
|