LLMCompiler is an Agent Architecture designed to speed up the execution of agent tasks by executing them quickly in the DAG. It also saves the cost of redundant token use by reducing the number of calls to the LLM.
Apache License 2.0
18
stars
3
forks
source link
Add Support for Custom Prompts and Refactor Prompt Management - Reworked #7
Moved formatted_dt_now (HUMAN_TEMPLATE) formatting to rewrite.py to avoid the issue of this value being assigned in prompt.py
Added more custom prompts:
PLANER_SYSTEM_PROMPT_1
PLANER_SYSTEM_PROMPT_2
Minor Refactor with get_custom_or_default function
Feel free to let me know if that solved the issue you mentioned :)
Previous Description
This PR introduces support for custom prompts that can overwrite predefined prompts, addressing the issue of some prompts being in Chinese only. The following updates have been made:
Custom Prompt Support:
Added functionality to allow users to pass custom prompts, which can overwrite the predefined ones. This is particularly useful for choosing language and adjusting the behavior.
New Tests:
Added a new test file tests/test_custom_prompts.py which demonstrates how custom prompts can be passed and tested.
Refactoring and Consolidation of Prompts:
Moved some predefined prompts into a new file prompt.py for better organization and maintainability.
Currently, only the following prompts are supported for customization:
JOINER_SYSTEM_PROMPT_1
JOINER_SYSTEM_PROMPT_2
HUMAN_MESSAGE_TEMPLATE
JOINER_RESPONSE_HUMAN_TEMPLATE
Open Points:
Only a subset of prompts is currently supported for customization, as it's unclear which additional prompts are actively used, can be removed, or will be needed in the future. Feedback on which additional prompts should be supported is welcome.
Request for Feedback:
Suggestions for additional prompts to support or remove.
Maybe add general overhaul of how the Prompts/Templates are defined?
Updated Description
formatted_dt_now
(HUMAN_TEMPLATE
) formatting torewrite.py
to avoid the issue of this value being assigned inprompt.py
PLANER_SYSTEM_PROMPT_1
PLANER_SYSTEM_PROMPT_2
get_custom_or_default
functionFeel free to let me know if that solved the issue you mentioned :)
Previous Description
This PR introduces support for custom prompts that can overwrite predefined prompts, addressing the issue of some prompts being in Chinese only. The following updates have been made:
Custom Prompt Support:
New Tests:
Refactoring and Consolidation of Prompts:
JOINER_SYSTEM_PROMPT_1
JOINER_SYSTEM_PROMPT_2
HUMAN_MESSAGE_TEMPLATE
JOINER_RESPONSE_HUMAN_TEMPLATE
Open Points:
Request for Feedback:
Awesome project! :)