Function umm::grade::get_source_context
source · pub fn get_source_context<T: Into<LineRef>>(
line_refs: Vec<T>,
proj: Project,
start_offset: usize,
num_lines: usize,
max_line_refs: usize,
try_use_active_retrieval: bool,
active_retrieval_context: Option<String>
) -> Result<ChatCompletionRequestMessage>
Expand description
Returns a ChatCompletionRequestMessage with the given line references that include contextual lines of code from the source
line_refs
: a vector of LineRef objectsproj
: a Project objectstart_offset
: the number of lines of code to include before the linenum_lines
: the number of lines of code to include after the linemax_line_refs
: the maximum number of processed line references to include in the final messagetry_use_active_retrieval
: whether to try to use active retrievaladditional_context
: additional context to use for