Skip to content

Commit

Permalink
fix empty embedding error
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianliechti committed Aug 23, 2024
1 parent bcfad3c commit de59618
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/openai/handler_embeddings.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package openai

import (
"encoding/json"
"errors"
"net/http"
)

Expand Down Expand Up @@ -30,7 +31,7 @@ func (h *Handler) handleEmbeddings(w http.ResponseWriter, r *http.Request) {
}

if len(inputs) == 0 {
writeError(w, http.StatusBadRequest, err)
writeError(w, http.StatusBadRequest, errors.New("no input provided"))
return
}

Expand Down

0 comments on commit de59618

Please sign in to comment.