Skip to main content

A tool to search the web using SearXNG.

Project description

llm-tools-searxng

PyPI Changelog Tests License

A tool to search the web using SearXNG search engines.

Installation

Install this plugin in the same environment as LLM.

llm install llm-tools-searxng

Configuration

By default, the tool does not have a default SearXNG URL set. You can configure it in one of two ways:

Using environment variables

export SEARXNG_URL=https://your-searxng-instance.com
export SEARXNG_METHOD=GET  # or POST (default)

Using LLM's built-in key management

llm key set searxng_url https://your-searxng-instance.com

Note: Public SearXNG instances typically don't allow API access or JSON output.

Usage

Simple search function

Use the searxng_search function for basic web searches:

llm --tool searxng_search "latest developments in AI" --tools-debug

With LLM chat

This plugin works well with llm chat:

llm chat --tool searxng_search --tools-debug

Python API usage

import llm
from llm_tools_searxng import SearXNG, searxng_search

# Using the simple function
model = llm.get_model("gpt-4.1-mini")
result = model.chain(
    "What are the latest developments in renewable energy?",
    tools=[searxng_search]
).text()

Development

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

cd llm-tools-searxng
uv sync --all-extras

Now install the dependencies and test dependencies:

llm install -e '.[test]'

To run the tests:

uv run python -m pytest

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_tools_searxng-0.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

llm_tools_searxng-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file llm_tools_searxng-0.1.1.tar.gz.

File metadata

  • Download URL: llm_tools_searxng-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_tools_searxng-0.1.1.tar.gz
Algorithm Hash digest
SHA256 560aedebf8fbc9f5ffccb044cd2a4c481cf1e48bf5088fd9e741d4658f0b53c3
MD5 2ae7c9669a66be06cd2391a13efaaa03
BLAKE2b-256 f9c9a074497d499f6d7dc469aaa6b0334562ab203d5c8a1ea34bf265cb29abc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_searxng-0.1.1.tar.gz:

Publisher: publish.yml on justyns/llm-tools-searxng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_tools_searxng-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_tools_searxng-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f2b1902649157c0bd5c2d0f415cdd1630a3d1c1dc223ad26401dc26b657dcff
MD5 bee25b39a6d58b1a404c0207c09fc26e
BLAKE2b-256 30a38b292bc4102d0a16a4bbb8fde8bf0af53ec3ca2d6838a992065797af7344

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_searxng-0.1.1-py3-none-any.whl:

Publisher: publish.yml on justyns/llm-tools-searxng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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