diff --git a/docetl/operations/utils/api.py b/docetl/operations/utils/api.py index 387b42d0..a58c02a5 100644 --- a/docetl/operations/utils/api.py +++ b/docetl/operations/utils/api.py @@ -612,7 +612,7 @@ def _parse_llm_response_helper( for tool_call in tool_calls: if response.choices[0].finish_reason == "content_filter": raise InvalidOutputError( - "Content filter triggered in LLM response", + "Content filter triggered by LLM provider.", "", schema, response.choices, diff --git a/docetl/runner.py b/docetl/runner.py index dc6ae810..1d16101d 100644 --- a/docetl/runner.py +++ b/docetl/runner.py @@ -375,7 +375,8 @@ def execute_step( else: input_data, cost = operation_instance.execute(input_data) total_cost += cost - step_content += f"[green]✓[/green] Operation [cyan]{operation_name}[/cyan] completed (Cost: [green]${cost:.2f}[/green])\n" + step_content += f"[green]✓[/green] Operation [cyan]{operation_name}[/cyan] (Cost: [green]${cost:.2f}[/green])\n" + self.console.print(f"[green]✓[/green] Operation [cyan]{operation_name}[/cyan] completed (Cost: [green]${cost:.2f}[/green])") # Checkpoint after each operation if self.intermediate_dir: @@ -442,7 +443,12 @@ def _load_from_checkpoint_if_exists( self.datasets[f"{step_name}_{operation_name}"] = Dataset( self, "file", checkpoint_path, "local" ) - return self.datasets[f"{step_name}_{operation_name}"].load() + + self.console.print( + f"[green]✓[/green] [italic]Loaded checkpoint for operation '{operation_name}' in step '{step_name}' from {checkpoint_path}[/italic]" + ) + + return self.datasets[f"{step_name}_{operation_name}"].load() return None def clear_intermediate(self) -> None: