Tasks 12 + 13: worker node agent + Phi-4-mini query triage
Task 12 — node_agent/agent.py: standalone AMQP worker agent config reader, model discovery, registration publisher, ping/pong handler, model swap with systemctl + health poll (14 tests) Task 13 — triage.py: query classification + cluster node selection classify_query() routes to Phi-4-mini at :8083 select_node() picks best worker by model affinity get_inference_url() replaces hardcoded LLAMA_SERVER_BASE cluster.py stores node ip for URL construction (6 tests + 5 existing chat tests mocked for triage) 168 tests passing (+20 new)
This commit is contained in:
@@ -95,7 +95,11 @@ Developer wiki: [docs/wiki/Home.md](docs/wiki/Home.md)
|
||||
│ └── logo.png # Logo image (optional)
|
||||
├── templates/
|
||||
│ └── index.html # Frontend
|
||||
└── tests/ # 148 pytest tests
|
||||
├── node_agent/
|
||||
│ ├── agent.py # Standalone worker agent (AMQP client)
|
||||
│ └── requirements.txt
|
||||
├── triage.py # Query classification + cluster node selection
|
||||
└── tests/ # 168 pytest tests
|
||||
```
|
||||
|
||||
## Requirements
|
||||
@@ -309,7 +313,7 @@ Settings are stored in the `settings` table and include:
|
||||
python3 -m pytest tests/ -v
|
||||
```
|
||||
|
||||
All 148 tests use `tmp_path` fixtures + monkeypatched `httpx.AsyncClient`/`aio-pika`. No external services needed.
|
||||
All 168 tests use `tmp_path` fixtures + monkeypatched `httpx.AsyncClient`/`aio-pika`. No external services needed.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user