12 #ifndef DOCWIRE_AI_CT2_RUNNER_H
13 #define DOCWIRE_AI_CT2_RUNNER_H
15 #include "ai_ct2_export.h"
20 #include "ai_runner.h"
22 namespace docwire::ai::ct2
39 ct2_runner(
const std::filesystem::path& model_data_path);
46 std::string
process(
const std::string& input)
override;
53 std::vector<double>
embed(
const std::string& input)
override;
Abstract interface for AI model runners.
Class representing the CTranslate2 AI model loaded to memory.
std::string process(const std::string &input) override
Process input text using the model.
std::vector< double > embed(const std::string &input) override
Create embedding for the input text using the model.
ct2_runner(const std::filesystem::path &model_data_path)
Constructor. Loads model to memory.
virtual void unload() override
Unload the model and free associated resources. –!Must be thread-safe!– and safe to call concurrently...