Skip to content

Added showcase for Sonar Chromium Browser #39

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

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

Conversation

KoushikBaagh
Copy link

Description

Chromium browser patch that natively integrates Perplexity’s Sonar API to provide:

  • Omnibox Answers: Type sonar <your query> in the address bar for instant AI-powered autocomplete suggestions.
  • Context-menu Summarization: Select text on any webpage, right-click Summarize with Sonar, and view a concise summary in a new tab.

Type of Contribution

  • Example Tutorial
  • Showcase Project
  • Article/Integration Guide
  • Documentation Update
  • Bug Fix
  • Other (please describe)

Checklist

  • My code follows the cookbook’s style guidelines
  • I have included comprehensive documentation
  • I have tested my code and it works as expected
  • I have included all necessary dependencies and setup instructions
  • My MDX file includes proper frontmatter (title, description, keywords)
  • I have linked to any external repositories or live demos

Project Details

What problem does this solve?
Developers often need quick answers or summaries without leaving their browser. This patch embeds AI responses directly into Chromium’s omnibox and context-menu, streamlining research and browsing workflows.

What makes this contribution valuable to other developers?

  • Demonstrates how to hook into Chromium’s omnibox and context-menu APIs.
  • Provides a real-world example of integrating Perplexity Sonar models (sonar-pro for omnibox, sonar for summaries).
  • Offers a starting point for customizing browser builds with AI features.

External Links:

Testing

  1. Applied patches in a WSL2 Ubuntu 22.04 Chromium checkout.
  2. Built Chromium (Version 138.0.7160.0).
  3. Verified omnibox suggestions by typing sonar what is quantum tunneling?.
  4. Selected page text, right-clicked Summarize with Sonar, and confirmed the summary tab loads correctly.

Additional Notes

  • Ensure you replace the placeholder API_KEY in both sonar_autocomplete_provider.cc and render_view_context_menu.cc with your Perplexity Sonar API key before building.
  • This repository includes only the modified files; to replicate, apply these patches into a full Chromium src/ checkout as described in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant