module documentation
llmtools.py – ZMS tool registry for LLM function/tool calling.
Provides:
- ``LLM_TOOLS``: built-in tool schemas (OpenAI-format, also accepted by Ollama v0.3+).
- ``execute_llmtool(name, args, context)``: built-in dispatcher for core ZMS tools.
- ``ZMSLLMToolsAdapter``: abstraction layer that can load custom toolsets from ``*_llmtools`` ZMSLibrary meta-objects and dispatch custom ``llmtool_*`` actions.
All tools operate on the metamodel manager reachable via the ZMS acquisition context.
License: GNU General Public License v2 or later, Organization: ZMS Publishing
| Class | |
Resolve active LLM tools connector and dispatch tool calls. |
| Function | execute |
Dispatch a tool call to the corresponding ZMS API. |
| Function | get |
Return available custom LLM tools connectors (ZMSLibrary meta-objects). |
| Constant | LLM |
Undocumented |
| Function | _tool |
Crawl every ZMS page, render its body content, chunk + embed the text, and upsert all vectors into the configured Qdrant collection. |
Dispatch a tool call to the corresponding ZMS API.
| Parameters | |
| name | Tool name as returned in the LLM tool_call. |
| args | Dict of parsed arguments from the LLM. |
| context | ZMS acquisition context (must have ``metaobj_manager`` attribute). |
| Returns | |
| JSON-serialisable result dict. | |
Return available custom LLM tools connectors (ZMSLibrary meta-objects).
A connector is any ``ZMSLibrary`` matching either:
- id ends with ``_llmtools`` (generic naming), or
- id ends with ``_connector`` and package starts with ``com.zms.llmtools.`` (connector-style naming, e.g. ``ollama_connector``).
Undocumented
| Value |
|