|
@@ -627,14 +627,9 @@ func (s *Server) completion(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
flusher.Flush()
|
|
|
} else {
|
|
|
- // Send the final response
|
|
|
- doneReason := "stop"
|
|
|
- if seq.doneReason == "limit" {
|
|
|
- doneReason = "length"
|
|
|
- }
|
|
|
if err := json.NewEncoder(w).Encode(&llm.CompletionResponse{
|
|
|
Done: true,
|
|
|
- DoneReason: doneReason,
|
|
|
+ DoneReason: seq.doneReason,
|
|
|
PromptEvalCount: seq.numPromptInputs,
|
|
|
PromptEvalDuration: seq.startGenerationTime.Sub(seq.startProcessingTime),
|
|
|
EvalCount: seq.numPredicted,
|