MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / requires_npu_access

Function requires_npu_access

src/server/server.cpp:160–170  ·  view source on GitHub ↗

Helper function to check if an endpoint requires NPU access

Source from the content-addressed store, hash-verified

158
159// Helper function to check if an endpoint requires NPU access
160bool requires_npu_access(const std::string& method, const std::string& path) {
161 // NPU-intensive endpoints that should be restricted to one user at a time
162 if (method == "POST") {
163 return path == "/api/generate" ||
164 path == "/api/chat" ||
165 path == "/v1/chat/completions" ||
166 path == "/v1/audio/transcriptions" ||
167 path == "/v1/embeddings";
168 }
169 return false;
170}
171
172///@brief HttpSession class implementation
173///@param socket the socket

Callers 1

handle_requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected