diff --git a/docetl/operations/utils.py b/docetl/operations/utils.py index 709c2b82..a385c5ce 100644 --- a/docetl/operations/utils.py +++ b/docetl/operations/utils.py @@ -854,6 +854,7 @@ def _call_llm_with_cache( + messages, ) + return response def parse_llm_response( diff --git a/website/src/app/api/utils.ts b/website/src/app/api/utils.ts index 0212d633..03fa50ae 100644 --- a/website/src/app/api/utils.ts +++ b/website/src/app/api/utils.ts @@ -10,7 +10,8 @@ export function generatePipelineConfig( operation_id: string, name: string, sample_size: number | null, - optimize: boolean = false + optimize: boolean = false, + clear_intermediate: boolean = false ) { const homeDir = os.homedir(); @@ -42,6 +43,10 @@ export function generatePipelineConfig( newOp.optimize = true; } + if (clear_intermediate) { + newOp.bypass_cache = true; + } + delete newOp.runIndex; delete newOp.otherKwargs; delete newOp.id; diff --git a/website/src/app/api/writePipelineConfig/route.ts b/website/src/app/api/writePipelineConfig/route.ts index b41f6ac6..d51c8a19 100644 --- a/website/src/app/api/writePipelineConfig/route.ts +++ b/website/src/app/api/writePipelineConfig/route.ts @@ -14,6 +14,7 @@ export async function POST(request: Request) { name, sample_size, optimize = false, + clear_intermediate = false, } = await request.json(); if (!name) { @@ -37,7 +38,8 @@ export async function POST(request: Request) { operation_id, name, sample_size, - optimize + optimize, + clear_intermediate ); console.log(yamlString); diff --git a/website/src/components/PipelineGui.tsx b/website/src/components/PipelineGui.tsx index 3609208b..4e590fe3 100644 --- a/website/src/components/PipelineGui.tsx +++ b/website/src/components/PipelineGui.tsx @@ -379,6 +379,7 @@ const PipelineGUI: React.FC = () => { operation_id: lastOperation.id, name: pipelineName, sample_size: sampleSize, + clear_intermediate: clear_intermediate, }), });