feat: predictor works

This commit is contained in:
Anatoly Antonov 2025-06-26 01:15:37 +03:00
parent 11be8f351f
commit 7a9f81e527
20 changed files with 1357 additions and 1794 deletions

View file

@ -71,10 +71,10 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if len(elem) == 0 {
// Leaf node.
switch r.Method {
case "POST":
case "GET":
s.handlePerformPredictionRequest([0]string{}, elemIsEscaped, w, r)
default:
s.notAllowed(w, r, "POST")
s.notAllowed(w, r, "GET")
}
return
@ -205,9 +205,9 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) {
if len(elem) == 0 {
// Leaf node.
switch method {
case "POST":
case "GET":
r.name = PerformPredictionOperation
r.summary = "Perform preidction"
r.summary = "Perform prediction"
r.operationID = "performPrediction"
r.pathPattern = "/api/v1/prediction"
r.args = args