in lab/workshop-instructions/Lab7_Consumption_in_app/scripts/ChatSLM.Console/Program.cs [16:61]
void ChatWithModels()
{
Console.WriteLine("Welcome to ChatML Console! I am your ML assistant. Please ask me any question about travel. If you want to exit, please type ctrl + c.");
GenAI.InitGenAI();
while (true)
{
Console.Write("Ask: ");
String? question = Console.ReadLine();
if (String.IsNullOrWhiteSpace(question))
{
Console.WriteLine("Bot : Please input a question.");
return;
}
Console.WriteLine("************************************************************************************************************" );
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("Bot(Phi35-base): ");
Console.ResetColor();
GenAI.ChatWithGenAIONNXOpenAIAsync(question, false);
Console.WriteLine("************************************************************************************************************" );
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("Bot(Phi35-with-ft-adapter): " );
Console.ResetColor();
GenAI.ChatWithGenAIONNXOpenAIAsync(question,true);
Console.WriteLine("************************************************************************************************************" );
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("Bot(GPT35-ft): " );
Console.ResetColor();
Console.WriteLine(GenAI.ChatWithAOAI(question));
Console.WriteLine("************************************************************************************************************" );
}
}