mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
show a more descriptive error in the client if it is newer than the server (#8351)
This commit is contained in:
parent
6ae2adc1af
commit
8bccae4f92
2 changed files with 5 additions and 1 deletions
|
@ -33,6 +33,7 @@ var (
|
|||
errOnlyOneAdapterSupported = errors.New("only one adapter is currently supported")
|
||||
errOnlyGGUFSupported = errors.New("supplied file was not in GGUF format")
|
||||
errUnknownType = errors.New("unknown type")
|
||||
errNeitherFromOrFiles = errors.New("neither 'from' or 'files' was specified")
|
||||
)
|
||||
|
||||
func (s *Server) CreateHandler(c *gin.Context) {
|
||||
|
@ -95,7 +96,7 @@ func (s *Server) CreateHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
} else {
|
||||
ch <- gin.H{"error": "neither 'from' or 'files' was specified", "status": http.StatusBadRequest}
|
||||
ch <- gin.H{"error": errNeitherFromOrFiles.Error(), "status": http.StatusBadRequest}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue