Update index.js
Browse files
index.js
CHANGED
@@ -36,7 +36,7 @@ app.post('/api/chatgpt-old', async (req, res) => {
|
|
36 |
const url = "https://${type_urls}.remixproject.org"
|
37 |
const response = await axios.post(url, payload, { headers })
|
38 |
console.log('Response:', response.data)
|
39 |
-
const output = response.data.choices
|
40 |
res.json({message: output})
|
41 |
} catch (error) {
|
42 |
res.status(401).json({error: error.message})
|
|
|
36 |
const url = "https://${type_urls}.remixproject.org"
|
37 |
const response = await axios.post(url, payload, { headers })
|
38 |
console.log('Response:', response.data)
|
39 |
+
const output = response.data.choices[0].message.content;
|
40 |
res.json({message: output})
|
41 |
} catch (error) {
|
42 |
res.status(401).json({error: error.message})
|