Skip to content
Snippets Groups Projects

Add interface for using generic CoreML LLMs

Merged Abhinav Jain requested to merge compile_cmd_line_generic_model_broken into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -18,7 +18,7 @@ public struct LLMModelNameValidation: ExpressionMacro {
in context: some MacroExpansionContext
) throws -> ExprSyntax {
var macro = "let valid_models = [";
var macro = "try! { let valid_models = [";
var index = 0;
for (k, v) in LLM_MODEL_CLASSES {
@@ -35,7 +35,7 @@ public struct LLMModelNameValidation: ExpressionMacro {
\(macro)
if !valid_models.contains(self.model) {
throw fatalError("Model is not valid.");
}
} }();
"""
)
}
Loading