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:
Copy
Ask AI
# A very simple first moduleslug: llm-taxonomy-moduleorgSlug: kodexaversion: 1.0.0type: storestoreType: MODELname: LLM Taxonomy Modulemetadata: type: module moduleRuntimeRef: kodexa/base-module-runtime moduleSidecars: - kodexa/kodexa-langchain-module
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
Copy
Ask AI
from kodexa_langchain.utils import get_bedrock_clientbedrock_client = get_bedrock_client(region="us-east-1")