namespace BotSharp.Plugin.SparkDesk.Providers; public class ProviderHelper { public static List GetChatSamples(List lines) { var samples = new List(); for (int i = 0; i < lines.Count; i++) { var line = lines[i]; if (string.IsNullOrEmpty(line.Trim())) { continue; } var role = line.Substring(0, line.IndexOf(' ') - 1).Trim(); var content = line.Substring(line.IndexOf(' ') + 1).Trim(); // comments if (role == "##") { continue; } samples.Add(new RoleDialogModel(role, content)); } return samples; } }