diff --git a/app/(chat)/api/chat/route.ts b/app/(chat)/api/chat/route.ts index 1b936ccb5f..cf4138fd07 100644 --- a/app/(chat)/api/chat/route.ts +++ b/app/(chat)/api/chat/route.ts @@ -1,4 +1,3 @@ -import { checkBotId } from "botid/server"; import { geolocation, ipAddress } from "@vercel/functions"; import { convertToModelMessages, @@ -8,12 +7,13 @@ import { stepCountIs, streamText, } from "ai"; +import { checkBotId } from "botid/server"; import { after } from "next/server"; import { createResumableStreamContext } from "resumable-stream"; import { auth, type UserType } from "@/app/(auth)/auth"; import { entitlementsByUserType } from "@/lib/ai/entitlements"; -import { type RequestHints, systemPrompt } from "@/lib/ai/prompts"; import { allowedModelIds } from "@/lib/ai/models"; +import { type RequestHints, systemPrompt } from "@/lib/ai/prompts"; import { getLanguageModel } from "@/lib/ai/providers"; import { createDocument } from "@/lib/ai/tools/create-document"; import { getWeather } from "@/lib/ai/tools/get-weather"; @@ -185,7 +185,7 @@ export async function POST(request: Request) { }); dataStream.merge( - result.toUIMessageStream({ sendReasoning: isReasoningModel }), + result.toUIMessageStream({ sendReasoning: isReasoningModel }) ); if (titlePromise) { @@ -236,7 +236,7 @@ export async function POST(request: Request) { if ( error instanceof Error && error.message?.includes( - "AI Gateway requires a valid credit card on file to service requests", + "AI Gateway requires a valid credit card on file to service requests" ) ) { return "AI Gateway requires a valid credit card on file to service requests. Please visit https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dadd-credit-card to add a card and unlock your free credits."; diff --git a/components/ai-elements/web-preview.tsx b/components/ai-elements/web-preview.tsx index 5245995199..cffa2dd944 100644 --- a/components/ai-elements/web-preview.tsx +++ b/components/ai-elements/web-preview.tsx @@ -238,7 +238,7 @@ export const WebPreviewConsole = ({ {logs.length === 0 ? (
No console output
) : ( - logs.map((log, index) => ( + logs.map((log) => (No console output
) : ( - logs.map((log, index) => ( + logs.map((log) => (