Skip to content

simonw/llm-tools-trigger-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llm-tools-trigger-error

PyPI Changelog Tests License

Trigger an LLM tools error, useful for testing

Installation

Install this plugin in the same environment as LLM.

llm install llm-tools-trigger-error

Usage

To use this with the LLM command-line tool:

llm -T trigger_error "Trigger an error about an escaped badger" --tools-debug

With the LLM Python API:

import llm
from llm_tools_trigger_error import trigger_error

model = llm.get_model("gpt-4.1-mini")

result = model.chain(
    "Trigger an error about an escaped badger",
    tools=[trigger_error]
).text()

Development

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

cd llm-tools-trigger-error
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

About

Trigger an LLM tools error, useful for testing

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages