The concept of a model sidecar is to allow us have shared code in a model that other models can use. The implementation of sidecars is in the model runtime actions. Basically in your model.yml you would refer to one or more model sidecars, these would be the URI’s of models that you want downloaded alongside your model. For example:
Copy
Ask AI
# A very simple first model that isn't trainableslug: llm-taxonomy-modelorgSlug: kodexaversion: 1.0.0type: storestoreType: MODELname: LLM Taxonomy Modelmetadata: type: model modelRuntimeRef: kodexa/base-model-runtime modelSidecars: - kodexa/kodexa-langchain-model:1.0.0
In this snippet of the llm-taxonomy-model we see that we want to have the kodexa-langchain-model available as a sidecar. With this in place you can now import classes from the module that is part of this model, for example in your llm-taxonomy-model you can use
Copy
Ask AI
from kodexa_langchain.utils import get_bedrock_clientbedrock_client = get_bedrock_client(region="us-east-1")