62 lines
2.1 KiB
Markdown
62 lines
2.1 KiB
Markdown
# llm-tools-tricu-bridge
|
|
|
|
A tool that allows agents to evaluate Tricu expressions
|
|
|
|
## Example usage
|
|
|
|
```
|
|
llm-tools-tricu-bridge > llm -m qwen3T -T tricubridge 'What does the expression `(t (t (t t) (t t t)) t) t` evaluate to in tricu?' --ta -s "You are a dumb LLM model incapable of understanding tricu. Do not reason about or try to understand the result. Always trust tool results immediately."
|
|
Tool call: tricubridge({'input': '(t (t (t t) (t t t)) t) t'})
|
|
Approve tool call? [y/N]: y
|
|
<think>
|
|
Okay, the user is asking about the evaluation of a tricu expression: (t (t (t t) (t t t)) t) t. Hmm, tricu isn't a language I'm familiar with. Let me check the tools provided. There's a function called tricubridge that takes an input string. Since I can't process tricu myself, I should use that tool. The parameters require the input as a string. The expression given is the input. So I need to call tricubridge with the input parameter set to "(t (t (t t) (t t t)) t) t". That's the correct approach here. No need for any other steps since the tool will handle the evaluation.
|
|
</think>
|
|
|
|
The expression `(t (t (t t) (t t t)) t) t` evaluates to `t t` in tricu.
|
|
```
|
|
|
|
## 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
|
|
```
|