|
DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
|
Abstract interface for AI model runners. More...
#include <ai_runner.h>
Public Member Functions | |
| virtual | ~ai_runner ()=default |
| Virtual destructor. More... | |
| virtual std::string | process (const std::string &input)=0 |
| Synchronously process input and return generated text. More... | |
| virtual std::vector< double > | embed (const std::string &input)=0 |
| Generate an embedding for the given input. More... | |
| virtual void | unload ()=0 |
| Unload the model and free associated resources. –!Must be thread-safe!– and safe to call concurrently with process()/embed(). | |
Abstract interface for AI model runners.
Implementations load / run / unload AI models and expose a minimal synchronous API for text processing and embedding generation.
Thread-safety requirements (MANDATORY for all derived classes):
Definition at line 42 of file ai_runner.h.
|
virtualdefault |
Virtual destructor.
Implementations should ensure safe destruction semantics in the presence of concurrent calls (see class-level thread-safety requirements).
|
pure virtual |
Generate an embedding for the given input.
Must be thread-safe.
Implemented in docwire::ai::llama::llama_runner, and docwire::ai::ct2::ct2_runner.
|
pure virtual |
Synchronously process input and return generated text.
Must be thread-safe.
Implemented in docwire::ai::llama::llama_runner, and docwire::ai::ct2::ct2_runner.