|
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
|
This class is intended to load a Llama model with its correct model path and respective configuration and run inference on the prompt supplied along with the model configuration. More...
#include <llama_runner.h>
Public Member Functions | |
| llama_runner (const model_inference_config &config) | |
| std::string | process (const std::string &input) override |
| Synchronously process input and return generated text. More... | |
| std::vector< double > | embed (const std::string &input) override |
| Generate an embedding for the given input. More... | |
| virtual void | unload () override |
| Unload the model and free associated resources. –!Must be thread-safe!– and safe to call concurrently with process()/embed(). | |
Public Member Functions inherited from docwire::ai::ai_runner | |
| virtual | ~ai_runner ()=default |
| Virtual destructor. More... | |
Additional Inherited Members | |
Protected Types inherited from docwire::with_pimpl< llama_runner > | |
| using | impl_type = pimpl_impl< llama_runner > |
Protected Member Functions inherited from docwire::with_pimpl< llama_runner > | |
| impl_type * | create_impl (Args &&... args) |
| with_pimpl (Args &&... args) | |
| with_pimpl (with_pimpl< llama_runner > &&other) noexcept | |
| with_pimpl (std::nullptr_t) | |
| with_pimpl & | operator= (with_pimpl &&other) noexcept |
| impl_type & | impl () |
| const impl_type & | impl () const |
This class is intended to load a Llama model with its correct model path and respective configuration and run inference on the prompt supplied along with the model configuration.
Definition at line 27 of file llama_runner.h.
|
overridevirtual |
|
overridevirtual |
Synchronously process input and return generated text.
Must be thread-safe.
Implements docwire::ai::ai_runner.