-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use different interface for remote engine
- Loading branch information
1 parent
90694c4
commit a7e4659
Showing
8 changed files
with
140 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
#pragma once | ||
|
||
#include <functional> | ||
#include <memory> | ||
|
||
#include "json/value.h" | ||
#include "trantor/utils/Logger.h" | ||
class RemoteEngineI { | ||
public: | ||
virtual ~RemoteEngineI() {} | ||
|
||
virtual void HandleChatCompletion( | ||
std::shared_ptr<Json::Value> json_body, | ||
std::function<void(Json::Value&&, Json::Value&&)>&& callback) = 0; | ||
virtual void HandleEmbedding( | ||
std::shared_ptr<Json::Value> json_body, | ||
std::function<void(Json::Value&&, Json::Value&&)>&& callback) = 0; | ||
virtual void LoadModel( | ||
std::shared_ptr<Json::Value> json_body, | ||
std::function<void(Json::Value&&, Json::Value&&)>&& callback) = 0; | ||
virtual void UnloadModel( | ||
std::shared_ptr<Json::Value> json_body, | ||
std::function<void(Json::Value&&, Json::Value&&)>&& callback) = 0; | ||
virtual void GetModelStatus( | ||
std::shared_ptr<Json::Value> json_body, | ||
std::function<void(Json::Value&&, Json::Value&&)>&& callback) = 0; | ||
|
||
// Get list of running models | ||
virtual void GetModels( | ||
std::shared_ptr<Json::Value> jsonBody, | ||
std::function<void(Json::Value&&, Json::Value&&)>&& callback) = 0; | ||
|
||
// Get available remote models | ||
virtual Json::Value GetRemoteModels() = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters