import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { auth } from '@/auth' import { redirect } from 'next/navigation' import Link from 'next/link' import { ArrowLeft, TestTube } from 'lucide-react' import { AI_TESTER } from './ai-tester' export default async function AITestPage() { const session = await auth() if ((session?.user as any)?.role !== 'ADMIN') { redirect('/') } return (

AI Provider Testing

Test your AI providers for tag generation and semantic search embeddings

{/* Tags Provider Test */} đŸˇī¸ Tags Generation Test Test the AI provider responsible for automatic tag suggestions {/* Embeddings Provider Test */} 🔍 Embeddings Test Test the AI provider responsible for semantic search embeddings
{/* Info Section */} â„šī¸ How Testing Works

đŸˇī¸ Tags Generation Test:

  • Sends a sample note to the AI provider
  • Requests 3-5 relevant tags based on the content
  • Displays the generated tags with confidence scores
  • Measures response time

🔍 Embeddings Test:

  • Sends a sample text to the embedding provider
  • Generates a vector representation (list of numbers)
  • Displays embedding dimensions and sample values
  • Verifies the vector is valid and properly formatted

💡 Tip:

You can use different providers for tags and embeddings! For example, use Ollama (free) for tags and OpenAI (best quality) for embeddings to optimize costs and performance.

) }