Fix learn 404, coin animation, full regions, and AI key errors.
Use numeric /learn/{num} routes, register Tailwind coin animations with方孔铜钱 UI, expand to 34 provinces, and surface missing OPENAI_API_KEY clearly.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,6 +18,10 @@ export async function streamAIResponse(
|
||||
system: string,
|
||||
user: string,
|
||||
): Promise<{ data?: ReturnType<typeof createStreamableValue<string>>["value"]; error?: string }> {
|
||||
if (!process.env.OPENAI_API_KEY?.trim()) {
|
||||
return { error: "未配置 OPENAI_API_KEY,请在 .env.local 或 Docker env_file 中设置" };
|
||||
}
|
||||
|
||||
const stream = createStreamableValue<string>();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user