BaseMCPTool: remove duplicate override definitions
parent
970c9a9d53
commit
648b73e055
|
@ -16,11 +16,13 @@ const char* NEXT_STEP_PROMPT = R"(You can interact with the computer using pytho
|
|||
|
||||
Based on user needs, proactively select the most appropriate tool or combination of tools. For complex tasks, you can break down the problem and use different tools step by step to solve it.
|
||||
|
||||
After using each tool, clearly explain the execution results and suggest the next steps. If you finish the current step, call `terminate` to switch to next step.
|
||||
After using each tool, clearly explain the execution results and suggest the next steps.
|
||||
|
||||
Unless required by user, you should always at most use one tool at a time, observe the result and then choose the next tool or action.
|
||||
|
||||
Detect the language of the user input and respond in the same language for thoughts.)";
|
||||
Detect the language of the user input and respond in the same language for thoughts.
|
||||
|
||||
Basically the user will not reply to you, you should make decisions and determine whether current step is finished. If you finish the current step, call `terminate`.)";
|
||||
} // namespace humanus
|
||||
|
||||
namespace toolcall {
|
||||
|
|
|
@ -100,10 +100,6 @@ struct BaseTool {
|
|||
|
||||
// Execute the tool with given parameters.
|
||||
struct BaseMCPTool : BaseTool {
|
||||
std::string name;
|
||||
std::string description;
|
||||
json parameters;
|
||||
|
||||
std::unique_ptr<mcp::client> _client;
|
||||
|
||||
BaseMCPTool(const std::string& name, const std::string& description, const json& parameters)
|
||||
|
|
|
@ -26,7 +26,7 @@ struct ToolCollection {
|
|||
ToolResult execute(const std::string& name, const json& args) const {
|
||||
auto tool_iter = tools_map.find(name);
|
||||
if (tool_iter == tools_map.end()) {
|
||||
return ToolError("Tool " + name + " is invalid");
|
||||
return ToolError("Tool `" + name + "` not found");
|
||||
}
|
||||
try {
|
||||
return tool_iter->second->execute(args);
|
||||
|
|
Loading…
Reference in New Issue