mirror of
https://github.com/Hopiu/llm.git
synced 2026-03-16 20:50:25 +00:00
Include dataclasses in plugin tool docs
Refs #1000 Refs https://github.com/simonw/llm/issues/997#issuecomment-2873497310
This commit is contained in:
parent
35d460c5e3
commit
218bd10d6d
3 changed files with 19 additions and 1 deletions
|
|
@ -30,7 +30,12 @@ from subprocess import PIPE, Popen
|
|||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ["myst_parser", "sphinx_copybutton", "sphinx_markdown_builder"]
|
||||
extensions = [
|
||||
"myst_parser",
|
||||
"sphinx_copybutton",
|
||||
"sphinx_markdown_builder",
|
||||
"sphinx.ext.autodoc",
|
||||
]
|
||||
myst_enable_extensions = ["colon_fence"]
|
||||
|
||||
markdown_http_base = "https://llm.datasette.io/en/stable"
|
||||
|
|
|
|||
|
|
@ -138,6 +138,17 @@ Adding {ref}`tools support <tools>` involves several steps:
|
|||
|
||||
This [commit to llm-gemini](https://github.com/simonw/llm-gemini/commit/a7f1096cfbb733018eb41c29028a8cc6160be298) implementing tools helps demonstrate what this looks like for a real plugin.
|
||||
|
||||
Here are the relevant dataclasses:
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: llm.Tool
|
||||
|
||||
.. autoclass:: llm.ToolCall
|
||||
|
||||
.. autoclass:: llm.ToolResult
|
||||
```
|
||||
|
||||
|
||||
(advanced-model-plugins-attachments)=
|
||||
|
||||
## Attachments for multi-modal models
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ from .models import (
|
|||
Tool,
|
||||
Toolbox,
|
||||
ToolCall,
|
||||
ToolResult,
|
||||
)
|
||||
from .utils import schema_dsl, Fragment
|
||||
from .embeddings import Collection
|
||||
|
|
@ -59,6 +60,7 @@ __all__ = [
|
|||
"Tool",
|
||||
"Toolbox",
|
||||
"ToolCall",
|
||||
"ToolResult",
|
||||
"user_dir",
|
||||
"schema_dsl",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue