nw9663644-eng opened a new pull request, #362:
URL: https://github.com/apache/hugegraph-ai/pull/362

   ## Purpose
   
   Closes #346.
   
   This PR persists edited schema-generator query examples and few-shot schema 
examples in the demo.
   
   ## Changes
   
   * Added prompt config fields for schema-generator query examples and 
few-shot schema examples.
   * Load persisted schema-generator examples into the demo UI before falling 
back to bundled resource examples.
   * Persist edited examples through the existing prompt config save path.
   * Validate edited examples as JSON before saving.
   * Reject invalid JSON with a clear UI error and avoid persisting invalid 
content.
   * Keep bundled examples under `resources/prompt_examples` read-only as 
defaults.
   * Added tests for save/load behavior, invalid JSON handling, bundled 
fallback behavior, invalid persisted fallback behavior, UI persistence wiring, 
and old prompt config compatibility.
   
   ## Tests
   
   * `uv run ruff check 
hugegraph-llm/src/hugegraph_llm/config/models/base_prompt_config.py 
hugegraph-llm/src/hugegraph_llm/demo/rag_demo/vector_graph_block.py 
hugegraph-llm/src/tests/document/test_schema_generator_examples_persistence.py`
   * `uv run ruff format --check .`
   * `uv run pytest 
hugegraph-llm/src/tests/document/test_schema_generator_examples_persistence.py`
   * `uv run pytest hugegraph-llm/src/tests/document`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to