Feat/llm column choser - #25
Merged
Merged
Conversation
… chat warnings Bundles three related improvements to the PZZ classification chat flow: - detect: auto-detect the classifier's input columns (cadastral_vri_col, pzz_zone_code_col, pzz_zone_name_col) from uploaded layers via an exact-name heuristic + an LLM structured-output fallback (enum constrained to the real column names, so no hallucinated fields). New endpoint POST /tasks/auto/chat/stream announces the recognised mapping as a chat narrative, then runs the pipeline. Adds OllamaChatClient.complete_json. - output: drop urban_api passthrough attributes from the result GeoJSON (scenario flow rebuilt clean properties); expose the verdict as a human-readable Russian label in the existing Вердикт_ПЗЗ field (was the machine allowed_main), and read it back in the object-zone-fit report. - chat: emit non-fatal ChatStorage persistence failures (e.g. expired token) as a `warning` SSE event instead of `error`, so a successfully streamed answer that just wasn't saved to history is distinguishable from a real service failure. Documented in the frontend API guide.
In classifier-only mode there is no actual zone and no zone-based match, so the zone code/name, matched VRI name/code and allowed candidate codes are always empty. select_and_rename_result_columns now takes include_pzz_check and prunes those five PZZ-specific columns when it is False (12 -> 7 cols). pzz-check output is unchanged.
…alidation
Result artifacts are immutable and cached by input identity, so a fix to the
output format leaves stale results served until a manual recompute. Introduce
PIPELINE_OUTPUT_VERSION and mix it into every idempotency key (normal tasks
"{mode}:{ver}:{key}", scenarios "...:pv-{ver}"). After a bump old keys stop
matching and the next request recomputes automatically.
The version is also stamped on pipeline_tasks.output_version (migration 0003)
and exposed in TaskOut for observability.
Replace the opaque <external_id>.geojson download names with ASCII English filenames, resolved per slot and (for the result) per run mode: - PZZ check -> pzz_check_result.geojson / "Результат проверки ПЗЗ" - classify -> classification_result.geojson / "Результат классификации ВРИ" - cadastral -> input_parcels.geojson / "Исходные участки" - zones -> pzz_zones.geojson / "Зоны ПЗЗ" Add a human-readable RU 'title' (and the machine 'name') to the geo-layer descriptor and the ChatStorage file-part payload so the frontend has a proper label instead of the hash. The stable 'name' id is unchanged. Filenames now apply to the actual downloads (result endpoint + /files redirect) too. Document the field set (name/title/filename/url/download_url/role) and which to show in docs/frontend-api-guide.md.
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.
No description provided.