feat: Imitate tab — pull CF product samples, compare LLM responses #23
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/imitate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
app/imitate.py): 4 endpoints — product list with online check, real sample fetch from CF product APIs, SSE-streamed ollama run, push-to-correctionsImitateView.vue): 4-step wizard — product picker → sample/prompt editor → model multi-select + SSE run log → side-by-side result cards with corrections pushapp/api.py, router, sidebar nav,label_tool.yaml.exampleimitate sectiontest_tasks_parses_yamlschema mismatchTest plan
conda run -n cf python -m pytest tests/test_imitate.py -v— 16 passedimitate:block inconfig/label_tool.yaml)Backend (app/imitate.py): - GET /api/imitate/products — reads imitate: config, checks online status - GET /api/imitate/products/{id}/sample — fetches real item from product API - GET /api/imitate/run (SSE) — streams ollama responses for selected models - POST /api/imitate/push-corrections — queues results in SFT corrections JSONL Frontend (ImitateView.vue): - Step 1: product picker grid (online/offline status, icon from config) - Step 2: raw sample preview + editable prompt textarea - Step 3: ollama model multi-select, temperature slider, SSE run with live log - Step 4: response cards side by side, push to Corrections button Wiring: - app/api.py: include imitate_router at /api/imitate - web/src/router: /imitate route + lazy import - AppSidebar: Imitate nav entry (mirror icon) - config/label_tool.yaml.example: imitate: section with peregrine example - 16 unit tests (100% passing) Also: BenchmarkView.vue Compare panel — side-by-side run diff for bench results118ae2660ato3299c0e23a