GenAI Commons

Content Type: Module
Categories: Connectors,Artificial Intelligence

Overview

The GenAI Commons module combines common GenAI patterns found in a variety of generative AI models on the market. Platform-supported GenAI-connectors use the underlying data structures and their operations, for example both the OpenAI or Amazon Bedrock connector depend on this module.

If two different connectors both adhere to the GenAI Commons module, they can be easily swapped, which reduces dependency on the model providers. In addition, the initial implementation of AI capabilities using the connectors becomes a drag and drop experience, so that developers can quickly get started. The module exposes useful operations which developers can use to build a request to a large language model (LLM), and to handle the response. Additionally the basis for storing usage data for monitoring purposes is provided. 

This module is compatible with the Conversational UI module, which contains UI elements and logic for a chat interface, next to a set of page elements that enable displaying usage data for monitoring.

Developers who want to connect to another LLM provider or their own service are advised to use the GenAI Commons module as well. This speeds up development and ensures that common principles are considered. Lastly, other developers or consumers of the connector can adapt to it more quickly.

For more information, visit the official documentation.

Documentation

 

See official documentation

Dependencies

Implementation examples

For implementation examples, see the GenAI showcase app.

Connector development examples

Do you want to build your own connector to an LLM with GenAI Commons? Check out the OpenAI or Amazon Bedrock connector for inspiration.

Releases

Version: 1.5.0
Framework Version: 9.24.2
Release Notes: We have improved the documentation texts of entities in the domain model of GenAI Commons.
Version: 1.4.0
Framework Version: 9.24.2
Release Notes: We added a new java action for connector builders that can be used for chat completions to execute the model calling microflow while also taking care of processing functions that the model called. Additionally, it stores the Usage object for a given deployment identifier. Github: https://github.com/mendix/openai-connector/releases/tag/release-genaicommons-1.4.0
Version: 1.3.0
Framework Version: 9.24.2
Release Notes: We have added operations for GenAI connector developers to be able to store token usage data for monitoring purposes. This is a new requirement for GenAI connectors that adhere to the principles of GenAI Commons. For now, this is only applicable for chat completions (text generation) and embeddings operations. If you are working on a customer app and want to show charts in your app at runtime for this usage data, you can use the page and logic from the Conversational UI module. To control whether usage data is stored, refer to the constant StoreUsageMetrics. Additionally, we added a cleanup process that can be controlled using the constant Usage_CleanUpAfterDays (see in-model documentation for more details).
Version: 1.2.0
Framework Version: 9.24.2
Release Notes: We replaced the MediaType attribute with a new attribute FileExtension on the FileContent entity. The MediaType used to be a combination of FileType + FileExtension (e.g. “image/png”). Additionally, “document” was added as a new value for ENUM_FileType. Github: https://github.com/mendix/openai-connector/releases/tag/release-genaicommons-1.2.0
Version: 1.1.0
Framework Version: 9.24.2
Release Notes: We extended the common domain model to define a standard for image generation, embeddings and knowledge base interaction. We also provided a number of microflows for connector development that can be used while creating/handling the responses. Github: https://github.com/mendix/openai-connector/releases/tag/release-genaicommons-1.1.0
Version: 1.0.0
Framework Version: 9.24.2
Release Notes: Initial release. Github: https://github.com/mendix/openai-connector/releases/tag/release-genaicommons-1.0.0