Skip to content

Commit

Permalink
change request endpoint to /infer
Browse files Browse the repository at this point in the history
  • Loading branch information
bparees committed Aug 14, 2023
1 parent feeeac1 commit 0b12028
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/wisdom/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func newStartServerCommand() *cobra.Command {
h.BearerTokens[t] = true
}

r.HandleFunc("/prompt_request", h.PromptRequestHandler).Methods("POST")
r.HandleFunc("/infer", h.InferHandler).Methods("POST")

log.Infof("Default model provider: %s\n", h.DefaultProvider)
log.Infof("Default model: %s\n", h.DefaultModel)
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/inference_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/openshift/wisdom/pkg/model"
)

func (h *Handler) PromptRequestHandler(w http.ResponseWriter, r *http.Request) {
func (h *Handler) InferHandler(w http.ResponseWriter, r *http.Request) {
if !h.hasValidBearerToken(r) {
http.Error(w, "No valid bearer token found", http.StatusUnauthorized)
return
Expand Down

0 comments on commit 0b12028

Please sign in to comment.