module documentation

ZMSLLMConnector.py - ZMS LLM Connector for AI/LLM Integration

Provides ZMSLLMConnector as a Zope object that bridges ZMS content management with large language model providers (OpenAI, Ollama, RAG with Qdrant).

The connector stores its own configuration as ZODB-persisted properties and is retrieved from any ZMS context via getLLMConnector(). It can contain ZMSCustom child objects for richer 3rd-view UI extensions.

Multiple providers are supported through llmapi.py:

  • OpenAI (gpt-4o-mini, gpt-4, gpt-3.5-turbo, ...)
  • Ollama (local LLM deployment)
  • RAG with Qdrant + Ollama (retrieval-augmented generation)

License: GNU General Public License v2 or later, Organization: ZMS Publishing

Class ZMSLLMConnector ZMS LLM Connector – bridges ZMS to AI/LLM provider backends.
Function manage_addZMSLLMConnector Add a ZMSLLMConnector object.
Function _json_dumps_safe json.dumps with a fallback that decodes bytes to str.
def manage_addZMSLLMConnector(self, REQUEST, RESPONSE=None): (source)

Add a ZMSLLMConnector object.

def _json_dumps_safe(obj, **kwargs): (source)

json.dumps with a fallback that decodes bytes to str.