初始化模版工程
This commit is contained in:
7
app/api/conversation/info/route.ts
Normal file
7
app/api/conversation/info/route.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { oapiClient, sendResponse } from '../../oapi-client'
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const body = req.body ? await req.json() : {}
|
||||
const res = await oapiClient.post('/v1/super_agent/chat/get_conversation_info_list', body)
|
||||
return sendResponse(res)
|
||||
}
|
||||
12
app/api/conversation/route.ts
Normal file
12
app/api/conversation/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { oapiClient, sendResponse } from '../oapi-client'
|
||||
import { getDefaultAgentId } from '../nova-config'
|
||||
|
||||
export async function GET() {
|
||||
const res = await oapiClient.get('/v1/oapi/super_agent/chat/conversation_list', {
|
||||
page_no: 1,
|
||||
page_size: 10,
|
||||
agent_id: getDefaultAgentId(),
|
||||
})
|
||||
|
||||
return sendResponse(res)
|
||||
}
|
||||
Reference in New Issue
Block a user