Closed maheshsattala closed 2 months ago
The pull request modifies the edit_prompt_action
function in the kairon/shared/data/processor.py
file by adding an assignment for the llm_type
attribute in the action
object. This allows the function to handle an additional parameter from incoming request data, enhancing its capability to process different language model types.
File Path | Change Summary |
---|---|
kairon/shared/data/processor.py | Added action.llm_type assignment in edit_prompt_action function. |
tests/unit_test/data_processor/data_processor_test.py | Added test_edit_prompt_action_faq_action_llm_type_and_hyperparameters to test edit_prompt_action with LLM parameters. |
kairon/shared/data/processor.py
, indicating a potential relationship in shared functionality and enhancements in action handling.In the meadow where rabbits play,
A change has come to brighten the day.
Withllm_type
now in the mix,
Our prompts will dance with clever tricks.
Hopping forward, we celebrate,
New features bloom, oh, isn't it great? 🐇✨
tests/unit_test/data_processor/data_processor_test.py (1)
`912-971`: **LGTM!** The new test method `test_edit_prompt_action_faq_action_llm_type_and_hyperparameters` is well-structured and covers the important aspects of testing the `edit_prompt_action` method with various parameters. It constructs a request dictionary with multiple LLM prompts, a failure message, LLM type, and hyperparameters, and invokes the `edit_prompt_action` method with the constructed request, bot, and user identifiers. The use of `DeepDiff` for comparison ensures a thorough check of the output against the expected result. This addition enhances the test coverage for the `edit_prompt_action` functionality, particularly in scenarios involving LLM configurations.
updated edit prompt action code.
Summary by CodeRabbit
edit_prompt_action
functionality to support an additional parameter,llm_type
, improving the handling of different language model types.edit_prompt_action
with various LLM types and hyperparameters, enhancing test coverage.