Spaces:
Paused
Paused
Download src/app/api/analytics/diversity/route.ts from igorkurgin/omniroute: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/src/app/api/analytics/diversity/route.ts
- Command line
-
hf download hf://spaces/igorkurgin/omniroute/src/app/api/analytics/diversity/route.ts
-
curl -L -o route.ts https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/src/app/api/analytics/diversity/route.ts
406 Bytes
| import { NextResponse } from "next/server"; | |
| import { getDiversityReport } from "../../../../../open-sse/services/autoCombo/providerDiversity"; | |
| export const dynamic = "force-dynamic"; | |
| export async function GET() { | |
| try { | |
| const report = getDiversityReport(); | |
| return NextResponse.json(report); | |
| } catch (error: any) { | |
| return NextResponse.json({ error: error.message }, { status: 500 }); | |
| } | |
| } | |