44#include < memory>
55#include < string>
66#include < unordered_map>
7- #include " cortex-common/local_enginei .h"
7+ #include " cortex-common/EngineI .h"
88#include " json/json.h"
99#include " services/engine_service.h"
1010#include " utils/process/utils.h"
@@ -16,11 +16,16 @@ struct ServerAddress {
1616 int port;
1717 cortex::process::ProcessInfo process_info;
1818};
19- class LocalEngine : public LocalEngineI {
19+ class LocalEngine : public EngineI {
2020 public:
2121 LocalEngine (EngineService& engine_service, TaskQueue& q)
2222 : engine_service_(engine_service), q_(q) {}
2323 ~LocalEngine ();
24+
25+ void Load (EngineLoadOption opts) final {}
26+
27+ void Unload (EngineUnloadOption opts) final {}
28+
2429 void HandleChatCompletion (
2530 std::shared_ptr<Json::Value> json_body,
2631 std::function<void (Json::Value&&, Json::Value&&)>&& callback) final ;
@@ -42,6 +47,22 @@ class LocalEngine : public LocalEngineI {
4247 std::shared_ptr<Json::Value> jsonBody,
4348 std::function<void (Json::Value&&, Json::Value&&)>&& callback) final ;
4449
50+ bool SetFileLogger (int max_log_lines, const std::string& log_path) final {
51+ return true ;
52+ }
53+ void SetLogLevel (trantor::Logger::LogLevel logLevel) final {}
54+
55+ // Stop inflight chat completion in stream mode
56+ void StopInferencing (const std::string& model_id) final {}
57+
58+ void HandleRouteRequest (
59+ std::shared_ptr<Json::Value> json_body,
60+ std::function<void (Json::Value&&, Json::Value&&)>&& callback) final {}
61+
62+ void HandleInference (
63+ std::shared_ptr<Json::Value> json_body,
64+ std::function<void (Json::Value&&, Json::Value&&)>&& callback) final {}
65+
4566 private:
4667 std::unordered_map<std::string, ServerAddress> server_map_;
4768 EngineService& engine_service_;
0 commit comments