a plugins that allow to use OpenAPI as a tools
Project description
llm-tools-openapi
a plugins that allow to use OpenAPI as a tools
Installation
Install this plugin in the same environment as LLM.
llm install llm-tools-openapi
Usage
To use this with the LLM command-line tool:
llm --td --tool --tool 'OpenAPIToolbox(openapi_url="https://your/swagger.json")' 'question your API'
With the LLM Python API:
import llm
from llm_tools_openapi import openapi
model = llm.get_model("gpt-4.1-mini")
result = model.chain(
"Example prompt goes here",
tools=[openapi]
).text()
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-tools-openapi
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
python -m pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_tools_openapi-0.1.1.tar.gz.
File metadata
- Download URL: llm_tools_openapi-0.1.1.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59102ac756b74db4e7603a5bacb603ad5b6fb3be6e3da7491944968fbbd50ad2
|
|
| MD5 |
6078a74d8487e5665a7734cfab7d1915
|
|
| BLAKE2b-256 |
81efb3ebf18765f1d841bace0973d1ebffbb1278a7c64d425a233fe42bfa4311
|
File details
Details for the file llm_tools_openapi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llm_tools_openapi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf70bf1761a178ba9b425b72e121e9141b2bc6c4bb162036443a31f300de0307
|
|
| MD5 |
1a54dbdc81374919c90feacea3db1dcc
|
|
| BLAKE2b-256 |
564cef079bc01656f57f8c0ce6c5799a9418dc0497ddfe3bfda201b82cac2885
|