Web browsing plugin for GUI Chat applications
npm install @gui-chat-plugin/browse
Web browsing plugin for GUI Chat applications. Browse and extract content from web pages.
- Extract content from any web page URL
- Twitter/X post embedding support
- Article content parsing (title, byline, excerpt, body)
- Clean, readable content display
``bash`
yarn add @gui-chat-plugin/browse
`typescript
// In src/tools/index.ts
import BrowsePlugin from "@gui-chat-plugin/browse/vue";
const pluginList = [
// ... other plugins
BrowsePlugin,
];
// In src/main.ts
import "@gui-chat-plugin/browse/style.css";
`
`typescript
import { executeBrowse, TOOL_DEFINITION } from "@gui-chat-plugin/browse";
// Browse a webpage
const result = await executeBrowse(context, {
url: "https://example.com/article",
});
`
`typescript`
interface BrowseArgs {
url: string; // The URL of the webpage to browse
}
`typescript`
interface BrowseToolData {
url: string;
twitterEmbedHtml?: string | null;
}
`typescript`
interface BrowseJsonData {
data: {
title?: string;
description?: string;
content?: string;
textContent?: string;
text?: string;
byline?: string;
excerpt?: string;
};
}
`bashInstall dependencies
yarn install
Try these prompts to test the plugin:
1. "Browse the Wikipedia page about artificial intelligence and tell me the key points"
2. "Show me what's on the Hacker News homepage"
3. "Read this article and summarize it: https://example.com/article"
MIT