Crate bonito

Source

Enums§

TaskType
task types for bonito

Functions§

parse_a
parse the bonito LLM generated completion and return the answer in string only works with prompt with “exqa”/“multiple-choice question answering” None if no answer found
parse_q
parse the bonito LLM generated completion and return the question in string only works with prompt with “exqa”/“multiple-choice question answering” None if no question found
prepare_prompt
prepares the prompt for the model based on TaskType
str_to_task_type
maps a short task string (e.g. “exqa”) to a TaskType
task_type_to_task_prompt
maps a TaskType to a (long) string (e.g. “multiple-choice question answering”) which is used in prompt ref https://github.com/BatsResearch/bonito/blob/main/bonito/model.py#L106C13-L106C27