Skip to content

Conversation

@roh26it
Copy link
Collaborator

@roh26it roh26it commented Apr 8, 2025

Code Quality new feature

Author Description

Exa Web Search Plugin: Make Any LLM Online

Overview

This PR introduces an Exa Web Search plugin that enhances LLMs with real-time web information. The plugin transforms requests by adding relevant search results before they reach the model, turning offline models into online models.

Key Features

  • Adds up-to-date web information to model contexts
  • Compatible with all models supported by the Gateway
  • Configurable placement of search results in prompts
  • Source attribution for citations
  • Customizable formatting

Technical Details

  • Request transformer plugin that searches Exa.ai before model processing
  • Three insertion methods: append to system, add after system, or add at end
  • Configurable result count and timeout settings
  • Comprehensive test suite

Impact

Allows customers to use any model with current information, avoiding vendor lock-in with specific "online" models while maintaining factual accuracy.

Title: Exa plugin for online search

🔄 What Changed

  • Added a new Exa Web Search plugin that enhances LLMs with real-time web information
  • Implemented a request transformer that adds relevant search results to prompts before model processing
  • Added support for configurable placement of search results in prompts
  • Implemented source attribution for citations
  • Added customizable formatting options for search results

🔍 Impact of the Change

  • Allows customers to use any model with current information from the web
  • Avoids vendor lock-in with specific "online" models while maintaining factual accuracy
  • Enhances all models supported by the Gateway with real-time web search capabilities
  • Provides configurable domain filtering to control search result sources

📁 Total Files Changed

  • 4 files changed with 778 additions and 0 deletions
  • Added new plugin files: exa.test.ts, manifest.json, online.ts
  • Updated plugins/index.ts to register the new plugin

🧪 Test Added

  • Comprehensive test suite covering all major functionality
  • Tests for different insertion methods of search results
  • Tests for domain filtering capabilities
  • Tests for result count limiting
  • Tests for error handling with invalid queries

🔒 Security Vulnerabilities

  • No security vulnerabilities identified
  • API keys properly handled through the credentials system

Quality Recommendations

  1. Add error handling for network timeouts and API rate limiting scenarios

  2. Consider implementing a caching mechanism to reduce API calls for repeated queries

  3. Add more detailed logging for debugging and monitoring purposes

  4. Consider implementing a fallback mechanism when search results are not available

@roh26it roh26it requested a review from Copilot April 9, 2025 17:53
@roh26it roh26it self-assigned this Apr 9, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • plugins/exa/manifest.json: Language not supported

@roh26it roh26it requested review from VisargD and Copilot April 11, 2025 11:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • plugins/exa/manifest.json: Language not supported

narengogi
narengogi previously approved these changes Apr 21, 2025
Copy link
Collaborator

@narengogi narengogi left a comment

Choose a reason for hiding this comment

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

LGTM

@VisargD VisargD merged commit 6088382 into main Apr 22, 2025
1 check passed
@VisargD VisargD deleted the feat/plugin-exa branch April 22, 2025 13:42
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.

4 participants