forked from xiaozhi/xiaozhi-esp32
Add MCP server
This commit is contained in:
@@ -115,6 +115,11 @@ void Protocol::SendIotStates(const std::string& states) {
|
||||
SendText(message);
|
||||
}
|
||||
|
||||
void Protocol::SendMcpMessage(const std::string& payload) {
|
||||
std::string message = "{\"session_id\":\"" + session_id_ + "\",\"type\":\"mcp\",\"payload\":" + payload + "}";
|
||||
SendText(message);
|
||||
}
|
||||
|
||||
bool Protocol::IsTimeout() const {
|
||||
const int kTimeoutSeconds = 120;
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
|
||||
Reference in New Issue
Block a user