Skip to content

daturkel/llm-tools-exa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llm-tools-exa

A tool plugin for LLM that allows you to search the web using Exa.

PyPI Changelog Tests License

Installation

Install this plugin in the same environment as LLM:

llm install llm-tools-exa

Usage

Create an account at Exa and get your API key from this page. Add it to llm with llm keys set exa.

This plugin provides two tools which can be bundled together or provided separately.

Use -T Exa to include both tools, -T web_search for web search only, and -T get_answer for get answer only.

web_search

Search the web for high-quality, relevant results with content and highlights:

llm -m claude-4-sonnet -T web_search "search the web to get today's weather in nyc"

get_answer

Get a direct answer to a question with optional citations:

llm -m claude-4-sonnet -T get_answer "What is the capital of France?"

You can ask the model to include or omit citations, as desired.

get_contents

Get the contents of a webpage as markdown:

llm -m claude-4-sonnet -T get_contents "What's on the homepage of nytimes.com

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-tools-exa
python -m venv venv
source venv/bin/activate

Install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Dependencies

  • llm: The LLM CLI tool this plugin extends
  • sqlite-utils: For querying LLM's sqlite databases

About

A tool plugin for LLM to support web search via Exa

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages