mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-22 20:51:39 +00:00
feat: 支持上下文联想
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import express from 'express'
|
||||
import { chatReply } from './chatgpt'
|
||||
import { chatReply, clearChatContext } from './chatgpt'
|
||||
|
||||
const app = express()
|
||||
|
||||
@@ -19,3 +19,8 @@ app.post('/chat', async (req, res) => {
|
||||
const response = await chatReply(message)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.post('/clear', async (req, res) => {
|
||||
const response = await clearChatContext()
|
||||
res.send(response)
|
||||
})
|
||||
|
Reference in New Issue
Block a user