From 6383bf270a30885ec685afa214ae0633efe26091 Mon Sep 17 00:00:00 2001 From: Eric Ciarla Date: Sat, 18 Jan 2025 17:12:06 -0300 Subject: [PATCH] Fix python sdk for extract --- apps/python-sdk/firecrawl/firecrawl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/python-sdk/firecrawl/firecrawl.py b/apps/python-sdk/firecrawl/firecrawl.py index ea74d4e69d..eecc15afc3 100644 --- a/apps/python-sdk/firecrawl/firecrawl.py +++ b/apps/python-sdk/firecrawl/firecrawl.py @@ -599,8 +599,8 @@ def extract(self, urls: List[str], params: Optional[ExtractParams] = None) -> An """ headers = self._prepare_headers() - #if not params or not params.get('prompt'): - # raise ValueError("Prompt is required") + if not params or (not params.get('prompt') and not params.get('schema')): + raise ValueError("Either prompt or schema is required") schema = params.get('schema') if schema: