Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/api/assistant/[assistant_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function GET(
const { assistant_id } = await params;

// Get backend URL from environment variable
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// Forward the request to the actual backend
const response = await fetch(`${backendUrl}/api/v1/assistant/${assistant_id}`, {
Expand Down
2 changes: 1 addition & 1 deletion app/api/collections/[collection_id]/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextResponse } from 'next/server';

const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// GET /api/collections/[collection_id] - Get a specific collection
export async function GET(
Expand Down
2 changes: 1 addition & 1 deletion app/api/collections/jobs/[job_id]/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextResponse } from 'next/server';

const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// GET /api/collections/jobs/[job_id] - Get collection job status
export async function GET(
Expand Down
4 changes: 2 additions & 2 deletions app/api/collections/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';


export async function GET(request: Request) {
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down Expand Up @@ -52,7 +52,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();

// Get backend URL from environment variable
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// Forward the request to the actual backend
const response = await fetch(`${backendUrl}/api/v1/collections/`, {
Expand Down
6 changes: 3 additions & 3 deletions app/api/configs/[config_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ config_id: string }> }
) {
const { config_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand All @@ -30,7 +30,7 @@ export async function PATCH(
{ params }: { params: Promise<{ config_id: string }> }
) {
const { config_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down Expand Up @@ -60,7 +60,7 @@ export async function DELETE(
{ params }: { params: Promise<{ config_id: string }> }
) {
const { config_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ config_id: string; version_number: string }> }
) {
const { config_id, version_number } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down Expand Up @@ -33,7 +33,7 @@ export async function DELETE(
{ params }: { params: Promise<{ config_id: string; version_number: string }> }
) {
const { config_id, version_number } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down
4 changes: 2 additions & 2 deletions app/api/configs/[config_id]/versions/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ config_id: string }> }
) {
const { config_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand All @@ -30,7 +30,7 @@ export async function POST(
{ params }: { params: Promise<{ config_id: string }> }
) {
const { config_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down
4 changes: 2 additions & 2 deletions app/api/configs/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextResponse, NextRequest } from 'next/server';

export async function GET(request: Request) {
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down Expand Up @@ -36,7 +36,7 @@ export async function POST(request: NextRequest) {
)
}
const body=await request.json();
const backendUrl=process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl=process.env.BACKEND_URL || 'http://localhost:8000';

const response=await fetch(`${backendUrl}/api/v1/configs/`, {
method:'POST',
Expand Down
4 changes: 2 additions & 2 deletions app/api/document/[document_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function GET(request: Request,
) {

const { document_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down Expand Up @@ -44,7 +44,7 @@ export async function DELETE(request: Request,
{ params }: { params: Promise<{ document_id: string }> }
) {
const { document_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down
4 changes: 2 additions & 2 deletions app/api/document/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';


export async function GET(request: Request) {
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down Expand Up @@ -52,7 +52,7 @@ export async function POST(request: NextRequest) {
const formData = await request.formData();

// Get backend URL from environment variable
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// Forward the request to the actual backend
const response = await fetch(`${backendUrl}/api/v1/documents/`, {
Expand Down
2 changes: 1 addition & 1 deletion app/api/evaluations/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function GET(
}

// Real backend mode
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

const searchParams = request.nextUrl.searchParams;
const exportFormat = searchParams.get('export_format') || 'row';
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/datasets/[dataset_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function GET(
}

const { dataset_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const searchParams = request.nextUrl.searchParams.toString();
const queryString = searchParams ? `?${searchParams}` : '';

Expand Down Expand Up @@ -78,7 +78,7 @@ export async function DELETE(
const { dataset_id } = await params;

// Get backend URL from environment variable
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// Forward the request to the actual backend
const response = await fetch(`${backendUrl}/api/v1/evaluations/datasets/${dataset_id}`, {
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/datasets/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function GET(request: NextRequest) {
}

// Get backend URL from environment variable
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// Forward the request to the actual backend
const response = await fetch(`${backendUrl}/api/v1/evaluations/datasets`, {
Expand Down Expand Up @@ -68,7 +68,7 @@ export async function POST(request: NextRequest) {
const formData = await request.formData();

// Get backend URL from environment variable
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// Forward the request to the actual backend
const response = await fetch(`${backendUrl}/api/v1/evaluations/datasets`, {
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function GET(request: NextRequest) {
return NextResponse.json({ error: 'Missing X-API-KEY' }, { status: 401 });
}

const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

const response = await fetch(`${backendUrl}/api/v1/evaluations`, {
method: 'GET',
Expand Down Expand Up @@ -44,7 +44,7 @@ export async function POST(request: NextRequest) {
}

const body = await request.json();
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

const response = await fetch(`${backendUrl}/api/v1/evaluations`, {
method: 'POST',
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/stt/datasets/[dataset_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ dataset_id: string }> }
) {
const { dataset_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down Expand Up @@ -47,7 +47,7 @@ export async function DELETE(
{ params }: { params: Promise<{ dataset_id: string }> }
) {
const { dataset_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/stt/datasets/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NextResponse, NextRequest } from 'next/server';

export async function GET(request:
Request) {
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down Expand Up @@ -39,7 +39,7 @@ export async function POST(request: NextRequest) {
)
}
const body=await request.json();
const backendUrl=process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl=process.env.BACKEND_URL || 'http://localhost:8000';

const response=await fetch(`${backendUrl}/api/v1/evaluations/stt/datasets`, {
method:'POST',
Expand Down
2 changes: 1 addition & 1 deletion app/api/evaluations/stt/files/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function POST(request: NextRequest) {
const formData = await request.formData();

// Get backend URL from environment variable
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

// Forward the request to the actual backend
const response = await fetch(`${backendUrl}/api/v1/evaluations/stt/files`, {
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/stt/results/[result_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ result_id: string }> }
) {
const { result_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand All @@ -31,7 +31,7 @@ export async function PATCH(
{ params }: { params: Promise<{ result_id: string }> }
) {
const { result_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down
2 changes: 1 addition & 1 deletion app/api/evaluations/stt/runs/[run_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ run_id: string }> }
) {
const { run_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

// Extract query parameters from the request URL
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/stt/runs/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NextResponse, NextRequest } from 'next/server';


export async function GET(request: Request) {
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down Expand Up @@ -38,7 +38,7 @@ export async function POST(request: NextRequest) {
)
}
const body=await request.json();
const backendUrl=process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl=process.env.BACKEND_URL || 'http://localhost:8000';

const response=await fetch(`${backendUrl}/api/v1/evaluations/stt/runs`, {
method:'POST',
Expand Down
2 changes: 1 addition & 1 deletion app/api/evaluations/stt/samples/[sample_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function PATCH(
{ params }: { params: Promise<{ sample_id: string }> }
) {
const { sample_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/tts/datasets/[dataset_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ dataset_id: string }> }
) {
const { dataset_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down Expand Up @@ -64,7 +64,7 @@ export async function DELETE(
{ params }: { params: Promise<{ dataset_id: string }> }
) {
const { dataset_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/tts/datasets/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextResponse, NextRequest } from 'next/server';

export async function GET(request: Request) {
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand Down Expand Up @@ -31,7 +31,7 @@ export async function POST(request: NextRequest) {
);
}
const body = await request.json();
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';

const response = await fetch(`${backendUrl}/api/v1/evaluations/tts/datasets`, {
method: 'POST',
Expand Down
4 changes: 2 additions & 2 deletions app/api/evaluations/tts/results/[result_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ result_id: string }> }
) {
const { result_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

try {
Expand All @@ -30,7 +30,7 @@ export async function PATCH(
{ params }: { params: Promise<{ result_id: string }> }
) {
const { result_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

if (!apiKey) {
Expand Down
2 changes: 1 addition & 1 deletion app/api/evaluations/tts/runs/[run_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(
{ params }: { params: Promise<{ run_id: string }> }
) {
const { run_id } = await params;
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8000';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:8000';
const apiKey = request.headers.get('X-API-KEY');

const { searchParams } = new URL(request.url);
Expand Down
Loading