Perplexity Web Search (OpenRouter)

Search the web using Perplexity AI via OpenRouter API.

v0.1.1
perplexity_openrouter.py
Python · 206 lines
32    class Valves(BaseModel):33        openrouter_api_key: str = Field(34            default="", description="Required API key to access OpenRouter services"35        )36        openrouter_api_base_url: str = Field(37            default="https://openrouter.ai/api/v1",38            description="The base URL for OpenRouter API endpoints",39        )40        model: str = Field(41            default="perplexity/sonar-pro",42            description="Model to use for search",43        )

Perplexity Web Search (OpenRouter)

Purpose: Access search summaries for multi-step reasoning workflows.

This tool enables models to leverage Perplexity's search summaries. It is adapted from the Perplexity Web Search Tool to support OpenRouter.

Key Features

  • Access AI-generated answers from web search
  • Configurable model selection
  • Automatic citation generation

Setup

  1. Import the tool into Open WebUI (Workspace → Tools)
  2. Get an OpenRouter API key from OpenRouter
  3. Configure the tool by clicking the valves settings icon and entering the API key

The tool defaults to Perplexity Sonar Pro but can be configured to use other compatible models.

Contributing

For reporting issues or submitting pull requests, see openwebui-plugins.

0
1

Perplexity Web Search (OpenRouter)

Purpose: Access search summaries for multi-step reasoning workflows.

This tool enables models to leverage Perplexity's search summaries. It is adapted from the Perplexity Web Search Tool to support OpenRouter.

Key Features

  • Access AI-generated answers from web search
  • Configurable model selection
  • Automatic citation generation

Setup

  1. Import the tool into Open WebUI (Workspace → Tools)
  2. Get an OpenRouter API key from OpenRouter
  3. Configure the tool by clicking the valves settings icon and entering the API key

The tool defaults to Perplexity Sonar Pro but can be configured to use other compatible models.

Contributing

For reporting issues or submitting pull requests, see openwebui-plugins.

0
1