Repository navigation
feat: LUMINA AI — web chatbot hợp nhất, tự chọn model, đăng nhập Google - #1
Merged
Merged
Conversation
… web search Xây dựng từ khung mẫu "Unified AI Core" (Router + Circuit Breaker + Cache + Memory + Rate limiter + Metrics), viết lại theo Claude API hiện hành: - Auto-Router "bù trừ": tự chọn chế độ theo câu lệnh (⚡ Haiku 4.5 / ✨ Sonnet 5 / 🧠 Opus 4.8 effort cao / 🔍 Opus 4.8 + web search / 🌌 Fable 5 tùy chọn) — người dùng không cần chọn model - Claude engine: SDK anthropic chính thức, adaptive thinking, server tools web_search_20260209 + web_fetch_20260209, streaming SSE thật, pause_turn, refusal + server-side fallbacks cho Fable 5 - Fallback chain claude → gemini → openai với circuit breaker - Đăng nhập Google bắt buộc (GIS + JWT cookie), lịch sử chat SQLite theo user, rate limit token-bucket theo user - Frontend chat kiểu GLM (HTML/CSS/JS thuần): dark mode, markdown, khối tư duy, trạng thái tìm kiếm, trích dẫn nguồn - Deploy: render.yaml (1-click Render) + Dockerfile; README tiếng Việt đầy đủ - 10 unit tests (router/memory/cache/breaker/ratelimit) — pass Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HUmDaZPaPfY5Sb8ezVkwAG
4 of 5 tasks
baoduy3108
pushed a commit
that referenced
this pull request
Jul 27, 2026
#1 BẢN ĐỒ QUYẾT ĐỊNH: bộ não xuất ```lumina-decision (JSON cây lựa chọn) → frontend render cây bấm mở từng nhánh: hệ quả / được / mất-rủi ro / tối ưu cho ai + nhánh con (đệ quy). Directive + renderDecisionsIn + CSS. #2 TRÍ NHỚ DỰ ÁN: cột projects.memory (ALTER) + set_project_memory + PUT nhận memory; chat trong project chèn "TRÍ NHỚ DỰ ÁN" vào system prompt (tách khỏi chuyện cá nhân). Editor trong Dashboard project. github#7 FEEDBACK: bảng feedback + POST /api/feedback + feedback_summary; nút 👍/👎 dưới mỗi câu trả lời (👎 hỏi note). Đo độ hữu dụng theo hành vi thật. github#10 BRAIN MAP: khuyến khích bộ não dùng Mermaid mindmap cho "bản đồ tri thức/tư duy" (tái dùng overlay zoom sẵn có). Test project-memory + feedback + (goals cũ). E2E trình duyệt: decision map render 3 nhánh (có nhánh con) mở được. 227 test xanh. README. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01HUmDaZPaPfY5Sb8ezVkwAG
baoduy3108
pushed a commit
that referenced
this pull request
Aug 2, 2026
#1 — LUMINA thành API dùng được từ app/script ngoài: - db.api_keys (lưu HASH sha256, prefix hiển thị) + create/list/delete + user_by_api_key. - auth.require_api_key: 'Authorization: Bearer lum_…'. - POST /v1/chat/completions — TƯƠNG THÍCH OpenAI (trỏ SDK OpenAI vào <host>/v1, model 'lumina'): định tuyến qua bộ não nhiều tầng, KHÔNG lộ model thật, stream & non-stream, tôn trọng hạn mức gói. Quản lý key: POST/GET/DELETE /api/keys. - Frontend: modal 🔑 API (tạo/sao chép/thu hồi key + ví dụ curl). #2 — thêm ~30 bộ não phụ MIỄN PHÍ: - config.OPENROUTER_MODELS (~31 model free: Llama/Qwen/Gemma/DeepSeek/Mistral/Phi…). - orchestrator đăng ký mỗi model thành engine openrouter-N (như LOCAL_MODELS cho Ollama), chèn vào chuỗi free → nay 52 engine, 51 bộ não free (chỉ chạy khi có OPENROUTER_API_KEY; engine chết thì fallback tự nhảy). OpenRouterEngine nhận model/name. 324 test pass (API key lifecycle + /v1 + đếm engine). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01HUmDaZPaPfY5Sb8ezVkwAG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Thêm thư mục
lumina-ai/— một web chatbot AI độc lập (không đụng đến code spec-kit hiện có), gọi tên LUMINA AI:render.yaml(1-click Render, free tier, hỗ trợ SSE) +Dockerfile; README tiếng Việt đầy đủ 3 bước (lấy API key Claude, tạo Google Client ID, deploy).Testing
pip install -r requirements.txtthành công trong venv sạchpytest tests/— 10/10 test pass (router intent detection, memory trimming, cache TTL, circuit breaker, rate limiter)uvicorn app.main:appthật, kiểm tra bằngcurl:/health,/api/config, đăng nhập DEV,/api/conversations, chat SSE (báo lỗi rõ ràng khi thiếuANTHROPIC_API_KEY, đúng như thiết kế)ANTHROPIC_API_KEYcủa chủ repo) — cần điền key thật sau khi merge để kiểm tra đầu-cuốiAI Disclosure
Toàn bộ code trong
lumina-ai/được viết bởi Claude (Claude Code), dựa trên khung kiến trúc mẫu do chủ repo cung cấp (Router/Circuit Breaker/Cache/Memory/Rate limiter kiểu "Unified AI Core"), viết lại theo Claude API hiện hành và mở rộng thêm auto-router, đăng nhập Google, giao diện chat.Generated by Claude Code