Skip to content

Commit 86ddb10

Browse files
committed
Initial scaffolding
1 parent 2b68523 commit 86ddb10

File tree

6 files changed

+822
-0
lines changed

6 files changed

+822
-0
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.9", "3.10", "3.11", "3.12"]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v3
22+
- name: Install dependencies
23+
run: |
24+
uv pip install -e '.[test]'
25+
- name: Run tests
26+
run: |
27+
python -m pytest -v

.gitignore

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
tests/
2+
__pycache__/
3+
*.pyc
4+
*.pyo
5+
*.pyd
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
MANIFEST
23+
24+
# PyInstaller
25+
*.manifest
26+
*.spec
27+
28+
# Installer logs
29+
pip-log.txt
30+
pip-delete-this-directory.txt
31+
32+
# Unit test / coverage reports
33+
htmlcov/
34+
.tox/
35+
.coverage
36+
.coverage.*
37+
.cache
38+
nosetests.xml
39+
coverage.xml
40+
*.cover
41+
.hypothesis/
42+
.pytest_cache/
43+
44+
# Translations
45+
*.mo
46+
*.pot
47+
48+
# Django stuff:
49+
*.log
50+
local_settings.py
51+
db.sqlite3
52+
53+
# Flask stuff:
54+
instance/
55+
.webassets-cache
56+
57+
# Scrapy stuff:
58+
.scrapy
59+
60+
# Sphinx documentation
61+
docs/_build/
62+
63+
# PyBuilder
64+
target/
65+
66+
# Jupyter Notebook
67+
.ipynb_checkpoints
68+
69+
# pyenv
70+
.python-version
71+
72+
# celery beat schedule file
73+
celerybeat-schedule
74+
75+
# SageMath parsed files
76+
*.sage.py
77+
78+
# Environments
79+
.env
80+
.venv
81+
env/
82+
venv/
83+
ENV/
84+
env.bak/
85+
venv.bak/
86+
87+
# Spyder project settings
88+
.spyderproject
89+
.spyproject
90+
91+
# Rope project settings
92+
.ropeproject
93+
94+
# mkdocs documentation
95+
/site
96+
97+
# mypy
98+
.mypy_cache/
99+
.dmypy.json
100+
dmypy.json

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# llm-tools-searxng
2+
3+
[![PyPI](https://img.shields.io/pypi/v/llm-tools-searxng.svg)](https://pypi.org/project/llm-tools-searxng/)
4+
[![Changelog](https://img.shields.io/github/v/release/justyns/llm-tools-searxng?include_prereleases&label=changelog)](https://github.com/justyns/llm-tools-searxng/releases)
5+
[![Tests](https://github.com/justyns/llm-tools-searxng/actions/workflows/test.yml/badge.svg)](https://github.com/justyns/llm-tools-searxng/actions/workflows/test.yml)
6+
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/justyns/llm-tools-searxng/blob/main/LICENSE)
7+
8+
Make searxng web search available as an LLM tool
9+
10+
## Installation
11+
12+
Install this plugin in the same environment as [LLM](https://llm.datasette.io/).
13+
```bash
14+
llm install llm-tools-searxng
15+
```
16+
## Usage
17+
18+
```bash
19+
llm -T searxng_search "What's the population of Canada?" --td
20+
```
21+
22+
## Development
23+
24+
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
25+
```bash
26+
cd llm-tools-searxng
27+
python -m venv venv
28+
source venv/bin/activate
29+
```
30+
Now install the dependencies and test dependencies:
31+
```bash
32+
python -m pip install -e '.[test]'
33+
```
34+
To run the tests:
35+
```bash
36+
python -m pytest
37+
```

llm_tools_searxng.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO

pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[project]
2+
name = "llm-tools-searxng"
3+
version = "0.1.0"
4+
description = "SearXNG search tool plugin for llm"
5+
readme = "README.md"
6+
requires-python = ">=3.9"
7+
authors = [{name = "Justyn Shull"}]
8+
license = "Apache-2.0"
9+
classifiers = []
10+
dependencies = [
11+
"httpx>=0.28.1",
12+
"llm>=0.26",
13+
]
14+
15+
[build-system]
16+
requires = ["setuptools"]
17+
build-backend = "setuptools.build_meta"
18+
19+
[project.urls]
20+
Homepage = "https://github.com/justyns/llm-tools-searxng"
21+
Changelog = "https://github.com/justyns/llm-tools-searxng/releases"
22+
Issues = "https://github.com/justyns/llm-tools-searxng/issues"
23+
CI = "https://github.com/justyns/llm-tools-searxng/actions"
24+
25+
[project.entry-points.llm]
26+
tools_simpleeval = "llm_tools_searxng"
27+
28+
[project.optional-dependencies]
29+
test = ["pytest", "llm-echo>=0.3a1"]

0 commit comments

Comments
 (0)