-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use cortex python engine interface (#14)
* fix: use cortex python engine interface * fix: reorder functions --------- Co-authored-by: vansangpfiev <[email protected]>
- Loading branch information
1 parent
d7b2063
commit 5b5ac31
Showing
5 changed files
with
33 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include <functional> | ||
#include <memory> | ||
|
||
#include "json/value.h" | ||
|
||
class CortexPythonEngineI { | ||
public: | ||
virtual ~CortexPythonEngineI() {} | ||
|
||
virtual bool IsSupported(const std::string& f) { | ||
if (f == "ExecutePythonFile" || f == "HandlePythonFileExecutionRequest") { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
virtual void ExecutePythonFile(std::string binary_execute_path, | ||
std::string file_execution_path, | ||
std::string python_library_path) = 0; | ||
|
||
virtual void HandlePythonFileExecutionRequest( | ||
std::shared_ptr<Json::Value> json_body, | ||
std::function<void(Json::Value&&, Json::Value&&)>&& callback) = 0; | ||
}; |
This file was deleted.
Oops, something went wrong.
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