iiiiSaber opened a new pull request, #438:
URL: https://github.com/apache/hugegraph-ai/pull/438

   ## Problem
   
   This is a bug of empty configure file (corner case).
   
   An empty or comment-only config_prompt.yaml prevents HugeGraph LLM from 
starting. PyYAML returns None for a file with no YAML data, and the prompt 
loader raises AttributeError when it tries to read the overrides with .items().
   
   ## Fix
   
   Use the built-in prompts for the configured language when PyYAML returns 
`None`. Load the defaults in memory and preserve the file contents.
   
   ## Verification
   
   - Launched the HugeGraph LLM demo locally with an empty config_prompt.yaml 
and again with a comment-only file. Before the fix, both launches exited with 
AttributeError. With the fix, both launches served / and /gradio_api/info with 
HTTP 200.
   - Passed all 15 tests in `test_resource_mounts.py` and 
`test_prompt_config.py`.
   - Ruff lint and formatting passed.
   
   Refs #166


-- 
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