mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
feat: lint code
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { type NextRequest } from 'next/server'
|
||||
import { getInfo, client } from '@/app/api/utils/common'
|
||||
import { client, getInfo } from '@/app/api/utils/common'
|
||||
import { OpenAIStream } from '@/app/api/utils/stream'
|
||||
|
||||
export async function POST(request: NextRequest) {
|
||||
@ -8,10 +8,10 @@ export async function POST(request: NextRequest) {
|
||||
inputs,
|
||||
query,
|
||||
conversation_id: conversationId,
|
||||
response_mode: responseMode
|
||||
response_mode: responseMode,
|
||||
} = body
|
||||
const { user } = getInfo(request);
|
||||
const { user } = getInfo(request)
|
||||
const res = await client.createChatMessage(inputs, query, user, responseMode, conversationId)
|
||||
const stream = await OpenAIStream(res as any)
|
||||
return new Response(stream as any)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user