Skip to content

Commit 114d567

Browse files
committed
1 parent 471eb67 commit 114d567

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

docs/changelog.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Changelog
22

3+
(v0_26_a0)=
4+
## 0.26a0 (2025-05-13)
5+
6+
This is the first alpha to introduce {ref}`support for tools<tools>`! Models with tool capability (which includes the default OpenAI model family) can now be granted access to execute Python functions as part of responding to a prompt.
7+
8+
Tools are supported by {ref}`the command-line interface <usage-tools>`:
9+
10+
```bash
11+
llm --functions '
12+
def multiply(x: int, y: int) -> int:
13+
"""Multiply two numbers."""
14+
return x * y
15+
' 'what is 34234 * 213345'
16+
```
17+
And in {ref}`the Python API <python-api-tools>`, using a new `model.chain()` method for executing multiple prompts in a sequence:
18+
```python
19+
import llm
20+
21+
def multiply(x: int, y: int) -> int:
22+
"""Multiply two numbers."""
23+
return x * y
24+
25+
model = llm.get_model("gpt-4.1-mini")
26+
response = model.chain(
27+
"What is 34234 * 213345?",
28+
tools=[multiply]
29+
)
30+
print(response.text())
31+
```
32+
New tools can also be defined using the {ref}`register_tools() plugin hook <plugin-hooks-register-tools>`. They can then be called by name from the command-line like this:
33+
```bash
34+
llm -T multiply 'What is 34234 * 213345?'
35+
```
36+
Tool support is currently under **active development**. Consult [this milestone](https://github.com/simonw/llm/milestone/12) for the latest status.
37+
338
(v0_25)=
439
## 0.25 (2025-05-04)
540

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "llm"
3-
version = "0.25"
3+
version = "0.26a0"
44
description = "CLI utility and Python library for interacting with Large Language Models from organizations like OpenAI, Anthropic and Gemini plus local models installed on your own machine."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
authors = [

0 commit comments

Comments
 (0)