-
Notifications
You must be signed in to change notification settings - Fork 375
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
Adds an exception for missing templates. #1034
Adds an exception for missing templates. #1034
Conversation
LLama/Exceptions/RuntimeError.cs
Outdated
/// <summary> | ||
/// `llama_decode` return a non-zero status code | ||
/// </summary> | ||
public class MissingTemplateError |
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.
public class MissingTemplateError | |
public class MissingTemplateException |
Exception classes should end with Exception
(docs).
RuntimeError
and LLamaDecodeError
break this rule and should be fixed sometime!
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.
Very minor naming nit, otherwise looks good :)
9136f7f
to
45a8a19
Compare
i even felt a bit dirty typing it out, should have trusted my gut. Got it fixed up and pushed now. |
Thanks again! |
Adds better exception handling for when there are missing templates with a model when calling
llama_chat_apply_template
Funny enough, it looks like ggerganov/llama.cpp#10572 added support for my missing template, but still nice to have a better exception down the road.
Closes #1032