File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def get_scrape_options(formats: Optional[List[scrape_types]] = None):
5959 },
6060 "scrape_options" : get_scrape_options (["screenshot" ]),
6161 },
62- "required" : ["url" , "scrape_options" ],
62+ "required" : ["url" ],
6363 "additionalProperties" : False ,
6464}
6565
Original file line number Diff line number Diff line change 11from typing import get_args
22
33from hyperbrowser .models .consts import BrowserUseLlm
4- from hyperbrowser .tools .schema import BROWSER_USE_LLM_SCHEMA , BROWSER_USE_SCHEMA , EXTRACT_SCHEMA
4+ from hyperbrowser .tools .schema import (
5+ BROWSER_USE_LLM_SCHEMA ,
6+ BROWSER_USE_SCHEMA ,
7+ CRAWL_SCHEMA ,
8+ EXTRACT_SCHEMA ,
9+ SCRAPE_SCHEMA ,
10+ SCREENSHOT_SCHEMA ,
11+ )
512
613
714def test_browser_use_llm_schema_matches_sdk_literals ():
@@ -14,3 +21,9 @@ def test_extract_schema_requires_only_urls():
1421
1522def test_browser_use_schema_requires_only_task ():
1623 assert BROWSER_USE_SCHEMA ["required" ] == ["task" ]
24+
25+
26+ def test_scrape_related_tool_schemas_require_only_url ():
27+ assert SCRAPE_SCHEMA ["required" ] == ["url" ]
28+ assert SCREENSHOT_SCHEMA ["required" ] == ["url" ]
29+ assert CRAWL_SCHEMA ["required" ] == ["url" ]
You can’t perform that action at this time.
0 commit comments