flexeval.completions#

Completing conversations using LLMs.

Functions

get_completion(turn, completion_llm)

get_completion_function(completion_llm)

Identify a completion function given the completion LLM configuration.

get_completions(eval_run, evalsetrun)

save_completion(completion, turn, ...)

flexeval.completions.get_completion(turn: Turn, completion_llm: CompletionLlm)[source]#
flexeval.completions.get_completion_function(completion_llm: CompletionLlm) Callable[source]#

Identify a completion function given the completion LLM configuration.

Parameters:

completion_llm (CompletionLlm) – The description of the function to retrieve.

Raises:

ValueError – If not found in completion_functions or in globals by function_name.

Returns:

The completion function.

Return type:

Callable

flexeval.completions.get_completions(eval_run: EvalRun, evalsetrun: EvalSetRun)[source]#
flexeval.completions.save_completion(completion: dict, turn: Turn, evalsetrun: EvalSetRun, eval_run: EvalRun)[source]#