llm: Make "POST predict" error message more informative
"POST predict" basically means that the runner has crashed, which can have many reasons. However, many people think this is a specific error and either report only this message or group together unrelated bugs. This replaces it with a more friendly and helpful message.
This commit is contained in:
parent
0478d440f0
commit
5e8041f59b
@ -798,7 +798,8 @@ func (s *llmServer) Completion(ctx context.Context, req CompletionRequest, fn fu
|
|||||||
|
|
||||||
res, err := http.DefaultClient.Do(serverReq)
|
res, err := http.DefaultClient.Do(serverReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("POST predict: %v", err)
|
slog.Error("post predict", "error", err)
|
||||||
|
return errors.New("runner has crashed, check the log for additional detail")
|
||||||
}
|
}
|
||||||
defer res.Body.Close()
|
defer res.Body.Close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user