trinity.common.workflows.customized_math_workflows module#

We include the customized math workflows in this file.

class trinity.common.workflows.customized_math_workflows.MathBoxedWorkflow(*, task: Task, model: ModelWrapper, auxiliary_models: List[OpenAI] | None = None)[source]#

Bases: SimpleWorkflow

A workflow for math tasks that give answers in boxed format.

reset(task: Task)[source]#

Reset the workflow.

format_prompt()[source]#
run() List[Experience][source]#

Run workflow and return a list of experiences.

class trinity.common.workflows.customized_math_workflows.AsyncMathBoxedWorkflow(*, task: Task, model: ModelWrapper, auxiliary_models: List[OpenAI] | None = None)[source]#

Bases: MathBoxedWorkflow

property asynchronous#

Whether the workflow runs in async mode.

async run_async() List[Experience][source]#

Run workflow in async and return a list of experiences.