Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(community): Add support for connecting to remote browser via Websocket #7603

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mikiastilahun
Copy link

@mikiastilahun mikiastilahun commented Jan 27, 2025

Pull Request: Connect to an Existing Browser Instance

Summary

This PR introduces functionality to connect to an already running browser instance instead of launching a new one each time. This is particularly useful for users who have a separate Chrome instance running and prefer to connect to it directly for efficiency and custom workflows.

Key Features

  • Connect to an existing browser: Avoids the need to launch a new browser process every time.
  • Streamlined workflows: Ideal for scenarios where a persistent browser session is managed externally.
  • Performance benefits: Reduces overhead by reusing an already running instance.

Use Case Example

  • A user has a Chrome instance running with specific configurations and wants to connect to it without starting a new browser instance.

Contributor:
Twitter/X: @Mike_T_Abebe

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 27, 2025
Copy link

vercel bot commented Jan 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs 🛑 Canceled (Inspect) Jan 30, 2025 0:26am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Jan 30, 2025 0:26am

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Jan 27, 2025
Copy link
Collaborator

@jacoblee93 jacoblee93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me, thank you!

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Jan 29, 2025
@jacoblee93 jacoblee93 changed the title feat(puppeteer): Add support for connecting to remote browser via Web… feat(community): Add support for connecting to remote browser via Websocket Jan 29, 2025
@jacoblee93
Copy link
Collaborator

Could you run yarn format?

@jacoblee93
Copy link
Collaborator

I got it nvm

@vercel vercel bot temporarily deployed to Preview – langchainjs-docs January 30, 2025 00:26 Inactive
@jacoblee93
Copy link
Collaborator

Getting some build errors:

src/document_loaders/web/puppeteer.ts(73,33): error TS2339: Property 'browserWSEndpoint' does not exist on type 'PuppeteerLaunchOptions'.

@jacoblee93 jacoblee93 added close PRs that need one or two touch-ups to be ready and removed lgtm PRs that are ready to be merged as-is labels Jan 30, 2025
@mikiastilahun
Copy link
Author

mikiastilahun commented Jan 30, 2025

The browserWSEndpoint is actually in the PuppeteerLaunchOptions, Let me update the typings and push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases close PRs that need one or two touch-ups to be ready size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants