@@ -296,8 +296,7 @@ static void AddPackageReference(ProjectItemGroupElement itemGroup, string packag
296
296
packageReferenceItem . Condition = "$(Platform) == 'x64'" ;
297
297
}
298
298
else if ( packageName == "Microsoft.ML.OnnxRuntime.Qnn" ||
299
- packageName == "Microsoft.ML.OnnxRuntimeGenAI" ||
300
- packageName == "Microsoft.ML.OnnxRuntimeGenAI.Managed" )
299
+ packageName == "Microsoft.ML.OnnxRuntimeGenAI" )
301
300
{
302
301
packageReferenceItem . Condition = "$(Platform) == 'ARM64'" ;
303
302
}
@@ -403,7 +402,7 @@ static void AddPackageReference(ProjectItemGroupElement itemGroup, string packag
403
402
private string ? GetChatClientLoaderString ( List < Samples . SharedCodeEnum > sharedCode , string modelPath , string promptTemplate , bool isPhiSilica , ModelType modelType )
404
403
{
405
404
bool isLanguageModel = ModelDetailsHelper . EqualOrParent ( modelType , ModelType . LanguageModels ) ;
406
- if ( ! sharedCode . Contains ( SharedCodeEnum . GenAIModel ) && ! isPhiSilica && ! isLanguageModel )
405
+ if ( ! sharedCode . Contains ( SharedCodeEnum . OnnxRuntimeGenAIChatClientFactory ) && ! isPhiSilica && ! isLanguageModel )
407
406
{
408
407
return null ;
409
408
}
@@ -413,7 +412,7 @@ static void AddPackageReference(ProjectItemGroupElement itemGroup, string packag
413
412
return "PhiSilicaClient.CreateAsync()" ;
414
413
}
415
414
416
- return $ "GenAIModel .CreateAsync({ modelPath } , { promptTemplate } )";
415
+ return $ "OnnxRuntimeGenAIChatClientFactory .CreateAsync({ modelPath } , { promptTemplate } )";
417
416
}
418
417
419
418
private static async Task CopyFileAsync ( string sourceFile , string destinationFile , CancellationToken cancellationToken )
@@ -601,9 +600,9 @@ private async Task<string> AddFilesFromSampleAsync(
601
600
}
602
601
}
603
602
604
- if ( sharedCode . Contains ( SharedCodeEnum . GenAIModel ) )
603
+ if ( sharedCode . Contains ( SharedCodeEnum . OnnxRuntimeGenAIChatClientFactory ) )
605
604
{
606
- cleanCsSource = RegexInitializeComponent ( ) . Replace ( cleanCsSource , $ "$1this.InitializeComponent();$1GenAIModel .InitializeGenAI();") ;
605
+ cleanCsSource = RegexInitializeComponent ( ) . Replace ( cleanCsSource , $ "$1this.InitializeComponent();$1OnnxRuntimeGenAIChatClientFactory .InitializeGenAI();") ;
607
606
}
608
607
609
608
await File . WriteAllTextAsync ( Path . Join ( outputPath , $ "Sample.xaml.cs") , cleanCsSource , cancellationToken ) ;
0 commit comments