class documentation
class ZMSLLMToolsAdapter(object): (source)
Constructor: ZMSLLMToolsAdapter(connector, context)
Resolve active LLM tools connector and dispatch tool calls.
Contract for custom LLM tools connector libraries (``*_llmtools`` or ``com.zms.llmtools.*/*_connector``):
- A python/script attribute ``get_llmtools`` returning a list of OpenAI tool schemas (same shape as ``LLM_TOOLS``). Returning ``{"tools": [...]} `` is also accepted.
- Tool executors as python/script attributes named ``llmtool_<name>``. The script is called as ``script(connector, context, args)``.
| Method | __init__ |
Undocumented |
| Method | execute |
Execute tool call against active connector, then fallback to built-in tools. |
| Method | get |
Return available ``*_llmtools`` / ``*_connector`` ZMSLibrary connectors. |
| Method | get |
Return configured LLM tools connector id. |
| Method | get |
Return active tool schemas for current connector/context. |
| Instance Variable | connector |
Undocumented |
| Instance Variable | context |
Undocumented |
| Instance Variable | root |
Undocumented |
| Method | _get |
Return script actions from connector meta-object, filtered by regex. |
| Method | _get |
Return the get_llmtools action for a custom connector. |
| Method | _validate |
Validate tools payload shape. |
Return active tool schemas for current connector/context.
- If ``llm.llmtools.id`` is empty: return built-in ``LLM_TOOLS``.
- If configured: load from connector's ``get_llmtools`` script.