Skip to main content

A tool to search the web using SearXNG.

Project description

llm-tools-searxng

PyPI](https://pypi.org/project/llm-tools-searxng/) 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 must set this environment variable to a searxng instance you have access to:

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

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.tar.gz (8.4 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-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_tools_searxng-0.1.tar.gz
  • Upload date:
  • Size: 8.4 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.tar.gz
Algorithm Hash digest
SHA256 f2e0f07b1a365eea8efa59c3521ae10ed4a1fe611a58633666c23ba0b13dc274
MD5 9aeddd2747d39fe886200fee10197810
BLAKE2b-256 bcb5e54941c9aa51b2ecadd2193adb568ba6e58ed9363600b6c493b61dcf10f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_searxng-0.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-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_tools_searxng-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de21cc0572d8c06cf2b4172f26ff6be1ed91ded54208dd6780da7b27991d2927
MD5 5677d49291e83406c8627935888839e2
BLAKE2b-256 48a267e8568757217aaaf7cf97932f380d9a716fb7d819d61c795d8a102f9326

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_searxng-0.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