12 #ifndef DOCWIRE_AI_MODEL_CHAIN_ELEMENT_H
13 #define DOCWIRE_AI_MODEL_CHAIN_ELEMENT_H
15 #include "ai_runner.h"
16 #include "chain_element.h"
17 #include "ai_export.h"
25 enum class model_lifetime_policy
49 model_chain_element(
const std::string& prompt, std::shared_ptr<ai_runner> runner, model_lifetime_policy lifetime = model_lifetime_policy::persistent);
83 bool is_leaf()
const override {
return false; }
87 std::shared_ptr<ai_runner> m_model_runner;
88 model_lifetime_policy m_model_lifetime;
A model chain element that processes input text using a model runner.
continuation operator()(message_ptr msg, const message_callbacks &emit_message) override
Construct a model chain element with a default model runner.
model_chain_element(const std::string &prompt, std::shared_ptr< ai_runner > runner, model_lifetime_policy lifetime=model_lifetime_policy::persistent)
Construct a model chain element.
bool is_leaf() const override
Check if the model chain element is a leaf.