Skip to main content

a plugins that allow to use OpenAPI as a tools

Project description

llm-tools-openapi

PyPI Changelog Tests License

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


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_openapi-0.1.1.tar.gz (13.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_openapi-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

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

Hashes for llm_tools_openapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 59102ac756b74db4e7603a5bacb603ad5b6fb3be6e3da7491944968fbbd50ad2
MD5 6078a74d8487e5665a7734cfab7d1915
BLAKE2b-256 81efb3ebf18765f1d841bace0973d1ebffbb1278a7c64d425a233fe42bfa4311

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llm_tools_openapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf70bf1761a178ba9b425b72e121e9141b2bc6c4bb162036443a31f300de0307
MD5 1a54dbdc81374919c90feacea3db1dcc
BLAKE2b-256 564cef079bc01656f57f8c0ce6c5799a9418dc0497ddfe3bfda201b82cac2885

See more details on using hashes here.

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