mirror of
https://github.com/severian-dev/sucker.severian.dev.git
synced 2025-11-05 00:25:43 +00:00
fix non-streaming
This commit is contained in:
@@ -312,11 +312,7 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
try {
|
||||
const body = await request.json();
|
||||
|
||||
// Check if this is a streaming request (JanitorAI expects SSE)
|
||||
const acceptHeader = request.headers.get("accept");
|
||||
const isStreamingRequest =
|
||||
acceptHeader?.includes("text/event-stream") || body.stream === true;
|
||||
const isStreamingRequest = body.stream === true;
|
||||
|
||||
if (!body.messages || body.messages.length < 2) {
|
||||
if (isStreamingRequest) {
|
||||
|
||||
Reference in New Issue
Block a user