feat: fix bugs and finalize ai-optimized-editor

This commit is contained in:
fly6516 2025-05-16 14:09:06 +08:00
parent 88be549430
commit 9d149e4254
2 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,7 @@ Format:
"issuesFixed": ["list of issues fixed"]
}
`;
console.log("Prompt:", prompt);
// 发送请求给OpenAI
const messages: CoreMessage[] = [{ role: "user", content: prompt }];
@ -97,5 +98,6 @@ Format:
throw new Error("Response validation failed");
}
console.log("LLM response:", llmResponseJson);
return validationResult.data;
};

View File

@ -1,3 +1,5 @@
"use client";
import { AIProblemEditor } from "@/components/ai-optimized-editor";
import { useParams } from "next/navigation";