初始化模版工程
This commit is contained in:
18
app/api/chat/event/route.ts
Normal file
18
app/api/chat/event/route.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { NextRequest } from 'next/server'
|
||||
import { oapiClient, sendResponse } from '../../oapi-client'
|
||||
import { getDefaultAgentId } from '../../nova-config'
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
const conversationId = req.nextUrl.searchParams.get('conversation_id')
|
||||
const pageNo = req.nextUrl.searchParams.get('page_no')
|
||||
const pageSize = req.nextUrl.searchParams.get('page_size')
|
||||
|
||||
const res = await oapiClient.get('/v1/oapi/super_agent/chat/event_list', {
|
||||
agent_id: getDefaultAgentId(),
|
||||
conversation_id: conversationId,
|
||||
page_no: pageNo,
|
||||
page_size: pageSize,
|
||||
})
|
||||
|
||||
return sendResponse(res)
|
||||
}
|
||||
Reference in New Issue
Block a user