class ZMSLLMConnector(ZMSItem.ZMSItem): (source)
Constructor: ZMSLLMConnector(id)
Implements interfaces: Products.zms.IZMSConfigurationProvider.IZMSConfigurationProvider, Products.zms.IZMSLLMConnector.IZMSLLMConnector, Products.zms.IZMSRepositoryProvider.IZMSRepositoryProvider
ZMS LLM Connector – bridges ZMS to AI/LLM provider backends.
| Method | __init__ |
Constructor. |
| Method | chat |
Send messages to the configured LLM provider. |
| Method | chat |
Agentic chat loop with ZMS tool calling. |
| Method | get |
Fetch the list of locally available models from the configured Ollama server. |
| Method | get |
Return information about the currently configured LLM provider. |
| Method | get |
Return available ``*_llmtools`` / ``*_connector`` ZMSLibrary meta-objects. |
| Method | get |
Return a configuration property for this connector. |
| Method | get |
Return a dict of enabled AI feature flags. |
| Method | is |
Check whether a specific AI feature is enabled. |
| Method | manage_change |
Save connector configuration fields from the Config tab form. |
| Method | manage_change |
Save feature-flag checkboxes from the Features tab form. |
| Method | manage_change |
Backwards-compatible shim: delegates to manage_changeConfig. |
| Method | manage |
Return management options delegating to the parent ZMS object. |
| Method | manage |
Contribute the LLM tab to the ZMS main tab bar. |
| Method | provide |
Export connector configuration for repository. |
| Method | update |
Import connector configuration from repository. |
| Class Variable | __ac |
Undocumented |
| Class Variable | __administrator |
Undocumented |
| Class Variable | manage |
Undocumented |
| Class Variable | manage |
Undocumented |
| Class Variable | manage |
Undocumented |
| Class Variable | manage |
Undocumented |
| Class Variable | meta |
Undocumented |
| Class Variable | security |
Undocumented |
| Class Variable | zmi |
Undocumented |
| Instance Variable | id |
Undocumented |
| Method | _as |
Parse common truthy/falsy values from request-like sources. |
| Method | _prepare |
Normalize messages and optionally inject HTML-preservation guidance. |
| Instance Variable | _config |
Undocumented |
| Instance Variable | _p |
Undocumented |
Send messages to the configured LLM provider.
Delegates to ``llmapi`` provider factory using this connector as the configuration context so ``getConfProperty()`` resolves correctly.
| Parameters | |
| messages | List of ``{"role": ..., "content": ...}`` dicts or a plain string. |
| **kwargs | Optional overrides: temperature, top_p, max_tokens, etc. |
| Returns | |
| dict | Response in OpenAI /v1/chat/completions format or error dict. |
Agentic chat loop with ZMS tool calling.
Sends ``messages`` plus active tool definitions from ``llmtools.ZMSLLMToolsAdapter`` to the LLM. If the LLM responds with ``tool_calls``, each call is executed through the adapter (custom ``*_llmtools`` profile or built-in fallback), appended as ``tool`` role messages, and the conversation continues until the LLM produces a plain text response or ``max_rounds`` is reached.
| Parameters | |
| messages | List of ``{"role": ..., "content": ...}`` dicts or a plain string (auto-wrapped as user message). |
| context | ZMS acquisition context exposing ``metaobj_manager``. |
| max | Maximum tool-calling iterations to prevent infinite loops. |
| preserve | Undocumented |
| Returns | |
| dict | Dict with keys:
|
Fetch the list of locally available models from the configured Ollama server.
| Returns | |
| dict | Dict with 'models' list (name strings) or 'error'. |
Return information about the currently configured LLM provider.
| Returns | |
| dict | Dict with provider type, model name, endpoint, etc. |
Return available ``*_llmtools`` / ``*_connector`` ZMSLibrary meta-objects.
Connectors are discovered from installed ZMSLibrary meta-objects and can be selected via ``llm.llmtools.id`` in connector config.
Return a configuration property for this connector.
Reads from connector's own ``_config`` dict first; falls back to the ZMS root confmanager for site-wide defaults.
| Parameters | |
| key | Property key (e.g. 'llm.provider', 'llm.api.key'). |
| default | Value returned when key is absent. |
| Returns | |
| Property value or default. | |
Return a dict of enabled AI feature flags.
Keys: rte_assist, translate_assist, metadata_gen, rag_chat. Values: bool.
| Returns | |
| dict | Feature flag dict. |
Check whether a specific AI feature is enabled.
| Parameters | |
| feature | One of 'rte_assist', 'translate_assist', 'metadata_gen', 'rag_chat'. |
| Returns | |
| bool | True if the feature is enabled. |