engine/inference_engine.hpp¶
Abstract inference engine interface. More...
Namespaces¶
| Name |
|---|
| sgns |
| sgns::neoswarm |
| sgns::neoswarm::core |
Classes¶
| Name | |
|---|---|
| class | sgns::neoswarm::core::InferenceEngine Abstract interface for all inference backends. |
Detailed Description¶
Abstract inference engine interface.
Date: 2026-05-06
Source code¶
#ifndef NEOSWARM_CORE_ENGINE_INFERENCEENGINE_HPP
#define NEOSWARM_CORE_ENGINE_INFERENCEENGINE_HPP
#include "common/error.hpp"
#include "common/types.hpp"
#include <functional>
#include <string>
namespace sgns::neoswarm::core
{
class InferenceEngine
{
public:
virtual ~InferenceEngine() = default;
virtual outcome::result<void> LoadModel( const std::string& model_path ) = 0;
virtual outcome::result<InferenceResponse> Infer( const Task& task ) = 0;
virtual outcome::result<void> StreamInfer( const Task& task,
std::function<void( const std::string& token )> callback ) = 0;
virtual bool IsLoaded() const = 0;
virtual std::string BackendName() const = 0;
};
} // namespace sgns::neoswarm::core
#endif // NEOSWARM_CORE_ENGINE_INFERENCEENGINE_HPP
Updated on 2026-07-25 at 22:56:57 +0000