openmanus.cpp/include/tools/python_execute.h

27 lines
599 B
C++
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef OPENMANUS_TOOLS_PYTHON_EXECUTE_H
#define OPENMANUS_TOOLS_PYTHON_EXECUTE_H
#include "../tool_base.h"
namespace openmanus {
/**
* @class PythonExecute
* @brief Python执行工具用于执行Python代码
*/
class PythonExecute : public ToolBase {
public:
PythonExecute();
virtual ~PythonExecute() = default;
/**
* @brief 执行Python代码
* @param params 工具参数包含code字段
* @return 执行结果
*/
virtual mcp::json execute(const mcp::json& params) override;
};
} // namespace openmanus
#endif // OPENMANUS_TOOLS_PYTHON_EXECUTE_H