初始化模版工程
This commit is contained in:
14
app/api/chat/oss_url/route.ts
Normal file
14
app/api/chat/oss_url/route.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { NextRequest } from 'next/server'
|
||||
import { oapiClient, sendResponse } from '../../oapi-client'
|
||||
|
||||
export async function POST(req: NextRequest) {
|
||||
const body = req.body ? await req.json() : {}
|
||||
const { file_path, task_id } = body
|
||||
|
||||
const res = await oapiClient.post('/v1/super_agent/chat/oss_url', {
|
||||
file_path: file_path,
|
||||
task_id: task_id,
|
||||
})
|
||||
|
||||
return sendResponse(res)
|
||||
}
|
||||
Reference in New Issue
Block a user