-
Notifications
You must be signed in to change notification settings - Fork 15
Add tilde operator #18
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
cf7149e to
059f542
Compare
|
You are truly outstanding.🚀🚀🚀 |
pcuenca
left a comment
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.
Amazing!
|
I added a test, but when I run it I get this error: I need to leave it here for now, but maybe you can figure out what's going wrong. |
4e8d10c to
1b3578f
Compare
|
The problem seems to be Swift Jinja's handling of escaped quotation marks here: {%- set xml_tool_string = ns.xml_tool_string + "</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>" -%}I am not able to take on the task of fixing this separate problem, but others are welcome to do that. If you want to try to fix it with agentic tools, I recommend cloning https://github.com/pallets/jinja inside this repo so that it can be used for reference. |
* Add tilde operator * Add test for SmolLM3 * Fix tilde operator handling to use additive binary operator * Add testSmolLM3FromHF * swift-format * Add replace function to String extension with optional count parameter * Add unit tests for String replacingOccurrences function * Add test for SmolLM3 template rendering with system prompt * swift-format --------- Co-authored-by: Anthony DePasquale <[email protected]>
|
@johnmai-dev, it would have made more sense to work with my original PR instead of creating a new one using my commits. I will close this now. |
I still need to add a test for the SmolLM3 chat template.