mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
updated browserbase load tool
This commit is contained in:
@@ -1,12 +1,15 @@
|
|||||||
import os
|
|
||||||
from crewai_tools import BaseTool
|
from crewai_tools import BaseTool
|
||||||
from typing import Union, Optional
|
from typing import Optional, Any
|
||||||
|
|
||||||
class BrowserbaseLoadTool(BaseTool):
|
class BrowserbaseLoadTool(BaseTool):
|
||||||
name: str = "Browserbase web load tool"
|
name: str = "Browserbase web load tool"
|
||||||
description: str = "Load webpages in a headless browser using Browserbase and return the contents"
|
description: str = "Load webpages in a headless browser using Browserbase and return the contents"
|
||||||
|
api_key: Optional[str] = None
|
||||||
|
text_content: Optional[bool] = False
|
||||||
|
browserbase: Optional[Any] = None
|
||||||
|
|
||||||
def __init__(self, api_key: Optional[str] = None, text_content: bool = False):
|
def __init__(self, api_key: Optional[str] = None, text_content: Optional[bool] = False, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
try:
|
try:
|
||||||
from browserbase import Browserbase
|
from browserbase import Browserbase
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user