File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ dependencies = [
3636 " langchain-fireworks>=0.1.3" ,
3737 " langchain-community>=0.2.9" ,
3838 " langchain-huggingface>=0.0.3" ,
39+ " browserbase==0.3.0"
3940]
4041
4142license = " MIT"
Original file line number Diff line number Diff line change 11"""__init__.py file for docloaders folder"""
22
33from .chromium import ChromiumLoader
4+ from .broswer_base import browser_base_fetch
Original file line number Diff line number Diff line change 1+ """
2+ browserbase integration module
3+ """
4+ from browserbase import Browserbase
5+
6+ def browser_base_fetch (api_key : str , project_id : str , link : str ) -> object :
7+ """
8+ BrowserBase Fetch
9+
10+ This module provides an interface to the BrowserBase API.
11+
12+ The `browser_base_fetch` function takes three arguments:
13+ - `api_key`: The API key provided by BrowserBase.
14+ - `project_id`: The ID of the project on BrowserBase where you want to fetch data from.
15+ - `link`: The URL or link that you want to fetch data from.
16+
17+ It initializes a Browserbase object with the given API key and project ID,
18+ then uses this object to load the specified link. It returns the result of the loading operation.
19+
20+ Example usage:
21+
22+ ```
23+ from browser_base_fetch import browser_base_fetch
24+
25+ result = browser_base_fetch(api_key="your_api_key",
26+ project_id="your_project_id", link="https://example.com")
27+ print(result)
28+ ```
29+
30+ Please note that you need to replace "your_api_key" and "your_project_id"
31+ with your actual BrowserBase API key and project ID.
32+
33+ Args:
34+ api_key (str): The API key provided by BrowserBase.
35+ project_id (str): The ID of the project on BrowserBase where you want to fetch data from.
36+ link (str): The URL or link that you want to fetch data from.
37+
38+ Returns:
39+ object: The result of the loading operation.
40+ """
41+
42+ browserbase = Browserbase (api_key = api_key , project_id = project_id )
43+
44+ result = browserbase .load (link )
45+
46+ return result
You can’t perform that action at this time.
0 commit comments