Skip to main content
The concept of a module sidecar is to allow us have shared code in a module that other modules can use. The implementation of sidecars is in the module runtime actions. Basically in your module.yml you would refer to one or more module sidecars, these would be the URI’s of modules that you want downloaded alongside your module. For example:
# A very simple first module that isn't trainable

slug: llm-taxonomy-module
orgSlug: kodexa
version: 1.0.0
type: store
storeType: MODEL
name: LLM Taxonomy Module
metadata:
  type: module
  moduleRuntimeRef: kodexa/base-module-runtime
  moduleSidecars:
  - kodexa/kodexa-langchain-module:1.0.0
In this snippet of the llm-taxonomy-module we see that we want to have the kodexa-langchain-module available as a sidecar. With this in place you can now import classes from the module that is part of this module, for example in your llm-taxonomy-module you can use
from kodexa_langchain.utils import get_bedrock_client
bedrock_client = get_bedrock_client(region="us-east-1")