mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
Update browserbase_load_tool.py
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
from typing import Any, Optional, Type
|
|
||||||
import os
|
import os
|
||||||
|
from typing import Any, Optional, Type
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from crewai_tools.tools.base_tool import BaseTool
|
from crewai_tools.tools.base_tool import BaseTool
|
||||||
@@ -32,6 +32,8 @@ class BrowserbaseLoadTool(BaseTool):
|
|||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
if not self.api_key:
|
||||||
|
raise EnvironmentError("BROWSERBASE_API_KEY environment variable is required for initialization")
|
||||||
try:
|
try:
|
||||||
from browserbase import Browserbase # type: ignore
|
from browserbase import Browserbase # type: ignore
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user