Cosurfer is a browser extension (currently only for Chromium based browsers), that lets you ask questions to the website in your current browser tab using LLMs. It can summarize long discussions for you for example.
- Take the
dist
folder of this repository OR build it yourself - Go to
chrome://extensions
- Click "Load unpacked"
- Select the
dist
folder
You can use Cosurfer with different LLM providers remote and local.
- Create an account at Groq
- Generate an API key
- Open the Cosurfer settings by clicking the gear icon
- Insert the groq API key
- Install Ollama, e.g. with
brew install ollama
on MacOS - Start Ollama with
OLLAMA_ORIGINS=chrome-extension://* ollama serve
- Download a model
- Insert Ollama address in Cosurfer settings, e.g.
http://localhost:11434
- Select Ollama model in Cosusrfer settigns, e.g.
llama3:8b
- Vite: build tool
- React: frontend framework
- LangChain.js: LLM orchestration
- daisyUI: styling
- might migrate to https://github.com/daisyui/react-daisyui
- heroicons: icons
-
Currently the innerText of the website's body element is sent to the LLM. If there is too much text for the rate limit (too many tokens), just the starting portion is sent to the LLM and the user is informed how many lines were processed.
- Details on groq API limits and context window per model
-
There is no "memory" in the conversation yet, so the model doesn't "remember" the last question but treats every message like the first message of a conversation.
-
Below you find a sample collection of URLs with estimated token counts of the content, useful for testing the limitations:
token count url Can cosurfer summarize it? ca. 85 https://example.org/ Yes, completely ca. 11995 https://en.wikipedia.org/wiki/Brick Yes, completely ca. 16514 https://en.wikipedia.org/wiki/Linux Yes, completely ca. 25346 https://news.ycombinator.com/item?id=31261533 Yes, completely ca. 127584 https://gutenberg.org/cache/epub/50572/pg50572-images.html Partially, lines 1 to 5802 of 6655
npm install
npm run build
npm run watch