Skip to content

refactor: remove useless function call and refine tests.#996

Open
liutongxuan wants to merge 1 commit intojd-opensource:mainfrom
liutongxuan:feature/refactor
Open

refactor: remove useless function call and refine tests.#996
liutongxuan wants to merge 1 commit intojd-opensource:mainfrom
liutongxuan:feature/refactor

Conversation

@liutongxuan
Copy link
Collaborator

No description provided.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request effectively refactors the JinjaChatTemplate::apply method usage across LLMMaster and RecMaster. By removing the has_tools() check and always calling the apply overload that accepts json_tools, the code is simplified and made more robust. The change in access specifier for the apply overload without json_tools from public to protected improves encapsulation. The introduction of TestableJinjaChatTemplate in the test file is a correct approach to maintain test coverage for the now protected methods. Overall, these changes are a good improvement to the codebase, enhancing maintainability and reducing redundancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants