Skip to content
Snippets Groups Projects
Commit 64c754af authored by Abhinav Jain's avatar Abhinav Jain
Browse files

name changes

parent 67a7b716
No related branches found
No related tags found
1 merge request!15Add interface for using generic CoreML LLMs
Pipeline #116014 failed
...@@ -18,7 +18,7 @@ public struct LLMModelNameValidation: ExpressionMacro { ...@@ -18,7 +18,7 @@ public struct LLMModelNameValidation: ExpressionMacro {
in context: some MacroExpansionContext in context: some MacroExpansionContext
) throws -> ExprSyntax { ) throws -> ExprSyntax {
var macro = "let valid_models = ["; var macro = "try! { let valid_models = [";
var index = 0; var index = 0;
for (k, v) in LLM_MODEL_CLASSES { for (k, v) in LLM_MODEL_CLASSES {
...@@ -35,7 +35,7 @@ public struct LLMModelNameValidation: ExpressionMacro { ...@@ -35,7 +35,7 @@ public struct LLMModelNameValidation: ExpressionMacro {
\(macro) \(macro)
if !valid_models.contains(self.model) { if !valid_models.contains(self.model) {
throw fatalError("Model is not valid."); throw fatalError("Model is not valid.");
} } }();
""" """
) )
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment