import React, { useState, useEffect } from "react"; import { UploadCloud, FileText, Database, Search, CheckCircle2, ArrowRight, Loader2, Lock, Cpu, File, Terminal, } from "lucide-react"; import { useLanguage } from "../App"; import { TerminalBlock } from "../components/TerminalBlock"; export const Playground: React.FC = () => { const { language } = useLanguage(); const [step, setStep] = useState<"upload" | "processing" | "ready">("upload"); const [processingStage, setProcessingStage] = useState(0); // 0: Parsing, 1: Chunking, 2: Embedding, 3: Indexing const [query, setQuery] = useState(""); const [showResult, setShowResult] = useState(false); const content = { en: { title: "Enterprise Knowledge Engine", subtitle: "Experience our secure RAG pipeline architecture. Turn unstructured documents into queryable intelligence.", upload_title: "Data Ingestion", upload_desc: "Drag and drop your internal PDFs, DOCX, or Wiki dumps here. We simulate the ingestion process secure enterprises use.", drop_label: "Drop corporate assets here", processing_title: "Processing Pipeline", stages: [ "Optical Character Recognition (OCR)", "Semantic Chunking", "Vector Embedding (text-embedding-3-large)", "Pinecone Indexing", ], query_placeholder: "Ask a question about the uploaded documents...", query_btn: "Retrieve Insight", result_title: "Synthesized Answer", source_title: "Source Attribution", value_prop: "Why this matters: Most enterprise knowledge is trapped in PDFs. We build pipelines that unlock this data while respecting RBAC (Role-Based Access Control).", }, th: { title: "เครื่องยนต์ความรู้องค์กร", subtitle: "สัมผัสสถาปัตยกรรม RAG ที่ปลอดภัยของเรา เปลี่ยนเอกสารที่ไม่มีโครงสร้างให้เป็นข้อมูลอัจฉริยะที่ค้นหาได้", upload_title: "การนำเข้าข้อมูล", upload_desc: "ลากและวาง PDF, DOCX หรือ Wiki ภายในองค์กรที่นี่ เราจำลองกระบวนการนำเข้าข้อมูลที่องค์กรระดับสูงใช้", drop_label: "วางไฟล์ข้อมูลองค์กรที่นี่", processing_title: "ท่อประมวลผลข้อมูล", stages: [ "การแปลงภาพเป็นข้อความ (OCR)", "การแบ่งส่วนความหมาย (Semantic Chunking)", "การสร้าง Vector (text-embedding-3-large)", "การจัดทำดัชนี Pinecone", ], query_placeholder: "ถามคำถามเกี่ยวกับเอกสารที่อัปโหลด...", query_btn: "ค้นหาข้อมูลเชิงลึก", result_title: "คำตอบที่สังเคราะห์แล้ว", source_title: "การอ้างอิงแหล่งที่มา", value_prop: "ทำไมสิ่งนี้ถึงสำคัญ: ความรู้องค์กรส่วนใหญ่ติดอยู่ใน PDF เราสร้างระบบที่ปลดล็อกข้อมูลนี้โดยยังคงรักษาความปลอดภัยตามสิทธิ์การเข้าถึง (RBAC)", }, }; const t = content[language]; const handleSimulateUpload = () => { setStep("processing"); setProcessingStage(0); // Simulate pipeline stages const interval = setInterval(() => { setProcessingStage((prev) => { if (prev >= 3) { clearInterval(interval); setTimeout(() => setStep("ready"), 800); return 3; } return prev + 1; }); }, 1500); }; const handleSearch = (e: React.FormEvent) => { e.preventDefault(); if (!query) return; setShowResult(true); }; return (
{t.subtitle}
{t.upload_desc}
{stage}
{processingStage === index && (Processing...
)}Based on the{" "} technical_specs.docx , the maximum concurrent connection limit for the websocket gateway is{" "} 10,000 users per shard. To increase this, you must scale the Redis cluster horizontally.
{t.value_prop}