51 lines
1.1 KiB
Markdown
51 lines
1.1 KiB
Markdown
# llm-tools-tricu-bridge
|
|
|
|
[](https://pypi.org/project/llm-tools-tricu-bridge/)
|
|
|
|
A tool that allows running Tricu expressions
|
|
|
|
## Installation
|
|
|
|
Install this plugin in the same environment as [LLM](https://llm.datasette.io/).
|
|
```bash
|
|
llm install llm-tools-tricu-bridge
|
|
```
|
|
## Usage
|
|
|
|
To use this with the [LLM command-line tool](https://llm.datasette.io/en/stable/usage.html):
|
|
|
|
```bash
|
|
llm --tool tricu-bridge "Example prompt goes here" --tools-debug
|
|
```
|
|
|
|
With the [LLM Python API](https://llm.datasette.io/en/stable/python-api.html):
|
|
|
|
```python
|
|
import llm
|
|
from llm_tools_tricu_bridge import tricu-bridge
|
|
|
|
model = llm.get_model("gpt-4.1-mini")
|
|
|
|
result = model.chain(
|
|
"Example prompt goes here",
|
|
tools=[tricu-bridge]
|
|
).text()
|
|
```
|
|
|
|
## Development
|
|
|
|
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
|
|
```bash
|
|
cd llm-tools-tricu-bridge
|
|
python -m venv venv
|
|
source venv/bin/activate
|
|
```
|
|
Now install the dependencies and test dependencies:
|
|
```bash
|
|
llm install -e '.[test]'
|
|
```
|
|
To run the tests:
|
|
```bash
|
|
python -m pytest
|
|
```
|