INNER CODE UNIT · Python
run_task
openfoodfacts/openfoodfacts-ai · llm-evals/main.py:22
def run_task(
image_urls: list[str] = typer.Argument(
default=..., help="The image URL(s) to run the task on."
),
model: str = typer.Option(
default=DEFAULT_MODEL, help="The model to use for the task."
),
task: TaskType = typer.Option(
default="food:product_info_extraction", help="The task to run."
),
output_mode: Annotated[
OutputMode, typer.Option(..., help="The output mode of the agent.")
] = "tool",
):
"""Run a specific task with the given model on a single image URL.
The Agent (model, prompt, output schema) and task function are
retrieved from the task configuration.