Changelogs
v0.0.18
Currently under beta testing:
- 0.0.18-beta1
Model Chaining
Model chaining allows you to chain models together so that the output of one model can be the input to another model. For all the models in the chain, all the request and entities in the model input are the same.
ModelChainComponent
ChainedModelInput
This is the input for any models within a model chain. It’s a child class of the ModelInput and has two additional properties:
upstream_model_output
: the output of the upstream modelupstream_model_name
: the name of the upstream model
Support dict as model output
Starting from v0.0.18, Wyvern will support serializable dictionary as model output.
If the model output is a dictionary, wyvern will generate the same number of
model events as the number of keys in the dictionary. For each
model event (ModelEventData), a new
optional property model_key
is added to reprent the key of in the
dictionary. The ModelEventData.model_output
will be the value of the key in the
model output.
Model output cache
Now ModelComponent initialization can take cache_output
as an optional
input. If cache_output
is set to True
, the model output will be cached.
The default value is True.
WyvernRequest has a new global map model_output_map
which is used to
cache model output. The key of the map is the model name. The value is another
map (the inner map). They key of the inner map is the entity identifier and
the value is the model output value.
Component.get_model_output
Within any component, now you can use self.get_model_output
to get the
model cached model output.
Was this page helpful?