-
Notifications
You must be signed in to change notification settings - Fork 195
Don't use jinja in the multimodal case #1435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
At least with smolvlm the output becomes junk with this option on. Signed-off-by: Eric Curtin <[email protected]>
Reviewer's GuideThis PR refactors the template mounting and serving logic in ramalama/model.py to remove redundant checks, consolidate conditional blocks for chat and multimodal project files, and disable Jinja processing when a multimodal project is present. Updated Class Diagram for the Model ClassclassDiagram
class Model {
+setup_mounts(model_path, args)
+build_exec_args_serve(args, exec_model_path, chat_template_path, mmproj_path)
+serve(args, quiet)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We encountered an error and are unable to review this PR. We have been notified and are working to fix it.
You can try again by commenting this pull request with @sourcery-ai review
, or contact us for help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ericcurtin - I've reviewed your changes - here's some feedback:
- Consolidate the repeated
if ref_file
logic in bothsetup_mounts
andserve
into a shared helper to reduce duplication and improve maintainability. - In
build_exec_args_serve
, consider defaulting to--jinja
in the base args and then removing or overriding it whenmmproj_path
is provided to simplify the conditional logic.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
LGTM |
At least with smolvlm the output becomes junk with this option on.
Summary by Sourcery
Ensure Jinja templating is only applied when no multimodal project file is present and simplify reference file handling.
Bug Fixes:
Enhancements: