namespace AIStudio.Assistants.BeyondFactsLab; public static class BflFieldKindExtensions { /// The kind of field. extension(BflFieldKind kind) { /// /// Gets the longest value a field of this kind takes, in characters. /// /// /// The values go into the prompts of the chats, so each kind gets a limit that leaves room for the /// rest of a preparation. /// public int MaxLength => kind switch { BflFieldKind.SINGLE_LINE => 300, BflFieldKind.MULTI_LINE => 4_000, BflFieldKind.LINK => 2_000, BflFieldKind.CHOICE => 100, BflFieldKind.MULTI_CHOICE => 1_000, _ => 0, }; /// /// Gets whether a field of this kind offers options to choose from. /// public bool HasOptions => kind is BflFieldKind.CHOICE or BflFieldKind.MULTI_CHOICE; } }