Skip to main content

LLM plugin for accessing Exa.ai API

Project description

llm-exa

PyPI License

LLM plugin for accessing Exa.ai - an AI-powered search engine and data retrieval API.

Installation

Install this plugin in the same environment as LLM.

llm install llm-exa

Configuration

First, set an API key for Exa.ai:

llm keys set exa
# Paste your Exa.ai API key here

You can obtain an API key by signing up at exa.ai and navigating to your dashboard.

Available Models

This plugin provides access to the following Exa.ai capabilities:

  • exa-search - Search the web using Exa.ai's neural or keyword search
  • exa-search-contents - Search and retrieve full content of relevant web pages
  • exa-find-similar - Find web pages similar to a provided URL
  • exa-answer - Get direct answers to questions with citations from the web

You can view all models and their options with:

llm models
llm models --options

Usage Examples

Web Search

Search the web using neural search (semantic understanding):

llm -m exa-search "Latest developments in quantum computing" --option type neural

Search with category filtering:

llm -m exa-search "Recent papers on LLMs" --option category "papers" 

Limit search to specific domains:

llm -m exa-search "Climate change impacts" --option include_domains '["nature.com", "science.org"]'

Search with Full Content Retrieval

Search and get full content of web pages:

llm -m exa-search-contents "The future of renewable energy" --option text true --option highlights true

Include summaries of retrieved pages:

llm -m exa-search-contents "AI chip advancements" --option summary true 

Finding Similar Content

Find pages similar to a URL:

llm -m exa-find-similar "https://example.com/article-about-agi" 

Exclude the original domain:

llm -m exa-find-similar "https://example.com/some-article" --option exclude_domains '["example.com"]'

Getting Direct Answers

Get a direct answer to a question with citations:

llm -m exa-answer "What are the environmental impacts of blockchain?"

Stream the answer in real-time:

llm -m exa-answer "What are the latest developments in fusion energy?" --option stream true

Options

Common options for all models:

  • num_results - Number of results to return (default: 5)
  • text - Whether to include full text content (default: true)

Search-specific options:

  • type - Search type: "neural", "keyword", or "auto" (default: "auto")
  • category - Filter by data category (e.g., "company", "research paper", "news")
  • include_domains - List of domains to include in search
  • exclude_domains - List of domains to exclude from search

Content-specific options:

  • highlights - Include relevant highlights in response (default: false)
  • summary - Include generated summary in response (default: false)

Answer-specific options:

  • stream - Stream the response (default: true)

Development

To set up this plugin locally:

git clone https://github.com/nicobailon/llm-exa.git
cd llm-exa
python -m venv venv
source venv/bin/activate
pip install -e '.[test]'

License

This project is licensed under the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_exa-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_exa-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file llm_exa-0.1.0.tar.gz.

File metadata

  • Download URL: llm_exa-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for llm_exa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d4778447bddd722f69d4d82319a9047495f548a107c513a01cb6a28e947eedb
MD5 9f6e06214e652b5861cf2b87280c3317
BLAKE2b-256 62ab7d58498fc48a545affd8af54c6d52f52c527227f191880059708db9fac84

See more details on using hashes here.

File details

Details for the file llm_exa-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: llm_exa-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for llm_exa-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0433632bd2228eab300f6a4c7f04be38fe854234a725751f1f7fa91badc30364
MD5 b2c7c7d8f640864a7c9bb2d15d36ed90
BLAKE2b-256 7f58f805fbf66d5650c42960467773a25f23972863651325e2aec2d6134f7a17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page