|
1 | | -# KernelBots (ACL) |
2 | | - |
3 | | -Agente de contexto local com RAG (BM25) sobre Markdown em `content/`, interface em `templates/` e respostas em streaming via OpenRouter. |
4 | | - |
5 | | -## Requisitos |
6 | | - |
7 | | -- Python 3.10+ |
8 | | -- Chave `OPENROUTER_API_KEY` no arquivo `.env` na raiz do repositório |
9 | | - |
10 | | -## Instalação |
11 | | - |
12 | | -```bash |
13 | | -pip install -r requirements.txt |
14 | | -``` |
15 | | - |
16 | | -## Executar |
17 | | - |
18 | | -```bash |
19 | | -python main.py |
20 | | -``` |
21 | | - |
22 | | -Ou com Uvicorn: |
23 | | - |
24 | | -```bash |
25 | | -uvicorn main:app --host 127.0.0.1 --port 8000 |
26 | | -``` |
27 | | - |
28 | | -Abra `http://127.0.0.1:8000`. |
29 | | - |
30 | | -## Estrutura |
31 | | - |
32 | | -| Caminho | Função | |
33 | | -|--------|--------| |
34 | | -| `main.py` | Orquestração: logging, `SearchEngine`, watchdog, `create_app` | |
35 | | -| `core/` | Config (`Settings`), logging centralizado | |
36 | | -| `engine/` | BM25 (`SearchEngine`), `ContentWatcher`, `ContextManager`, `ChatProvider` | |
37 | | -| `api/` | Rotas FastAPI (`GET /`, `POST /chat`) | |
38 | | -| `app/` | `create_app()`, estado injetado em `app.state` | |
39 | | -| `content/` | Arquivos `.md` indexados | |
40 | | -| `templates/` | UI (Jinja2) | |
41 | | - |
42 | | -## Testes |
43 | | - |
44 | | -```bash |
45 | | -python -m pytest tests/ -v |
46 | | -``` |
47 | | - |
48 | | -## Logging |
49 | | - |
50 | | -O projeto usa `logging` da biblioteca padrão com loggers prefixados `kernelbots.*` (ex.: `kernelbots.engine.search`, `kernelbots.api.chat`). Para logs estruturados em JSON no stdout, é possível estender `core/logging_config.py` com algo como `structlog` no mesmo ponto de configuração. |
51 | | - |
52 | | -## Comandos no chat |
53 | | - |
54 | | -- `/content …` — força uso da base local (com fallback para os primeiros chunks se não houver hit BM25). |
55 | | -- `/doc …` — injeta o conteúdo de `documentation.md` quando disponível no índice. |
| 1 | +<div align="center"> |
| 2 | + <img src="frontend/assets/images/KernelBanner.webp" alt="Banner" /> |
| 3 | +</div> |
| 4 | + |
| 5 | +<div style="width: 100%; overflow: hidden; margin-top: 20px;"> |
| 6 | + <div style="width: 52%; float: left; padding-right: 16px; box-sizing: border-box;"> |
| 7 | + <h2 style="margin-top: 0;">🚧 Em obras (ou quase isso)</h2> |
| 8 | + <p style="margin: 0 0 12px 0;"> |
| 9 | + O código já está performando mais que muito sênior por aí, mas a documentação ainda está sendo "indexada" pela minha produtividade. |
| 10 | + </p> |
| 11 | + <p style="margin: 0 0 12px 0;"> |
| 12 | + Se você é um recrutador: O código fala mais que mil palavras. Olhe a pasta <code>engine/</code>. |
| 13 | + <br /> |
| 14 | + Se você é um curioso: Volte em breve. Ou dê um <code>python main.py</code> e descubra. |
| 15 | + </p> |
| 16 | + </div> |
| 17 | + |
| 18 | + <img src="frontend/assets/images/spiderMan.webp" alt="Spider-Man" style="width: 48%; float: right;" /> |
| 19 | +</div> |
| 20 | + |
| 21 | +<div style="clear: both;"></div> |
0 commit comments