# langchain-selenium-browser

> Selenium Web browser tool for langchain

Latest version **0.2.0** (published 2023-06-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install langchain-selenium-browser
pnpm add langchain-selenium-browser
yarn add langchain-selenium-browser
bun add langchain-selenium-browser
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-06-02 |
| First published | 2023-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 60.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Altaflux |
| Maintainers | altaflux |
| Keywords | langchain |

## Links

- npm: https://www.npmjs.com/package/langchain-selenium-browser
- Repository: https://github.com/Altaflux/langchain-selenium-browser
- Homepage: https://github.com/Altaflux/langchain-selenium-browser#readme
- Issues: https://github.com/Altaflux/langchain-selenium-browser/issues
- npm.io page: https://npm.io/package/langchain-selenium-browser

## Dependencies (5)

- [jsdom](https://npm.io/package/jsdom.md) 22.0.0
- [turndown](https://npm.io/package/turndown.md) ^7.1.2
- [async-exit-hook](https://npm.io/package/async-exit-hook.md) ^2.0.1
- [webdriver-manager](https://npm.io/package/webdriver-manager.md) ^13.0.2
- [selenium-webdriver](https://npm.io/package/selenium-webdriver.md) 4.9.0

## Recent versions

- 0.2.0 (latest) — 2023-06-02
- 0.0.3 — 2023-05-03
- 0.0.2 — 2023-05-03

## README

# langchain-selenium-browser

A langchain web browser tool based on Selenium

## Usage:
```javascript
    const WebBrowserToolKit = require('@agent-mimir/selenium-browser').WebBrowserToolKit;
    const model = new ChatOpenAI({
        openAIApiKey: process.env.OPENAI_API_KEY,
        temperature: 0.9,
    });
    const embeddings = new OpenAIEmbeddings({
        openAIApiKey: process.env.OPENAI_API_KEY,
    });

    const webToolKit = new WebBrowserToolKit({
        browserConfig: {
            browserName: "chrome", // chrome, firefox, edge
            disableHeadless: false // set to true to see the browser, false by default
        },
        maximumChunkSize: 3000, // size of chunks to split the website content into, defaults to 3000
        numberOfRelevantDocuments: 2, // Max number of chunks to use when analyzing a website page, defaults to 2,  set to 'all' to use all chunks (slow)
    }, model, embeddings);

    //Add to agents tool:
    tools: [
            ...webToolKit.tools,
        ],
```

---
_Source: https://npm.io/package/langchain-selenium-browser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
