Added support for loading user-defined prompts template
Description
Adding support for loading user-defined prompts template. This is to make it easier for user to apply domain specific prompts (e.g. entity types, long examples, and tweak the instructions for specific llm model) for their domains (e.g. finance, telecom).
Related Issues
None
Changes Made
Allow user to specify a yaml file prompt template to be loaded on top of default PROMPTS
- added LightRAG server support through environment variable
PROMPTS_YAML_FILEand command line parameter--prompts-yaml-file - added LightRAG core support through
addon_params["prompts_yaml_file"], and load yaml and update PROMPTS during__post_init__ - updated
promptto keep record of default PROMPTS, so it can be reset if needed - added
prompts.example.yaml - updated
requirements.txtwithPyYAML - updated
README
Checklist
- [x] Changes tested locally
- [x] Code reviewed
- [x] Documentation updated (if necessary)
- [ ] Unit tests added (if applicable)
Additional Notes
changes are kept minimum, hope it is OK
Thanks Daniel for the feedback. glad to learn there is already similar (and more complete) feature planned/under dev I will surely check that out.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This pull request has been automatically closed because it has not had recent activity.